/* The FunBrowser console: the approved mock-up's shell and tokens (documentation/mockups/console/template.html),
   with the pieces the real pages need (dialogs, chips, forms, the sign-in screens). No inline style anywhere: the
   server's Content-Security-Policy refuses it, so every look is a class here. */
@font-face { font-family: Fredoka; src: url(fredoka-latin.woff2) format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: Nunito; src: url(nunito-latin.woff2) format("woff2"); font-weight: 200 1000; font-display: swap; }
:root {
  --stone: #ece4d6; --tile: #fbf6ee; --raised: #ffffff; --inset: #f3ecdf; --shade: #ded3c0;
  --ink: #141837; --mute: #3f4466; --faint: #6a6f8c; --link: #4b3fd6;
  --gold: #ffcb52; --gold2: #ff9d2e; --goldBg: #fff1c9; --goldInk: #8a5a00;
  --green: #2f9e6b; --greenInk: #14532d; --greenBg: #e0f4e6; --red: #b83a2a; --redBg: #f9ded8;
  --blueBg: #e4e6ff; --blueInk: #3a33a8;
  --sideA: #1c2052; --sideB: #0e1130; --onDark: #f4f2ff; --onDarkMute: #a9acd6;
  --btnBg: var(--raised); --hover: rgba(111,91,255,.06); --stripe: #eee6d8;
  --cardShadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 4px 14px rgba(60,45,20,.10);
  --btnShadow: 0 1px 3px rgba(60,45,20,.22); --fieldShadow: inset 1px 1px 3px rgba(90,70,40,.20);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --stone: #2a2e68; --tile: #0e1130; --raised: #1c2052; --inset: #262a60; --shade: #30346f;
  --ink: #f4f2ff; --mute: #c9cbea; --faint: #9da0c8; --link: #b6adff;
  --goldBg: rgba(255,203,82,.16); --goldInk: #ffd874;
  --green: #3baa78; --greenInk: #9bf0b8; --greenBg: rgba(74,222,128,.14); --red: #ff9b8a; --redBg: rgba(255,90,70,.18);
  --blueBg: rgba(111,91,255,.25); --blueInk: #cfc9ff;
  --sideA: #0a0d28; --sideB: #06081c; --btnBg: #2a2e68; --hover: rgba(255,255,255,.05); --stripe: #232760;
  --cardShadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 4px 14px rgba(0,0,0,.35);
  --btnShadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 1px 3px rgba(0,0,0,.4); --fieldShadow: inset 1px 1px 3px rgba(0,0,0,.4);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--tile); color: var(--ink); font-family: Nunito, "Segoe UI", system-ui, sans-serif; font-size: 14.5px; }
button { font: inherit; cursor: pointer; border: 0; }
button:disabled { cursor: default; opacity: .5; }
input, textarea, select { font: inherit; color: inherit; }
a { color: var(--link); }
svg.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold2); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icons { position: absolute; width: 0; height: 0; overflow: hidden; }
.boot { min-height: 100%; display: grid; place-items: center; color: var(--faint); }

