/* The full version's surfaces, controls and typography (web/style.css), limited
   to what this page uses. This file is served before signing in. */
@font-face { font-family: 'Hanken Grotesk'; src: url('fonts/hanken-grotesk.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('fonts/jetbrains-mono.woff2') format('woff2'); font-weight: 400 500; font-display: swap; }
@font-face { font-family: 'IBM Plex Serif'; src: url('fonts/ibm-plex-serif.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Noto Serif JP'; src: url('fonts/noto-serif-logo.woff2') format('woff2'); font-weight: 300 900; font-display: swap; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface-1: #f4f4f5;
  --surface-2: #e7e7ea;
  --surface-raised: #ffffff;
  --surface-bubble: #ffffff;
  --surface-hover: #e9e9ee;
  --border: #e4e4e7;
  --border-subtle: #a1a1aa;
  --text: #18181b;
  --text-muted: #52525b;
  --text-subtle: #71717a;
  --text-faint: #a1a1aa;
  --red: #b91c1c;
  --font: 'Hanken Grotesk', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  --font-display: 'IBM Plex Serif', Georgia, serif;
  --font-logo: 'Noto Serif JP', Georgia, 'Times New Roman', serif;
}
html.dark {
  color-scheme: dark;
  --bg: #121214;
  --surface-1: #1c1c20;
  --surface-2: #27272b;
  --surface-raised: #2a2a2f;
  --surface-bubble: #26262c;
  --surface-hover: #33333b;
  --border: #3f3f46;
  --border-subtle: #71717a;
  --text: #f4f4f5;
  --text-muted: #d4d4d8;
  --text-subtle: #a1a1aa;
  --text-faint: #71717a;
  --red: #f87171;
}
html { font-size: 14px; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font);
  font-weight: 450; line-height: 1.5; min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
button, input { font: inherit; }
button { cursor: pointer; border: 0; padding: 10px 18px; min-height: 40px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .3px; color: var(--text-muted); background: var(--surface-2); white-space: nowrap; }
button, input { transition: color 150ms, background-color 150ms, box-shadow 150ms, opacity 150ms; }
button:hover { background: var(--surface-hover); color: var(--text); }
button:focus-visible, summary:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--border-subtle); }
button:disabled, button:disabled:hover { cursor: default; opacity: .4; }
button.primary { background: var(--text); color: var(--bg); }
button.primary:hover { opacity: .85; }
input { min-width: 0; border: 1px solid transparent; outline: none; border-radius: 999px; background: var(--surface-1); color: var(--text); padding: 10px 16px; }
input:focus { border-color: var(--border-subtle); }
input:-webkit-autofill { -webkit-text-fill-color: var(--text); box-shadow: 0 0 0 100px var(--surface-1) inset; }
::selection { background: var(--text-muted); color: var(--bg); }

.logo { display: inline-flex; align-items: baseline; font: 900 30px var(--font-logo); letter-spacing: -0.05em; color: var(--text); }
.logo-tag { margin-left: 8px; font: 400 14px var(--font); letter-spacing: 0; color: var(--text-faint); }
.header-actions { display: flex; align-items: center; gap: 6px; }
.theme-toggle { width: 36px; height: 36px; min-height: 36px; border-radius: 50%; color: var(--text-muted); background: transparent; display: grid; place-items: center; flex-shrink: 0; padding: 0; }
.theme-toggle:hover { background: var(--surface-1); color: var(--text); }
.icon-dark, html.dark .icon-light { display: none; }
html.dark .icon-dark { display: block; }

.auth-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 100dvh; }
.auth-column { display: flex; flex-direction: column; min-height: 100dvh; }
.auth-header { display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding: 12px 32px; }
.auth-main { display: flex; flex: 1; align-items: center; justify-content: center; padding: 56px 32px; }
.auth-form { width: 100%; max-width: 384px; display: flex; flex-direction: column; gap: 16px; }
.auth-form h1 { font: 600 36px/1.2 var(--font-display); letter-spacing: -1px; margin-bottom: 12px; }
.auth-intro { font-size: 14px; color: var(--text-subtle); margin-top: -12px; margin-bottom: 8px; }
.auth-field { position: relative; height: 56px; border-radius: 999px; background: var(--surface-1); }
.auth-field:focus-within { background: var(--surface-2); }
.auth-field-icon { position: absolute; left: 18px; top: 19px; color: var(--text-subtle); pointer-events: none; }
.auth-field input { width: 100%; height: 100%; border: 0; outline: none; border-radius: inherit; background: transparent; color: var(--text); padding: 0 20px 0 48px; font-size: 14px; }
.auth-field label { position: absolute; left: 48px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--text-subtle); pointer-events: none; transition: opacity 150ms; }
.auth-field input:focus + label, .auth-field input:not(:placeholder-shown) + label { opacity: 0; }
.auth-form .auth-submit { display: flex; align-items: center; justify-content: center; gap: 8px; height: 56px; margin-top: 8px; font-size: 14px; }
.form-error { color: var(--red); font-size: 13px; padding: 0 6px; }
.auth-decoration { padding: 20px 20px 20px 16px; }
.auth-art-window { position: relative; height: 100%; overflow: hidden; border-radius: 40px; }
.auth-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
html.dark .auth-art { filter: brightness(0.75); }

