@media screen {
  :root {
    color-scheme: light;
    --forest: #123c34;
    --green: #1c6550;
    --lime: #ddf7ae;
    --ink: #162d28;
    --muted: #4f625b;
    --bg: #f7f8f4;
    --line: #dce5dc;
    --surface: #fff;
    --soft: #eaf2e9;
    --radius: 20px;
    --gutter: clamp(16px, 3.5vw, 52px);
    --layout: min(1200px, calc(100% - 2 * var(--gutter)));
  }

  body {
    background: var(--bg);
    color: var(--ink);
  }

  body > header,
  body > .main-nav,
  body > .system-notice,
  #app,
  body > .seo-guide,
  body > .site-about,
  body > footer,
  #na-history-demo {
    width: var(--layout);
    max-width: none;
    margin-inline: auto;
  }

  body > header {
    height: 76px;
    padding: 0;
    border: 0;
    gap: 14px;
  }

  body > header .brand {
    color: var(--ink);
    font-size: 22px;
    letter-spacing: -.05em;
  }

  body > header .brand small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 9px;
    letter-spacing: .16em;
  }

  body > header .brandmark {
    background: var(--forest);
    color: var(--lime);
    border-radius: 13px;
  }

  body > header .header-note { display: none; }

  body > header .pill {
    color: var(--forest);
    background: var(--soft);
    border: 0;
    font-weight: 700;
  }

  body > .main-nav {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-rows: 1fr;
    align-items: stretch;
    gap: 4px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--surface);
  }

  body > .main-nav > :is(a, button) {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    min-height: 44px;
    padding: 9px 8px;
    border: 0;
    border-radius: 10px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
  }

  body > .main-nav :is(a, button):hover,
  body > .main-nav :is([aria-current="page"], .active) {
    background: var(--soft);
    color: var(--forest);
  }

  body > .main-nav .topic-nav-link {
    margin-left: 0;
  }

  #app {
    min-height: 54vh;
    padding: 22px 0 52px;
  }

  .welcome {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(250px, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 360px;
    margin-bottom: 18px;
    padding: clamp(26px, 3.1vw, 42px) clamp(26px, 4.4vw, 60px);
    border-radius: 26px;
    background: radial-gradient(ellipse at 96% 12%, #28604d 0, transparent 55%), linear-gradient(128deg, #102f2a, #163c31);
    color: var(--surface);
  }

  .welcome::after {
    position: absolute;
    z-index: -1;
    inset: 0 0 0 50%;
    background: radial-gradient(#e1f6d3 0.7px, transparent 0.9px) 0 0 / 15px 15px;
    mask-image: linear-gradient(to right, transparent, #000);
    opacity: .2;
    content: "";
  }

  .welcome-copy { min-width: 0; }

  .welcome .welcome-kicker {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #c6e2cb;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
  }

  .welcome-kicker span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 0 0 4px #ddf7ae26;
  }

  .welcome h1 {
    margin: 16px 0 14px;
    color: var(--surface);
    font: 800 clamp(36px, 5vw, 64px)/1.06 Manrope, Arial, sans-serif;
    letter-spacing: -.065em;
  }

  .welcome h1 span { color: var(--lime); }

  .welcome .welcome-lead {
    max-width: 35rem;
    color: #e0eee2;
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.55;
  }

  .welcome-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 15px;
    margin-top: 21px;
  }

  .welcome-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    border-radius: 11px;
    padding: 9px 14px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
  }

  .welcome-start {
    background: var(--lime);
    color: #1a3829;
  }

  .welcome-start:hover { background: #eefacb; }
  .welcome-more { color: #f1f7ef; }
  .welcome-more:hover { background: #ffffff16; }
  .welcome a:focus-visible { outline-color: var(--lime); }

  .welcome-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin: 21px 0 0;
    padding: 0;
    color: #d6e9d9;
    list-style: none;
    font-size: 13px;
  }

  .welcome-facts li + li { border-left: 1px solid #d6e9d94d; padding-left: 16px; }
  .welcome-facts strong { color: #fff; font-weight: 700; }

  .welcome-visual {
    position: relative;
    display: grid;
    min-height: 280px;
    place-items: center;
  }

  .welcome-orbits {
    position: absolute;
    width: min(125%, 440px);
    height: auto;
    color: #d9f6a85c;
    pointer-events: none;
  }

  .study-card {
    position: relative;
    width: min(100%, 305px);
    padding: 16px;
    transform: rotate(-4deg);
    color: var(--ink);
    background: #f7faf1;
    border: 1px solid #ffffff9c;
    border-radius: 21px;
    box-shadow: 0 22px 42px #0820197d, 8px 8px 0 #a9d99b32;
  }

  .study-card-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin: 1px 1px 13px;
  }

  .study-card-heading span {
    display: block;
    margin-bottom: 3px;
    color: #50725d;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .15em;
  }

  .study-card-heading strong { font: 800 19px/1.2 Manrope, Arial, sans-serif; }

  .study-card-heading b {
    padding: 7px 8px;
    border-radius: 9px;
    background: #e1efcd;
    color: #2b5437;
    font: 800 15px/.9 Manrope, Arial, sans-serif;
    text-align: center;
  }

  .study-card-heading small { font-size: 8px; }

  .study-step {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    margin-top: 6px;
    padding: 5px 9px 5px 6px;
    background: #fff;
    border: 1px solid #dbe9d9;
    border-radius: 9px;
    font-size: 13px;
  }

  .study-step span {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 7px;
    background: #edf5e7;
    color: #315f43;
    font-size: 11px;
    font-weight: 700;
  }

  .study-step i { color: #4b7255; font-style: normal; }

  .dashboard-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin-bottom: 34px;
    border-radius: 16px;
    background: var(--surface);
  }

  .dashboard-strip > div {
    display: grid;
    align-content: center;
    gap: 1px;
    padding: 12px 19px;
  }

  .dashboard-strip > div + div { border-left: 1px solid var(--line); }
  .dashboard-strip b { color: var(--forest); font-size: 24px; }
  .dashboard-strip span { max-width: none; }

  .home-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 23px;
  }

  .home-grid > aside {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 16px;
  }

  .home-grid .section-head h2,
  #na-history-demo .section-head h2 {
    font: 800 clamp(23px, 3vw, 33px)/1.15 Manrope, Arial, sans-serif;
    letter-spacing: -.045em;
  }

  #dersler,
  #konu-testleri { scroll-margin-top: 22px; }

  .tests,
  #na-history-demo .topics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

  .test-card,
  #na-history-demo article.topic {
    min-width: 0;
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: 0 3px 12px #183b2d07;
  }

  .test-card { min-height: 235px; }
  .test-card:hover { transform: none; border-color: #a9c4b1; box-shadow: 0 8px 20px #183b2d12; }
  .test-card .subject-icon { width: 47px; height: 47px; border-radius: 13px; }
  .test-card .card-index { color: #64746d; }
  .test-card h3 { font-size: 21px; letter-spacing: -.025em; }
  .test-card p { margin-bottom: 12px; font-size: 14px; }
  .test-card .card-bottom { gap: 8px; padding-top: 12px; }
  .test-card .start { min-height: 42px; padding: 7px 10px; }
  .test-card .catalog-link { font-size: 13px; font-weight: 600; }

  .test-card.mix {
    border-color: #bad7b7;
    background: #eaf4e5;
    color: var(--ink);
    --color: #206048;
    --tint: #d7ebcf;
  }

  .test-card.mix :is(p, .card-meta, .card-index) { color: #456554; }
  .test-card.mix .card-bottom { border-color: #ccdeca; }
  .test-card.mix .start { color: white; background: var(--forest); }

  .home-grid .side-feature {
    display: block;
    border-radius: var(--radius);
    padding: clamp(18px, 3vw, 26px);
    background: #193d34;
  }

  .home-grid .side-feature h2 { font-size: clamp(21px, 2.4vw, 28px); }
  .home-grid .side-feature .eyebrow { margin-bottom: 10px; }
  .home-grid .info { margin: 0; }

  #na-history-demo {
    --paper: var(--bg);
    --panel: var(--surface);
    --sub: var(--muted);
    --hero: var(--forest);
    background: transparent;
  }

  #na-history-demo .wrap {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 22px 0 50px;
  }

  #na-history-demo .subjects {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 15px;
    padding: 0;
  }

  #na-history-demo .subject {
    display: grid;
    gap: 2px;
    justify-content: start;
    min-height: 57px;
    padding: 8px 12px;
    color: var(--ink);
    white-space: normal;
    background: var(--surface);
    border-radius: 12px;
  }

  #na-history-demo .subject span { color: var(--muted); }
  #na-history-demo .subject.selected { color: var(--forest); background: #e3f0e1; border-color: #99bda3; }

  #na-history-demo .hero,
  .result-banner {
    border-radius: 24px;
    background: radial-gradient(ellipse at 100% 0%, #2a604b, transparent 58%), #163b31;
  }

  #na-history-demo .hero {
    gap: 20px;
    padding: clamp(23px, 4vw, 48px);
  }

  #na-history-demo .hero h1 {
    font-size: clamp(30px, 4vw, 53px);
    letter-spacing: -.055em;
    line-height: 1.12;
  }

  #na-history-demo .hero p { color: #dfede1; }
  #na-history-demo .hero .primary { color: #20402e; background: var(--lime); }
  #na-history-demo .hero .primary:focus-visible { outline-color: var(--lime); }
  #na-history-demo .topic-number { color: var(--green); font: 800 21px Manrope, Arial, sans-serif; }
  #na-history-demo .topic .num { color: var(--forest); }
  #na-history-demo .topic h3 { overflow-wrap: anywhere; }

  #na-history-demo .topic a.primary {
    padding: 10px 12px;
    color: var(--forest);
    background: var(--soft);
    border-radius: 10px;
    line-height: 1.4;
  }

  #na-history-demo .topic a.primary:hover { background: #d9ebd9; }
  #na-history-demo footer { margin: 0; padding: 18px 0; }

  .launch-card {
    margin-block: 12px;
    padding: clamp(20px, 4vw, 38px);
    border-radius: 23px;
    border-color: var(--line);
    box-shadow: 0 6px 20px #183b2d0a;
  }

  .launch-card h1 {
    font-size: clamp(29px, 4vw, 43px);
    line-height: 1.13;
    letter-spacing: -.045em;
    overflow-wrap: anywhere;
  }

  .launch-card h2 { margin-top: 27px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 19px; }
  .launch-card .primary { margin: 12px 8px 0 0; }

  .exam-heading {
    margin-bottom: 14px;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
  }

  .exam-heading h1 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -.045em; }
  .exam-grid { gap: 16px; }
  .question-card, .map-card { border-radius: var(--radius); box-shadow: 0 4px 15px #183b2d08; }
  .question-card { padding: clamp(16px, 3vw, 34px); }
  .question-text { font-size: clamp(18px, 2.1vw, 24px); line-height: 1.48; }
  .options { gap: 8px; }
  .option { min-height: 52px; padding: 9px 12px; }
  .option.selected { border-width: 1px; box-shadow: inset 0 0 0 1px var(--green); background: #eaf4e7; }
  .option .letter { border-radius: 8px; }
  .question-actions button { min-height: 44px; }
  .score-ring::before { background: #163b31; }

  body > .seo-guide,
  body > .site-about {
    margin-block: 0 16px;
    padding: clamp(16px, 3vw, 26px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
  }

  body > footer { padding-block: 20px; }
  body > .document-page { margin-inline: auto; }

  @media (max-width: 850px) {
    .tests, #na-history-demo .topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .welcome { grid-template-columns: minmax(0, 1.5fr) minmax(175px, 1fr); }
    .welcome-visual { min-height: 230px; }
    .study-card { padding: 11px; }
    .study-card-heading strong { font-size: 16px; }
  }

  @media (max-width: 620px) {
    body > header { height: 64px; }
    body > header .brand { font-size: 19px; }
    body > header .pill { display: none; }
    body > .main-nav {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      grid-auto-flow: row;
    }
    body > .main-nav:has(> :nth-child(4):last-child) {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    #main-nav > :nth-child(7):last-child { grid-column: 2; }
    body > .main-nav > :is(a, button) { padding-inline: 5px; font-size: 12px; }
    #app { padding-top: 15px; }
    .welcome { grid-template-columns: minmax(0, 1fr); gap: 14px; min-height: 0; padding: 24px 19px; border-radius: 19px; }
    .welcome h1 { font-size: clamp(32px, 8.3vw, 49px); }
    .welcome-visual { display: none; }
    .welcome-actions { gap: 4px 7px; margin-top: 18px; }
    .welcome-actions a { padding-inline: 9px; font-size: 13px; }
    .welcome-facts { gap: 5px 10px; margin-top: 20px; font-size: 12px; }
    .welcome-facts li + li { padding-left: 10px; }
    .dashboard-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 25px; }
    .dashboard-strip > div { padding: 8px 13px; }
    .dashboard-strip > div:nth-child(odd) { border-left: 0; }
    .dashboard-strip > div:nth-child(n+3) { border-top: 1px solid var(--line); }
    .home-grid > aside { grid-template-columns: minmax(0, 1fr); }
    #na-history-demo .wrap { padding-top: 15px; }
    #na-history-demo .subjects { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    #na-history-demo .subject { min-height: 49px; padding: 6px 8px; font-size: 12px; }
    #na-history-demo .subject span { font-size: 11px; }
    .exam-heading { gap: 10px; padding: 12px; }
  }

  @media (max-width: 470px) {
    .tests, #na-history-demo .topics { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .test-card { min-height: 0; padding: 15px; }
    #na-history-demo .hero { padding: 20px; }
    #na-history-demo article.topic { padding: 16px; }
  }

  @media (prefers-reduced-motion: reduce) {
    .test-card, .option, #na-history-demo .topic { transition: none; }
  }
}
