:root {
  color-scheme: light;
  --bg: #f7f9f8;
  --paper: #ffffff;
  --text: #202625;
  --muted: #5f6d68;
  --line: #dce3df;
  --accent: #25665c;
  --accent-2: #7a4e18;
  --wash: #eaf3ef;
  --code: #f0f4f2;
  --tr: #fff5dc;
  --shadow: 0 12px 32px rgba(33, 51, 46, 0.08);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121716;
  --paper: #1d2422;
  --text: #e8eeeb;
  --muted: #afbeb9;
  --line: #3a4945;
  --accent: #9fdbcb;
  --accent-2: #e0ba74;
  --wash: #23352f;
  --code: #111a17;
  --tr: #352e1f;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  padding-top: 70px;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.78 "Segoe UI", Arial, sans-serif;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

button,
select {
  font: inherit;
  color: inherit;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
}

button {
  padding: 5px 11px;
  cursor: pointer;
}

button:hover {
  background: var(--wash);
}

a:focus-visible,
button:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 99;
  background: var(--paper);
  padding: 10px;
}

.skip-link:focus {
  top: 10px;
}

.guide-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 4vw;
  background: color-mix(in srgb, var(--paper) 96%, transparent);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-weight: 800;
  text-decoration: none;
  font-size: 22px;
  white-space: nowrap;
}

.brand span {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 10px;
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header-actions a {
  white-space: nowrap;
}

.guide-layout {
  max-width: 1480px;
  margin: auto;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 54px;
  padding: 44px 4vw;
}

.sidebar {
  position: sticky;
  top: 104px;
  align-self: start;
  max-height: calc(100vh - 130px);
  overflow-y: auto;
  padding-right: 14px;
  font-size: 13px;
  scrollbar-width: thin;
}

.sidebar label {
  display: block;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
}

.sidebar select {
  width: 100%;
  padding: 8px;
  margin: 0 0 18px;
}

.eyebrow,
.guide-intro > span,
.guide-card span,
.nav-group-title {
  letter-spacing: 0;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}

.sidebar h2 {
  font-size: 21px;
  line-height: 1.3;
  margin: 8px 0 20px;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-group-title {
  margin: 18px 0 5px;
}

.sidebar nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 6px 9px;
  border-left: 2px solid transparent;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.sidebar nav a:hover,
.sidebar nav a[aria-current] {
  background: var(--wash);
  color: var(--accent);
  border-left-color: var(--accent);
}

.reading {
  min-width: 0;
  max-width: 980px;
}

.guide-intro {
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: 30px 36px;
  border-radius: 8px;
  margin-bottom: 34px;
}

.guide-intro > h1 {
  font: 600 42px/1.16 Georgia, serif;
  color: var(--accent);
  margin: 14px 0 12px;
}

.guide-intro > p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.guide-hub {
  padding-bottom: 14px;
}

.guide-summary {
  max-width: 760px;
  color: var(--muted);
}

.guide-card-grid {
  display: grid;
  gap: 14px;
  margin: 18px 0 32px;
}

.guide-card-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.guide-card-grid.weeks {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.guide-card {
  display: block;
  min-height: 154px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  text-decoration: none;
  color: var(--text);
}

.guide-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.guide-card h3 {
  margin: 8px 0 8px;
  color: var(--accent);
  font-size: 18px;
  line-height: 1.35;
}

.guide-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.page-toc {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--wash);
  padding: 16px 18px;
  margin: 0 0 32px;
}

.page-toc strong {
  color: var(--accent);
  font-size: 14px;
}

.page-toc nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 4px 16px;
  margin-top: 8px;
}

.page-toc a {
  font-size: 14px;
  line-height: 1.45;
  text-decoration: none;
}

.guide-chapter {
  padding-bottom: 34px;
}

.reading h1 {
  font: 600 34px/1.25 Georgia, serif;
  color: var(--accent);
  margin: 10px 0 26px;
}

.reading h2 {
  font-size: 25px;
  line-height: 1.35;
  margin: 42px 0 18px;
}

.reading h3 {
  font-size: 20px;
  line-height: 1.4;
  margin: 28px 0 14px;
}

.reading h4 {
  font-size: 17px;
  margin: 24px 0 12px;
}

.reading h5,
.reading h6 {
  font-size: 16px;
}

.reading p {
  margin: 16px 0;
}

.reading li {
  padding-left: 3px;
  margin: 9px 0;
}

.reading ul,
.reading ol {
  padding-left: 25px;
}

.turkish {
  background: var(--tr);
  border-left: 3px solid var(--accent-2);
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  font-size: 16px;
  line-height: 1.8;
}

.reading code {
  font: 0.86em/1.7 Consolas, "Courier New", monospace;
  background: var(--code);
  padding: 2px 5px;
  border-radius: 4px;
  overflow-wrap: anywhere;
}

.guide-code {
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--code);
}

.code-label {
  padding: 7px 18px;
  font-size: 11px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  letter-spacing: 0;
}

.guide-code pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  font: 14px/1.8 Consolas, "Courier New", monospace;
  tab-size: 4;
}

.guide-code code {
  font: inherit;
  padding: 0;
  background: none;
  overflow-wrap: normal;
}

