/* cyclotron: aippaci.in brand kit (projects/aippaci.in/brand/BRAND.md). Theme follows the OS. */
:root {
  --ink: #193038; --accent: #5F9A78; --badge: #FFFB85; --cta: #FFF06A;
  --muted: rgba(25,48,56,.58); --line: rgba(25,48,56,.12); --line2: rgba(25,48,56,.24);
  --paper: #FFFFFF; --soft: #F5F7F1; --card: #F7F9F3; --hover: rgba(25,48,56,.06);
  --bad: #A8432F; --warn: #8A6A12;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #FFFFFF; --muted: rgba(255,255,255,.55); --line: rgba(255,255,255,.10); --line2: rgba(255,255,255,.22);
    --paper: #0D1A1F; --soft: #081216; --card: rgba(255,255,255,.04); --hover: rgba(255,255,255,.06);
    --bad: #E08A76; --warn: #E3C766;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 16px/1.55 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); background: var(--soft); min-height: 100vh; display: flex; flex-direction: column;
}
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
main.wrap { flex: 1; padding-top: 40px; padding-bottom: 56px; }
[hidden] { display: none !important; }

.top { background: var(--paper); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 24px; min-height: 64px; flex-wrap: wrap; }
.brand img { display: block; height: 30px; width: auto; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px; padding: 8px 14px; border-radius: 999px; }
.nav a:hover { background: var(--hover); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.who { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }

h1 { font-size: 48px; line-height: 1.1; font-weight: 900; margin: 0 0 12px; letter-spacing: -.01em; }
h2 { font-size: 22px; font-weight: 900; margin: 32px 0 4px; }
.card h2 { margin-top: 0; }
.sub { font-size: 18px; color: var(--muted); margin: 0 0 28px; max-width: 46em; }
.help, .hint { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.hint { margin: 2px 0 8px; }
.note { font-size: 14px; min-height: 1.5em; margin: 8px 0 0; }
.note.bad { color: var(--bad); }

.btn-primary, .btn-secondary {
  font: inherit; font-weight: 800; border-radius: 999px; padding: 11px 22px; cursor: pointer; color: var(--ink);
}
.btn-primary { background: var(--badge); border: 1px solid transparent; color: #193038; }
.btn-primary:hover { background: var(--cta); }
.btn-secondary { background: transparent; border: 1px solid var(--line2); }
.btn-secondary:hover { background: var(--hover); }
a { color: var(--accent); font-weight: 700; }
.btn-link { font: inherit; background: none; border: 0; padding: 0; color: var(--accent); font-weight: 700; cursor: pointer; text-decoration: underline; }
button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.signin { max-width: 560px; padding-top: 40px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; padding: 24px; margin-bottom: 16px; }
.grid .card { margin: 0; }
.card h3 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 8px; }
.big { font-size: 26px; font-weight: 900; margin: 0 0 4px; }
dl.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 12px 0 0; font-size: 14px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }

.chip { display: inline-block; font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line2); vertical-align: middle; }
.chip.good { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.chip.warn { color: var(--warn); border-color: currentColor; }
.chip.bad { color: var(--bad); border-color: currentColor; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.tile { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.tile .tile-label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.tile strong { font-size: 19px; font-weight: 900; white-space: nowrap; }
.pos { color: var(--accent); }
.neg { color: var(--bad); }

.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
.empty { background: var(--paper); border: 1px dashed var(--line2); border-radius: 18px; padding: 20px; color: var(--muted); }

label { display: block; font-weight: 700; font-size: 14px; margin-top: 8px; }
input[type=password], input[type=number] {
  font: inherit; width: 100%; max-width: 520px; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--line2); background: var(--paper); color: var(--ink); margin: 6px 0 12px; display: block;
}
.switch { display: flex; align-items: flex-start; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.switch:first-child { border-top: 0; }
.switch input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--accent); flex: none; }
.switch b { display: block; }
.switch small { display: block; color: var(--muted); font-size: 14px; font-weight: 400; }
.switch label { margin: 0; }
.switch.locked { opacity: .7; }
.state { font-weight: 700; margin: 0 0 8px; }

.foot { border-top: 1px solid var(--line); background: var(--paper); color: var(--muted); font-size: 14px; padding: 18px 0; }

@media (max-width: 640px) {
  h1 { font-size: 40px; }
  .wrap { padding: 0 16px; }
  main.wrap { padding-top: 28px; }
  .nav { gap: 2px; }
  .nav a { padding: 6px 10px; font-size: 14px; }
  .who { margin-left: 0; width: 100%; padding-bottom: 10px; }
  .top-in { gap: 8px 16px; padding-top: 10px; }
  .grid { grid-template-columns: 1fr; }
}
.switch .note { display: inline; min-height: 0; margin: 0; }
.lines { margin: 0; padding-left: 20px; font-size: 15px; }
.lines li { margin: 2px 0; }
