/* Exam guide pages (imat-preparation, imat-hazirlik, cent-s-preparation, cent-s-hazirlik).
   Self-contained: does not depend on styles.css so the pages stay light and fast. */
:root {
  --g-paper: #f7faf6;
  --g-surface: #ffffff;
  --g-soft: #e8f3e8;
  --g-ink: #1f3328;
  --g-muted: #5d725f;
  --g-line: #dbe8db;
  --g-brand: #245f45;
  --g-brand-strong: #123b2d;
  --g-accent: #66a47b;
  --g-gold: #c98f2d;
  --g-bad: #b5523b;
  --g-bar-1: #245f45;
  --g-bar-2: #4f8f67;
  --g-bar-3: #86b993;
  --g-bar-4: #c9a45c;
  --g-bar-5: #e3cf9a;
  --g-radius: 18px;
  --g-serif: 'Noto Serif', Georgia, 'Times New Roman', serif;
  --g-sans: 'DM Sans', 'Manrope', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  color-scheme: light;
}
html[data-theme="dark"] {
  --g-paper: #0d130d;
  --g-surface: #151d15;
  --g-soft: #1b2c1b;
  --g-ink: #e6efe6;
  --g-muted: #a3b6a3;
  --g-line: #2d392d;
  --g-brand: #8fd1a3;
  --g-brand-strong: #c9ecd3;
  --g-accent: #66a47b;
  --g-gold: #e0b45e;
  --g-bad: #e58a72;
  --g-bar-1: #8fd1a3;
  --g-bar-2: #5fae7b;
  --g-bar-3: #3f8158;
  --g-bar-4: #d6ad5a;
  --g-bar-5: #8c7440;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--g-paper);
  color: var(--g-ink);
  font: 400 17px/1.65 var(--g-sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--g-brand); text-underline-offset: 3px; }
a:hover { color: var(--g-brand-strong); }
img { max-width: 100%; height: auto; }

/* Header */
.g-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 24px;
  height: 72px; padding: 0 max(calc((100vw - 1120px) / 2), 20px);
  background: color-mix(in srgb, var(--g-paper) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--g-line);
}
.g-brand img { display: block; width: 190px; height: auto; }
html[data-theme="dark"] .g-brand img { filter: brightness(0) invert(.92); }
.g-nav { display: flex; gap: 22px; margin-left: 12px; font-size: 15px; font-weight: 600; }
.g-nav a { color: var(--g-muted); text-decoration: none; }
.g-nav a:hover, .g-nav a[aria-current="page"] { color: var(--g-ink); }
.g-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.g-lang, .g-theme {
  min-width: 40px; height: 40px; padding: 0 12px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--g-line); border-radius: 999px;
  background: var(--g-surface); color: var(--g-ink);
  font: 700 13px var(--g-sans); text-decoration: none; cursor: pointer;
}
.g-btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 999px;
  font: 700 15px var(--g-sans); text-decoration: none;
  background: var(--g-brand); color: #fff; border: 1px solid var(--g-brand);
}
html[data-theme="dark"] .g-btn { color: #0d1f13; }
.g-btn:hover { background: var(--g-brand-strong); border-color: var(--g-brand-strong); color: #fff; }
html[data-theme="dark"] .g-btn:hover { color: #0d1f13; }
.g-btn.g-btn-ghost { background: transparent; color: var(--g-brand); }
.g-btn.g-btn-ghost:hover { background: var(--g-soft); color: var(--g-brand-strong); }
.g-btn-small { min-height: 40px; padding: 0 16px; font-size: 14px; }

/* Hero */
.g-hero { padding: 64px 20px 36px; }
.g-hero-inner, .g-main { max-width: 860px; margin: 0 auto; }
.g-crumbs { font-size: 14px; color: var(--g-muted); margin-bottom: 18px; }
.g-crumbs a { color: var(--g-muted); }
.g-kicker {
  display: inline-block; margin-bottom: 14px;
  font: 700 12px/1 var(--g-sans); letter-spacing: .14em; text-transform: uppercase;
  color: var(--g-brand);
}
.g-hero h1 {
  margin: 0 0 18px;
  font: 700 clamp(34px, 5.4vw, 54px)/1.08 var(--g-serif);
  letter-spacing: -.02em; color: var(--g-ink);
}
.g-lead { margin: 0 0 26px; font-size: 19px; color: var(--g-muted); max-width: 700px; }
.g-cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.g-updated { margin-top: 18px; font-size: 13px; color: var(--g-muted); }

.g-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 40px 0 0; border: 1px solid var(--g-line); border-radius: var(--g-radius);
  background: var(--g-surface); overflow: hidden;
}
.g-stat { padding: 20px 22px; border-left: 1px solid var(--g-line); }
.g-stat:first-child { border-left: 0; }
.g-stat b { display: block; font: 700 30px/1.1 var(--g-serif); color: var(--g-brand); }
.g-stat span { font-size: 14px; color: var(--g-muted); }

/* Body */
.g-main { padding: 8px 20px 80px; }
.g-main section { padding-top: 44px; }
.g-main h2 {
  margin: 0 0 14px;
  font: 700 clamp(26px, 3.4vw, 34px)/1.2 var(--g-serif); letter-spacing: -.01em;
}
.g-main h3 { margin: 26px 0 8px; font: 700 19px/1.35 var(--g-sans); }
.g-main p { margin: 0 0 14px; }
.g-main ul, .g-main ol { margin: 0 0 14px; padding-left: 22px; }
.g-main li { margin-bottom: 6px; }

/* Share bar: question share per section */
.g-share { margin: 22px 0 10px; }
.g-share-bar {
  display: flex; height: 18px; border-radius: 999px; overflow: hidden;
  background: var(--g-soft);
}
.g-share-bar span { display: block; height: 100%; }
.g-share-bar span + span { border-left: 2px solid var(--g-surface); }
.g-share-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--g-muted); }
.g-share-legend li { display: inline-flex; align-items: center; gap: 7px; margin: 0; }
.g-share-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.g-c1 { background: var(--g-bar-1); } .g-c2 { background: var(--g-bar-2); } .g-c3 { background: var(--g-bar-3); }
.g-c4 { background: var(--g-bar-4); } .g-c5 { background: var(--g-bar-5); }