.table-scroll {
  overflow-x: auto;
  max-width: 100%;
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  line-height: 1.65;
  background: var(--paper);
}

th {
  background: var(--wash);
  color: var(--accent);
  text-align: left;
  font-size: 13px;
  vertical-align: bottom;
}

th,
td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  min-width: 100px;
}

tr:last-child td {
  border-bottom: 0;
}

.solution-heading {
  color: var(--accent);
  background: var(--wash);
  padding: 8px 14px;
  border-radius: 6px;
}

.page-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 28px 0 12px;
  border-top: 1px solid var(--line);
}

.pager-link {
  display: block;
  min-height: 76px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  text-decoration: none;
}

.pager-link.next {
  text-align: right;
}

.pager-link span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.pager-link strong {
  display: block;
  color: var(--accent);
  font-size: 18px;
}

.mobile-jump {
  display: none;
}

@media (min-width: 1450px) {
  .guide-layout {
    gap: 70px;
  }
}

@media (max-width: 1000px) {
  .guide-layout {
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 28px;
    padding: 30px 3vw;
  }

  .sidebar {
    font-size: 12px;
  }

  .guide-intro > h1 {
    font-size: 36px;
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 125px;
  }

  body {
    padding-top: 58px;
    font-size: 16px;
  }

  .guide-header {
    min-height: 58px;
    padding: 10px 16px;
    gap: 8px;
  }

  .brand {
    font-size: 19px;
  }

  .brand span {
    display: none;
  }

  .header-actions {
    gap: 8px;
    font-size: 12px;
  }

  .header-actions button {
    padding: 4px 8px;
  }

  .mobile-jump {
    display: flex;
    position: sticky;
    top: 58px;
    z-index: 9;
    align-items: center;
    gap: 12px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 9px 16px;
  }

  .mobile-jump label {
    font-size: 11px;
    line-height: 1.3;
    flex: 0 0 65px;
    color: var(--muted);
  }

  .mobile-jump select {
    width: 100%;
    min-width: 0;
    font-size: 13px;
    padding: 7px;
  }

  .guide-layout {
    display: block;
    padding: 24px 18px;
  }

  .sidebar {
    display: none;
  }

  .guide-intro {
    padding: 22px;
    margin-bottom: 28px;
  }

  .guide-intro > h1 {
    font-size: 30px;
  }

  .guide-card-grid,
  .guide-card-grid.compact,
  .guide-card-grid.weeks,
  .page-pager,
  .page-toc nav {
    grid-template-columns: 1fr;
  }

  .reading h1 {
    font-size: 29px;
  }

  .reading h2 {
    font-size: 23px;
  }

  .reading h3 {
    font-size: 19px;
  }

  .turkish {
    padding: 14px 16px;
    font-size: 15px;
  }

  .table-scroll {
    margin: 20px 0;
  }

  th,
  td {
    padding: 10px 12px;
    min-width: 105px;
  }

  .guide-code pre {
    font-size: 13px;
    padding: 15px;
  }
}

@media print {
  html {
    scroll-padding-top: 0;
  }

  :root,
  [data-theme="dark"] {
    --bg: white;
    --paper: white;
    --text: #111;
    --muted: #444;
    --line: #aaa;
    --accent: #183b2f;
    --wash: #f1f5f0;
    --code: #f4f4f4;
    --tr: #faf6ec;
    color-scheme: light;
  }

  body {
    padding-top: 0;
    font: 10pt/1.55 Georgia, serif;
  }

  .guide-header,
  .sidebar,
  .mobile-jump,
  .skip-link,
  .page-toc,
  .page-pager {
    display: none;
  }

  .guide-layout {
    display: block;
    margin: 0;
    padding: 0;
  }

  .reading {
    max-width: none;
  }

  .guide-intro {
    break-after: avoid;
    border: 0;
    box-shadow: none;
    padding: 0 0 10mm;
    margin: 0;
  }

  .guide-intro > h1 {
    font-size: 24pt;
  }

  .reading h1 {
    font-size: 23pt;
  }

  .reading h2 {
    font-size: 17pt;
  }

  .reading h3 {
    font-size: 13pt;
  }

  .reading h4 {
    font-size: 11pt;
  }

  .reading h1,
  .reading h2,
  .reading h3,
  .reading h4 {
    break-after: avoid;
  }

  .turkish {
    font-size: 10pt;
    break-inside: avoid;
  }

  .table-scroll {
    overflow: visible;
    border-radius: 0;
  }

  table {
    font-size: 9pt;
  }

  th,
  td {
    min-width: 0;
    padding: 6px;
  }

  thead {
    display: table-header-group;
  }

  tr {
    break-inside: avoid;
  }

  .guide-code {
    break-inside: avoid;
  }

  .guide-code pre {
    font-size: 8.5pt;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  a {
    text-decoration: none;
  }

  p {
    orphans: 3;
    widows: 3;
  }

  @page {
    margin: 17mm;
  }
}
/* Reference pages are reading surfaces; the chapter index is optional. */
.guide-layout{display:block;max-width:960px;margin:auto}.reference-index{display:grid;gap:.6rem;padding:1rem 0}.reference-index .nav-group-title{margin-top:1rem;font-weight:700}
