/* Picokoi: still water. One teal for actions, one koi dot for identity,
   state colours only for states. No cards, no shadows. */
:root {
  --paper: #f4f7f6; --ink: #16303a; --muted: #5b7078; --line: #d5dfdf; --well: #e8eeed;
  --act: #0e6e6e; --act-ink: #ffffff; --koi: #f07a1a; --focus: #0e6e6e;
  --up: #2f8f5b; --late: #b07a08; --down: #c23b33; --unknown: #6d5bd0; --idle: #7a8a90;
  --sans: "Avenir Next", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --round: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", var(--sans);
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1a1e; --ink: #dde8e7; --muted: #93a7ac; --line: #24363b; --well: #15262b;
    --act: #4fb3b0; --act-ink: #07211f; --focus: #7fd3d0;
    --up: #5cc28a; --late: #e0a93a; --down: #ef6b61; --unknown: #a596f0; --idle: #8a9ca1;
  }
}
* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); font: 17px/1.55 var(--sans); -webkit-text-size-adjust: 100%; }
body { margin: 0 auto; max-width: 46rem; padding: 0 1.25rem 4rem; }
body.bare { min-height: 100vh; display: grid; align-items: center; padding-bottom: 0; }
a { color: var(--act); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
h1, h2 { line-height: 1.2; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 1.75rem; margin: 2.25rem 0 .75rem; }
h2 { font-size: 1.1rem; margin: 2.5rem 0 .75rem; }
p { margin: 0 0 1rem; }
code, pre { font-family: var(--mono); font-size: .86em; }
pre { background: var(--well); padding: .9rem 1rem; border-radius: 6px; overflow-x: auto; line-height: 1.45; }
.quiet, .hint, .meta { color: var(--muted); }
.hint { font-size: .9rem; }

/* wordmark: the one place the koi lives */
.mark { font-family: var(--round); font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -.02em; font-size: 1.2rem; }
.mark .dot { display: inline-block; width: .32em; height: .32em; border-radius: 50%; background: var(--koi); margin-left: .08em; vertical-align: .05em; }
.mark.big { font-size: clamp(3rem, 12vw, 5.5rem); margin: 0; line-height: 1; }
.mark.big .dot { position: relative; }
.mark.big .dot::after { content: ""; position: absolute; inset: -.1em; border-radius: 50%; border: 2px solid var(--koi); opacity: 0;
  animation: ripple 2.4s .5s ease-out 1 both; }
@keyframes ripple { from { transform: scale(.6); opacity: .7; } to { transform: scale(3.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mark.big .dot::after { animation: none; } }

.hero { padding: 0 0 8vh; }
.lede { font-size: 1.35rem; margin: 1.25rem 0 2rem; max-width: 26ch; }
.lede-s { font-size: 1.05rem; max-width: 60ch; }
.actions { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }

/* header */
.top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 1.25rem 0 .5rem; flex-wrap: wrap; }
.top nav { display: flex; gap: 1.25rem; align-items: baseline; font-size: .95rem; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current] { color: var(--ink); }
.top nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--koi); }
.top form { display: inline; margin: 0; }

/* buttons */
.button, button { font: inherit; cursor: pointer; }
.button { display: inline-block; background: var(--act); color: var(--act-ink); border: 0; border-radius: 6px; padding: .55rem 1.1rem; text-decoration: none; font-weight: 600; }
.button:hover { filter: brightness(1.08); text-decoration: none; }
.secondary, .danger { background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 6px; padding: .4rem .85rem; }
.secondary:hover { border-color: var(--act); color: var(--act); }
.danger { color: var(--down); }
.danger:hover { border-color: var(--down); }
.small { font-size: .85rem; padding: .25rem .6rem; }
.link { background: none; border: 0; padding: 0; color: var(--muted); }
.link:hover { color: var(--ink); }

