/* Shared editorial theme. App internals are deliberately not reset. */
:root {
  color-scheme: light dark;
  --paper: #f7f8f6;
  --surface: #ffffff;
  --ink: #202c31;
  --quiet: #56666b;
  --rule: #d6dfdf;
  --teal: #245c68;
  --tint: #edf3f3;
  --bg: var(--paper);
  --panel: var(--surface);
  --panel-2: var(--tint);
  --border: var(--rule);
  --text: var(--ink);
  --muted: var(--quiet);
  --accent: var(--teal);
  --accent-2: #1e4d58;
  --code: #eef2f1;
}
body.site-page { margin: 0; padding: 0; background: var(--paper); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; line-height: 1.7; }
.site-page a { color: var(--teal); text-underline-offset: .2em; }
.site-page a:hover { text-decoration-thickness: 2px; }
.site-page :focus-visible { outline: 3px solid var(--teal); outline-offset: 5px; }
.site-page .site-header, .site-page .site-footer { box-sizing: border-box; max-width: 1120px; margin: 0 auto; padding: 26px 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border: 0; }
.site-page .site-header { border-bottom: 1px solid var(--rule); }
.site-header .wordmark { color: var(--ink); text-decoration: none; font-size: 1.12rem; font-weight: 650; letter-spacing: -.03em; }
.wordmark span { color: var(--quiet); font-weight: 400; }
.site-header nav, .site-footer nav { display: flex; gap: 24px; }
.site-header nav a, .site-footer nav a { font-size: .9rem; text-decoration: none; color: var(--quiet); }
.site-header a[aria-current], .site-footer a[aria-current] { color: var(--teal); text-decoration: underline; text-decoration-thickness: 2px; }
.site-page .skip-link { position: absolute; top: -100px; left: 16px; padding: 10px 18px; background: var(--surface); z-index: 20; }
.site-page .skip-link:focus { top: 12px; }
.site-page .reading, .site-page .listing { box-sizing: border-box; width: 100%; max-width: 780px; padding: 60px 32px 72px; margin: 0 auto; }
.site-page .listing-heading, .site-page .article-heading { margin: 0 0 48px; padding: 0; display: block; border: 0; }
.listing-heading h1, .article-heading h1 { margin: 12px 0 20px; font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.14; font-weight: 650; letter-spacing: -.045em; overflow-wrap: anywhere; }
.listing-heading > p:not(.eyebrow) { color: var(--quiet); font-size: 1.1rem; max-width: 42ch; }
.site-page .eyebrow { font-size: .72rem; font-weight: 650; letter-spacing: .13em; text-transform: uppercase; color: var(--teal); margin: 0; }
.site-page time { color: var(--quiet); font-size: .84rem; font-variant-numeric: tabular-nums; }
.post-card { padding: 26px 0; border-bottom: 1px solid var(--rule); }
.post-card:has(.eyebrow) { background: var(--tint); border: 1px solid var(--rule); border-radius: 3px; padding: 30px; margin-bottom: 18px; }
.post-card .eyebrow { margin-bottom: 20px; }
.post-card h2 { font-size: 1.35rem; line-height: 1.35; font-weight: 600; letter-spacing: -.02em; margin: 8px 0; }
.post-card:has(.eyebrow) h2 { font-size: 1.8rem; }
.post-card h2 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover { color: var(--teal); text-decoration: underline; }
.post-card .excerpt { color: var(--quiet); margin-bottom: 0; font-size: .97rem; }
.pagination { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 40px; }
.pagination a { border: 1px solid var(--rule); padding: 7px 13px; border-radius: 3px; text-decoration: none; font-size: .85rem; }
.pagination a[aria-current] { background: var(--teal); color: var(--paper); border-color: var(--teal); }
.prose { font-size: 1.055rem; overflow-wrap: anywhere; }
.prose p { margin: 0 0 1.4em; }
.prose h2 { margin: 2em 0 .7em; line-height: 1.25; letter-spacing: -.025em; font-size: 1.55rem; }
.prose h3 { margin: 1.8em 0 .6em; line-height: 1.3; }
.prose li { margin-bottom: .5em; }
.prose ul, .prose ol { padding-left: 1.5em; }
.prose img { display: block; max-width: 100%; height: auto; margin: 24px auto; }
.prose pre { max-width: 100%; overflow-x: auto; padding: 18px; background: var(--code); border-radius: 3px; font-size: .87rem; }
.prose code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .88em; }
.prose table { display: block; overflow-x: auto; max-width: 100%; border-collapse: collapse; font-size: .9rem; }
.prose th, .prose td { padding: 12px; border: 1px solid var(--rule); text-align: left; }
.prose blockquote, .prose .summary, .prose .callout, .prose .answer { border-left: 3px solid var(--teal); padding: 18px 24px; margin: 24px 0; background: var(--tint); }
.prose .card { display: block; padding: 28px; margin: 24px 0; border: 1px solid var(--rule); background: var(--surface); border-radius: 3px; text-decoration: none; }
.prose .card h3 { margin: 0 0 10px; color: var(--ink); }
.prose .card .desc { color: var(--quiet); }
.prose .card .meta { font-size: .8rem; margin-top: 18px; color: var(--quiet); }
.back-link { display: inline-block; font-size: .84rem; margin-bottom: 32px; text-decoration: none; }
.neighbors { display: grid; gap: 16px; margin-top: 54px; padding-top: 24px; border-top: 1px solid var(--rule); font-size: .88rem; }
.site-page .site-footer { border-top: 1px solid var(--rule); align-items: start; color: var(--quiet); font-size: .8rem; padding-top: 32px; padding-bottom: 40px; }
.site-footer p { margin: 0; }
/* Narrowly scoped app adjustments: preserve panels, controls and JS layout. */
.converter > main { height: auto; min-height: 65vh; }
.converter pre.code { color: var(--ink); }
.converter button:hover, .converter .file-button:hover { background: var(--tint); }
.converter button.primary { color: #fff; }
.converter button.primary:hover { background: var(--accent-2); }
.converter .site-header nav, .converter .site-footer nav { flex-wrap: wrap; }
@media (prefers-color-scheme: dark) {
  :root { --paper: #141c20; --surface: #1b252a; --ink: #e3ebec; --quiet: #a6b7bd; --rule: #33444b; --teal: #8bbac4; --tint: #202f35; --code: #10191d; --accent-2: #3a7180; }
  .converter { --accent: #356b79; }
}
@media (max-width: 600px) {
  .site-page .site-header { padding: 20px; flex-wrap: wrap; gap: 16px; }
  .site-header nav, .site-footer nav { gap: 20px; }
  .site-page .reading, .site-page .listing { padding: 38px 20px 48px; }
  .site-page .listing-heading, .site-page .article-heading { margin-bottom: 32px; }
  .post-card:has(.eyebrow) { padding: 22px; }
  .post-card:has(.eyebrow) h2 { font-size: 1.5rem; }
  .site-page .site-footer { padding: 26px 20px; flex-direction: column; }
  .converter > main { grid-template-columns: 1fr; padding: 16px; }
  .converter > header:not(.site-header) { padding: 16px; }
  .converter .panel { min-height: 300px; }
}
@media (prefers-reduced-motion: reduce) {
  .site-page *, .site-page *::before, .site-page *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