.shell { width: 100%; padding: 0 16px; margin: 0 auto; }
.eyebrow { font-size: 11px; color: var(--text-subtle); letter-spacing: 1.5px; margin-bottom: 12px; }
main h1 { font: 600 32px/1.25 var(--font-display); letter-spacing: -.8px; overflow-wrap: anywhere; }
.muted { color: var(--text-subtle); line-height: 1.7; }
.settings-page { max-width: 760px; margin: 0 auto; padding: 28px 0 24px; }
.settings-intro { margin: 12px 0 24px; }
.settings-card { padding: 24px; border-radius: 16px; background: var(--surface-1); margin-bottom: 16px; min-width: 0; }
.settings-card h2 { font-size: 17px; font-weight: 600; }
.settings-card h2 .muted { font-weight: 450; }
.settings-card h3 { font-size: 13px; font-weight: 600; }
.settings-card p { font-size: 13px; }
.settings-form { display: grid; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); justify-items: start; }
.settings-form .field { display: grid; gap: 6px; width: 100%; font-size: 12px; color: var(--text-muted); }
.settings-form .field input { width: 100%; border-radius: 12px; background: var(--surface-bubble); }
.settings-card .field-hint { font-size: 12px; margin-top: 12px; }
.admin-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.admin-account { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--border); }
.admin-account:first-child { margin-top: 12px; }
.admin-account-name { flex: 1; min-width: 180px; overflow-wrap: anywhere; }
.admin-account-name strong { font-size: 14px; }
.meta { color: var(--text-subtle); font-size: 12px !important; }
.icon-button { padding: 0; width: 36px; height: 36px; min-height: 36px; display: grid; place-items: center; background: transparent; flex-shrink: 0; }
.icon-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.api-key-row { display: flex; gap: 8px; align-items: center; width: 100%; }
.api-key-row input { flex: 1; width: 0; background: var(--surface-bubble); font-family: var(--font-mono); font-size: 11px; }
.copy { min-width: 76px; }
.admin-menu { position: relative; }
.admin-menu summary { list-style: none; cursor: pointer; border-radius: 999px; color: var(--text-muted); }
.admin-menu summary::-webkit-details-marker { display: none; }
.admin-menu summary:hover, .admin-menu[open] summary { background: var(--surface-2); }
.admin-menu-list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; display: grid; min-width: 180px; padding: 6px; border-radius: 14px; background: var(--surface-raised); box-shadow: 0 8px 28px rgba(0,0,0,.16), 0 0 0 1px var(--border); }
.admin-menu-list button { text-align: left; min-height: 36px; padding: 8px 12px; border-radius: 10px; background: transparent; font-weight: 500; }
.admin-menu-list button:hover { background: var(--surface-2); }
.admin-menu-list button.danger { color: var(--red); }
.facts { display: grid; gap: 10px; margin-top: 14px; }
.facts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; font-size: 13px; }
.facts dt { color: var(--text-subtle); }
.facts dd { font: 12px var(--font-mono); overflow-wrap: anywhere; text-align: right; }

@media (max-width: 1023px) { .auth-layout { grid-template-columns: minmax(0, 1fr); } .auth-decoration { display: none; } }
@media (max-width: 767px) {
  .eyebrow { font-size: 9px; letter-spacing: 1px; }
  main h1 { font-size: 24px; }
  .settings-page { padding-top: 18px; }
  .settings-card { padding: 18px; }
}
@media (max-width: 600px) { .auth-header { padding: 12px 16px; } .auth-main { padding: 40px 24px; } .auth-form h1 { font-size: 30px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
