:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #22221d;
  --muted: #6c6b64;
  --faint: #999890;
  --line: #dfdfd9;
  --line-soft: #ecece7;
  --surface: #f6f6f2;
  --accent: #e6532f;
  --header-height: 54px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 74px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
button, input, select { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; left: 12px; z-index: 100; padding: 8px 12px; color: #fff; background: var(--ink); font-size: 13px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left));
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid rgba(223, 223, 217, .68);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.brand { color: var(--ink); font-size: 17px; font-weight: 740; letter-spacing: -.045em; text-decoration: none; }
.site-nav { display: flex; align-items: center; gap: 3px; }
.site-nav a { padding: 8px 10px; color: var(--muted); border-radius: 5px; font-size: 12px; text-decoration: none; }
.site-nav a:hover { color: var(--ink); background: var(--surface); }
.site-nav a[aria-current="page"] { color: var(--ink); }

main { width: min(calc(100% - 48px), 1060px); margin: 0 auto; }
.knowledge-hero { padding: 152px 0 104px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 18px; color: var(--accent); font-size: 10px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 900px; margin-bottom: 24px; font-size: clamp(52px, 9vw, 104px); font-weight: 710; line-height: .94; letter-spacing: -.072em; }
.hero-copy { max-width: 710px; margin: 0; color: #4f4e48; font-size: clamp(18px, 2.5vw, 25px); line-height: 1.46; letter-spacing: -.017em; }
.collection-meta { margin: 30px 0 0; color: var(--faint); font-size: 11px; letter-spacing: .015em; }
.collection-meta strong { color: var(--muted); font-weight: 680; }
.collection-meta span { margin: 0 8px; color: #c6c5bf; }

.search-section, .topics-section { padding: 88px 0 100px; }
.search-section { border-bottom: 1px solid var(--line); }
.section-heading { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(280px, 1fr); gap: 60px; align-items: start; margin-bottom: 42px; }
.section-heading h2 { margin: 0; font-size: clamp(28px, 4vw, 42px); font-weight: 680; line-height: 1.06; letter-spacing: -.045em; }
.section-heading p { max-width: 470px; margin: 2px 0 0; color: var(--muted); font-size: 14px; line-height: 1.65; }

.search-form { margin-bottom: 28px; }
.search-field { display: block; border-bottom: 2px solid var(--ink); }
.search-field:focus-within { border-color: var(--accent); }
.search-field input { width: 100%; padding: 17px 0 18px; color: var(--ink); background: transparent; border: 0; border-radius: 0; outline: 0; font-size: clamp(22px, 4vw, 38px); font-weight: 520; line-height: 1.2; letter-spacing: -.035em; }
.search-field input::placeholder { color: #b6b5ae; opacity: 1; }
.search-field input::-webkit-search-cancel-button { display: none; }
.filter-row { display: flex; align-items: end; gap: 28px; margin-top: 18px; }
.filter-row label { display: grid; gap: 7px; }
.filter-row label > span { color: var(--faint); font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.filter-row select { min-width: 154px; padding: 8px 28px 8px 0; color: var(--muted); background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; outline: 0; font-size: 12px; }
.filter-row select:focus { color: var(--ink); border-color: var(--ink); }
.filter-row button { margin-left: auto; padding: 8px 0; color: var(--muted); background: transparent; border: 0; cursor: pointer; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.filter-row button:hover { color: var(--accent); }
.search-status { min-height: 18px; margin: 38px 0 10px; color: var(--faint); font-size: 11px; }

.session-list { margin: 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.session-item { margin: 0; border-bottom: 1px solid var(--line-soft); }
.session-item a { display: grid; grid-template-columns: minmax(230px, 1.1fr) minmax(150px, .7fr) minmax(280px, 1.4fr); gap: 28px; align-items: baseline; padding: 20px 0 21px; text-decoration: none; }
.session-item a:hover .session-title { color: var(--accent); }
.session-title { font-size: 14px; font-weight: 660; line-height: 1.4; letter-spacing: -.012em; transition: color .15s ease; }
.session-meta { color: var(--faint); font-size: 10px; line-height: 1.5; }
.session-description { color: var(--muted); font-size: 12px; line-height: 1.58; }
.more-button { display: block; margin: 28px auto 0; padding: 9px 0; color: var(--muted); background: transparent; border: 0; cursor: pointer; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.more-button:hover { color: var(--accent); }
.empty-result { padding: 34px 0; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 14px; }
.noscript-note { color: var(--muted); font-size: 12px; }

.topic-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 72px; margin: 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.topic-list li { border-bottom: 1px solid var(--line-soft); }
.topic-list a { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 10px 24px; min-height: 178px; padding: 27px 0 29px; text-decoration: none; }
.topic-name { font-size: 18px; font-weight: 670; line-height: 1.25; letter-spacing: -.025em; }
.topic-count { padding-top: 3px; color: var(--faint); font-size: 10px; }
.topic-summary { grid-column: 1 / -1; max-width: 440px; color: var(--muted); font-size: 13px; line-height: 1.62; }
.topic-years { grid-column: 1 / -1; align-self: end; color: var(--faint); font-size: 9px; letter-spacing: .02em; }
.topic-list a:hover .topic-name { color: var(--accent); }

.knowledge-footer { width: min(calc(100% - 48px), 1060px); margin: 0 auto; padding: 40px 0 48px; border-top: 1px solid var(--line); }
.knowledge-footer { display: grid; grid-template-columns: 1fr auto; gap: 18px 40px; align-items: center; }
.knowledge-footer nav { display: flex; flex-wrap: wrap; gap: 18px; justify-content: flex-end; }
.knowledge-footer nav a { color: var(--muted); font-size: 11px; text-decoration: none; }
.knowledge-footer nav a:hover { color: var(--accent); }
.knowledge-footer p { grid-column: 1 / -1; margin: 12px 0 0; color: var(--faint); font-size: 9px; }

.topic-page, .api-page { padding-top: calc(var(--header-height) + 44px); }
.breadcrumb { display: flex; gap: 9px; margin: 0 0 78px; color: var(--faint); font-size: 11px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.topic-hero { max-width: 830px; padding-bottom: 72px; }
.topic-hero h1 { margin-bottom: 25px; font-size: clamp(48px, 8vw, 84px); }
.topic-dek { max-width: 760px; margin: 0 0 22px; color: #45443f; font-size: clamp(18px, 2.6vw, 24px); line-height: 1.48; letter-spacing: -.018em; }
.topic-intro { max-width: 680px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.72; }
.topic-stats { display: flex; flex-wrap: wrap; gap: 30px; margin: 42px 0 0; }
.topic-stats div { display: grid; gap: 5px; min-width: 62px; }
.topic-stats dt { color: var(--faint); font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.topic-stats dd { margin: 0; font-size: 17px; font-weight: 650; }
.focus-section { display: grid; grid-template-columns: 1fr 1.6fr; gap: 50px; padding: 45px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.focus-section h2 { margin: 0; font-size: 21px; font-weight: 660; letter-spacing: -.025em; }
.focus-section ul { display: grid; gap: 13px; margin: 0; padding: 0; list-style: none; }
.focus-section li { position: relative; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.focus-section li::before { content: ""; position: absolute; top: .58em; left: 0; width: 5px; height: 5px; background: var(--accent); border-radius: 50%; }
.year-nav { display: flex; gap: 22px; padding: 25px 0 8px; }
.year-nav a { color: var(--muted); font-size: 11px; text-decoration: none; }
.year-nav a:hover { color: var(--accent); }
.year-section { padding: 68px 0 22px; }
.year-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.year-heading h2 { margin: 0; font-size: 31px; font-weight: 680; letter-spacing: -.04em; }
.year-heading span { color: var(--faint); font-size: 10px; }
.topic-page + .knowledge-footer, .api-page + .knowledge-footer { margin-top: 84px; }

.api-page { max-width: 800px; }
.api-section { padding: 55px 0; border-top: 1px solid var(--line); }
.api-section h2 { margin: 0 0 22px; font-size: 27px; font-weight: 670; letter-spacing: -.035em; }
.api-section p { color: var(--muted); font-size: 14px; line-height: 1.7; }
pre { margin: 0 0 24px; padding: 18px 20px; overflow-x: auto; background: #24241f; color: #f4f2e9; border-radius: 5px; font: 12px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; }
.parameter-list { margin: 0; }
.parameter-list div { display: grid; grid-template-columns: 90px 1fr; gap: 20px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.parameter-list dt { font: 650 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.parameter-list dd { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

@media (max-width: 820px) {
  main, .knowledge-footer { width: min(calc(100% - 40px), 680px); }
  .knowledge-hero { padding: 128px 0 76px; }
  .search-section, .topics-section { padding: 68px 0 78px; }
  .section-heading { grid-template-columns: 1fr; gap: 16px; }
  .session-item a { grid-template-columns: 1fr auto; gap: 8px 20px; }
  .session-description { grid-column: 1 / -1; max-width: 620px; }
  .topic-list { grid-template-columns: 1fr; }
  .topic-list a { min-height: 0; }
  .focus-section { grid-template-columns: 1fr; gap: 26px; }
}

@media (max-width: 560px) {
  :root { --header-height: 50px; }
  .site-header { padding-inline: 16px; }
  .site-nav a { padding-inline: 7px; font-size: 11px; }
  .site-nav a:first-child { display: none; }
  main, .knowledge-footer { width: calc(100% - 36px); }
  .knowledge-hero { padding: 112px 0 62px; }
  h1 { font-size: 51px; }
  .hero-copy { font-size: 17px; }
  .collection-meta span { margin: 0 4px; }
  .search-section, .topics-section { padding: 56px 0 66px; }
  .search-field input { padding: 14px 0; font-size: 22px; }
  .filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .filter-row label, .filter-row select { min-width: 0; width: 100%; }
  .filter-row button { grid-column: 1 / -1; justify-self: start; margin-left: 0; }
  .session-item a { display: grid; grid-template-columns: 1fr; padding: 18px 0; }
  .session-meta { order: -1; }
  .topic-list a { padding: 23px 0 25px; }
  .knowledge-footer { grid-template-columns: 1fr; }
  .knowledge-footer nav { justify-content: flex-start; }
  .breadcrumb { margin-bottom: 52px; }
  .topic-hero { padding-bottom: 54px; }
  .topic-hero h1 { font-size: 46px; }
  .topic-stats { gap: 20px; }
  .year-section { padding-top: 54px; }
  .parameter-list div { grid-template-columns: 1fr; gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
