@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f6f7f8;
  --surface-strong: #ffffff;
  --text: #0e1114;
  --muted: #0e1114;
  --border: #e5e7eb;
  --brand: #16a34a;
  --brand-strong: #117c38;
  --accent: #7c3aed;
  --focus: #7c3aed;
  --header: rgba(255, 255, 255, .94);
  --max: 1180px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1114;
  --surface: #151b22;
  --surface-strong: #1b222b;
  --text: #ffffff;
  --muted: #ffffff;
  --border: #27303a;
  --brand: #22c55e;
  --brand-strong: #4ade80;
  --accent: #8b5cf6;
  --focus: #a78bfa;
  --header: rgba(14, 17, 20, .94);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 9px 13px; background: var(--text); color: var(--bg); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.shell { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header); border-bottom: 1px solid var(--border); backdrop-filter: blur(12px); }
.header-inner { min-height: 68px; display: flex; align-items: center; gap: 24px; }
.brand-logo { display: flex; align-items: center; flex: 0 0 auto; }
.brand-logo img { display: block; width: 230px; height: 41px; }
.brand-logo .logo-dark { display: none; }
[data-theme="dark"] .brand-logo .logo-light { display: none; }
[data-theme="dark"] .brand-logo .logo-dark { display: block; }
.site-nav { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.site-nav a { color: var(--muted); font-size: .88rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }
.nav-external::after { content: "↗"; margin-left: 4px; color: var(--brand); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-button, .menu-button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface-strong); cursor: pointer; }
.icon-button svg, .menu-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; }
.theme-sun { display: none; }
[data-theme="dark"] .theme-moon { display: none; }
[data-theme="dark"] .theme-sun { display: block; }
.menu-button { display: none; }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 17px; border: 1px solid var(--brand); background: var(--brand); color: #fff; font-weight: 700; text-decoration: none; transition: background-color .15s, border-color .15s, color .15s; }
.button:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.button.secondary { background: transparent; color: var(--text); border-color: var(--border); }
.button.secondary:hover { border-color: var(--brand); color: var(--brand-strong); }
.button.compact { min-height: 38px; padding: 7px 13px; font-size: .87rem; }
.hero { border-bottom: 1px solid var(--border); }
.hero-grid { min-height: 340px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 64px; padding-block: 30px; }
.eyebrow { margin: 0 0 10px; color: var(--brand-strong); font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
h1, h2, h3 { line-height: 1.15; letter-spacing: 0; }
h1 { max-width: 650px; margin: 0; font-size: clamp(2.35rem, 3.5vw, 2.8rem); font-weight: 800; }
.hero h1 { line-height: 1.05; }
.hero-copy { max-width: 610px; margin: 12px 0 0; color: var(--muted); font-size: 1.02rem; line-height: 1.5; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.signature { min-height: 245px; position: relative; display: grid; place-items: center; overflow: hidden; background: var(--surface); border: 1px solid var(--border); }
.signature::before { content: ""; position: absolute; inset: 28px; border: 1px solid var(--border); }
.signature-mark { position: relative; width: 158px; height: 158px; padding: 25px; background: var(--bg); border: 1px solid var(--border); }
.signature-mark img { width: 100%; height: 100%; object-fit: contain; }
.signature .pixel { position: absolute; width: 14px; height: 14px; background: var(--brand); }
.signature .pixel.one { top: 35px; right: 58px; }
.signature .pixel.two { top: 55px; right: 38px; background: var(--accent); }
.signature .pixel.three { bottom: 42px; left: 46px; width: 8px; height: 8px; }
main > section, .page-section { padding-block: 64px; }
main > section.hero { padding-block: 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.section-head h2, .page-intro h1 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.35rem); }
.section-head p { max-width: 620px; margin: 8px 0 0; color: var(--muted); }
.section-link { color: var(--brand-strong); font-weight: 700; text-decoration: none; white-space: nowrap; }
.section-link::after, .card-action::after { content: " →"; }
.grid-2, .grid-3 { display: grid; align-items: stretch; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.quick-path { min-height: 118px; display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 16px; padding: 20px; color: inherit; background: var(--surface-strong); border: 1px solid var(--border); text-decoration: none; }
.quick-path:hover { border-color: var(--brand); }
.quick-icon, .card-icon { width: 44px; height: 44px; display: grid; place-items: center; color: var(--brand-strong); background: color-mix(in srgb, var(--brand) 10%, transparent); }
.quick-icon svg, .card-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.quick-path h3 { margin: 0 0 2px; font-size: 1rem; }
.quick-path p { margin: 0; color: var(--muted); font-size: .88rem; }
.quick-arrow { color: var(--brand); font-size: 1.3rem; }
.resource-card { min-height: 100%; display: flex; flex-direction: column; padding: 24px; background: var(--surface-strong); border: 1px solid var(--border); }
.resource-card[data-accent="purple"] .card-icon, .resource-card[data-accent="purple"] .card-kicker { color: var(--accent); }
.resource-card[data-accent="purple"] .card-icon { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.card-kicker { color: var(--brand-strong); font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.resource-card h3 { margin: 20px 0 9px; font-size: 1.25rem; }
.resource-card p { margin: 0; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0 20px; }
.tag { padding: 4px 8px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: .72rem; font-weight: 600; }
.card-action { margin-top: auto; color: var(--brand-strong); font-size: .9rem; font-weight: 750; text-decoration: none; }
.utility-card { min-height: 220px; display: flex; flex-direction: column; padding: 24px; border-left: 3px solid var(--brand); background: var(--surface-strong); }
.utility-card.purple { border-left-color: var(--accent); }
.utility-card h3 { margin: 0 0 8px; }
.utility-card p { margin: 0 0 18px; color: var(--muted); }
.need-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.need-links a { padding: 5px 8px; border: 1px solid var(--border); color: var(--muted); font-size: .75rem; text-decoration: none; }
.page-intro { padding-block: 54px 42px; border-bottom: 1px solid var(--border); }
.page-intro p { max-width: 720px; margin: 14px 0 0; color: var(--muted); font-size: 1.06rem; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.filter-button { min-height: 40px; padding: 7px 13px; border: 1px solid var(--border); background: var(--surface-strong); cursor: pointer; font-weight: 650; }
.filter-button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.prose { max-width: 760px; }
.prose h2 { margin-top: 2em; }
.prose p, .prose li { color: var(--muted); }
.contact-form { max-width: 760px; display: grid; gap: 18px; }
.form-status { margin: 0; padding: 11px 12px; color: #8f2c14; background: #fff6f4; border-left: 3px solid #e0876b; }
[data-theme="dark"] .form-status { color: #ffffff; background: #2a1d1b; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
label { display: grid; gap: 7px; font-size: .88rem; font-weight: 700; }
input, select, textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--border); background: var(--surface-strong); color: var(--text); }
textarea { min-height: 150px; resize: vertical; }
.auth-layout { min-height: calc(100vh - 220px); display: grid; grid-template-columns: minmax(0, 1fr) 420px; align-items: center; gap: 72px; padding-block: 56px; }
.auth-context { max-width: 580px; }
.auth-context h1 { font-size: clamp(2.1rem, 4vw, 3.25rem); }
.auth-context p { max-width: 540px; color: var(--muted); }
.auth-panel { padding: 28px; background: var(--surface-strong); border: 1px solid var(--border); }
.auth-tabs { display: grid; grid-template-columns: repeat(2, 1fr); margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.auth-tab { padding: 10px; border: 0; border-bottom: 3px solid transparent; background: transparent; cursor: pointer; font-weight: 750; }
.auth-tab[aria-selected="true"] { color: var(--brand-strong); border-bottom-color: var(--brand); }
.auth-form { display: grid; gap: 16px; }
.auth-form[hidden] { display: none; }
.auth-message { margin: 0; padding: 10px 12px; border-left: 3px solid var(--brand); background: var(--surface); }
.auth-message.error { border-left-color: #e0876b; color: #8f2c14; background: #fff6f4; }
[data-theme="dark"] .auth-message.error { color: #ffffff; background: #2a1d1b; }
.text-button { padding: 0; border: 0; background: none; color: var(--brand-strong); cursor: pointer; font-weight: 700; text-align: left; }
.account-shell { padding-block: 48px 64px; }
.admin-shell { padding-block: 48px 64px; }
.account-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.account-head h1 { margin: 0; font-size: 2rem; }
.account-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 32px; padding-top: 28px; }
.account-nav { display: grid; align-content: start; gap: 8px; }
.account-nav button { padding: 11px 12px; border: 1px solid var(--border); background: var(--surface-strong); text-align: left; cursor: pointer; font-weight: 700; }
.account-nav button[aria-selected="true"] { border-color: var(--brand); color: var(--brand-strong); }
.account-panel { min-width: 0; }
.account-panel[hidden] { display: none; }
.account-panel h2 { margin-top: 0; }
.account-form { max-width: 620px; display: grid; gap: 16px; }
.account-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.account-fact { padding: 15px; background: var(--surface); border: 1px solid var(--border); }
.account-fact span { display: block; color: var(--muted); font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.account-fact small { display: block; margin-top: 5px; color: var(--muted); font-size: .78rem; font-weight: 500; }
.transparency-intro { max-width: 680px; color: var(--muted); }
.transparency-list { display: grid; gap: 12px; margin-top: 20px; }
.transparency-item { padding: 18px; border: 1px solid var(--border); background: var(--surface); }
.transparency-item h3 { margin: 0 0 7px; font-size: 1rem; }
.transparency-item p { max-width: 760px; margin: 0; color: var(--muted); }
.transparency-note { max-width: 760px; margin-top: 20px; padding: 14px 16px; border-left: 3px solid var(--brand); background: var(--surface); }
.history-table { width: 100%; border-collapse: collapse; background: var(--surface-strong); border: 1px solid var(--border); }
.history-table th, .history-table td { padding: 11px 12px; border-bottom: 1px solid var(--border); text-align: left; font-size: .85rem; }
.history-table th { color: var(--muted); font-size: .72rem; text-transform: uppercase; }
.history-empty { padding: 24px; background: var(--surface); border-left: 3px solid var(--brand); }
.admin-intro { max-width: 760px; padding: 24px 0 14px; }
.admin-intro h2 { margin: 0 0 8px; }
.admin-intro p { margin: 0; color: var(--muted); }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; min-width: 760px; border-collapse: collapse; background: var(--surface-strong); border: 1px solid var(--border); }
.admin-table th, .admin-table td { padding: 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.admin-table th { color: var(--muted); font-size: .72rem; text-transform: uppercase; }
.admin-table td small { display: block; max-width: 250px; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: .72rem; text-overflow: ellipsis; }
.admin-table td:nth-child(3) { display: flex; gap: 8px; align-items: center; }
.admin-table select, .admin-table input { min-width: 110px; padding: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.admin-audit { margin-top: 36px; }
.admin-audit h2 { margin: 0 0 12px; font-size: 1.2rem; }
.site-footer { padding-block: 36px; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 24px; }
.footer-brand img { width: 205px; height: auto; }
.footer-brand p, .footer-meta { margin: 8px 0 0; color: var(--muted); font-size: .82rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.footer-links a { color: var(--muted); font-size: .84rem; text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-meta { text-align: right; }
.empty-state { padding: 30px; background: var(--surface); border-left: 3px solid var(--accent); }
.empty-state h2 { margin-top: 0; }
.empty-state p { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 1050px) {
  .site-nav { position: fixed; inset: 69px 0 auto; display: none; align-items: stretch; gap: 0; padding: 12px 20px 24px; background: var(--bg); border-bottom: 1px solid var(--border); }
  .site-nav.open { display: grid; }
  .site-nav a { padding: 12px 4px; border-bottom: 1px solid var(--border); }
  .menu-button { display: grid; }
  .header-actions { margin-left: auto; }
}

@media (max-width: 767px) {
  .shell { width: min(100% - 28px, var(--max)); }
  .header-inner { min-height: 60px; }
  .brand-logo img { width: 188px; height: auto; }
  .site-nav { inset-block-start: 61px; }
  .header-contact { display: none; }
  .hero-grid { min-height: 0; grid-template-columns: 1fr; gap: 0; padding-block: 28px; }
  h1 { font-size: 2.15rem; }
  .hero-copy { font-size: 1rem; }
  .signature { display: none; }
  main > section, .page-section { padding-block: 46px; }
  .section-head { align-items: start; flex-direction: column; gap: 8px; }
  .grid-2, .grid-3, .footer-grid, .form-grid { grid-template-columns: 1fr; }
  .quick-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .quick-path { min-height: 76px; grid-template-columns: 38px 1fr auto; padding: 12px 14px; }
  .quick-icon { width: 36px; height: 36px; }
  .quick-path p { display: none; }
  .resource-card { padding: 20px; }
  .utility-card { min-height: 0; }
  .footer-meta { text-align: left; }
  .auth-layout, .account-grid { grid-template-columns: 1fr; gap: 28px; }
  .auth-layout { padding-block: 30px; }
  .auth-context { display: none; }
  .auth-panel { padding: 22px 18px; }
  .account-head { align-items: start; flex-direction: column; }
  .account-nav { grid-template-columns: repeat(2, 1fr); }
  .account-nav button { text-align: center; }
  .account-facts { grid-template-columns: 1fr; }
  .history-wrap { overflow-x: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
