/* utctime.app — dark-first, dense, monospace/terminal.
 *
 * Deliberately NOT the airy card look of the sibling consumer site. Everything
 * is prefixed `u-` because base.html loads Bootstrap site-wide and generic
 * names (.col-4, .row, .card, .badge) collide invisibly.
 *
 * Theme: tokens are defined on bare :root as the DARK palette, and
 * [data-theme="light"] overrides them. Dark is the default for EVERY visitor —
 * prefers-color-scheme is not consulted, because dark-first is the brand. The
 * server stamps data-theme="dark" on <html>, and a tiny inline script in <head>
 * flips it to light only for someone who explicitly chose light, before paint.
 */

:root {
    --bg:        #0a0d13;
    --bg-2:      #10151f;
    --panel:     #121927;
    --panel-2:   #172033;
    --line:      #222e45;
    --line-2:    #2d3c58;
    --ink:       #e6edf7;
    --ink-2:     #a7b4c9;
    --ink-3:     #6f7f99;
    --accent:    #5eead4;
    --accent-2:  #22d3ee;
    --amber:     #fbbf24;
    --rose:      #fb7185;
    --green:     #4ade80;
    --shadow:    0 1px 0 rgba(255,255,255,.03), 0 12px 32px -18px rgba(0,0,0,.9);
    --mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas,
            "DejaVu Sans Mono", "Liberation Mono", monospace;
    --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
            "Helvetica Neue", Arial, sans-serif;
    --radius: 8px;
    color-scheme: dark;
}

[data-theme="light"] {
    --bg:        #f7f8fa;
    --bg-2:      #ffffff;
    --panel:     #ffffff;
    --panel-2:   #f1f3f7;
    --line:      #dde2ea;
    --line-2:    #c6cedb;
    --ink:       #10151f;
    --ink-2:     #45516a;
    --ink-3:     #6f7f99;
    --accent:    #0f766e;
    --accent-2:  #0e7490;
    --amber:     #a16207;
    --rose:      #be123c;
    --green:     #15803d;
    --shadow:    0 1px 2px rgba(16,21,31,.06), 0 8px 24px -18px rgba(16,21,31,.4);
    color-scheme: light;
}

/* ---------------------------------------------------------------- base -- */

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

body.u-body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.55;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

.u-body a { color: var(--accent); text-decoration: none; }
.u-body a:hover { color: var(--accent-2); text-decoration: underline; }
.u-body code, .u-body kbd, .u-body pre { font-family: var(--mono); }
.u-body h1, .u-body h2, .u-body h3, .u-body h4 {
    font-family: var(--sans);
    line-height: 1.2;
    letter-spacing: -.02em;
    margin: 0 0 .5rem;
    color: var(--ink);
}
.u-body h1 { font-size: 1.6rem; font-weight: 700; }
.u-body h2 { font-size: 1.22rem; font-weight: 650; }
.u-body h3 { font-size: 1.02rem; font-weight: 650; }
.u-body p  { margin: 0 0 .8rem; color: var(--ink-2); }
.u-body hr { border: 0; border-top: 1px solid var(--line); margin: 1.6rem 0; }
.u-body ::selection { background: var(--accent); color: #04211d; }

.u-shell { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 18px; }
.u-main { flex: 1 0 auto; padding: 22px 0 56px; }
.u-mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.u-dim { color: var(--ink-3); }
.u-mute { color: var(--ink-2); }
.u-small { font-size: .82rem; }
.u-nowrap { white-space: nowrap; }
.u-center { text-align: center; }
.u-right { text-align: right; }
.u-hidden { display: none !important; }
/* Drag-to-reorder does not exist on touch, so the hint that describes it must
   not either. Swapped at the same breakpoint that hides the drag handles. */
.u-only-narrow { display: none; }
.u-only-wide { display: inline; }

/* ----------------------------------------------------------------- nav -- */

.u-nav {
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, var(--bg-2), var(--bg));
    position: sticky; top: 0; z-index: 40;
    backdrop-filter: saturate(1.2) blur(6px);
}
.u-nav-in {
    display: flex; align-items: center; gap: 18px;
    height: 52px;
}
.u-brand {
    font-family: var(--mono);
    font-weight: 700;
    font-size: .98rem;
    letter-spacing: -.01em;
    color: var(--ink) !important;
    text-decoration: none !important;
    display: inline-flex; align-items: center; gap: 7px;
    flex: none;
}
.u-brand:hover { color: var(--accent) !important; }
.u-brand .u-caret {
    display: inline-block; width: 9px; height: 17px;
    background: var(--accent);
    animation: u-blink 1.15s steps(1) infinite;
    border-radius: 1px;
}
@keyframes u-blink { 0%,55% { opacity: 1 } 56%,100% { opacity: .12 } }
@media (prefers-reduced-motion: reduce) { .u-brand .u-caret { animation: none } }

