/* Discord Timestamps: the look. The site's engineering-tool system (oncall/oncall.css, the front page): a deep, flat surface,
   one blue accent, mono for labels, codes and buttons, Inter for prose, hairlines and 2 to 3 px corners. No cards, gradients or
   shadows. Calm is the visitor's choice (this page's, then the site's): data-motion="calm" on the root, and --m is 0. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/fonts/inter-latin.woff2') format('woff2'); }

:root {
  color-scheme: dark;
  --bg: #0a0d12; --bg-2: #0d1118; --surface: #121720; --surface-2: #19202a; --surface-3: #202a36;
  --line: rgba(151,168,189,.12); --line-2: rgba(151,168,189,.26); --line-3: rgba(151,168,189,.4);
  --text: #e7ecf2; --muted: #9ba8b8; --dim: #687689;
  --acc: #79b8f0; --acc-2: #3d87c9; --acc-3: #2c6ca3; --acc-ink: #ffffff; --acc-soft: rgba(121,184,240,.12);
  --warn: #f5be3f; --bad: #ff6b6b;
  --font: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Cascadia Mono', 'Cascadia Code', Consolas, 'SF Mono', Menlo, 'DejaVu Sans Mono', 'Liberation Mono', ui-monospace, monospace;
  --m: 1;
}
html[data-motion="calm"] { --m: 0; }

* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: hidden; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); min-height: 100vh; display: flex; flex-direction: column; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: var(--acc); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
::selection { background: rgba(121,184,240,.28); }
h1, h2, h3 { font-family: var(--font); font-weight: 600; line-height: 1.25; margin: 0; letter-spacing: 0; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 30; padding: 6px 10px; background: var(--surface-2); border: 1px solid var(--line-3); border-radius: 3px; font: 500 12.5px var(--mono); }
.skip:focus { left: 8px; }
.mono { font-family: var(--mono); }
.dim { color: var(--dim); } .muted { color: var(--muted); }

/* ── the site header: the brand in mono, the crumb, the motion switch at the right ── */
.top { border-bottom: 1px solid var(--line-2); background: var(--bg-2); position: relative; z-index: 5; }
.top .bar { display: flex; align-items: center; gap: 8px; min-height: 42px; padding-inline: 20px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; font: 500 13px var(--mono); white-space: nowrap; flex: none; }
.brand img { width: 22px; height: 22px; display: block; }
.crumb { font: 500 13px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sep { color: var(--dim); margin-right: 8px; }
.motion { position: relative; flex: none; margin-left: auto; }
.icon-btn { position: relative; width: 32px; height: 32px; display: grid; place-items: center; background: none; border: 1px solid transparent; border-radius: 3px; color: var(--muted); transition: color .15s, background .15s, border-color .15s; }
.icon-btn:hover { color: var(--text); background: var(--surface-2); border-color: var(--line); }
.icon-btn[aria-expanded="true"] { color: var(--text); background: var(--surface-2); border-color: var(--line-2); }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: min(300px, calc(100vw - 32px)); padding: 12px 14px 14px; border-radius: 3px; background: var(--bg-2); border: 1px solid var(--line-3); }
.row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.row-note { margin: 10px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }

/* ── the page: left-aligned, a heading, one line, then the panes ── */
main { flex: 1 0 auto; width: 100%; max-width: 1240px; padding: 18px 20px 8px; outline: none; }
.head h1 { font-size: 22px; margin: 0 0 4px; }
.lede { margin: 0; color: var(--muted); font-size: 14px; max-width: 72ch; }
.facts { margin: 6px 0 0; font: 12px/1.6 var(--mono); color: var(--dim); }
.facts b { color: var(--muted); font-weight: 500; }
.note { margin: 12px 0 0; padding: 6px 0 6px 10px; border-left: 2px solid var(--acc); font-size: 13px; color: var(--muted); }
.note b { color: var(--text); font-weight: 500; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 36px; }
.pane { min-width: 0; }
/* a pane's head: a running head in mono over a hairline, its number in the accent */
.pane > h2 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; font: 500 12px var(--mono); color: var(--muted); margin: 22px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line-2); }
.pane > h2 b { color: var(--acc); font-weight: 500; }
.pane > h2 .aside { margin-left: auto; color: var(--dim); font-weight: 400; font-size: 11.5px; }
.sub { font: 500 11.5px var(--mono); color: var(--dim); margin: 18px 0 6px; }
.lbl { display: block; font: 500 11.5px var(--mono); color: var(--muted); margin-bottom: 4px; }
.hint { margin: 6px 0 0; color: var(--dim); font: 12px/1.5 var(--mono); }
.hint b { color: var(--muted); font-weight: 500; }

