@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('../assets/fonts/inter-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('../assets/fonts/inter-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('../assets/fonts/roboto-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('../assets/fonts/roboto-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --cim: #3102dd; --cim-ink: #2701b4; --cim-tint: #ebe7ff;
  --cxm: #37d6ae;
  --action: var(--cim); --action-hover: var(--cim-ink);
  --ink: #00003d; --body: #4a4e75; --muted: #6b6f92;
  --paper: #ffffff; --tint: #f7f8fd; --line: #e7e9f3; --elev: #ffffff;
  --code-bg: #0b0b3b; --code-fg: #e6e8ff; --code-cmt: #8f93c4;
  --header-bg: rgba(255,255,255,0.85);
  --night: linear-gradient(112deg, #141079 0%, #0a0a56 30%, #00003d 60%, #1a0640 100%);
  --hero-wash: linear-gradient(135deg, var(--cim-tint) 0%, var(--paper) 48%, #f5e2ff 100%);
  --logo-light: none; --logo-dark: inline;
  --font: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
html[data-theme="dark"] {
  --cim-tint: #191466; --cim-ink: #9589ff;
  --action: #9589ff; --action-hover: #a79cff;
  --ink: #ffffff; --body: #b3b5e4; --muted: #9a9dc4;
  --paper: #00003d; --tint: #060633; --line: #23236a; --elev: #07074a;
  --code-bg: #04041f; --header-bg: rgba(0,0,61,0.85);
  --hero-wash: linear-gradient(135deg, #191466 0%, #00003d 48%, #3a1a55 100%);
  --logo-light: inline; --logo-dark: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); background: var(--paper); color: var(--body); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

.site-header { position: sticky; top: 0; z-index: 100; background: var(--header-bg); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); font-family: var(--font-ui); }
.header-inner { display: flex; align-items: center; gap: 14px; height: 64px; }
.brand-logo { display: flex; align-items: center; flex-shrink: 0; }
.brand-logo img { height: 28px; width: auto; }
.brand-logo .logo-light { display: var(--logo-light); }
.brand-logo .logo-dark { display: var(--logo-dark); }
.brand-sep { width: 1px; height: 22px; background: var(--line); }
.brand-sub { font-weight: 600; font-size: 0.95rem; color: var(--ink); }
.header-links { margin-left: auto; display: flex; gap: 22px; font-weight: 600; font-size: 0.9rem; color: var(--ink); }
.header-links a:hover { color: var(--action); }

.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--night); padding: 72px 0 68px; text-align: center; }
.hero > .container { position: relative; z-index: 1; max-width: 820px; }
h1 { margin: 0 0 16px; font-size: clamp(34px, 5vw, 54px); font-weight: 700; line-height: 1.08; letter-spacing: -0.028em; color: #fff; text-wrap: balance; }
.lead { margin: 0 auto 26px; max-width: 56ch; font-size: clamp(16px, 1.5vw, 18px); color: #b3b5e4; }
.hero-cta { display: flex; justify-content: center; }
.btn-onDark { display: inline-flex; align-items: center; gap: 8px; border-radius: 8px; padding: 12px 22px; font-size: 15px; font-weight: 600; background: #fff; color: #00003d; transition: background 0.16s; }
.btn-onDark:hover { background: #e9eaf7; }

.section { padding: 64px 0; }
.section-tint { background: var(--tint); }
h2 { margin: 0 0 24px; font-size: clamp(24px, 3vw, 32px); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; color: var(--ink); }
.sub { margin: 0 0 28px; font-size: 16px; color: var(--muted); max-width: 62ch; }
.sub a, .note a { color: var(--action); font-weight: 600; }
.sub a:hover, .note a:hover { text-decoration: underline; }
.note { margin: 16px 0 0; font-size: 14px; color: var(--muted); }

.finder { border: 1px solid var(--line); border-radius: 16px; background: var(--elev); padding: 24px; display: grid; gap: 20px; }
.f-row { display: grid; gap: 18px; }
.f-row-3 { grid-template-columns: 1.6fr 1fr 1fr; }
@media (max-width: 860px) { .f-row-3 { grid-template-columns: 1fr; } }
.f-field { display: grid; gap: 8px; min-width: 0; }
.f-field[hidden] { display: none; }
.f-label { font-family: var(--font-ui); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
select { font: 500 15px/1.2 var(--font); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; height: 42px; padding: 0 36px 0 12px; width: 100%; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 7'%3E%3Cpath fill='none' stroke='%236b6f92' stroke-width='1.6' stroke-linecap='round' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 12px; }
select:focus { border-color: var(--action); outline: none; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { font: 600 14px/1 var(--font-ui); height: 42px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
.seg button:hover { border-color: var(--action); }
.seg button[aria-checked="true"] { background: var(--action); border-color: var(--action); color: #fff; }
html[data-theme="dark"] .seg button[aria-checked="true"] { color: #00003d; }
.seg button[disabled] { opacity: 0.4; cursor: not-allowed; }
@media (max-width: 560px) { .seg { flex-direction: column; } .seg button { width: 100%; } }
.f-result { border-top: 1px solid var(--line); padding-top: 20px; display: grid; gap: 12px; }
.f-result > * { animation: f-in 0.22s ease both; }
@keyframes f-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.f-field select { transition: border-color 0.16s ease; }
.f-url { display: flex; align-items: center; gap: 10px; background: var(--code-bg); color: var(--code-fg); border-radius: 10px; padding: 12px 14px; font-family: var(--mono); font-size: 14px; min-width: 0; }
.f-url code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; }
.f-url a, .f-url .f-copy { flex: none; font: 600 12px/1 var(--font-ui); color: #fff; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2); border-radius: 6px; padding: 7px 10px; cursor: pointer; }
.f-url a:hover, .f-url .f-copy:hover { background: rgba(255,255,255,0.2); }
.f-empty { font-size: 14px; color: var(--muted); margin: 0; }

.keys { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 800px) { .keys { grid-template-columns: 1fr; } }
.key { display: grid; gap: 12px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--elev); min-width: 0; }
.key h3 { margin: 0; font-size: 17px; font-weight: 700; color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.key-dl { display: grid; grid-template-columns: max-content 1fr; gap: 5px 16px; margin: 0; font-size: 14px; }
.key-dl dt { color: var(--muted); }
.key-dl dd { margin: 0; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.key-dl a { color: var(--action); font-weight: 600; }
.fp { font-family: var(--mono); font-size: 13.5px; }
@media (max-width: 480px) { .key-dl { grid-template-columns: 1fr; gap: 2px 0; } .key-dl dt { margin-top: 8px; } }
.key-instr { margin: 0; font-size: 14px; color: var(--muted); }

.site-footer { background: #000; color: #c8cbe6; padding: 56px 0 26px; font-family: var(--font-ui); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 36px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-logo img { height: 28px; width: auto; margin-bottom: 16px; }
.footer-blurb { font-size: 0.92rem; color: #9b9fc6; max-width: 32ch; margin: 0; }
.footer-social { display: flex; gap: 12px; margin-top: 18px; }
.footer-social a { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,0.15); border-radius: 999px; color: #c8cbe6; }
.footer-social a:hover { border-color: #fff; color: #fff; }
.footer-col-heading { color: #fff; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 14px; }
.footer-col a { display: block; padding: 5px 0; font-size: 0.9rem; color: #9b9fc6; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.82rem; color: #8488b0; }
.footer-bottom a { color: #8488b0; }
.footer-bottom a:hover { color: #fff; }
.footer-bottom-links { display: flex; gap: 18px; flex-wrap: wrap; }
.status-link { display: inline-flex; align-items: center; gap: 7px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cxm); }

.lang { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; isolation: isolate; }
.lang::before { content: ''; position: absolute; top: 2px; bottom: 2px; left: 2px; width: calc((100% - 6px) / 2); border-radius: 6px; background: var(--action); transform: translateX(calc(var(--lang-index, 0) * (100% + 2px))); transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1); z-index: -1; }
.lang button { font: 600 12px/1 var(--font-ui); padding: 6px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; transition: color 0.16s ease; }
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { color: #fff; }
html[data-theme="dark"] .lang button[aria-pressed="true"] { color: #00003d; }
.header-links { align-items: center; }

[data-i18n], .finder { transition: opacity 0.16s ease; }
html.lang-fading [data-i18n], html.lang-fading .finder { opacity: 0; }
