/* Lattr — what's next. Light/dark via prefers-color-scheme. */
/* Object Sans (licensed, pangrampangram.com) — same files as the Drive SPA */
@font-face { font-family:'Object Sans'; font-weight:400; font-style:normal; font-display:swap; src:url('fonts/ObjectSans-Regular.woff2') format('woff2'),url('fonts/ObjectSans-Regular.woff') format('woff'); }
@font-face { font-family:'Object Sans'; font-weight:500; font-style:normal; font-display:swap; src:url('fonts/ObjectSans-Regular.woff2') format('woff2'),url('fonts/ObjectSans-Regular.woff') format('woff'); }
@font-face { font-family:'Object Sans'; font-weight:600; font-style:normal; font-display:swap; src:url('fonts/ObjectSans-Bold.woff2') format('woff2'),url('fonts/ObjectSans-Bold.woff') format('woff'); }
@font-face { font-family:'Object Sans'; font-weight:700; font-style:normal; font-display:swap; src:url('fonts/ObjectSans-Bold.woff2') format('woff2'),url('fonts/ObjectSans-Bold.woff') format('woff'); }
@font-face { font-family:'Object Sans'; font-weight:800; font-style:normal; font-display:swap; src:url('fonts/ObjectSans-Heavy.woff2') format('woff2'),url('fonts/ObjectSans-Heavy.woff') format('woff'); }
:root {
  color-scheme: light;
  --surface-1: #fcfcfb;
  --page: #f7f7f4;
  --ink-1: #0b0b0b;
  --ink-2: #52514e;
  --ink-muted: #898781;
  --hairline: #e1e0d9;
  --border: rgba(11,11,11,0.10);
  --accent: #5558d9;
  --accent-deep: #3f42b8;
  --good: #0ca30c;
  --good-text: #006300;
  --warning: #cc8b00;
  --critical: #d03b3b;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --surface-1: #1a1a19;
    --page: #0d0d0d;
    --ink-1: #ffffff;
    --ink-2: #c3c2b7;
    --ink-muted: #898781;
    --hairline: #2c2c2a;
    --border: rgba(255,255,255,0.10);
    --accent: #7b7ef0;
    --accent-deep: #a3a5f5;
    --good: #0ca30c;
    --good-text: #35c035;
    --warning: #e0a52e;
    --critical: #e05b5b;
  }
}
* { box-sizing: border-box; margin: 0; }
body {
  font-family: 'Object Sans', system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--page); color: var(--ink-1);
  line-height: 1.5;
}

/* wordmark + auth */
.wordmark { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; color: var(--accent); }
.wordmark.small { font-size: 22px; }
.tagline { color: var(--ink-2); font-size: 14px; margin: 2px 0 18px; }
.tagline.inline { margin: 0 0 0 10px; font-size: 13px; }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 14px;
  padding: 32px; width: 100%; max-width: 380px;
}
.auth-card label { margin-top: 12px; }
.auth-card input { width: 100%; margin-bottom: 4px; }
.auth-card button { width: 100%; margin-top: 16px; }
.auth-msg { margin-top: 10px; font-size: 13px; color: var(--critical); min-height: 18px; }
.auth-msg.ok { color: var(--good-text); }
.auth-links { margin-top: 14px; display: flex; gap: 16px; flex-wrap: wrap; }
.auth-links a { color: var(--accent); font-size: 13px; text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }

/* layout */
.wrap { max-width: 1060px; margin: 0 auto; padding: 20px 24px; }
header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
nav { display: flex; gap: 6px; align-items: center; }
.tab { border: none; background: none; color: var(--ink-2); padding: 8px 12px; border-radius: 8px; font: 600 14px 'Object Sans', system-ui; cursor: pointer; }
.tab.active { background: var(--surface-1); color: var(--accent); border: 1px solid var(--border); }
.ghost { border: none; background: none; color: var(--ink-muted); font: 500 13px 'Object Sans', system-ui; cursor: pointer; padding: 8px; }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.tilerow { display: grid; grid-template-columns: 220px 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 760px) { .cols, .grid2, .tilerow { grid-template-columns: 1fr; } }
.card {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px; margin-bottom: 16px;
}
.rowline { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }

