/* The console: ink and cream, nothing else (docs/brand-palette.md). Cream on ink, like the site. */
:root {
    --ink: #111110; --cream: #F3EEE4;
    --faint: rgba(243, 238, 228, 0.62); --dim: rgba(243, 238, 228, 0.4);
    --rule: rgba(243, 238, 228, 0.12); --well: rgba(243, 238, 228, 0.06); --well-strong: rgba(243, 238, 228, 0.1);
    --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { background: var(--ink); }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'Segoe UI', sans-serif;
    background: var(--ink); color: var(--cream); line-height: 1.5; -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px 96px; }

/* The top: the lockup, who's in, the way out. */
header { display: flex; align-items: center; gap: 20px; height: 92px; border-bottom: 1px solid var(--rule); margin-bottom: 40px; }
header img { height: 44px; }
header .tag { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--dim); padding-top: 4px; }
header .who { margin-left: auto; text-align: right; font-size: 14px; color: var(--faint); }
header .who b { display: block; color: var(--cream); font-weight: 600; }

h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 800; }
h2 { font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); font-weight: 600; margin: 56px 0 16px; }
.lede { color: var(--faint); font-size: 18px; margin-top: 12px; max-width: 34em; }

.pill {
    border: 0; border-radius: 999px; padding: 12px 22px; font-weight: 650; cursor: pointer;
    background: var(--cream); color: var(--ink); transition: transform 0.12s ease, opacity 0.12s ease;
}
.pill:hover { transform: translateY(-1px); }
.pill:active { transform: scale(0.97); }
.pill[disabled] { opacity: 0.4; cursor: default; transform: none; }
.pill.quiet { background: var(--well-strong); color: var(--cream); }
.pill.small { padding: 7px 14px; font-size: 13px; }
.pill.armed { background: var(--cream); color: var(--ink); }
.link { background: none; border: 0; color: var(--faint); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 14px; }
.link:hover { color: var(--cream); }

input[type=text], input[type=password] {
    background: var(--well); border: 1.5px solid transparent; border-radius: 14px; padding: 13px 16px; outline: none; min-width: 0;
}
input:focus { border-color: var(--cream); }
input::placeholder { color: var(--dim); }
.problem { color: var(--cream); background: var(--well-strong); border-left: 3px solid var(--cream); padding: 10px 14px; border-radius: 6px; margin-top: 16px; font-size: 15px; }