/* Tables */
.g-table-wrap { overflow-x: auto; margin: 18px 0 8px; border: 1px solid var(--g-line); border-radius: var(--g-radius); background: var(--g-surface); }
.g-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.g-table th, .g-table td { padding: 13px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--g-line); }
.g-table tr:last-child td { border-bottom: 0; }
.g-table th { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--g-muted); background: var(--g-soft); white-space: nowrap; }
.g-table td.g-num, .g-table th.g-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.g-table td:first-child { font-weight: 700; white-space: nowrap; }
.g-table tfoot td { font-weight: 700; background: var(--g-soft); }
.g-pos { color: var(--g-brand); font-weight: 700; }
.g-neg { color: var(--g-bad); font-weight: 700; }
.g-zero { color: var(--g-muted); font-weight: 700; }

.g-note {
  margin: 20px 0; padding: 16px 20px; border-radius: 14px;
  background: var(--g-soft); border-left: 4px solid var(--g-accent); font-size: 16px;
}
.g-note strong { color: var(--g-ink); }

/* Timeline plan */
.g-plan { list-style: none; padding: 0 !important; margin: 20px 0 0; counter-reset: step; }
.g-plan li {
  position: relative; margin: 0; padding: 0 0 24px 58px;
  counter-increment: step;
}
.g-plan li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--g-brand); color: #fff; font: 700 15px var(--g-sans);
}
html[data-theme="dark"] .g-plan li::before { color: #0d1f13; }
.g-plan li::after {
  content: ""; position: absolute; left: 18px; top: 42px; bottom: 4px;
  width: 2px; background: var(--g-line);
}
.g-plan li:last-child::after { display: none; }
.g-plan b { display: block; font-size: 17px; }
.g-plan em { font-style: normal; font-size: 13px; font-weight: 700; color: var(--g-gold); letter-spacing: .04em; text-transform: uppercase; }
.g-plan p { margin: 4px 0 0; color: var(--g-muted); }

/* Feature cards */
.g-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.g-card { padding: 20px; border: 1px solid var(--g-line); border-radius: var(--g-radius); background: var(--g-surface); }
.g-card b { display: block; margin-bottom: 6px; font-size: 16px; }
.g-card p { margin: 0; font-size: 15px; color: var(--g-muted); }

/* FAQ */
.g-faq details { border-bottom: 1px solid var(--g-line); }
.g-faq summary {
  cursor: pointer; list-style: none; padding: 18px 34px 18px 0; position: relative;
  font-weight: 700; font-size: 17px;
}
.g-faq summary::-webkit-details-marker { display: none; }
.g-faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 24px; color: var(--g-brand); }
.g-faq details[open] summary::after { content: "–"; }
.g-faq details p { margin: 0 0 18px; color: var(--g-muted); }