label { font-weight: 600; font-size: 13px; display: block; margin-bottom: 6px; }
textarea {
  width: 100%; min-height: 220px; resize: vertical;
  background: var(--page); color: var(--ink-1);
  border: 1px solid var(--hairline); border-radius: 8px;
  padding: 10px; font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
}
textarea.tall { min-height: 320px; }
textarea:focus, input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
input[type="text"], input[type="password"] {
  background: var(--page); color: var(--ink-1);
  border: 1px solid var(--hairline); border-radius: 8px;
  padding: 9px 10px; font: 13px 'Object Sans', system-ui, sans-serif;
}
.grow { flex: 1; min-width: 160px; }

.btnrow { display: flex; gap: 10px; margin: 16px 0; align-items: center; flex-wrap: wrap; }
.btnrow.tight { margin: 10px 0 0; }
button {
  font: 600 14px 'Object Sans', system-ui, sans-serif; cursor: pointer;
  border-radius: 8px; padding: 10px 18px; border: 1px solid var(--border);
  background: var(--surface-1); color: var(--ink-1);
}
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover { background: var(--accent-deep); }
button.mini { font-size: 12px; padding: 5px 12px; }
button:disabled { opacity: .5; cursor: default; }

/* results */
h2 { font-size: 15px; margin-bottom: 10px; }
h2 .count { color: var(--ink-muted); font-weight: 400; }
.stat-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-muted); }
.stat-value { font-size: 44px; font-weight: 700; line-height: 1.1; margin: 2px 0 8px; }
.meter { height: 8px; border-radius: 4px; background: var(--hairline); overflow: hidden; }
.meter > div { height: 100%; border-radius: 4px; background: var(--accent); transition: width .4s ease; }
.stat-note { font-size: 12px; color: var(--ink-2); margin-top: 8px; }
ul.clean { list-style: none; padding: 0; }
ul.clean li { padding: 6px 0; border-bottom: 1px solid var(--hairline); font-size: 13.5px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
ul.clean li:last-child { border-bottom: none; }
.chipgrid { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 12.5px; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--hairline); color: var(--ink-1); background: var(--page);
  display: inline-flex; align-items: center; gap: 5px;
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ok .dot { background: var(--good); }
.miss .dot { background: var(--critical); }
.ok-ic { color: var(--good-text); font-weight: 700; }
.miss-ic { color: var(--critical); font-weight: 700; }
.warn-ic { color: var(--warning); font-weight: 700; }
.req-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; border-radius: 4px; padding: 1px 6px; border: 1px solid var(--hairline); color: var(--ink-2); flex: none; }
.check-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--hairline); font-size: 13.5px; }
.check-item:last-child { border-bottom: none; }
.check-item input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.check-item b { display: block; }
.check-item span { color: var(--ink-2); font-size: 12.5px; }

/* applications table */
.scroll-x { overflow-x: auto; }
table.apps { width: 100%; border-collapse: collapse; font-size: 13px; }
table.apps th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-muted); padding: 6px 8px; border-bottom: 1px solid var(--hairline); white-space: nowrap; }
table.apps td { padding: 6px 8px; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
table.apps tr:last-child td { border-bottom: none; }
table.apps a { color: var(--accent); }
select {
  background: var(--page); color: var(--ink-1);
  border: 1px solid var(--hairline); border-radius: 6px;
  padding: 4px 6px; font: 12.5px 'Object Sans', system-ui, sans-serif;
}

.memnote { font-size: 12px; color: var(--ink-muted); }
.pad-b { margin-bottom: 10px; }
footer { margin-top: 8px; font-size: 12px; color: var(--ink-muted); }