/* Signing in. */
.door { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.door .card { width: min(460px, 100%); text-align: center; }
.door img { height: 62px; margin-bottom: 44px; }
.door h1 { font-size: 34px; }
.door form { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.door input { text-align: center; font-family: var(--mono); font-size: 20px; letter-spacing: 0.08em; text-transform: uppercase; }
.door .link { margin-top: 26px; }
.number { font-family: var(--mono); font-size: 132px; font-weight: 700; line-height: 1; letter-spacing: -0.04em; margin: 28px 0 8px; }
.drain { height: 4px; border-radius: 2px; background: var(--well-strong); overflow: hidden; margin: 28px auto 0; width: 220px; }
.drain i { display: block; height: 100%; background: var(--cream); transform-origin: left; animation: drain 60s linear forwards; }
@keyframes drain { to { transform: scaleX(0); } }

/* The numbers. */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 36px; }
.tile { background: var(--well); border-radius: 22px; padding: 22px 24px 20px; }
.tile b { display: block; font-size: 56px; line-height: 1; font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.tile span { display: block; margin-top: 10px; color: var(--faint); font-size: 14px; }
.tile.lit { background: var(--cream); color: var(--ink); }
.tile.lit span { color: rgba(17, 17, 16, 0.62); }

/* Issuing a code. */
.issue { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.issue input[type=text] { flex: 1 1 260px; }
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--faint); font-size: 14px; cursor: pointer; user-select: none; }
.check input { appearance: none; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--dim); cursor: pointer; }
.check input:checked { background: var(--cream); border-color: var(--cream); box-shadow: inset 0 0 0 4px var(--ink); }
.fresh { background: var(--cream); color: var(--ink); border-radius: 26px; padding: 30px 32px; margin-top: 18px; animation: arrive 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.fresh p { color: rgba(17, 17, 16, 0.66); }
.fresh .code { font-family: var(--mono); font-size: clamp(28px, 6vw, 52px); font-weight: 700; letter-spacing: 0.04em; margin: 10px 0 16px; word-break: keep-all; }
.fresh .pill { background: var(--ink); color: var(--cream); }
.fresh .pill.quiet { background: rgba(17, 17, 16, 0.1); color: var(--ink); }
.fresh .row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
@keyframes arrive { from { opacity: 0; transform: translateY(10px) scale(0.98); } }

/* The phones. */
.phones { display: flex; flex-direction: column; gap: 8px; }
.phone { display: grid; grid-template-columns: 14px 1fr auto auto; gap: 16px; align-items: center; background: var(--well); border-radius: 18px; padding: 16px 18px 16px 20px; }
.phone .name { font-weight: 650; font-size: 17px; }
.phone .about { color: var(--faint); font-size: 14px; }
.phone .count { text-align: right; font-variant-numeric: tabular-nums; }
.phone .count b { display: block; font-size: 22px; line-height: 1.1; }
.phone .count span { color: var(--dim); font-size: 12px; }
.phone .acts { display: flex; gap: 8px; }
.phone.gone { opacity: 0.45; }
.dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--cream); }
.dot.live { background: var(--cream); animation: pulse 2.4s ease-out infinite; }
.dot.off { border-style: dotted; }
.dot.gone { border-color: var(--dim); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(243, 238, 228, 0.5); } 70%, 100% { box-shadow: 0 0 0 10px rgba(243, 238, 228, 0); } }
.chip { display: inline-block; border: 1px solid var(--dim); border-radius: 999px; padding: 1px 9px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; margin-left: 8px; vertical-align: 2px; color: var(--faint); }
.chip.solid { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.empty { color: var(--faint); background: var(--well); border-radius: 18px; padding: 28px; text-align: center; }

/* The rules, the log, the operator's list. */
.rules { background: var(--well); border-radius: 22px; padding: 8px 22px; }
.rule { display: flex; align-items: center; gap: 18px; padding: 16px 0; }
.rule + .rule { border-top: 1px solid var(--rule); }
.rule div { flex: 1; }
.rule p { color: var(--faint); font-size: 14px; }
.rule input[type=text] { width: 110px; text-align: center; font-family: var(--mono); }
.switch { appearance: none; width: 54px; height: 32px; border-radius: 16px; background: var(--well-strong); position: relative; cursor: pointer; transition: background 0.18s; flex: none; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--faint); transition: transform 0.18s cubic-bezier(0.3, 1.4, 0.5, 1), background 0.18s; }
.switch:checked { background: var(--cream); }
.switch:checked::after { transform: translateX(22px); background: var(--ink); }
.log { list-style: none; }
.log li { display: flex; gap: 16px; padding: 11px 0; border-top: 1px solid var(--rule); font-size: 15px; }
.log li:first-child { border-top: 0; }
.log time { color: var(--dim); flex: none; width: 96px; font-variant-numeric: tabular-nums; font-size: 13px; padding-top: 2px; }
.log b { font-weight: 650; }
.orgs { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.new-org { display: flex; gap: 8px; align-items: center; margin-left: 8px; }
.new-org input[type=text] { width: 220px; padding: 8px 14px; font-size: 14px; }

@media (max-width: 760px) {
    .tiles { grid-template-columns: repeat(2, 1fr); }
    .phone { grid-template-columns: 14px 1fr; }
    .phone .count { display: none; }
    .phone .acts { grid-column: 2; }
    header .tag { display: none; }
}
@media (prefers-reduced-motion: reduce) { .dot.live, .fresh { animation: none; } }