/* Closing CTA */
.g-final {
  margin-top: 56px; padding: 36px 32px; border-radius: 24px;
  background: var(--g-brand-strong); color: #f1f8f2;
}
html[data-theme="dark"] .g-final { background: #173b27; }
.g-final h2 { color: #fff; margin-bottom: 10px; }
.g-final p { color: #cfe3d5; margin-bottom: 22px; }
.g-final .g-btn { background: #f1f8f2; color: #123b2d; border-color: #f1f8f2; }
.g-final .g-btn:hover { background: #fff; color: #123b2d; }
.g-final .g-btn-ghost { background: transparent; color: #f1f8f2; border-color: rgba(241,248,242,.5); }
.g-final .g-btn-ghost:hover { background: rgba(255,255,255,.08); color: #fff; }

.g-sources { font-size: 14px; color: var(--g-muted); }
.g-sources li { margin-bottom: 4px; }

/* Footer */
.g-footer { border-top: 1px solid var(--g-line); padding: 28px 20px 40px; font-size: 14px; color: var(--g-muted); }
.g-footer-inner { max-width: 1120px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; }
.g-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.g-footer a { color: var(--g-muted); }

@media (max-width: 860px) {
  .g-nav { display: none; }
  .g-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-stat:nth-child(3) { border-left: 0; }
  .g-stat:nth-child(n+3) { border-top: 1px solid var(--g-line); }
  .g-cards { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .g-header { height: 62px; gap: 10px; }
  .g-brand img { width: 150px; }
  .g-actions .g-btn-small { display: none; }
  .g-hero { padding-top: 40px; }
  .g-lead { font-size: 17px; }
  .g-stat { padding: 16px; }
  .g-stat b { font-size: 25px; }
  .g-cta-row .g-btn { width: 100%; justify-content: center; }
  .g-final { padding: 28px 22px; }
  .g-table th, .g-table td { padding: 11px 12px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Fixes after review */
.g-theme { padding: 0; width: 40px; }
html[data-theme="dark"] .g-btn.g-btn-ghost { color: var(--g-brand); background: transparent; }
html[data-theme="dark"] .g-btn.g-btn-ghost:hover { background: var(--g-soft); color: var(--g-brand-strong); }
@media (max-width: 640px) {
  /* Section tables become stacked rows: name + numbers, topics underneath */
  .g-sections thead { display: none; }
  .g-sections tbody tr, .g-sections tfoot tr {
    display: grid; grid-template-columns: 1fr auto auto auto; gap: 2px 14px;
    padding: 14px 16px; border-bottom: 1px solid var(--g-line);
  }
  .g-sections tbody tr:last-child { border-bottom: 0; }
  .g-sections td { padding: 0; border: 0; white-space: normal !important; }
  .g-sections td:first-child { white-space: normal; }
  .g-sections td:last-child { grid-column: 1 / -1; color: var(--g-muted); font-size: 14px; margin-top: 4px; }
  .g-sections tfoot tr { background: var(--g-soft); }
  .g-sections tfoot td { background: transparent; }
  .g-sections tfoot td:last-child { color: var(--g-ink); }
  .g-table { font-size: 14px; }
  .g-table td:first-child { white-space: normal; }
  .g-table th { white-space: normal; }
}

/* IMAT score calculator + cut-off pages (added 2026-10-23) */
.g-input {
  width: 64px; min-height: 40px; padding: 6px 8px; text-align: right;
  font: 600 16px/1 var(--g-sans); color: var(--g-ink); background: var(--g-paper);
  border: 1px solid var(--g-line); border-radius: 10px; font-variant-numeric: tabular-nums;
}
.g-input:focus { outline: 2px solid var(--g-accent); outline-offset: 1px; border-color: var(--g-accent); }
.g-calc td { vertical-align: middle; }
.g-calc tr.g-bad-row .g-input { border-color: var(--g-bad); }
.g-error { margin: 0 0 10px; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--g-bad) 12%, transparent); color: var(--g-bad); font-weight: 600; font-size: 15px; }
.g-result {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 28px; align-items: start;
  margin: 18px 0 8px; padding: 22px 24px; border-radius: var(--g-radius);
  background: var(--g-soft); border: 1px solid var(--g-line);
}
.g-result-score span { display: block; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--g-muted); }
.g-result-score b { display: block; font: 700 54px/1.05 var(--g-serif); color: var(--g-brand); font-variant-numeric: tabular-nums; }
.g-result-score small { color: var(--g-muted); font-size: 14px; }
.g-result-list { list-style: none; margin: 0 !important; padding: 0 !important; font-size: 15px; }
.g-result-list li { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px solid var(--g-line); margin: 0; }
.g-result-list li:last-child { border-bottom: 0; }
.g-result-list b { white-space: nowrap; }
.g-result .g-btn { grid-column: 1; justify-self: start; }
.g-sub { display: block; font-weight: 400; font-size: 13px; color: var(--g-muted); }
@media (max-width: 640px) {
  .g-result { grid-template-columns: 1fr; padding: 18px; }
  .g-result-score b { font-size: 46px; }
  .g-input { width: 52px; padding: 6px; }
  .g-calc th, .g-calc td { padding: 9px 7px; }
  .g-result-list li { flex-direction: column; gap: 2px; }
}
@media (max-width: 640px) {
  .g-calc th:nth-child(2), .g-calc td:nth-child(2) { display: none; }
  .g-calc th { font-size: 11px; letter-spacing: .04em; }
}
