/* app/public/style.css — the canvas turned into one stylesheet.
 *
 * Colours, radii and type sizes come from design/*.dc.html. The canvas linked
 * Google Fonts; the app does not, because the Content-Security-Policy is
 * `default-src 'self'` (KTD7). Onest and Commissioner are named first anyway,
 * so a machine that has them installed shows the intended faces.
 *
 * Every tap target is at least 44px tall and looks different from the text
 * around it.
 */

:root {
  --bg: #eef0f4;
  --card: #ffffff;
  --ink: #15171c;
  --muted: #5b616e;
  --faint: #8a909c;
  --line: #eef0f4;
  --blue: #1d4ed8;
  --blue-dark: #1e3a8a;
  --blue-soft: #dbeafe;
  --green: #047857;
  --green-soft: #ecfdf5;
  --slate: #475569;
  --grey-soft: #e5e7eb;
  --grey-ink: #374151;
  --amber-soft: #fef3c7;
  --amber-ink: #92400e;
  --red: #b3221f;
  --red-soft: #fee2e2;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Onest, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

h1,
h2 {
  font-family: Commissioner, "Helvetica Neue", Arial, sans-serif;
  margin: 0;
}

a {
  color: var(--blue);
}
a:hover {
  color: var(--blue-dark);
}

/* --- header and tabs ---------------------------------------------------- */

.head {
  background: var(--card);
  padding: 16px 16px 8px;
  position: sticky;
  top: 0;
  z-index: 2;
}
.head-thin {
  padding: 0 16px;
}
.head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
  min-height: 56px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand h1 {
  font-size: 24px;
  font-weight: 700;
}
.who {
  font-size: 13px;
  color: var(--faint);
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--blue);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.tabs {
  display: flex;
  gap: 6px;
  max-width: 480px;
  margin: 12px auto 0;
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 14px;
  border-radius: 22px;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.tab-on {
  background: var(--ink);
  color: #fff;
  font-weight: 600;
}
.tab .tab-n {
  color: var(--faint);
}
.tab-on .tab-n {
  color: #fff;
  opacity: 0.7;
}

/* --- lists -------------------------------------------------------------- */

.list,
.lead,
.login {
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hint {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.empty {
  margin: 24px 0;
  font-size: 15px;
  color: var(--muted);
  text-align: center;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--card);
}
.card-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: inherit;
  text-decoration: none;
  min-height: 44px;
}
.card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}
.card-marks {
  margin-left: auto;
  display: inline-flex;
  gap: 6px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}
.card-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
}
.card-title svg {
  flex: none;
  align-self: center;
}
.card-line {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-sub {
  margin: 0;
  font-size: 13px;
  color: var(--faint);
}
.note {
  margin: 4px 0 0;
  font-size: 13px;
}
.note-bad {
  color: var(--red);
}
.note-wait {
  color: var(--amber-ink);
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-core {
  background: var(--green-soft);
  color: var(--green);
}
.badge-noncore {
  background: var(--blue-soft);
  color: var(--blue);
}
.badge-unsure {
  background: var(--grey-soft);
  color: var(--grey-ink);
}
.badge-archive {
  background: var(--amber-soft);
  color: var(--amber-ink);
}

/* --- lead screen -------------------------------------------------------- */

.lead-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lead-head h1 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  word-break: break-word;
}

.sugg {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 14px;
}
.sugg p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
}
.sugg-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}
.sugg-core {
  background: var(--green-soft);
  color: var(--green);
}
.sugg-noncore {
  background: var(--blue-soft);
  color: var(--blue);
}
.sugg-unsure {
  background: var(--grey-soft);
  color: var(--grey-ink);
}

.rows {
  display: flex;
  flex-direction: column;
  padding: 4px 16px;
  border-radius: 14px;
  background: var(--card);
}
.row-head {
  padding: 12px 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.row {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  font-size: 15px;
  line-height: 1.4;
  box-shadow: 0 -1px 0 var(--line);
}
.rows .row:first-of-type {
  box-shadow: none;
}
.row-key {
  width: 108px;
  flex: none;
  color: var(--muted);
  font-size: 13px;
  padding-top: 2px;
}
.row-val {
  color: var(--ink);
  word-break: break-word;
  min-width: 0;
}
.row-val.wrap {
  white-space: pre-wrap;
}
.void {
  color: var(--faint);
}
.tap {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
  word-break: break-all;
}

.raw {
  background: var(--card);
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--muted);
}
.raw summary {
  cursor: pointer;
  min-height: 32px;
  display: flex;
  align-items: center;
}
.raw pre {
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 12px;
}

/* --- buttons ------------------------------------------------------------ */

.gos {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}
.go {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-height: 56px;
  padding: 10px 16px;
  border: 0;
  border-radius: 14px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
}
.go-title {
  font-size: 17px;
  font-weight: 600;
}
.go-note {
  font-size: 13px;
  opacity: 0.85;
  font-weight: 400;
}
.go-core {
  background: var(--green);
}
.go-noncore {
  background: var(--blue);
}
.go-spam {
  background: var(--slate);
}
.go-primary {
  background: var(--blue);
  align-items: center;
  text-align: center;
}
.go-quiet {
  background: var(--bg);
  color: var(--ink);
  min-height: 44px;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 15px;
  box-shadow: inset 0 0 0 1px #d5d9e2;
}
.go-wait {
  background: var(--amber-soft);
  color: var(--amber-ink);
  align-items: flex-start;
  font-size: 15px;
}
.go[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.banner {
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
}
.banner-bad {
  background: var(--red-soft);
  color: var(--red);
}
.banner-done {
  background: var(--card);
  color: var(--ink);
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  word-break: break-word;
}

/* --- login -------------------------------------------------------------- */

.screen-login {
  min-height: 100vh;
}
.login {
  justify-content: center;
  gap: 24px;
  min-height: 100vh;
  padding: 24px 24px 12px;
}
.login-top {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.login-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
}
.login h1 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
}
.lede {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.picks {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pick {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 16px;
  border-radius: 12px;
  background: var(--card);
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
}
.pick input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.pick-mark {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px #c3c8d3;
  flex: none;
}
.pick:has(input:checked) {
  box-shadow: inset 0 0 0 2px var(--blue);
  font-weight: 600;
}
.pick:has(input:checked) .pick-mark {
  background: var(--blue);
  box-shadow: none;
}
.pick input:focus-visible + .pick-mark {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.input {
  height: 52px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: var(--card);
  font-family: inherit;
  font-size: 17px;
  color: var(--ink);
}
.login-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.login-foot p {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--faint);
}
.login-foot svg {
  flex: none;
  width: 110px;
  height: 125px;
}

/* The name in the corner is the way out, so every screen carries the token. */
.who-form {
  margin: 0;
}
.who-out {
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--faint);
  min-height: 44px;
  padding: 0 4px;
  cursor: pointer;
}