/* fields: flat, mono, a hairline that turns blue in focus */
input[type="date"], input[type="time"], input[type="text"], input[type="url"], select, textarea {
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 3px; padding: 6px 8px; font: 13.5px/1.35 var(--mono); color: var(--text); min-width: 0; color-scheme: dark; }
input:hover, select:hover, textarea:hover { border-color: var(--line-3); }
input:focus, select:focus, textarea:focus { border-color: var(--acc-2); outline: none; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 1px solid var(--acc-2); outline-offset: 0; }
textarea { width: 100%; resize: vertical; min-height: 64px; }
::placeholder { color: var(--dim); opacity: 1; }

/* buttons: flat tool buttons in mono; one primary at most on a screen */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 3px; padding: 6px 12px; font: 500 12.5px/1.3 var(--mono); color: var(--text); white-space: nowrap; transition: border-color .12s, background .12s, color .12s; }
.btn:hover, .btn:focus-visible { border-color: var(--line-3); background: var(--surface-3); }
.btn.primary { background: var(--acc-2); border-color: var(--acc-2); color: var(--acc-ink); }
.btn.primary:hover, .btn.primary:focus-visible { background: var(--acc-3); border-color: var(--acc-3); }
.btn.small { padding: 4px 9px; font-size: 12px; }
.btn.ghost { background: none; }
.btn.done { color: var(--acc); border-color: var(--acc-2); }
.btn.stuck { color: var(--warn); border-color: rgba(245,190,63,.5); }

/* the zone switch: a segmented control on radios, as on the front page */
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 3px; overflow: hidden; background: var(--bg-2); vertical-align: middle; }
.seg label { position: relative; display: block; }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg span { display: block; text-align: center; padding: 5px 12px; font: 500 12.5px var(--mono); color: var(--muted); transition: background .12s, color .12s; white-space: nowrap; }
.seg label + label span { border-left: 1px solid var(--line-2); }
.seg input:checked + span { color: var(--acc-ink); background: var(--acc-2); }
.seg input:focus-visible + span { outline: 2px solid var(--acc); outline-offset: -2px; }
.seg input:hover:not(:checked) + span { color: var(--text); }

/* ── 01 the moment ── */
.zone { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.zone-note { font: 12px var(--mono); color: var(--dim); }
.zone-note b { color: var(--muted); font-weight: 500; }
.dt { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) auto; gap: 8px; align-items: end; margin-top: 12px; }
.dt label { min-width: 0; }
.dt input { width: 100%; }
.dt .weekday { grid-column: 1 / -1; margin: -2px 0 0; font: 12px var(--mono); color: var(--muted); }
.warn { margin: 8px 0 0; padding: 4px 0 4px 10px; border-left: 2px solid var(--warn); font-size: 12.5px; color: var(--muted); }
.warn b { color: var(--warn); font-weight: 500; }

/* raid nights: one flat button per night, its next date beneath, a small × to forget it */
.picks { display: flex; flex-wrap: wrap; gap: 6px; }
.pick { display: inline-flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: 3px; background: var(--bg-2); min-width: 0; transition: border-color .12s; }
.pick .go { background: none; border: 0; border-radius: 3px 0 0 3px; padding: 5px 10px 5px 9px; text-align: left; font: 500 12.5px/1.35 var(--mono); color: var(--text); min-width: 0; }
.pick .go small { display: block; font: 11px/1.35 var(--mono); color: var(--dim); }
.pick .go:hover, .pick .go:focus-visible { background: var(--surface-2); }
.pick .x { background: none; border: 0; border-left: 1px solid var(--line); border-radius: 0 3px 3px 0; width: 28px; color: var(--dim); font: 14px/1 var(--mono); }
.pick .x:hover, .pick .x:focus-visible { color: var(--text); background: var(--surface-2); }
.pick.on { border-color: var(--acc-2); box-shadow: inset 2px 0 0 var(--acc); }
.pick.on .go small { color: var(--acc); }
.picks .none { font: 12px var(--mono); color: var(--dim); margin: 0; }
.addpick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.addpick select { flex: 0 1 auto; }
.addpick input { width: 9.5em; flex: none; }
.addpick .st { font: 12px var(--mono); color: var(--dim); }

.rel { display: flex; align-items: center; gap: 8px; }
.rel .in { font: 500 13px var(--mono); color: var(--muted); flex: none; }
.rel input { flex: 1 1 auto; width: 100%; }
.rel-out { min-height: 1.5em; }
.rel-out.bad { color: var(--warn); }

