/* Shared visual language with Doug Finke's blog. */
:root {
  color-scheme: light;
  --bg: #fff; --panel: #fff; --panel-strong: #f0f3f6; --panel-soft: #f5f7f9;
  --line: #e3e7ec; --line-strong: #cbd3dd; --text: #162130;
  --muted: #657080; --subtle: #657080; --green: #14745a; --cyan: #14745a;
  --amber: #766020; --coral: #bd6255; --shadow: 0 12px 36px #0f172a0c;
  --radius: 12px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101722; --panel: #161f2c; --panel-strong: #202d40; --panel-soft: #1e2939;
  --line: #2d3949; --line-strong: #46556b; --text: #e5ebf3;
  --muted: #a2afbf; --subtle: #a2afbf; --green: #72d5b2; --cyan: #72d5b2;
  --amber: #e1c67a; --coral: #f08f76;
}
html { background: var(--bg); scroll-padding-top: 24px; }
body { background: var(--bg); color: var(--text); font: 16px/1.65 var(--font-sans); }
body::before { display: none; }
h1,h2,h3 { font-weight: 700; letter-spacing: -.035em; line-height: 1.25; }
h1 { font-size: clamp(34px,4.3vw,53px); line-height: 1.12; max-width: 720px; }
h2,.section-heading h2 { font-size: 25px; } h3 { font-size: 18px; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
a:focus-visible,button:focus-visible,input:focus-visible { outline: 3px solid var(--green); outline-offset: 4px; }
.site-header { background: var(--panel); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.header-inner { max-width: 1216px; padding: 0 36px; margin: auto; display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 88px; }
.site-title { display: flex; align-items: center; gap: 12px; color: var(--text); font-size: 20px; font-weight: 750; line-height: 1.2; letter-spacing: -.03em; flex-shrink: 0; }
.site-title:hover { text-decoration: none; }
.site-title .brand-mark { display: grid; place-items: center; width: 37px; height: 37px; border: 0; border-radius: 9px; background: #172334; color: #b0e3d4; font: 700 19px/1 Consolas,monospace; }
.brand-subtitle { display: block; padding-top: 5px; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }
.forge-nav { display: flex; align-items: center; gap: 23px; font-size: 13px; font-weight: 550; }
.forge-nav > a:not(.button) { color: var(--muted); }
.forge-nav > a[aria-current] { color: var(--green); }
.theme-toggle { display: grid; place-items: center; min-width: 38px; min-height: 44px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 22px; }
.menu-button { display: none; }
.button,.button.compact { min-height: 40px; border: 1px solid var(--line); border-radius: 7px; padding: 9px 14px; background: var(--panel); color: var(--text); font-size: 12px; font-weight: 650; }
.button:hover,.button:focus-visible { color: var(--green); border-color: var(--green); text-decoration: none; }
.button.primary,.button.nav-forge { background: var(--text); border-color: var(--text); color: var(--bg); }
.button.primary:hover,.button.nav-forge:hover { background: var(--green); border-color: var(--green); color: var(--bg); }
.button.secondary { background: var(--panel-soft); }
.button.nav-forge { white-space: nowrap; gap: 16px; min-height: 44px; padding: 10px 18px; font-size: 13px; }
.site-shell { width: min(1144px,calc(100% - 72px)); margin: auto; padding: 0 0 72px; }
.intro-section { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,.8fr); gap: 48px; min-height: 0; padding: 48px 0 50px; margin-bottom: 40px; color: #fff; background: #182538; box-shadow: 0 0 0 100vmax #182538; clip-path: inset(0 -100vmax); }
.intro-copy { max-width: 720px; }
.eyebrow { margin: 0 0 14px; color: var(--green); font-size: 10px; font-weight: 700; letter-spacing: .15em; }
.intro-section .eyebrow { color: #b7ddcf; }
.intro-section h1 { color: #fff; margin-bottom: 20px; }
.intro-text { color: #c3cedc; font-size: 15px; line-height: 1.8; }
.motto { display: block; padding: 0; border: 0; background: transparent; color: #a6b5c8; font: 12px/1.6 var(--font-sans); margin-bottom: 18px; }
.hero-actions { flex-direction: row; }
.hero-actions .button { width: auto; }
.hero-actions .primary { background: #fff; border-color: #fff; color: #162130; }
.hero-actions .secondary { background: transparent; border-color: #63748b; color: #fff; }
.hero-actions .button:hover { border-color: #b7ddcf; color: #b7ddcf; background: #233346; }
.featured-terminal { width: 100%; min-width: 0; margin: 0; border: 1px solid #516075; border-radius: 12px; background: #101a2b; box-shadow: none; }
.terminal-bar { border-color: #334155; background: #233346; }
.featured-terminal pre { min-height: 0; padding: 20px; }
.featured-terminal code { font-size: 11px; color: #dce9f4; }
.section-heading { margin-bottom: 22px; }
.section-heading p:not(.eyebrow),.about-copy p,.copy-panel p { color: var(--muted); font-size: 14px; line-height: 1.8; }
.section-heading p.eyebrow { color: var(--green); font-size: 10px; line-height: 1.65; }
.toolbar-section { padding-top: 0; }
.tool-controls { max-width: none; margin-top: 24px; gap: 18px; }
.search-field { max-width: 540px; min-height: 46px; border-radius: 8px; background: var(--panel-soft); }
.search-field input { min-width: 0; font-size: 13px; }
.search-field:focus-within { outline: 2px solid var(--green); outline-offset: 2px; }
.search-field input:focus-visible { outline: 0; }
.tab-list { gap: 8px; }
.tab-button { min-height: 36px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--muted); font-size: 12px; }
.tab-button:hover,.tab-button:focus-visible,.tab-button.is-active { border-color: var(--green); background: var(--panel-soft); color: var(--green); text-decoration: none; }
.tab-button.is-active { background: var(--green); color: var(--bg); }
.tool-grid { max-width: none; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; margin-top: 26px; }
.tool-card,.tool-card:last-child { display: flex; flex-direction: column; min-width: 0; min-height: 100%; gap: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: 0 2px 4px #0f172a03; }
.tool-card:hover { border-color: var(--line-strong); }
.tool-media { width: 100%; height: 175px; min-height: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: var(--panel-soft); }
.tool-media img { height: 100%; max-height: 175px; padding: 14px; border-radius: 0; object-fit: contain; }
.tool-card-body { display: flex; flex-direction: column; flex: 1; gap: 13px; padding: 23px; }
.tool-card-topline { margin: 0; gap: 8px; }
.tool-category,.tool-status { min-height: 22px; border: 0; border-radius: 4px; padding: 3px 7px; background: var(--panel-soft); font: 10px/1.4 var(--font-sans); color: var(--green); }
.tool-status { color: var(--muted); } .tool-status::before { content: none; }
.tool-card h3 { margin: 0; color: var(--text); font-size: 22px; }
.tool-card-body p { min-height: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.tag-row { margin: 0; gap: 6px; }
.tag-row span { border: 1px solid var(--line); border-radius: 4px; padding: 3px 6px; background: var(--panel-soft); font-size: 10px; }
.metric-row { margin-top: auto; padding-top: 2px; font-size: 11px; }
.card-actions { margin-top: 0; gap: 7px; flex-direction: row; }
.card-actions .button { width: auto; min-height: 36px; padding: 7px 10px; font-size: 11px; }
.card-actions svg { width: 14px; height: 14px; }
.archive-section,.throughline-section,.about-section,.work-section,.agent-notes-section { margin-top: 55px; }
.copy-panel,.about-copy { max-width: 820px; padding-top: 22px; }
.archive-table-wrap { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.archive-table th,.archive-table td { padding: 17px; font-size: 12px; }
.archive-table thead th { background: var(--panel-soft); color: var(--muted); font-size: 10px; }
.archive-table tbody th small { font-size: 11px; }
.offer-grid span,.offer-names span { background: var(--panel-soft); border-color: var(--line); border-radius: 6px; color: var(--muted); font-size: 12px; }
.offer-names span { color: var(--green); }
.site-footer { width: 100%; max-width: none; margin: 0; padding: 38px max(36px,calc((100% - 1144px)/2)); gap: 35px; border-color: var(--line); background: var(--panel-soft); }
.site-footer-copy h2 { font-size: 25px; }
.site-footer-copy p:last-child { color: var(--muted); font-size: 13px; line-height: 1.8; }
.footer-social .nav-social-link { border-radius: 6px; }
.nav-social-link strong { font-size: 12px; } .brand-letter,.brand-play { border-radius: 3px; }
.tool-dialog { max-height: 90vh; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.tool-dialog::backdrop { background: #101a2ba8; backdrop-filter: blur(4px); }
.dialog-hero { background: var(--panel-soft); }
.dialog-close { border-radius: 7px; background: var(--panel); color: var(--text); }
.dialog-copy { padding: 28px; gap: 16px; }
.dialog-copy h2 { font-size: 30px; } .dialog-copy p:not(.eyebrow) { font-size: 14px; }
.install-box { background: var(--panel-soft); border-radius: 7px; }
.install-box code { font-size: 12px; }
.empty-state { grid-column: 1 / -1; background: var(--panel-soft); border-radius: 12px; padding: 25px; text-align: center; }
.reveal { opacity: 1; transform: none; transition: none; }
@media (max-width: 1000px) {
  .forge-nav { gap: 16px; } .nav-forge.button { display: none; }
  .intro-section { gap: 28px; } .tool-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 800px) {
  .header-inner { padding: 18px 24px; flex-wrap: wrap; gap: 15px; }
  .forge-nav { flex: 1; justify-content: flex-end; gap: 16px; }
  .site-shell { width: calc(100% - 48px); padding-top: 0; }
  .intro-section { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 40px; }
  .featured-terminal { max-width: 100%; } .featured-terminal code { font-size: 12px; }
  .site-footer { padding: 32px 24px; grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .header-inner { padding: 16px 20px; min-height: 80px; }
  .site-title { font-size: 18px; } .brand-subtitle { font-size: 9px; }
  .menu-button { display: inline-flex; padding: 8px 12px; min-height: 44px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--text); cursor: pointer; font-size: 13px; }
  .forge-nav { display: none; width: 100%; flex-basis: 100%; justify-content: flex-start; flex-wrap: wrap; gap: 8px 18px; border-top: 1px solid var(--line); padding-top: 12px; }
  .forge-nav.is-open { display: flex; }
  .forge-nav > a:not(.button) { min-height: 44px; display: flex; align-items: center; }
  .site-shell { width: calc(100% - 40px); }
  h1 { font-size: 36px; } h2,.section-heading h2 { font-size: 23px; }
  .intro-section { padding: 32px 0; } .intro-text { font-size: 14px; }
  .tool-grid { grid-template-columns: 1fr; gap: 20px; }
  .tool-media { height: 190px; } .tool-media img { max-height: 190px; }
  .tool-card-body { padding: 22px; }
  .site-footer { padding: 32px 20px; } .site-footer-copy h2 { font-size: 23px; }
  .dialog-actions { flex-direction: row; } .dialog-actions .button { width: auto; }
  .dialog-copy { padding: 20px; } .dialog-copy h2 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