/* forms */
.narrow { max-width: 30rem; }
.stack { display: grid; gap: .5rem; }
.stack > .button { justify-self: start; margin-top: .75rem; }
label, legend { font-weight: 600; font-size: .95rem; }
fieldset { border: 0; padding: 0; margin: .75rem 0 0; }
legend { margin-bottom: .4rem; }
input, select { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: .5rem .65rem; min-width: 0; }
input:focus, select:focus { border-color: var(--act); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--act) 25%, transparent); }
input[aria-invalid="true"] { border-color: var(--down); }
.pair { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.pair input { width: 5rem; }
.error { color: var(--down); margin: .25rem 0; }
.notice { border-left: 3px solid var(--koi); padding: .5rem .9rem; background: var(--well); border-radius: 0 6px 6px 0; }
.notice.ok { border-left-color: var(--up); }

/* states */
.pip { display: inline-block; width: .6em; height: .6em; border-radius: 50%; background: currentColor; margin-right: .45em; vertical-align: .06em; }
.s-up, .st-ok { color: var(--up); } .s-late, .st-degraded { color: var(--late); } .s-down, .st-outage { color: var(--down); }
.s-unknown { color: var(--unknown); } .s-new, .s-paused { color: var(--idle); }
.verdict { font-size: 2.4rem; font-weight: 650; letter-spacing: -.02em; line-height: 1.1; margin: .25rem 0 .75rem; }
.verdict .pip { width: .42em; height: .42em; vertical-align: .14em; }
.explain { max-width: 58ch; }

/* list of checks */
.titlebar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.rows { list-style: none; margin: 1rem 0; padding: 0; border-top: 1px solid var(--line); }
.rows li { border-bottom: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 11rem 1fr; gap: .1rem 1rem; padding: .85rem .25rem; color: inherit; text-decoration: none; }
a.row:hover { background: var(--well); }
.row .name { font-weight: 600; overflow-wrap: anywhere; }
.row .meta { grid-column: 2; font-size: .9rem; overflow-wrap: anywhere; }
.row .state { grid-row: span 2; font-size: .95rem; font-weight: 600; }
.row.static { grid-template-columns: 1fr auto; }
.row.static .meta { grid-column: 1; }
.row.static .state { grid-row: auto; }
.row .inline { grid-row: 1 / span 2; grid-column: 2; display: flex; gap: .5rem; align-items: center; }
.row .inline form { margin: 0; }
.empty { padding: 1.5rem 0; max-width: 52ch; }

/* a check's page */
.back { margin: 1.5rem 0 0; font-size: .95rem; }
.back a { color: var(--muted); }
.check h1 { margin-top: .5rem; overflow-wrap: anywhere; }
.ping { margin: 1.75rem 0; }
.ping.first { border-left: 3px solid var(--koi); padding-left: 1rem; }
.ping h2 { margin-top: 0; }
.code { display: flex; align-items: stretch; background: var(--well); border-radius: 6px; }
.code code { flex: 1; padding: .75rem 1rem; overflow-x: auto; white-space: nowrap; }
.copy { background: none; border: 0; border-left: 1px solid var(--line); color: var(--act); padding: 0 1rem; font-weight: 600; }
.copy[data-done] { color: var(--up); }
.facts dl { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.5rem; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
details.edit { margin: 2rem 0 1rem; }
details.edit summary { cursor: pointer; color: var(--act); }
details.edit form { margin-top: 1rem; max-width: 30rem; }
.tools { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1.5rem 0; }
.tools form { margin: 0; }
.log { list-style: none; padding: 0; margin: 0; }
.log li { padding: .3rem 0; border-bottom: 1px solid var(--line); }
.log li:last-child { border-bottom: 0; }

/* help */
.doc { max-width: 42rem; }
.doc p, .doc li, .doc dd { max-width: 68ch; }
.toc { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; margin: 1.5rem 0 1rem; font-size: .95rem; }
.steps { padding-left: 1.25rem; } .steps li { margin-bottom: .5rem; padding-left: .25rem; }
.states { display: grid; grid-template-columns: max-content 1fr; gap: .6rem 1.5rem; }
.states dt { font-weight: 600; } .states dd { margin: 0; }
h2[id] { scroll-margin-top: 1rem; }

@media (max-width: 34rem) {
  html { font-size: 16px; }
  .row { grid-template-columns: 1fr; }
  .row .meta, .row .state { grid-column: 1; grid-row: auto; }
  .row .inline { grid-column: 1; grid-row: auto; }
  .states, .facts dl { grid-template-columns: 1fr; }
  .verdict { font-size: 2rem; }
}