/* the moment's numbers: a ruled list of key and value in mono */
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 14px; margin: 16px 0 0; font: 12.5px/1.5 var(--mono); border-top: 1px solid var(--line); }
.kv dt, .kv dd { padding: 5px 0; border-bottom: 1px solid var(--line); margin: 0; }
.kv dt { color: var(--dim); font-size: 11.5px; }
.kv dd { color: var(--text); min-width: 0; }
.kv dd .dim { font-size: 11.5px; }

/* ── 02 the codes: one ruled row per style. Its letter, its name, the code, how Discord shows it, Copy ── */
.rows { display: grid; border-top: 1px solid var(--line); }
.crow { display: grid; grid-template-columns: 30px 128px 19.5ch minmax(0, 1fr) auto; grid-template-areas: "k name code pv copy"; align-items: center; gap: 4px 14px; padding: 7px 4px 7px 0; border-bottom: 1px solid var(--line); transition: background .15s; }
.crow:hover { background: var(--surface); }
.crow .k { grid-area: k; font: 600 13px var(--mono); color: var(--acc); padding-left: 6px; white-space: nowrap; }
.crow .name { grid-area: name; font: 12px var(--mono); color: var(--muted); }
.crow .name i { display: block; font-style: normal; color: var(--dim); font-size: 11px; }
.crow .code { grid-area: code; font: 13px/1.4 var(--mono); color: var(--text); background: none; padding: 0; -webkit-user-select: all; user-select: all; min-width: 0; }
.crow .pv { grid-area: pv; min-width: 0; font-size: 14px; color: var(--text); }
.crow .copy { grid-area: copy; justify-self: end; min-width: 68px; }
.crow.flash { animation: flash calc(var(--m) * .7s) ease-out; }
@keyframes flash { from { background: var(--acc-soft); } to { background: transparent; } }
/* a timestamp as Discord draws one: the words on a faint plate */
.dts { background: rgba(255,255,255,.07); border-radius: 3px; padding: 1px 4px; white-space: normal; }
.pv .sep2 { color: var(--muted); }
.codes-foot { margin-top: 8px; }

/* ── 03 paste and 04 the link ── */
.found { list-style: none; margin: 10px 0 0; padding: 0; border-top: 1px solid var(--line); }
.found:empty { display: none; }
.found li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.found .raw { font: 12.5px var(--mono); color: var(--muted); }
.found .raw b { color: var(--acc); font-weight: 500; }
.found .read { font-size: 14px; }
.found .more { grid-column: 1 / -1; font: 12px/1.5 var(--mono); color: var(--dim); }
.found .use { grid-row: 1 / 3; grid-column: 2; }
.found .bad { grid-column: 1 / -1; color: var(--warn); font: 12.5px var(--mono); }
.share { display: flex; gap: 8px; }
.share input { flex: 1 1 auto; width: 100%; color: var(--muted); }

/* ── the foot ── */
.foot { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 14px 20px; margin-top: 28px; color: var(--dim); font: 12px var(--mono); border-top: 1px solid var(--line-2); }
.foot a { color: var(--muted); }

/* ── wide windows: the moment at the left, the codes beside it; paste and the link beneath ── */
@media (min-width: 900px) {
  .layout { grid-template-columns: minmax(330px, 400px) minmax(0, 1fr); }
}
/* ── a narrow codes pane (a tablet, a phone): letter, name and Copy on one line, the code beneath, then the preview ── */
@media (max-width: 1099px) and (min-width: 900px), (max-width: 640px) {
  .crow { grid-template-columns: 30px minmax(0, 1fr) auto; grid-template-areas: "k name copy" ". code copy" ". pv pv"; padding: 8px 0; }
  .crow .name i { display: inline; margin-left: 6px; }
}
@media (max-width: 640px) {
  .top .bar { padding-inline: 14px; min-height: 46px; }
  main { padding: 14px 14px 8px; }
  .head h1 { font-size: 20px; }
  .crow { grid-template-areas: "k name copy" ". code code" ". pv pv"; }
  .foot { padding-inline: 14px; }
}
@media (max-width: 480px) {
  .brand span { display: none; }
  .dt { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .dt .now { grid-column: 2; grid-row: 2; justify-self: end; }
  .dt .weekday { grid-column: 1; grid-row: 2; align-self: center; margin: 0; }
  .share { flex-wrap: wrap; }
  .share .btn { flex: none; }
}

/* ── calm: nothing decorative moves ── */
html[data-motion="calm"] * { transition-duration: 0s !important; }
html[data-motion="calm"] .crow.flash { animation: none; }
