/* Scribe project site: shared design language with MCM. */
:root {
  color-scheme: light;
  --paper: #f8fafc;
  --paper-alt: #eef2f6;
  --panel: #ffffff;
  --ink: #17242f;
  --muted: #475569;
  --faint: #526171;
  --line: #d4dde5;
  --line-strong: #81909d;
  --accent: #087568;
  --accent-strong: #065e54;
  --link: #235a79;
  --nav-bg: rgba(248,250,252,.94);
  --shadow: rgba(30,27,20,.08);
  --focus: #087568;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #111210;
  --paper-alt: #171815;
  --panel: #1a1b18;
  --ink: #f0eee7;
  --muted: #b7b3ab;
  --faint: #a6b0ba;
  --line: #30312d;
  --line-strong: #474842;
  --accent: #70d2bb;
  --accent-strong: #98e6d5;
  --link: #9ec0e6;
  --nav-bg: rgba(17,18,16,.94);
  --shadow: rgba(0,0,0,.29);
  --focus: #70d2bb;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-width: 0; color: var(--ink); background: var(--paper); font: 15px/1.65 system-ui,-apple-system,"Segoe UI",sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
img, picture { display: block; max-width: 100%; }
img { height: auto; }
code, kbd, .mono { font-family: ui-monospace,SFMono-Regular,"Cascadia Code",Consolas,monospace; }
code { font-size: .89em; overflow-wrap: anywhere; }
.wrap { width: min(1180px, calc(100% - 48px)); margin-inline: auto; min-width: 0; }
.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; left: 12px; top: -72px; z-index: 500; padding: 8px 13px; background: var(--ink); color: var(--paper); border-radius: 5px; }
.skip-link:focus { top: 12px; color: var(--paper); }
h1,h2,h3,p { overflow-wrap: break-word; }
h1,h2,h3 { text-wrap: balance; }

