:root {
  --ink: #16213E;
  --ink-soft: #3B4766;
  --ground: #ECEFF3;
  --surface: #FFFFFF;
  --line: #D5DBE3;
  --muted: #5B6577;
  --go: #00875A;
  --go-ink: #006644;
  --go-wash: #E3F4EC;
  --signal: #FFC629;
  --danger: #C4302B;
  --danger-wash: #FBE6E5;
  --radius-s: 6px;
  --radius-m: 12px;
  font-family: Archivo, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--ground);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--go-ink); }
h1, h2, h3 { font-stretch: 112%; line-height: 1.15; margin: 0; }
h1 { font-size: 2rem; font-weight: 780; letter-spacing: -0.01em; }
h2 { font-size: 1.3rem; font-weight: 720; }
h3 { font-size: 1.05rem; font-weight: 680; }
p { margin: 0.5rem 0; max-width: 68ch; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }

/* top bar */
.bar { background: var(--ink); color: #fff; display: flex; align-items: center; gap: 24px;
       padding: 10px max(16px, calc((100vw - 1040px) / 2)); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none;
         font-weight: 760; font-stretch: 118%; font-size: 1.1rem; }
.brand svg { width: 30px; height: 30px; }
.bar nav { display: flex; gap: 4px; flex-wrap: wrap; }
.bar nav a { color: #C9D1E4; text-decoration: none; padding: 6px 12px; border-radius: 999px; font-weight: 560; }
.bar nav a:hover { color: #fff; background: var(--ink-soft); }
.bar nav a.on { color: var(--ink); background: var(--signal); }

main { width: 100%; max-width: 1040px; margin: 0 auto; padding: 28px 16px 48px; flex: 1; }
main.narrow { max-width: 620px; }
.foot { text-align: center; color: var(--muted); font-size: 0.85rem; padding: 18px; }

/* page head */
.lede { margin: 0 0 24px; }
.lede p { color: var(--muted); font-size: 1.05rem; }

/* panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m);
         padding: 20px 22px; margin-bottom: 18px; }
.panel > h2 { margin-bottom: 6px; }
.panel .hint { color: var(--muted); font-size: 0.92rem; margin-top: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; align-items: start; }
.grid2 > .panel { margin-bottom: 0; }

/* forms */
label { display: block; font-weight: 600; margin: 14px 0 4px; }
label .opt { color: var(--muted); font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1.5px solid var(--line);
  border-radius: var(--radius-s); padding: 9px 11px; }
input:focus, select:focus, textarea:focus { border-color: var(--ink-soft); outline: none; box-shadow: 0 0 0 3px #FFE9A8; }
textarea { min-height: 90px; resize: vertical; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1 1 160px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; margin: 10px 0; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--go); flex: none; }
.check small { display: block; color: var(--muted); font-weight: 400; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; margin: 14px 0 6px; }

button, .button { font: inherit; font-weight: 640; border: 0; border-radius: 999px; padding: 10px 20px;
  background: var(--go); color: #fff; cursor: pointer; text-decoration: none; display: inline-block; }
button:hover, .button:hover { background: var(--go-ink); }
button.quiet, .button.quiet { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
button.quiet:hover, .button.quiet:hover { border-color: var(--ink-soft); background: #F6F8FA; }
button.small { padding: 5px 13px; font-size: 0.88rem; }
button.danger { background: var(--danger); }
button.link { background: none; color: var(--go-ink); padding: 0; text-decoration: underline; font-weight: 500; }
form.inline { display: inline; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.result { font-size: 0.92rem; margin-left: 4px; }
.result.ok { color: var(--go-ink); }
.result.bad { color: var(--danger); }

.flash { border-radius: var(--radius-s); padding: 11px 14px; margin-bottom: 14px; background: var(--go-wash);
         border-left: 4px solid var(--go); }
.flash.error { background: var(--danger-wash); border-left-color: var(--danger); }

/* interest dials: tap to cycle off → sometimes → like → love */
.dials { display: flex; flex-wrap: wrap; gap: 8px; }
.dial-group { margin-top: 16px; }
.dial-group h3 { font-size: 0.95rem; color: var(--muted); font-weight: 600; font-stretch: 100%; margin-bottom: 8px; }
.dial { display: inline-flex; align-items: center; gap: 9px; border: 1.5px solid var(--line); background: #fff;
        color: var(--ink); border-radius: 999px; padding: 7px 14px 7px 12px; font-weight: 520; font-size: 0.93rem; }
.dial:hover { background: #fff; border-color: var(--ink-soft); }
.dial .bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.dial .bars i { width: 4px; border-radius: 1px; background: var(--line); }
.dial .bars i:nth-child(1) { height: 6px; }
.dial .bars i:nth-child(2) { height: 10px; }
.dial .bars i:nth-child(3) { height: 14px; }
.dial[data-level="1"] { border-color: #8FC9B1; }
.dial[data-level="1"] .bars i:nth-child(-n+1),
.dial[data-level="2"] .bars i:nth-child(-n+2),
.dial[data-level="3"] .bars i:nth-child(-n+3) { background: var(--go); }
.dial[data-level="2"] { background: var(--go-wash); border-color: var(--go); }
.dial[data-level="3"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.dial[data-level="3"] .bars i { background: var(--signal) !important; }
.dial .level { font-size: 0.78rem; color: var(--muted); font-weight: 500; min-width: 0; }
.dial[data-level="3"] .level { color: var(--signal); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 0.86rem; margin: 6px 0 0; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; gap: 6px; align-items: center; border: 1.5px solid var(--line); border-radius: 999px;
        padding: 5px 12px; background: #fff; font-weight: 500; font-size: 0.92rem; margin: 0; cursor: pointer; }
.pill input { accent-color: var(--go); margin: 0; }
.pill:has(input:checked) { border-color: var(--go); background: var(--go-wash); }

/* lists and tables */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 12px; justify-content: space-between; align-items: center; padding: 11px 0;
           border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list .sub { color: var(--muted); font-size: 0.86rem; }
.state { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--line); margin-right: 6px; }
.state.ok { background: var(--go); }
.state.failed { background: var(--danger); }
.state.pending { background: var(--signal); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.scroll { overflow-x: auto; }
code, .mono { font-family: ui-monospace, Consolas, monospace; font-size: 0.86rem; overflow-wrap: anywhere; }

/* home */
.steps { list-style: none; padding: 0; margin: 8px 0 0; }
.steps li { display: flex; gap: 10px; align-items: center; padding: 7px 0; }
.steps .tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none;
               display: grid; place-items: center; font-size: 13px; color: #fff; }
.steps .done .tick { background: var(--go); border-color: var(--go); }
.steps .tick svg { width: 12px; height: 12px; }
.steps .done span { color: var(--muted); }
.next { background: var(--ink); color: #fff; border-color: var(--ink); }
.next h2 { color: var(--signal); }
.next .when { font-size: 1.6rem; font-weight: 760; font-stretch: 115%; margin: 6px 0 2px; }
.next p { color: #C9D1E4; }
.next .button.quiet { color: #fff; border-color: var(--ink-soft); }
.next .button.quiet:hover { background: var(--ink-soft); }
.figures { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 4px; }
.figures div { min-width: 90px; }
.figures b { display: block; font-size: 1.5rem; font-stretch: 112%; }
.figures span { color: var(--muted); font-size: 0.86rem; }

/* sources */
.addbox { display: flex; gap: 10px; flex-wrap: wrap; }
.addbox input { flex: 1 1 260px; }
.pack { border: 1.5px solid var(--line); border-radius: var(--radius-m); padding: 14px 16px; margin-top: 10px;
        display: flex; justify-content: space-between; gap: 14px; align-items: center; flex-wrap: wrap; }
.pack p { margin: 2px 0 0; color: var(--muted); font-size: 0.92rem; }

/* digest page wrapper */
.digest-frame { background: transparent; }
.digest-frame .wrap { padding: 0; max-width: 720px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }

/* services */
.service { scroll-margin-top: 20px; }
.service .status { font-size: 0.85rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: #EEF1F5;
                   color: var(--muted); margin-left: 8px; vertical-align: middle; }
.service .status.on { background: var(--go-wash); color: var(--go-ink); }
details { margin-top: 12px; }
summary { cursor: pointer; color: var(--go-ink); font-weight: 560; }
.howto { background: #F6F8FA; border-radius: var(--radius-s); padding: 10px 14px 10px 30px; margin: 10px 0; font-size: 0.93rem; }
.howto li { margin: 4px 0; }

.panel .hint.spaced, .panel p.spaced { margin-top: 14px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.spaced { margin-top: 18px; }

@media (max-width: 640px) {
  h1 { font-size: 1.6rem; }
  .bar { gap: 10px; }
  .panel { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
