:root {
  color-scheme: light dark;
  --background: #faf9f6;
  --foreground: #212321;
  --muted: #5e625e;
  --rule: #deded7;
  --accent: #285b4b;
  --code: #f0efeb;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #151715;
    --foreground: #ebede8;
    --muted: #adb3ac;
    --rule: #373b35;
    --accent: #a9d5bf;
    --code: #20231f;
  }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--foreground); }
a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.shell { width: min(100% - 3rem, 64rem); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--rule); }
.header-inner, .footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  padding-block: 1.15rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--foreground);
  font-weight: 650;
  text-decoration: none;
  letter-spacing: -0.025em;
}
.wordmark img { display: block; }
nav, .links, .entry-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
nav a, .footer a { color: var(--muted); font-size: 0.875rem; text-decoration: none; }
nav a[aria-current], nav a:hover { color: var(--foreground); text-decoration: underline; }
main { min-height: 72vh; padding-bottom: 3rem; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.035em; font-weight: 630; }
h1 { font-size: clamp(2.5rem, 5.5vw, 4.5rem); margin: 0 0 1.25rem; }
h2 { font-size: 1.4rem; margin: 0 0 0.55rem; }
p { margin: 0 0 1rem; }
.hero { padding: clamp(2.5rem, 5vw, 4.5rem) 0 2.5rem; }
.hero h1 { max-width: 20ch; font-size: clamp(2.5rem, 5.5vw, 4.5rem); line-height: 1.06; letter-spacing: -0.055em; }
.period { color: var(--accent); }
.intro { color: var(--muted); font-size: 1.2rem; max-width: 40rem; margin-bottom: 1.5rem; }
.hero .intro { margin-bottom: 0; }
.featured-project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  padding-block: 1rem;
}
.featured-copy { padding-top: 0.4rem; }
.project-identity { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1rem; }
.project-identity h2 { margin: 0; font-size: 2rem; }
.project-identity h2 a { color: var(--foreground); text-decoration: none; }
.project-identity h2 a:hover { text-decoration: underline; }
.featured-copy > p { max-width: 35ch; }
.feature-list { margin: 1rem 0 1.5rem; padding-left: 1.2rem; color: var(--muted); }
.feature-list li + li { margin-top: 0.15rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.65rem; }
.action { display: inline-flex; align-items: center; min-height: 44px; padding: 0.5rem 1rem; border: 1px solid var(--rule); border-radius: 4px; font-weight: 600; font-size: 0.9rem; text-decoration: none; }
.action-primary { color: var(--background); background: var(--foreground); border-color: var(--foreground); }
.action-secondary { color: var(--foreground); }
.action:hover { text-decoration: underline; }
.star-note { color: var(--muted); font-size: 0.8rem; margin: 0.8rem 0 0; }
.project-demo { display: grid; gap: 0.8rem; min-width: 0; }
.code-panel {
  color-scheme: dark;
  color: var(--editor-fg);
  background: var(--editor-bg);
  border: 1px solid var(--editor-border);
  border-radius: 8px;
  min-width: 0;
  margin: 0;
  overflow: hidden;
}
.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 2.6rem;
  gap: 1rem;
  padding: 0.35rem 0.9rem;
  border-bottom: 1px solid #353535;
  background: #252526;
  color: #bcbcbc;
  font-size: 0.75rem;
  font-weight: 550;
}
.code-panel pre, .prose .code-panel pre {
  border: 0;
  margin: 0;
  padding: 1rem;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: 0.925rem;
  line-height: 1.65;
}
.code-panel code { font-size: inherit; }
.code-panel pre:focus-visible, .copy-code:focus-visible {
  outline: 2px solid #9cdcfe;
  outline-offset: -3px;
}
.copy-code {
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #c5c5c5;
  font: inherit;
  cursor: pointer;
  padding: 0.25rem 0.55rem;
  min-height: 30px;
}
.copy-code:hover { background: #333333; color: #fff; border-color: #555; }
.terminal { background: var(--terminal-bg); }
.terminal .code-header { background: #202422; }
.terminal pre { color: var(--terminal-fg); }
.terminal-prompt { color: var(--terminal-prompt); font-weight: 650; }
.tok-keyword { color: var(--editor-keyword); }
.tok-string { color: var(--editor-string); }
.tok-number, .tok-constant { color: var(--editor-number); }
.tok-comment { color: var(--editor-comment); }
.tok-function { color: var(--editor-function); }
.tok-type { color: var(--editor-type); }
.prose .code-panel { margin-block: 1.5rem; }
.doc-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.doc-links a { padding: 0.85rem 1.25rem; border-left: 1px solid var(--rule); text-decoration: none; }
.doc-links a:first-child { border-left: 0; padding-left: 0; }
.doc-links a strong { display: block; color: var(--foreground); font-weight: 630; }
.doc-links a span { display: block; color: var(--muted); font-size: 0.9rem; margin-top: 0.25rem; }
.doc-links a:hover strong { color: var(--accent); text-decoration: underline; }
.community, .sponsor-invitation { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem 2rem; }
.community p, .sponsor-invitation p { color: var(--muted); margin: 0; }
.sponsor-contact { margin-bottom: 2rem; }
.sponsor-contact p { margin-top: 0.6rem; color: var(--muted); font-size: 0.875rem; }
.inventory > div { padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.inventory dt { font-weight: 650; }
.inventory dd { margin: 0.25rem 0 0; color: var(--muted); }
section { border-top: 1px solid var(--rule); padding-block: clamp(1.75rem, 4vw, 2.75rem); }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.section-heading > h2 { font-size: 1.2rem; letter-spacing: -0.02em; margin: 0; }
.section-heading > a { font-size: 0.875rem; }
.entry {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}
.entry:last-child { border-bottom: 0; }
.entry h2 a { color: var(--foreground); text-decoration: none; }
.entry h2 a:hover { text-decoration: underline; }
.entry p { color: var(--muted); max-width: 39rem; margin: 0; }
.entry small { display: block; margin-bottom: 0.5rem; }
.entry-links { flex-shrink: 0; font-size: 0.875rem; }
.page-heading { padding: 4.5rem 0 1.75rem; }
.prose { max-width: 43rem; }
.prose h2 { margin-top: 2.5rem; }
.prose pre { margin: 1.5rem 0; }
pre { overflow: auto; padding: 1.25rem; background: var(--code); border: 1px solid var(--rule); border-radius: 4px; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.875em; }
small { color: var(--muted); font-size: 0.8rem; }
.advertisement { border: 1px solid var(--rule); border-radius: 4px; padding: 1rem 1.25rem; margin: 2rem 0; max-width: 43rem; }
.advertisement p { margin: 0.5rem 0; }
.advertisement > a { font-size: 0.875rem; }
.disclosure { display: block; margin-top: 0.5rem; }
.primary-link { display: inline-block; font-weight: 600; }
.footer { border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.875rem; }
.skip { position: absolute; left: 1rem; top: -10rem; }
.skip:focus { top: 1rem; padding: 0.5rem; background: var(--background); z-index: 1; }
[hidden] { display: none !important; }

@media (max-width: 42rem) {
  .shell { width: calc(100% - 2rem); }
  .header-inner { align-items: flex-start; flex-direction: column; gap: 0.75rem; }
  nav { gap: 1rem; }
  .entry { flex-direction: column; gap: 0.75rem; }
  .page-heading { padding-top: 3rem; }
  .hero { padding-bottom: 2rem; }
  .featured-project { grid-template-columns: 1fr; }
  .featured-copy > p { max-width: none; }
  .doc-links { grid-template-columns: 1fr; }
  .doc-links a, .doc-links a:first-child { border-left: 0; padding: 1rem 0; }
  .doc-links a + a { border-top: 1px solid var(--rule); }
}
