:root {
  --ink: #1d2327;
  --muted: #4a555c;
  --paper: #fbfaf7;
  --card: #ffffff;
  --line: #d9dcd6;
  --accent: #1f5f5b;
  --accent-ink: #ffffff;
  --accent-soft: #e5efed;
  --warn-soft: #fdf3e1;
  --warn-line: #e3b862;
  --ok-soft: #e7f2e4;
  --ok-line: #6a9b5e;
  --focus: #c96a00;
  --radius: 10px;
  --max: 46rem;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 18px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--card); padding: .5rem 1rem; z-index: 10; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1rem; }
.wide { max-width: 64rem; }

header.site {
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
header.site .wrap {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: .25rem 1.25rem; padding-top: .8rem; padding-bottom: .8rem;
  max-width: 64rem;
}
.brand { font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.05rem; }
.brand span { color: var(--muted); font-weight: 400; }
nav.top a { margin-right: 1rem; font-size: .95rem; }
nav.top a:last-child { margin-right: 0; }

main { padding: 2rem 0 3rem; }

h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 1rem; letter-spacing: -0.01em; }
h2 { font-size: 1.4rem; line-height: 1.3; margin: 2.25rem 0 .75rem; }
h3 { font-size: 1.1rem; margin: 1.5rem 0 .5rem; }
p, ul, ol { margin: 0 0 1rem; }
li { margin-bottom: .35rem; }

.lede { font-size: 1.15rem; color: var(--muted); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.25rem .5rem; margin: 1.25rem 0;
}
.note { background: var(--accent-soft); border-color: #c4dad6; }
.warn { background: var(--warn-soft); border-color: var(--warn-line); }
.ok { background: var(--ok-soft); border-color: var(--ok-line); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .75rem; margin: 1.25rem 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; }
.stat b { display: block; font-size: 1.6rem; line-height: 1.2; }
.stat span { color: var(--muted); font-size: .95rem; }

.button, button {
  display: inline-block; background: var(--accent); color: var(--accent-ink); border: 0;
  border-radius: 8px; padding: .75rem 1.25rem; font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.button.secondary { background: transparent; color: var(--accent); border: 2px solid var(--accent); }
button[disabled] { opacity: .6; cursor: wait; }

form .field { margin: 0 0 1rem; }
label { display: block; font-weight: 600; margin-bottom: .3rem; }
.hint { display: block; color: var(--muted); font-size: .92rem; font-weight: 400; margin-top: -.15rem; margin-bottom: .35rem; }
input[type=email], input[type=text], input[type=date], select {
  width: 100%; font: inherit; padding: .6rem .7rem; border: 2px solid #8a9298; border-radius: 6px;
  background: #fff; color: var(--ink);
}
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.check input { margin-top: .35rem; width: 1.15rem; height: 1.15rem; flex: none; }
.hp { position: absolute; left: -5000px; }
.form-msg { margin-top: 1rem; }

table { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--card); }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f0f1ee; font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
th button.sort { background: none; color: inherit; padding: 0; font-weight: 600; border-radius: 0; }

.dst-row { display: grid; grid-template-columns: 1fr; gap: .4rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.dst-row .name { font-weight: 600; }
.dst-row .pair { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.dst-row label { font-weight: 400; font-size: .9rem; color: var(--muted); margin: 0; }

details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem 1rem; margin: .6rem 0; }
summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: .5rem; }

footer.site { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; padding: 1.5rem 0 2.5rem; }
footer.site p { margin-bottom: .5rem; }

.sources { font-size: .9rem; color: var(--muted); }
.sources li { margin-bottom: .2rem; word-break: break-word; }

@media (min-width: 700px) {
  h1 { font-size: 2.4rem; }
  .dst-row { grid-template-columns: 14rem 1fr; align-items: center; }
}

@media print {
  header.site nav, footer.site, .no-print { display: none; }
  body { background: #fff; }
}