/* Global navigation */
.topbar { position: sticky; top: 0; z-index: 100; background: var(--nav-bg); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.navbar { display: flex; align-items: center; gap: 22px; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; white-space: nowrap; font-weight: 750; font-size: 17px; }
.brand:hover { color: var(--ink); text-decoration: none; }
.brand img { width: 30px; height: 30px; flex: none; border-radius: 5px; }
.brand-subtitle { color: var(--faint); border-left: 1px solid var(--line); margin-left: 3px; padding-left: 12px; font-size: 11px; font-weight: 550; }
.desktop-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.desktop-nav a, .mobile-menu nav a { color: var(--muted); font-weight: 600; font-size: 13px; text-decoration: none; border-radius: 5px; }
.desktop-nav a { padding: 7px 10px; }
.desktop-nav a:hover, .mobile-menu nav a:hover { background: var(--paper-alt); color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: 3px; }
.repo-link, .theme-toggle, .mobile-menu summary {
  min-height: 35px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 11px; background: var(--panel); border: 1px solid var(--line);
  color: var(--ink); border-radius: 6px; font-size: 12px; font-weight: 650;
}
.repo-link { text-decoration: none; }
.repo-link:hover, .theme-toggle:hover, .mobile-menu summary:hover { color: var(--ink); border-color: var(--line-strong); text-decoration: none; }
.theme-toggle { cursor: pointer; gap: 7px; }
.theme-toggle svg { width: 15px; height: 15px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
.mobile-menu { display: none; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); align-items: center; gap: clamp(24px,4vw,60px); padding: clamp(40px,6vw,76px) 0 34px; }
.hero-copy, .hero-media { min-width: 0; }
.kicker, .section-label { color: var(--accent); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .115em; font-family: ui-monospace,SFMono-Regular,Consolas,monospace; }
.kicker { display: flex; align-items: center; gap: 9px; }
.kicker::before { content: ""; width: 7px; height: 7px; background: var(--accent); border-radius: 50%; flex: none; }
.hero h1 { margin: 18px 0 20px; font-size: clamp(37px,4.9vw,67px); letter-spacing: -.052em; line-height: 1.075; font-weight: 680; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-lede { max-width: 570px; color: var(--muted); margin: 0; font-size: clamp(15px,1.55vw,18px); line-height: 1.63; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.btn { display: inline-flex; min-height: 43px; align-items: center; justify-content: center; gap: 8px; padding: 10px 15px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; font-weight: 700; text-decoration: none; background: var(--panel); color: var(--ink); }
.btn.primary { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.btn:hover { color: var(--ink); background: var(--paper-alt); text-decoration: none; border-color: var(--line-strong); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.meta { margin: 18px 0 0; color: var(--faint); font-size: 11px; font-family: ui-monospace,SFMono-Regular,Consolas,monospace; }

/* Showcase mimics an application window, not a decorative illustration. */
.showcase { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-top: 3px solid var(--ink); background: var(--panel); box-shadow: 0 12px 32px var(--shadow); }
.showcase-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid var(--line); padding: 10px 13px; color: var(--faint); font-size: 10px; letter-spacing: .03em; }
.showcase-top strong { color: var(--ink); font-weight: 680; }
.showcase .shot { display: block; width: 100%; max-width: 100%; border: 0; border-radius: 0; }
.showcase .shot-dark { display: none; }
:root[data-theme="dark"] .showcase .shot-light { display: none; }
:root[data-theme="dark"] .showcase .shot-dark { display: block; }
.showcase figcaption { padding: 10px 13px; border-top: 1px solid var(--line); color: var(--faint); font-size: 11px; }
.hero-facts { grid-column: 1/-1; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 7px; }
.hero-facts > div { min-width: 0; padding: 12px 17px; border-right: 1px solid var(--line); }
.hero-facts > div:first-child { padding-left: 0; }
.hero-facts > div:last-child { border-right: 0; }
.hero-facts span { display: block; color: var(--faint); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; font-family: ui-monospace,SFMono-Regular,Consolas,monospace; }
.hero-facts strong { display: block; color: var(--ink); font-size: 13px; line-height: 1.4; margin-top: 2px; font-weight: 660; }

/* Sections */
main { min-width: 0; }
section { min-width: 0; scroll-margin-top: 84px; margin-top: clamp(48px,5.7vw,76px); }
.section-head { display: grid; grid-template-columns: minmax(0,210px) minmax(0,1fr); align-items: start; gap: 28px; margin-bottom: 24px; }
.section-head h2 { margin: 0; font-size: clamp(26px,3vw,37px); line-height: 1.12; font-weight: 670; letter-spacing: -.035em; }
.section-head .section-label { display: block; padding-top: 9px; }
.section-head p { color: var(--muted); margin: 9px 0 0; max-width: 650px; font-size: 14px; }
.feature-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0 25px; border-top: 2px solid var(--ink); }
.feature { min-width: 0; padding: 19px 0 21px; border-bottom: 1px solid var(--line); }
.feature h3 { margin: 0 0 6px; font-size: 15px; font-weight: 680; letter-spacing: -.01em; }
.feature p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.62; }
.figure-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.figure-grid figure { min-width: 0; margin: 0; }
.figure-grid img { display: block; width: 100%; border: 1px solid var(--line); border-radius: 4px; }
.figure-grid figcaption { margin-top: 8px; color: var(--faint); font-size: 12px; }
.workflow { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.workflow > div { min-width: 0; padding: 18px; border-right: 1px solid var(--line); }
.workflow > div:first-child { padding-left: 0; }
.workflow > div:last-child { border-right: 0; }
.workflow .step { display: block; margin-bottom: 9px; color: var(--accent); font-size: 11px; font-family: ui-monospace,SFMono-Regular,Consolas,monospace; }
.workflow h3 { margin: 0 0 4px; font-size: 15px; }
.workflow p { margin: 0; color: var(--muted); font-size: 13px; }


/* Source-checked platform comparison */
.comparison-wrap { min-width: 0; border-top: 2px solid var(--ink); }
.compare-table { table-layout: fixed; width: 100%; min-width: 0; border-collapse: collapse; }
.compare-table th, .compare-table td {
  padding: 13px 14px; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--line); overflow-wrap: anywhere;
  font-size: 12px; line-height: 1.6;
}
.compare-table thead th { color: var(--ink); background: var(--paper-alt); font-size: 11px; letter-spacing: 0; text-transform: none; }
.compare-table thead th:first-child { width: 17%; }
.compare-table thead th:nth-child(2) { width: 27%; }
.compare-table tbody th { width: auto; font-size: 12px; color: var(--ink); font-weight: 700; }
.compare-table tbody td { color: var(--muted); }
.compare-table tbody td:nth-child(2) { color: var(--ink); background: var(--panel); }
.compare-note { max-width: 990px; color: var(--faint); margin: 13px 0 0; font-size: 12px; line-height: 1.65; }

/* Keyboard reference */
.shortcut-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 32px; }
table { width: 100%; min-width: 0; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
th,td { vertical-align: top; text-align: left; border-bottom: 1px solid var(--line); padding: 9px 8px; overflow-wrap: anywhere; }
th { color: var(--faint); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
th:first-child { width: 52%; }
td:first-child { padding-right: 12px; }
kbd { display: inline-block; max-width: 100%; border: 1px solid var(--line); background: var(--panel); border-radius: 3px; padding: 1px 5px; margin: 1px 0; color: var(--ink); font-size: 10px; white-space: nowrap; line-height: 1.6; }

/* Download area */
.download-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.platform { min-width: 0; padding: 18px; border: 1px solid var(--line); border-top: 3px solid var(--ink); background: var(--panel); }
.platform-head { display: flex; justify-content: space-between; align-items: baseline; gap: 9px; }
.platform h3 { font-size: 18px; line-height: 1.35; margin: 0; font-weight: 700; }
.platform .platform-tag { font: 10px/1.3 ui-monospace,Consolas,monospace; color: var(--faint); }
.platform p { color: var(--muted); margin: 7px 0 14px; font-size: 13px; min-height: 42px; }
.download-links { display: grid; min-width: 0; gap: 8px; }
.download-links a { display: flex; flex-wrap: wrap; min-width: 0; justify-content: space-between; align-items: baseline; gap: 3px 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 4px; color: var(--link); background: var(--paper); font-size: 12px; font-weight: 670; text-decoration: none; overflow-wrap: anywhere; }
.download-links a:hover { border-color: var(--accent); text-decoration: underline; }
.download-links .file-size { color: var(--faint); white-space: nowrap; font-size: 11px; font-weight: 400; }
.note { max-width: 860px; margin: 16px 0 0; color: var(--muted); font-size: 12px; }
.release-privacy { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.release-privacy article { min-width: 0; }
.release-privacy h3 { font-size: 16px; margin: 0 0 8px; font-weight: 700; }
.release-privacy p, .release-privacy li { color: var(--muted); margin: 0; font-size: 13px; line-height: 1.65; }
.release-privacy ul { margin: 0 0 8px; padding-left: 19px; }
.release-privacy a { font-size: 12px; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 18px; color: var(--faint); font-size: 12px; padding: 23px 0 34px; margin-top: 70px; border-top: 1px solid var(--line); }
.footer a { color: var(--muted); }

/* Collapse intentionally, without forcing full-screen sections or clipping long content. */
@media (max-width: 990px) {
  .brand-subtitle { display: none; }
  .hero { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 22px; }
  .hero h1 { font-size: clamp(36px,4.9vw,50px); }
  .download-grid { gap: 10px; }
  .platform { padding: 14px; }
}
@media (max-width: 820px) {
  .navbar { min-height: 60px; }
  .desktop-nav, .repo-link { display: none; }
  .nav-actions { margin-left: auto; }
  .mobile-menu { display: block; position: relative; }
  .mobile-menu summary { cursor: pointer; list-style: none; }
  .mobile-menu summary::-webkit-details-marker { display: none; }
  .mobile-menu nav { display: grid; gap: 2px; position: absolute; top: calc(100% + 10px); right: 0; width: min(230px, calc(100vw - 36px)); padding: 7px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 12px 25px var(--shadow); border-radius: 5px; }
  .mobile-menu nav a { display: block; padding: 10px 12px; }
  .hero { grid-template-columns: minmax(0,1fr); padding-top: 40px; }
  .hero h1 { max-width: 640px; font-size: clamp(41px,7vw,58px); }
  .hero-media { max-width: 760px; }
  .hero-facts { margin-top: 8px; }
  .section-head { grid-template-columns: 1fr; gap: 8px; }
  .section-head .section-label { padding-top: 0; }
  .feature-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .download-grid { grid-template-columns: 1fr; }
  .platform { padding: 16px; }
  .platform p { min-height: 0; }
  .download-links { display: flex; flex-wrap: wrap; }
  .download-links a { min-width: 200px; }
  .shortcut-grid { gap: 18px; }
}
@media (max-width: 600px) {
  .wrap { width: min(100% - 32px,1180px); }
  .hero { padding-top: 34px; }
  .hero h1 { font-size: clamp(35px,9vw,45px); }
  .hero-facts { grid-template-columns: 1fr; }
  .hero-facts > div { border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 0; }
  .hero-facts > div:last-child { border-bottom: 0; }
  .feature-grid, .figure-grid, .workflow, .shortcut-grid, .release-privacy { grid-template-columns: 1fr; }
  .workflow > div { padding: 14px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .workflow > div:last-child { border-bottom: 0; }
  .feature { padding-block: 14px; }
  .release-privacy { gap: 21px; }
  .download-links a { width: 100%; min-width: 0; }
  section { margin-top: 47px; }
  .footer { margin-top: 45px; }
}
@media (max-width: 340px) {
  .brand { font-size: 15px; }
  .brand img { width: 26px; height: 26px; }
  .theme-toggle { padding: 0 7px; }
  .theme-toggle span { font-size: 11px; }
  .navbar { gap: 7px; }
  .nav-actions { gap: 5px; }
}

@media (max-width: 700px) {
  .compare-table, .compare-table tbody, .compare-table tbody tr { display: block; width: 100%; }
  .compare-table thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
  .compare-table tbody tr { padding: 12px 0 13px; border-bottom: 1px solid var(--line); }
  .compare-table tbody th { display: block; width: 100%; padding: 0 0 8px; border: 0; font-size: 14px; }
  .compare-table tbody td { display: block; width: 100%; padding: 5px 0 5px 0; border: 0; background: transparent !important; }
  .compare-table tbody td::before { content: attr(data-label); display: block; color: var(--faint); font: 10px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace; letter-spacing: .04em; margin-bottom: 1px; }
  .compare-table tbody td:nth-child(2) { color: var(--ink); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,*::before,*::after { animation-duration: .01ms!important; transition-duration: .01ms!important; }
}
