/* Tau Square Admin. Navy surfaces, one gold accent; numbers in mono. */

:root {
    --ink-950: #03070C; --ink-900: #070B14; --ink-850: #0B1220; --ink-800: #111A2C; --ink-700: #1A2640;
    --line: rgba(255, 255, 255, .07); --line-2: rgba(255, 255, 255, .13);
    --text: #E9EDF4; --text-2: #A3AEBF; --text-3: #6F7C90;
    --gold: #C8A96B; --gold-hi: #D9BE85;
    --good: #52C893; --mid: #E5B94A; --bad: #F08A84;
    --side: 236px;
    color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink-950); color: var(--text); font: 14px/1.5 Inter, system-ui, -apple-system, Segoe UI, sans-serif; -webkit-font-smoothing: antialiased; }
body.locked { overflow: hidden; }
a { color: var(--gold-hi); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
svg { display: block; }
code { font: 12.5px 'JetBrains Mono', monospace; background: var(--ink-800); padding: 1px 6px; border-radius: 4px; }
small { display: block; color: var(--text-3); font-size: 11.5px; overflow-wrap: anywhere; }
.muted { color: var(--text-2); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.mono { font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.eyebrow { margin: 0; font: 500 10.5px 'JetBrains Mono', monospace; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border: 1px solid var(--line-2); border-radius: 8px; font-weight: 500; font-size: 13px; color: var(--text); transition: background .15s, border-color .15s; }
.btn:hover { background: var(--ink-800); text-decoration: none; }
.btn.sm { padding: 7px 13px; font-size: 12.5px; }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #0A0E16; font-weight: 600; }
.btn.primary:hover { background: var(--gold-hi); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-link { color: var(--gold-hi); font-size: 12.5px; }
.btn-link:hover { text-decoration: underline; }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; flex: none; }
.icon-btn:hover { background: var(--ink-800); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }

/* First paint and sign-in */
.boot { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.boot img { width: 34px; }
.boot span { font: 500 10.5px 'JetBrains Mono', monospace; letter-spacing: .24em; text-transform: uppercase; color: var(--text-3); }
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(900px 500px at 50% -10%, #12203A 0, transparent 70%), var(--ink-950); }
.gate-card { width: min(380px, 100%); background: var(--ink-900); border: 1px solid var(--line); border-radius: 16px; padding: 36px 32px; }
.gate-logo { width: 38px; margin-bottom: 18px; }
.gate-card h1 { margin: 6px 0 24px; font: 500 34px 'Playfair Display', Georgia, serif; }
.gate-form { display: grid; gap: 10px; }
.gate-form label { font-size: 12.5px; color: var(--text-2); }
.gate-form input { width: 100%; padding: 11px 13px; background: var(--ink-850); border: 1px solid var(--line-2); border-radius: 8px; color: var(--text); font-size: 15px; }
.gate-form input:focus { outline: 0; border-color: var(--gold); }
.gate-form .btn-link { justify-self: start; margin-top: 2px; }
.gate-msg { min-height: 20px; margin: 14px 0 0; font-size: 13px; color: var(--text-2); }
.gate-msg.bad { color: var(--bad); }

/* Frame */
.shell { display: flex; min-height: 100vh; }
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--ink-900); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 40; }
.brand { display: flex; align-items: center; gap: 11px; padding: 20px 20px 16px; }
.brand img { width: 26px; }
.brand b { display: block; font-size: 14px; font-weight: 600; line-height: 1.2; }
.brand span { font: 500 9.5px 'JetBrains Mono', monospace; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.nav { flex: 1; overflow-y: auto; padding: 4px 10px 12px; }
.nav-group + .nav-group { margin-top: 14px; }
.nav-label { margin: 0 0 4px; padding: 0 10px; font: 500 9.5px 'JetBrains Mono', monospace; letter-spacing: .18em; text-transform: uppercase; color: var(--text-3); }
.nav-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--text-2); font-size: 13.5px; text-align: left; transition: background .12s, color .12s; }
.nav-item:hover { background: var(--ink-800); color: var(--text); }
.nav-item[aria-current] { background: var(--ink-700); color: #fff; }
.nav-item svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav-item[aria-current] svg { color: var(--gold); }
.nav-item span { flex: 1; min-width: 0; }
.nav-badge { min-width: 19px; padding: 0 5px; border-radius: 10px; background: var(--ink-700); color: var(--text); font: 500 10.5px/18px 'JetBrains Mono', monospace; text-align: center; }
.nav-badge.urgent { background: #5A2326; color: #FFC7C3; }
.side-foot { border-top: 1px solid var(--line); padding: 12px 20px 16px; display: grid; gap: 5px; font-size: 12.5px; }
.side-foot a { color: var(--text-2); }
.who { margin: 6px 0 0; color: var(--text-3); font-size: 11.5px; overflow-wrap: anywhere; }
.side-foot .btn-link { justify-self: start; }
.side-dim, .drawer-dim { position: fixed; inset: 0; background: rgba(2, 5, 10, .6); z-index: 39; }
.main { flex: 1; min-width: 0; margin-left: var(--side); }
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 12px 28px; background: rgba(3, 7, 12, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.menu-btn { display: none; }
.page-title { margin: 0; font-size: 16px; font-weight: 600; white-space: nowrap; }
.search { position: relative; flex: 1; max-width: 420px; margin-left: auto; display: flex; align-items: center; }
.search > svg { position: absolute; left: 11px; width: 16px; height: 16px; fill: none; stroke: var(--text-3); stroke-width: 1.8; stroke-linecap: round; pointer-events: none; }
.search input { width: 100%; padding: 8px 34px 8px 34px; background: var(--ink-850); border: 1px solid var(--line); border-radius: 8px; color: var(--text); font-size: 13px; }
.search input:focus { outline: 0; border-color: var(--gold); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd { position: absolute; right: 9px; font: 11px 'JetBrains Mono', monospace; color: var(--text-3); border: 1px solid var(--line-2); border-radius: 4px; padding: 0 5px; }
.search input:focus ~ kbd { display: none; }
.search-out { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--ink-850); border: 1px solid var(--line-2); border-radius: 10px; padding: 6px; max-height: 60vh; overflow-y: auto; box-shadow: 0 14px 40px rgba(0, 0, 0, .55); }
.sr { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 7px; text-align: left; }
.sr:hover { background: var(--ink-700); }
.sr b { display: block; font-weight: 500; font-size: 13px; }
.sr em { flex: none; font-style: normal; font-size: 11px; color: var(--text-2); }
.sr-empty { margin: 0; padding: 12px 10px; font-size: 13px; color: var(--text-2); }
.page { max-width: 1280px; margin: 0 auto; padding: 26px 28px 60px; }
.loading { padding: 48px 0; text-align: center; color: var(--text-3); font-size: 13px; }

/* Cards, grids, tiles */
.card { background: var(--ink-850); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; min-width: 0; }
.card + .card, .tiles + .card, .card + .note { margin-top: 16px; }
.card h3 { margin: 0 0 14px; font-size: 13.5px; font-weight: 600; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h3 { margin: 0; }
.card.empty, .card.setup { max-width: 640px; }
.card.setup h2 { margin: 0 0 8px; font-size: 15px; }
.card.setup p { margin: 0 0 6px; color: var(--text-2); }
.grid { display: grid; gap: 16px; margin-top: 16px; }
.grid > .card + .card { margin-top: 0; }
.grid + .card { margin-top: 16px; }
.grid:first-of-type { margin-top: 0; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.two-one { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.tab-content > .tiles:first-child { margin-top: 0; }
.tile { display: flex; flex-direction: column; gap: 3px; padding: 15px 18px; background: var(--ink-850); border: 1px solid var(--line); border-radius: 12px; text-align: left; min-width: 0; }
.tile.link { transition: border-color .15s, background .15s; }
.tile.link:hover { border-color: rgba(200, 169, 107, .45); background: var(--ink-800); }
.tile-label { font-size: 12px; color: var(--text-2); }
.tile-value { font: 500 27px/1.2 'JetBrains Mono', monospace; color: #fff; letter-spacing: -.02em; }
.tile-note { font-size: 11.5px; color: var(--text-3); }
.tile-note .warn { color: var(--bad); font-weight: 500; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.field { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.field select { background: var(--ink-800); border: 1px solid var(--line-2); border-radius: 7px; color: var(--text); padding: 5px 8px; font-size: 12.5px; }
.rule-top { margin-top: 14px; }
p.rule-top { margin-bottom: 0; padding-top: 12px; border-top: 1px solid var(--line); }

/* Overview */
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.hello h2 { margin: 4px 0 0; font: 500 32px/1.15 'Playfair Display', Georgia, serif; }
.needs { list-style: none; margin: 0; padding: 0; }
.needs li + li { border-top: 1px solid var(--line); }
.needs button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 4px; text-align: left; border-radius: 6px; }
.needs button:hover .need-text { color: #fff; }
.needs button:hover .arrow { transform: translateX(3px); color: var(--gold); }
.need-text { flex: 1; font-size: 13.5px; color: var(--text); }
.arrow { color: var(--text-3); transition: transform .15s; }
.needs .pill { width: 58px; justify-content: center; }
.all-clear { display: flex; align-items: center; gap: 12px; padding: 14px 0; }
.all-clear svg { width: 30px; height: 30px; fill: none; stroke: var(--good); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.all-clear b { display: block; font-weight: 600; }
.all-clear span { color: var(--text-2); font-size: 13px; }
.big { margin: 0; font: 500 34px/1.1 'JetBrains Mono', monospace; color: #fff; letter-spacing: -.03em; }
.goal-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.goal-top p { margin: 0; }
.goal-bar { position: relative; padding-top: 24px; margin-top: 12px; }
.goal-aim { position: absolute; top: 0; transform: translateX(-50%); font-size: 10.5px; color: #fff; white-space: nowrap; }
.goal-aim b { font: 500 10.5px 'JetBrains Mono', monospace; margin-left: 3px; }
.goal-track { position: relative; height: 8px; background: var(--ink-700); border-radius: 4px; }
.goal-fill { position: absolute; inset: 0 auto 0 0; background: var(--gold); border-radius: 4px; min-width: 3px; }
.goal-tick { position: absolute; top: -3px; width: 1.5px; height: 14px; background: var(--text-3); }
.goal-tick.aim { background: #fff; width: 2px; top: -6px; height: 20px; }
.goal-labels { position: relative; height: 38px; margin-top: 7px; }
.goal-labels span { position: absolute; transform: translateX(-50%); font-size: 10.5px; color: var(--text-3); text-align: center; white-space: nowrap; }
.goal-labels b { display: block; font: 500 10.5px 'JetBrains Mono', monospace; }
.goal-labels span:last-child { transform: translateX(-85%); }
.goal-note { margin: 12px 0 0; font-size: 12.5px; color: var(--text-2); }
.goal-note b { color: var(--text); font-weight: 600; }
.goal-facts { margin: 14px 0 0; border-top: 1px solid var(--line); }
.goal-facts div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 13px; }
.goal-facts div + div { border-top: 1px solid var(--line); }
.goal-facts dt { color: var(--text-2); }
.goal-facts dd { margin: 0; font-family: 'JetBrains Mono', monospace; font-size: 12.5px; }

.pill { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 20px; border: 1px solid var(--line-2); font-size: 11px; line-height: 16px; color: var(--text-2); white-space: nowrap; }
.pill.good { color: var(--good); border-color: rgba(82, 200, 147, .35); }
.pill.mid { color: var(--mid); border-color: rgba(229, 185, 74, .35); }
.pill.high { color: var(--bad); border-color: rgba(240, 138, 132, .4); }
.pill.low { color: var(--text-2); }
.pill.gold { color: var(--gold-hi); border-color: rgba(200, 169, 107, .4); }

.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.rows li + li { border-top: 1px solid var(--line); }
.rows.tight li { padding: 5px 0; font-size: 12.5px; }
.rows b { font-weight: 500; }
.grow { flex: 1; min-width: 0; }
.when { flex: none; width: 138px; font: 12px 'JetBrains Mono', monospace; color: var(--text-2); }
.clip { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quote { margin: 4px 0 0; padding-left: 10px; border-left: 2px solid var(--line-2); color: var(--text-2); font-size: 12.5px; white-space: pre-wrap; }
.student-link { text-align: left; font: inherit; color: var(--text); }
.student-link:hover { color: var(--gold-hi); text-decoration: underline; }

/* Tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { padding: 7px 12px 7px 0; text-align: left; font-weight: 500; font-size: 11.5px; color: var(--text-3); border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.table td { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tfoot td { font-weight: 600; border-top: 1px solid var(--line-2); border-bottom: 0; }
.table .n { text-align: right; font-family: 'JetBrains Mono', monospace; font-size: 12px; white-space: nowrap; }
.table th.n { font-family: inherit; font-size: 11.5px; }
.table th.n + th:not(.n), .table td.n + td:not(.n) { padding-left: 22px; }

/* Charts */
.chart { width: 100%; height: auto; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--text-3); font: 10.5px 'JetBrains Mono', monospace; }
.chart .hit:hover { fill: rgba(255, 255, 255, .04); }
.legend { display: flex; gap: 16px; margin: -6px 0 8px; font-size: 12px; color: var(--text-2); }
.legend i, .seg-key i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.chart-tip { position: fixed; z-index: 90; pointer-events: none; background: #1B2740; border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 11px; font-size: 12px; line-height: 1.55; color: var(--text); box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
.chart-tip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.chart-tip b { font-family: 'JetBrains Mono', monospace; font-weight: 500; }
.chart-table { margin-top: 6px; font-size: 12px; }
.chart-table summary { color: var(--text-3); cursor: pointer; }
.chart-table[open] .table-wrap { max-height: 240px; overflow-y: auto; margin-top: 6px; }
.funnel-row { display: grid; grid-template-columns: 112px 1fr 50px 36px; align-items: center; gap: 8px; padding: 5px 0; font-size: 12.5px; }
.funnel-label { color: var(--text-2); }
.funnel-track, .hbar-track { height: 10px; background: var(--ink-800); border-radius: 0 4px 4px 0; overflow: hidden; }
.funnel-fill, .hbar-track span { display: block; height: 100%; background: #B58E45; border-radius: 0 4px 4px 0; }
.funnel-n, .hbar b { font: 500 12px 'JetBrains Mono', monospace; text-align: right; }
.funnel-kept { font: 11px 'JetBrains Mono', monospace; color: var(--text-3); text-align: right; }
.hbar { display: grid; grid-template-columns: 90px 1fr 34px; align-items: center; gap: 8px; padding: 6px 0; font-size: 12.5px; }
.hbar-label { color: var(--text-2); }
.segments { display: flex; gap: 2px; height: 14px; }
.segments span { min-width: 4px; }
.segments span:first-child { border-radius: 4px 0 0 4px; }
.segments span:last-child { border-radius: 0 4px 4px 0; }
.seg-key { list-style: none; margin: 12px 0 0; padding: 0; }
.seg-key li { display: flex; align-items: center; padding: 4px 0; font-size: 13px; color: var(--text-2); }
.seg-key span { flex: 1; }
.seg-key b { font: 500 13px 'JetBrains Mono', monospace; color: var(--text); }

/* AI wallet */
.buy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.buy-figure { margin: 6px 0 14px; font: 500 44px/1.05 'JetBrains Mono', monospace; color: #fff; }
.buy-sum { margin: 0; }
.buy-sum div { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.buy-sum dt { color: var(--text-2); }
.buy-sum dd { margin: 0; font-family: 'JetBrains Mono', monospace; }
.buy-sum .total { border: 0; font-weight: 600; }
.buy-sum .total dt { color: var(--text); }
.note { margin: 14px 0; padding: 10px 14px; border-radius: 8px; font-size: 13px; background: var(--ink-800); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.note.good { border-left: 3px solid var(--good); }
.note.bad { border-left: 3px solid var(--bad); }
.note.mid { border-left: 3px solid var(--mid); }

/* Student profile */
.drawer { position: fixed; inset: 0 0 0 auto; width: min(560px, 100%); background: var(--ink-900); border-left: 1px solid var(--line-2); z-index: 60; overflow-y: auto; }
.drawer-dim { z-index: 59; }
.d-pad { padding: 24px; }
.d-head { display: flex; justify-content: space-between; gap: 12px; padding: 22px 24px 14px; }
.d-head h2 { margin: 0; font: 500 24px/1.2 'Playfair Display', Georgia, serif; }
.d-head p { margin: 2px 0 10px; font-size: 13px; }
.d-bar { height: 3px; margin: 0 24px; background: var(--ink-700); border-radius: 2px; }
.d-bar span { display: block; height: 100%; background: var(--gold); border-radius: 2px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; margin: 16px 0 0; padding: 0 24px; }
.d-sec .facts { padding: 0; margin: 0 0 8px; }
.facts dt { font-size: 11.5px; color: var(--text-3); }
.facts dd { margin: 1px 0 0; font-size: 13.5px; }
.d-sec { margin-top: 18px; padding: 16px 24px 0; border-top: 1px solid var(--line); }
.d-sec:last-child { padding-bottom: 26px; }
.d-sec h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 95; background: #1B2740; border: 1px solid var(--line-2); border-radius: 8px; padding: 9px 16px; font-size: 13px; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
.toast.bad { color: var(--bad); }

/* The original tabs: same content, settled into the new surfaces */
.tab-content .border.border-white\/5, .tab-content .border.border-\[\#C8A96B\]\/20 { border-radius: 10px; }
.tab-content #weeksGrid input, .tab-content select, .tab-content input[type=text], .tab-content input[type=date], .tab-content input[type=time], .tab-content input[type=url], .tab-content input[type=search], .tab-content input[type=datetime-local], .tab-content textarea { border-radius: 6px; }
.tab-content > .border { background: var(--ink-850); }

/* From the old admin page: classes its compiled stylesheet didn't include. */
.space-y-2 > * + * { margin-top: .5rem; }
.space-y-3 > * + * { margin-top: .75rem; }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-\[minmax\(0\,14rem\)_1fr_auto\] { grid-template-columns: minmax(0, 14rem) 1fr auto; }
.resize-y { resize: vertical; }
.break-all { word-break: break-all; }
.bg-white\/\[0\.03\] { background-color: rgba(255, 255, 255, .03); }
.hover\:bg-red-400\/10:hover { background-color: rgba(248, 113, 113, .1); }
.hover\:bg-white\/2:hover { background-color: rgba(255, 255, 255, .02); }
.hover\:text-\[\#C8A96B\]:hover { color: #C8A96B; }
@media (min-width: 768px) {
    .md\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .md\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .md\:col-span-2 { grid-column: span 2 / span 2; }
}
@media (min-width: 1024px) {
    .lg\:flex-row { flex-direction: row; }
    .lg\:items-start { align-items: flex-start; }
    .lg\:w-\[440px\] { width: 440px; }
}
@media (min-width: 1280px) { .xl\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Narrower screens */
@media (max-width: 1100px) {
    .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid.two-one { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
    .main { margin-left: 0; }
    .side { transform: translateX(-100%); transition: transform .2s; }
    .side.open { transform: none; }
    .menu-btn { display: grid; margin-left: -6px; }
    .top { padding: 10px 16px; gap: 8px; flex-wrap: wrap; }
    .search { order: 5; flex-basis: 100%; max-width: none; }
    #refresh { margin-left: auto; }
    .page { padding: 18px 16px 48px; }
    .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid.two, .grid.three { grid-template-columns: minmax(0, 1fr); }
    .buy { grid-template-columns: minmax(0, 1fr); }
    .search kbd { display: none; }
    .tile-value { font-size: 23px; }
    .when { width: 104px; font-size: 11px; }
}