.u-navlinks { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.u-navlinks a {
    color: var(--ink-2); font-size: .86rem; padding: 6px 9px;
    border-radius: 6px; text-decoration: none !important;
    font-family: var(--mono);
}
.u-navlinks a:hover { color: var(--ink); background: var(--panel-2); }
.u-navlinks a.u-on { color: var(--accent); background: var(--panel-2); }
.u-navtoggle {
    display: none; background: var(--panel); color: var(--ink);
    border: 1px solid var(--line); border-radius: 6px;
    font-family: var(--mono); font-size: .8rem; padding: 5px 9px; cursor: pointer;
}

/* ---------------------------------------------------------------- bits -- */

.u-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    font-family: var(--mono); font-size: .82rem; line-height: 1;
    padding: 8px 12px; border-radius: 6px; cursor: pointer;
    background: var(--panel-2); color: var(--ink) !important;
    border: 1px solid var(--line-2);
    text-decoration: none !important; white-space: nowrap;
    transition: background .12s, border-color .12s, color .12s;
}
.u-btn:hover { background: var(--line); border-color: var(--accent); color: var(--ink) !important; }
.u-btn:active { transform: translateY(1px); }
.u-btn-primary {
    background: var(--accent); color: #04211d !important; border-color: var(--accent);
    font-weight: 600;
}
[data-theme="light"] .u-btn-primary { color: #ffffff !important; }
.u-btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: #04211d !important; }
[data-theme="light"] .u-btn-primary:hover { color: #ffffff !important; }
.u-btn-sm { padding: 5px 8px; font-size: .74rem; }
.u-btn.is-copied { background: var(--green); border-color: var(--green); color: #04210f !important; }

.u-chip {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--mono); font-size: .74rem;
    padding: 3px 8px; border-radius: 999px;
    border: 1px solid var(--line-2); color: var(--ink-2);
    background: var(--panel);
}
.u-chip-ok    { border-color: var(--green); color: var(--green); }
.u-chip-warn  { border-color: var(--amber); color: var(--amber); }
.u-chip-bad   { border-color: var(--rose);  color: var(--rose); }
.u-chip-accent{ border-color: var(--accent); color: var(--accent); }

kbd.u-kbd {
    font-family: var(--mono); font-size: .72rem;
    background: var(--panel-2); border: 1px solid var(--line-2);
    border-bottom-width: 2px; border-radius: 4px;
    padding: 1px 5px; color: var(--ink-2);
}

.u-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.u-pad { padding: 16px 18px; }
.u-section { margin: 34px 0 0; }
.u-section > h2 { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.u-section > h2 .u-hint { font-size: .76rem; font-family: var(--mono); color: var(--ink-3); font-weight: 400; }
.u-lead { font-size: 1rem; color: var(--ink-2); max-width: 68ch; }

.u-grid { display: grid; gap: 12px; }
.u-g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.u-g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.u-g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.u-g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

/* --------------------------------------------------------------- clock -- */

.u-hero {
    display: grid; grid-template-columns: minmax(0,1fr) auto;
    gap: 20px; align-items: end;
    padding: 22px 20px 20px;
    background:
        radial-gradient(900px 240px at 8% -40%, rgba(94,234,212,.10), transparent 70%),
        var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.u-eyebrow {
    font-family: var(--mono); font-size: .72rem; letter-spacing: .12em;
    text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px;
}
.u-body .u-clock {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: clamp(2.6rem, 9.2vw, 5.2rem);
    line-height: .96;
    letter-spacing: -.03em;
    color: var(--ink);
    display: block;
    margin: 2px 0 6px;
}
.u-body .u-clock .u-sec { color: var(--accent); }
.u-clock-sub {
    font-family: var(--mono); font-size: .92rem; color: var(--ink-2);
    display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
}
.u-hero-side { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.u-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.u-skew {
    font-family: var(--mono); font-size: .78rem;
    border: 1px dashed var(--line-2); color: var(--ink-2);
    border-radius: 6px; padding: 6px 10px; background: var(--bg-2);
}
.u-skew strong { color: var(--ink); font-weight: 600; }
.u-skew.is-ok   { border-color: var(--green); border-style: solid; }
.u-skew.is-warn { border-color: var(--amber); border-style: solid; }
.u-skew.is-bad  { border-color: var(--rose);  border-style: solid; }

/* --------------------------------------------------------------- table -- */

.u-tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.u-table {
    width: 100%; border-collapse: collapse; background: var(--panel);
    font-size: .86rem;
}
table.u-table th, table.u-table td {
    padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
table.u-table thead th {
    font-family: var(--mono); font-size: .72rem; text-transform: uppercase;
    letter-spacing: .07em; color: var(--ink-3); font-weight: 600;
    background: var(--bg-2); position: sticky; top: 0; z-index: 1;
}
table.u-table tbody tr:last-child td { border-bottom: 0; }
table.u-table tbody tr:hover { background: var(--panel-2); }
table.u-table td.u-val {
    font-family: var(--mono); font-variant-numeric: tabular-nums;
    color: var(--ink); white-space: nowrap;
}
table.u-table td.u-act { width: 1%; white-space: nowrap; text-align: right; }
table.u-table .u-lbl { font-weight: 600; color: var(--ink); }
table.u-table .u-note { color: var(--ink-3); font-size: .78rem; }
table.u-table tr.u-row-now { background: rgba(94,234,212,.07); }
table.u-table tr.u-row-biz td.u-val { color: var(--green); }
.u-drag { cursor: grab; color: var(--ink-3); user-select: none; padding-right: 2px; }
.u-drag:active { cursor: grabbing; }
tr.u-dragging { opacity: .4; }
tr.u-dragover td { border-top: 2px solid var(--accent); }

/* ------------------------------------------------------------ snippets -- */

.u-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.u-tab {
    font-family: var(--mono); font-size: .76rem; padding: 5px 10px;
    border-radius: 6px; border: 1px solid var(--line);
    background: var(--panel); color: var(--ink-2); cursor: pointer;
}
.u-tab:hover { border-color: var(--line-2); color: var(--ink); }
.u-tab.u-on { background: var(--accent); border-color: var(--accent); color: #04211d; font-weight: 600; }
[data-theme="light"] .u-tab.u-on { color: #fff; }

.u-code {
    position: relative; background: var(--bg-2); border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden;
}
.u-code-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; padding: 7px 10px 7px 12px;
    border-bottom: 1px solid var(--line); background: var(--panel);
    font-family: var(--mono); font-size: .74rem; color: var(--ink-3);
}
.u-code pre {
    margin: 0; padding: 12px 14px; overflow-x: auto;
    font-size: .82rem; line-height: 1.5; color: var(--ink);
    background: transparent;
}
.u-snippet + .u-snippet { margin-top: 12px; }

/* ----------------------------------------------------------- converter -- */

.u-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; }
.u-pairbox {
    background: var(--panel); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow);
}
.u-pairbox .u-zname { font-family: var(--mono); font-size: .78rem; color: var(--ink-3); }
.u-pairbox .u-ztime {
    font-family: var(--mono); font-variant-numeric: tabular-nums;
    font-size: clamp(1.7rem, 5.4vw, 2.6rem); font-weight: 700; letter-spacing: -.02em;
    line-height: 1.05; margin: 4px 0 2px;
}
.u-pairbox .u-zmeta { font-family: var(--mono); font-size: .78rem; color: var(--ink-2); }
.u-swap { display: flex; align-items: center; justify-content: center; }
.u-swap a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 50%;
    border: 1px solid var(--line-2); background: var(--panel);
    color: var(--ink-2) !important; font-size: 1rem; text-decoration: none !important;
}
.u-swap a:hover { border-color: var(--accent); color: var(--accent) !important; }

.u-inputrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.u-input, .u-select {
    font-family: var(--mono); font-size: .88rem;
    background: var(--bg-2); color: var(--ink);
    border: 1px solid var(--line-2); border-radius: 6px;
    padding: 8px 10px; min-width: 0;
}
.u-input:focus, .u-select:focus {
    outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
.u-input::placeholder { color: var(--ink-3); }
.u-field { display: flex; flex-direction: column; gap: 4px; }
.u-field label { font-family: var(--mono); font-size: .72rem; color: var(--ink-3); }

.u-overlap { display: flex; gap: 2px; margin: 10px 0 6px; }
.u-ov {
    flex: 1 1 0; height: 30px; border-radius: 3px;
    background: var(--panel-2); border: 1px solid var(--line);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--mono); font-size: .6rem; color: var(--ink-3);
}
.u-ov.is-good { background: rgba(74,222,128,.22); border-color: var(--green); color: var(--green); }
.u-ov.is-edge { background: rgba(251,191,36,.15); border-color: var(--amber); color: var(--amber); }

.u-dstbox { border-left: 3px solid var(--amber); padding-left: 14px; }
.u-dstbox h3 { color: var(--amber); }

.u-hourgrid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px;
}
.u-hourgrid a {
    font-family: var(--mono); font-size: .76rem; text-align: center;
    padding: 7px 4px; border-radius: 6px; border: 1px solid var(--line);
    background: var(--panel); color: var(--ink-2) !important; text-decoration: none !important;
}
.u-hourgrid a:hover { border-color: var(--accent); color: var(--accent) !important; }
.u-hourgrid a.u-on { border-color: var(--accent); background: var(--panel-2); color: var(--accent) !important; }

.u-linkgrid { display: flex; flex-wrap: wrap; gap: 6px; }
.u-linkgrid a {
    font-family: var(--mono); font-size: .78rem; padding: 5px 9px;
    border: 1px solid var(--line); border-radius: 6px; background: var(--panel);
    color: var(--ink-2) !important; text-decoration: none !important;
}
.u-linkgrid a:hover { border-color: var(--accent); color: var(--accent) !important; }

/* ----------------------------------------------------------- zonecards -- */

.u-zonecard {
    background: var(--panel); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 11px 13px;
}
.u-zonecard .u-zc-name {
    font-family: var(--mono); font-size: .74rem; color: var(--ink-3);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.u-zonecard .u-zc-time {
    font-family: var(--mono); font-variant-numeric: tabular-nums;
    font-size: 1.36rem; font-weight: 700; letter-spacing: -.02em; margin: 2px 0 0;
}
.u-zonecard .u-zc-meta { font-family: var(--mono); font-size: .7rem; color: var(--ink-2); }

/* ----------------------------------------------------------------- faq -- */

.u-faq { border-top: 1px solid var(--line); }
.u-faq details {
    border-bottom: 1px solid var(--line); padding: 0;
}
.u-faq summary {
    cursor: pointer; padding: 12px 2px; font-weight: 600; color: var(--ink);
    list-style: none; display: flex; gap: 10px; align-items: flex-start;
}
.u-faq summary::-webkit-details-marker { display: none; }
.u-faq summary::before {
    content: "+"; font-family: var(--mono); color: var(--accent);
    flex: none; width: 12px;
}
.u-faq details[open] summary::before { content: "\2212"; }
.u-faq .u-faq-a { padding: 0 2px 14px 24px; color: var(--ink-2); max-width: 78ch; }

/* -------------------------------------------------------------- prefs --- */

.u-prefsbar {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--bg-2); font-family: var(--mono); font-size: .76rem;
    color: var(--ink-3);
}
.u-prefsbar select, .u-prefsbar input[type="text"] {
    font-family: var(--mono); font-size: .76rem; background: var(--panel);
    color: var(--ink); border: 1px solid var(--line-2); border-radius: 5px; padding: 4px 6px;
}
.u-toggle { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; color: var(--ink-2); }

dialog.u-dialog {
    background: var(--panel); color: var(--ink); border: 1px solid var(--line-2);
    border-radius: var(--radius); box-shadow: var(--shadow); padding: 0;
    max-width: 460px; width: calc(100% - 32px);
}
dialog.u-dialog::backdrop { background: rgba(2,5,10,.68); }
dialog.u-dialog .u-dialog-in { padding: 18px 20px; }
dialog.u-dialog h3 { margin-bottom: 10px; }
dialog.u-dialog table { width: 100%; font-size: .84rem; }
.u-rowedit {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 0; border-bottom: 1px solid var(--line);
}
.u-rowedit:last-child { border-bottom: 0; }
/* With 16 rows the dialog scrolls on a phone, which pushed "done" below the
   fold. Keep the actions pinned to the bottom of the scroll area. */
dialog.u-dialog .u-dialog-actions {
    position: sticky; bottom: -1px; z-index: 2;
    background: var(--panel);
    margin-top: 14px; padding: 12px 0 2px;
    border-top: 1px solid var(--line);
}
.u-rowedit .u-rowname { flex: 1 1 auto; color: var(--ink); font-size: .84rem; }
.u-rowedit input[type="checkbox"] { flex: none; }
.u-rowedit .u-move {
    flex: none; width: 30px; height: 28px; line-height: 1;
    font-family: var(--mono); font-size: .8rem; cursor: pointer;
    background: var(--panel-2); color: var(--ink); border: 1px solid var(--line-2);
    border-radius: 5px;
}
.u-rowedit .u-move:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.u-rowedit .u-move:disabled { opacity: .3; cursor: default; }
dialog.u-dialog td { padding: 4px 0; color: var(--ink-2); }

/* -------------------------------------------------------------- footer -- */

.u-footer {
    border-top: 1px solid var(--line);
    background: var(--bg-2);
    padding: 26px 0 30px;
    font-size: .84rem;
}
.u-footer .u-fgrid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 20px; }
.u-footer h4 {
    font-family: var(--mono); font-size: .72rem; text-transform: uppercase;
    letter-spacing: .1em; color: var(--ink-3); margin: 0 0 8px;
}
.u-footer ul { list-style: none; margin: 0; padding: 0; }
.u-footer li { margin-bottom: 5px; }
.u-footer a { color: var(--ink-2); }
.u-footer a:hover { color: var(--accent); }
.u-footer .u-fbottom {
    margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line);
    display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    color: var(--ink-3); font-family: var(--mono); font-size: .76rem;
}

/* --------------------------------------------------------------- misc --- */

.u-callout {
    border: 1px solid var(--line); border-left: 3px solid var(--accent);
    background: var(--panel); border-radius: 6px; padding: 12px 14px;
}
.u-callout.is-warn { border-left-color: var(--amber); }
.u-callout.is-bad  { border-left-color: var(--rose); }
.u-kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-family: var(--mono); font-size: .84rem; }
.u-kv dt { color: var(--ink-3); }
.u-kv dd { margin: 0; color: var(--ink); }
.u-breadcrumb { font-family: var(--mono); font-size: .76rem; color: var(--ink-3); margin-bottom: 10px; }
.u-breadcrumb a { color: var(--ink-2); }
.u-flex { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.u-between { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.u-stack > * + * { margin-top: 12px; }

/* Prose blocks on the static pages (about/terms/privacy) */
.u-prose { max-width: 76ch; }
.u-prose h2 { margin-top: 1.6rem; }
.u-prose ul { color: var(--ink-2); padding-left: 20px; }
.u-prose li { margin-bottom: 5px; }

/* --------------------------------------------------------- responsive --- */

@media (max-width: 900px) {
    .u-footer .u-fgrid { grid-template-columns: 1fr 1fr; }
    .u-g4, .u-g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .u-g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .u-navlinks {
        display: none; position: absolute; top: 52px; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--bg-2); border-bottom: 1px solid var(--line);
        padding: 6px 12px 12px;
    }
    .u-navlinks.is-open { display: flex; }
    .u-navlinks a { padding: 9px 8px; font-size: .9rem; }
    .u-navtoggle { display: inline-flex; margin-left: auto; }
    .u-nav-in { position: relative; }

    .u-hero { grid-template-columns: 1fr; align-items: start; padding: 18px 15px; }
    .u-hero-side { align-items: flex-start; }
    .u-hero-actions { justify-content: flex-start; }
    .u-pair { grid-template-columns: 1fr; }
    .u-swap { padding: 2px 0; }
    .u-swap a { width: 36px; height: 36px; }
    .u-g2, .u-g3, .u-g4, .u-g5 { grid-template-columns: 1fr 1fr; }
    .u-hourgrid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
    table.u-table th, table.u-table td { padding: 7px 9px; }
    table.u-table { font-size: .8rem; }
    table.u-table .u-note { display: none; }
    /* The drag handle is useless on touch. Hide the header cell with it, or the
       whole header row sits one column left of its own data. */
    .u-drag, #u-fmt-table thead th:first-child { display: none; }
    .u-only-narrow { display: inline; }
    .u-only-wide { display: none; }
    /* Let long values wrap rather than pushing the copy button - the copy
       button IS the feature, and it must never need a sideways scroll. */
    table.u-table td.u-val {
        font-size: .78rem; white-space: normal; overflow-wrap: anywhere;
    }
    table.u-table .u-lbl { font-size: .78rem; }
    table.u-table th, table.u-table td { padding: 6px 7px; }
    table.u-table td.u-act { padding: 6px 4px 6px 2px; }
    /* The label column is the greedy one; cap it so the copy button - the
       whole point of the table - stays on screen without a sideways scroll. */
    #u-fmt-table td:nth-child(2), #u-fmt-table th:nth-child(2) { max-width: 84px; }
    table.u-table td.u-act .u-btn-sm { padding: 4px 6px; font-size: .68rem; }
    .u-body .u-clock { letter-spacing: -.04em; }
    .u-overlap .u-ov { font-size: 0; }
    .u-body { font-size: 14.5px; }
}

@media (max-width: 460px) {
    .u-g2, .u-g3, .u-g4, .u-g5 { grid-template-columns: 1fr; }
    .u-footer .u-fgrid { grid-template-columns: 1fr; }
    .u-shell { padding: 0 13px; }
}

/* No-JS: everything is already server-rendered; just hide the controls that
   would do nothing, and reveal the stacked snippet list. */
.u-nojs-hide { }
html.no-js .u-nojs-hide { display: none !important; }
html.no-js .u-tabs { display: none; }