.app { height: 100%; display: grid; grid-template-columns: 236px 1fr; }
.side { background: linear-gradient(180deg, var(--sideA), var(--sideB)); color: var(--onDark); padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 7px; font-family: Fredoka, Nunito, sans-serif; font-weight: 600; font-size: 16.5px; padding: 2px 4px 14px; }
.brand .kite { width: 28px; height: 28px; flex: none; }
.brand small { font-family: Nunito, sans-serif; font-weight: 700; color: var(--onDarkMute); font-size: 12px; margin-left: 2px; }
.brand .theme { margin-left: auto; background: none; color: var(--onDarkMute); padding: 5px; border-radius: 9px; display: inline-flex; }
.brand .theme:hover { background: rgba(255,255,255,.08); color: var(--onDark); }
.brand .theme[aria-checked="true"] { color: var(--gold); }
.side h6 { margin: 12px 8px 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--onDarkMute); font-weight: 800; }
.nv { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 10px; color: #e3e1f7; font-size: 14px; font-weight: 600; background: none; text-align: left; width: 100%; text-decoration: none; }
.nv:hover { background: rgba(255,255,255,.06); }
.nv svg { color: var(--onDarkMute); }
.nv b { margin-left: auto; font-weight: 800; font-size: 12px; padding: 1px 7px; border-radius: 9px; background: rgba(255,255,255,.1); }
.nv b.rd { background: var(--gold2); color: #2a1a00; }
.nv.on { background: rgba(255,255,255,.11); color: #fff; }
.nv.on svg { color: var(--gold); }
.side .me { margin-top: auto; padding: 10px 8px 0; border-top: 1px solid rgba(255,255,255,.1); font-size: 12.5px; color: var(--onDarkMute); line-height: 1.45; }
.side .me b { color: var(--onDark); font-weight: 800; display: block; font-size: 14px; overflow-wrap: anywhere; }
.side .me .roles { display: block; }
.side .me button { background: none; color: var(--gold); padding: 6px 0 0; font-size: 12.5px; font-weight: 700; display: block; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.top { display: flex; align-items: center; gap: 12px; padding: 14px 22px; border-bottom: 1px solid var(--shade); flex-wrap: wrap; }
.top .right { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.body { flex: 1; overflow-y: auto; padding: 18px 22px 40px; display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: max-content; gap: 12px; align-content: start; }
h2.t { margin: 0; font-family: Fredoka, Nunito, sans-serif; font-weight: 600; font-size: 22px; letter-spacing: -.2px; }
h3.h { margin: 6px 0 0; font-family: Fredoka, Nunito, sans-serif; font-weight: 600; font-size: 17px; }
.sub { color: var(--faint); font-size: 13.5px; }
.meta { color: var(--faint); font-size: 12.5px; }
.meta.bad, .bad { color: var(--red); }
.meta.ok { color: var(--greenInk); }
p.meta, p.rule { margin: 0; }
.rule { color: var(--faint); font-size: 12.5px; line-height: 1.5; }
.card { background: var(--raised); border-radius: 16px; padding: 14px 16px; box-shadow: var(--cardShadow); min-width: 0; }
.card.tight { padding: 4px 6px; overflow-x: auto; }
.card h4 { margin: 0 0 8px; font-size: 15px; display: flex; align-items: center; gap: 7px; }
.card h4 svg { color: var(--gold2); }
.card h4 .pill { margin-left: 4px; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.grow { flex: 1; min-width: 180px; }
.cols { display: flex; gap: 18px; align-items: flex-start; }
.col { display: flex; flex-direction: column; gap: 12px; min-width: 0; flex: 1; }
.col.wide2 { flex: 1.4; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 8px; font-size: 11.5px; font-weight: 800; background: var(--inset); color: var(--mute); white-space: nowrap; }
.pill.rd { background: var(--redBg); color: var(--red); }
.pill.am { background: var(--goldBg); color: var(--goldInk); }
.pill.gr { background: var(--greenBg); color: var(--greenInk); }
.pill.bl { background: var(--blueBg); color: var(--blueInk); }
.pill + .pill { margin-left: 4px; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 11px; font-weight: 800; font-size: 13px; background: var(--btnBg); color: var(--ink); box-shadow: var(--btnShadow); white-space: nowrap; text-decoration: none; }
.btn.p { background: linear-gradient(180deg, var(--gold), var(--gold2)); color: #2a1a00; }
.btn.d { background: var(--redBg); color: var(--red); box-shadow: none; }
.btn.q { background: none; box-shadow: none; color: var(--link); padding: 8px 6px; }
.btn.sel, .btn[aria-pressed="true"] { outline: 2px solid var(--gold2); }
.btn.sm { padding: 5px 9px; font-size: 12.5px; }
.btn.wide { justify-content: center; padding: 11px; }
td.act .btn + .btn { margin-left: 4px; }
.field { width: 100%; background: var(--inset); border: 0; border-radius: 11px; padding: 10px 12px; box-shadow: var(--fieldShadow); }
select.field { width: auto; }
textarea.field { resize: vertical; min-height: 42px; line-height: 1.4; }
textarea.field.tall { min-height: 120px; }
input.field.short { width: 160px; }
select.field { min-width: 0; max-width: 100%; text-overflow: ellipsis; }   /* a long option does not widen the page */
.field.code6 { font-family: Consolas, "SF Mono", Menlo, monospace; letter-spacing: 6px; font-size: 20px; text-align: center; }
label.lab { font-size: 12.5px; font-weight: 800; color: var(--mute); }
label.lab small, .lab small { font-weight: 600; color: var(--faint); }
label.check { display: inline-flex; gap: 8px; align-items: center; font-size: 13.5px; }
.form { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 12px; align-items: center; }
.form > .full { grid-column: 1 / -1; }
table.q { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.q th { text-align: left; font-weight: 800; color: var(--faint); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; padding: 6px 10px; }
table.q th.num { text-align: right; }
table.q td { padding: 10px; border-top: 1px solid var(--stone); vertical-align: middle; }
table.q td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.q td.act { text-align: right; white-space: nowrap; }
table.q td.tick, table.q th.tick { width: 30px; padding-right: 0; }
table.q tr.click { cursor: pointer; }
table.q tr.click:hover td { background: var(--hover); }
table.q tr.sel td { background: var(--hover); box-shadow: inset 0 0 0 0 transparent; }
table.q tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--gold2); }
table.q td b.h, .h { font-family: Consolas, "SF Mono", Menlo, monospace; }
table.q td.empty { color: var(--green); font-weight: 700; }
table.q td.none { color: var(--faint); }
table.q td .meta { display: block; }
table.q tr.new td:first-child { font-weight: 800; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; }
.stat { flex: 1; min-width: 140px; background: var(--raised); border-radius: 16px; padding: 14px 16px; box-shadow: var(--cardShadow); text-align: left; color: inherit; }
button.stat:hover, a.stat:hover { background: var(--hover); }
a.stat { display: block; text-decoration: none; }
button.stat.sel { outline: 2px solid var(--gold2); }
.stat b { font-family: Fredoka, Nunito, sans-serif; font-weight: 600; font-size: 27px; display: block; letter-spacing: -.5px; }
.stat span { color: var(--faint); font-size: 12.5px; font-weight: 700; }
.bar { height: 6px; border-radius: 4px; background: var(--inset); overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--green); }
.flag { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 13px; background: var(--goldBg); color: var(--goldInk); font-size: 13.5px; line-height: 1.4; }
.flag.gr { background: var(--greenBg); color: var(--greenInk); }
.flag.rd { background: var(--redBg); color: var(--red); }
.flag.bl { background: var(--blueBg); color: var(--blueInk); }
.flag > span, .flag > div { flex: 1; min-width: 0; }
.flag .btn { flex: none; }
.flag p { margin: 0 0 4px; }
.flag p:last-child { margin-bottom: 0; }
.flag ul { margin: 2px 0 6px; padding-left: 18px; }
.toasts { position: fixed; right: 20px; bottom: 20px; max-width: 420px; z-index: 50; display: grid; gap: 8px; }
.toasts .flag { box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.code { font-family: Consolas, "SF Mono", Menlo, monospace; letter-spacing: 4px; font-size: 22px; font-weight: 700; overflow-wrap: anywhere; }
.k { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; font-size: 13.5px; margin: 0; }
.k dt { color: var(--faint); } .k dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 99px; font-weight: 800; font-size: 12.5px; background: var(--inset); color: var(--mute); }
.chip span { font-weight: 800; color: var(--faint); }
.chip[aria-pressed="true"], .chip[aria-selected="true"] { background: var(--ink); color: var(--tile); }
.chip[aria-pressed="true"] span, .chip[aria-selected="true"] span { color: var(--gold); }
.words { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; font-size: 14.5px; background: var(--inset); border-radius: 12px; padding: 12px 14px; }
.ans { white-space: pre-wrap; overflow-wrap: anywhere; }
.list-s { display: grid; gap: 4px; }
.item { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; text-align: left; background: var(--inset); color: inherit; padding: 8px 10px; border-radius: 10px; font-size: 13.5px; }
button.item:hover { background: var(--hover); }
.item small { color: var(--faint); white-space: nowrap; }
details.more summary { cursor: pointer; font-weight: 800; font-size: 13px; color: var(--mute); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.langs i { font-style: normal; font-size: 11.5px; font-weight: 800; padding: 1px 7px; border-radius: 8px; background: var(--greenBg); color: var(--greenInk); }
.langs i.todo { background: var(--inset); color: var(--faint); }
.langs { display: inline-flex; gap: 4px; flex-wrap: wrap; align-items: center; }

/* votes, the last 14 days: heights by class (no inline style) */
.votes { display: flex; gap: 18px; align-items: flex-end; flex-wrap: wrap; }
.votes .big b { font-family: Fredoka, Nunito, sans-serif; font-size: 34px; font-weight: 600; display: block; }
.votes .big span, .votes .big em { display: block; color: var(--faint); font-size: 12.5px; font-style: normal; }
.chart { flex: 1; min-width: 220px; }
.bars { display: flex; gap: 4px; align-items: flex-end; height: 80px; border-bottom: 1px solid var(--stone); }
.bars u { flex: 1; display: block; background: var(--gold2); border-radius: 4px 4px 0 0; min-height: 2px; text-decoration: none; }
.bars u.top { background: var(--green); }
.bars u.h0 { height: 2px; } .bars u.h1 { height: 10%; } .bars u.h2 { height: 20%; } .bars u.h3 { height: 30%; } .bars u.h4 { height: 40%; } .bars u.h5 { height: 50%; }
.bars u.h6 { height: 60%; } .bars u.h7 { height: 70%; } .bars u.h8 { height: 80%; } .bars u.h9 { height: 90%; } .bars u.h10 { height: 100%; }
.axis { display: flex; justify-content: space-between; color: var(--faint); font-size: 11.5px; padding-top: 3px; }

/* the queue */
.qitem { display: grid; gap: 8px; }
.qitem.late { box-shadow: inset 3px 0 0 var(--red), var(--cardShadow); }
.qitem .top2 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.qitem .top2 b { font-size: 15px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.steps li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 13.5px; }
.steps li small { color: var(--faint); }
.steps li.done span { text-decoration: line-through; color: var(--faint); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { margin: 0; display: grid; gap: 4px; justify-items: center; font-size: 12px; color: var(--faint); }
.swatch img { width: 128px; height: 128px; object-fit: contain; border-radius: 10px; padding: 6px; }
.swatch.light img { background: #ffffff; border: 1px solid #ddd; }
.swatch.dark img { background: #14172e; border: 1px solid #000; }
.friend { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.friend .name { font-weight: 800; font-size: 15px; }
.friend .name.none { color: var(--faint); font-style: italic; }

/* dialogs: the confirm step and "Confirm it's you" */
.scrim { position: fixed; inset: 0; z-index: 70; background: rgba(8,10,30,.55); display: grid; place-items: center; padding: 16px; }
.dialog { width: 440px; max-width: 100%; background: var(--raised); color: var(--ink); border-radius: 18px; padding: 18px 20px; box-shadow: 0 18px 50px rgba(0,0,0,.35); display: grid; gap: 10px; }
.dialog h3 { margin: 0; font-family: Fredoka, Nunito, sans-serif; font-weight: 600; font-size: 19px; }
.dialog p { margin: 0; line-height: 1.45; }

/* the sign-in screens */
.gate { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; background: radial-gradient(900px 520px at 50% 108%, rgba(111,91,255,.55), transparent 70%), linear-gradient(180deg, #0a0e2c 0%, #14134a 52%, #251a66 100%); padding: 16px; }
.gate .inner { width: 380px; max-width: 100%; text-align: center; color: #f4f2ff; }
.gate .brand { justify-content: center; font-size: 24px; padding-bottom: 8px; }
.gate .brand .kite { width: 40px; height: 40px; }
.gate .card { text-align: left; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; color: var(--ink); }
.gate .card .field { min-width: 0; width: 100%; }
.gate .card + .card { margin-top: 12px; }
.gate p.lead { color: #c9cbea; margin: 0 0 14px; }
.gate p.foot { color: #a9acd6; font-size: 12px; margin: 16px 0 0; }
.gate .who { display: flex; gap: 10px; align-items: center; }
.gate .who b { overflow-wrap: anywhere; }
.qr { display: block; width: 200px; height: 200px; margin: 0 auto; background: #fff; padding: 10px; border-radius: 12px; }
.key { font-family: Consolas, "SF Mono", Menlo, monospace; font-size: 15px; letter-spacing: 1px; text-align: center; overflow-wrap: anywhere; background: var(--inset); border-radius: 10px; padding: 8px; user-select: all; }
.dev { border: 2px dashed var(--gold2); }

@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; height: auto; min-height: 100%; }
  .side { flex-direction: row; flex-wrap: wrap; padding: 10px; gap: 4px; overflow: visible; }
  .side h6 { display: none; }
  .side .me { margin: 4px 0 0; width: 100%; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 8px 0; }
  .side .me b { display: inline; font-size: 13px; }
  .side .me .roles { display: inline; }
  .side .me button { padding: 0; margin-left: auto; }
  .brand { padding: 4px 8px; width: 100%; }
  .nv { width: auto; }
  .main { min-height: 0; }
  .cols { flex-direction: column; } .col { width: 100%; }
  .body { padding: 14px 16px 40px; overflow: visible; } .top { padding: 12px 16px; }
  .top .right { margin-left: 0; }
  table.q .wide { display: none; }
  .form, .k { grid-template-columns: minmax(0, 1fr); }
  .toasts { left: 16px; right: 16px; max-width: none; }
}
