/* Tech Genius shared shell: tokens, base, header, footer, form controls. Used by every page. */
/* Fonts: SIL OFL 1.1, see assets/fonts/LICENSE-*.txt */
@font-face { font-family: "Bricolage Grotesque"; src: url("/assets/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/assets/fonts/geist-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/assets/fonts/geist-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
    --bg: #F4F1EA; --surface: #FBFAF6; --ink: #17150F; --muted: #5E594F; --line: #DDD7CA; --line-strong: #C9C1B0;
    --accent: #C4301A; --accent-ink: #FFFFFF;
    --c-psychology: #6A4BD6; --c-games: #C4301A; --c-legal: #1F5FD1; --c-finance: #13804D; --c-creative: #A36A12;
    --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
    --text: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
    --pad: clamp(1.15rem, 4vw, 2.5rem);
    --max: 1240px;
    --ease: cubic-bezier(.2, .7, .2, 1);
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #111110; --surface: #1A1917; --ink: #EEEAE0; --muted: #A8A296; --line: #2C2A26; --line-strong: #3D3A34;
        --accent: #FF6A4D; --accent-ink: #111110;
        --c-psychology: #A996FF; --c-games: #FF6A4D; --c-legal: #7BA7FF; --c-finance: #4CC98B; --c-creative: #E8B04D;
        color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --bg: #111110; --surface: #1A1917; --ink: #EEEAE0; --muted: #A8A296; --line: #2C2A26; --line-strong: #3D3A34;
    --accent: #FF6A4D; --accent-ink: #111110;
    --c-psychology: #A996FF; --c-games: #FF6A4D; --c-legal: #7BA7FF; --c-finance: #4CC98B; --c-creative: #E8B04D;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; scrollbar-color: var(--line-strong) var(--bg); }
body {
    font-family: var(--text); font-size: 1rem; line-height: 1.55; color: var(--ink); background: var(--bg);
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
}
::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
a { color: inherit; }
ul { list-style: none; }
.i { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: .5rem .8rem; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }

/* Top bar */
.navbar { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.nav-container { display: flex; align-items: center; gap: 1rem; height: 56px; }
.logo { display: inline-flex; min-height: 44px; align-items: center; gap: .55rem; font-family: var(--display); font-weight: 700; font-size: 1.12rem; letter-spacing: -.02em; text-decoration: none; margin-right: auto; white-space: nowrap; }
.logo .mark { width: 26px; height: 26px; border-radius: 7px; background: var(--ink); color: var(--bg); display: grid; place-items: center; }
.logo .mark .i { width: 16px; height: 16px; stroke-width: 2.2; }
.nav-links { display: flex; gap: .15rem; }
.nav-links a { display: block; padding: .45rem .6rem; border-radius: 8px; font-size: .92rem; color: var(--muted); text-decoration: none; transition: color .2s, background-color .2s; }
.nav-links a:hover { color: var(--ink); background: var(--surface); }
.nav-links .opt { display: none; }
.theme-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; transition: background-color .2s; }
.theme-btn:hover { background: var(--surface); }
.theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .theme-btn .sun { display: none; }
    :root:not([data-theme]) .theme-btn .moon { display: block; }
}
@media (min-width: 640px) { .nav-links .opt { display: block; } }

/* Footer */
.footer { padding: clamp(2.5rem, 6vw, 4rem) 0 2.5rem; }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding-bottom: 1.6rem; border-bottom: 1px solid var(--line); }
.footer .mail { display: inline-flex; align-items: center; gap: .55rem; font: 650 clamp(1.25rem, 3.5vw, 1.75rem)/1.2 var(--display); letter-spacing: -.02em; text-decoration: none; overflow-wrap: anywhere; }
.footer .mail:hover { color: var(--accent); }
.footer-links { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: .93rem; padding: .3rem 0; }
.footer-links a:hover { color: var(--ink); }
.footer p { color: var(--muted); font-size: .9rem; margin-top: 1.2rem; max-width: 70ch; }
.footer .contact-line { margin-top: .35rem; }
.footer .contact-line a { color: var(--ink); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Shared page chrome for tool pages */
.page { padding-block: clamp(1.5rem, 5vw, 3rem) clamp(2.5rem, 6vw, 4rem); }
.page-head h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1.02; letter-spacing: -.035em; text-wrap: balance; }
.page-head p { margin-top: .7rem; color: var(--muted); max-width: 62ch; }
.crumb { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; color: var(--muted); text-decoration: none; font-size: .92rem; }
.crumb:hover { color: var(--ink); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: clamp(1rem, 3vw, 1.5rem); }
.stack > * + * { margin-top: 1rem; }
.note { color: var(--muted); font-size: .9rem; }
.notice { border-left: 3px solid var(--accent); padding: .6rem .9rem; background: var(--surface); border-radius: 0 10px 10px 0; font-size: .93rem; }
label, .label { display: block; font-weight: 550; font-size: .93rem; margin-bottom: .35rem; }
input, select, textarea, button { font: inherit; color: inherit; }
input[type="text"], input[type="number"], input[type="date"], input[type="email"], input[type="password"], input[type="search"], select, textarea {
    width: 100%; min-height: 44px; padding: .55rem .75rem; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink);
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: .55rem 1.05rem; border-radius: 10px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { opacity: .9; }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn.danger { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
.table-scroll { overflow-x: auto; max-width: 100%; }
.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; }
.footer-links a, .nav-links a { min-height: 44px; display: inline-flex; align-items: center; }
