:root {
  color-scheme: light;
  --ink: #14252d;
  --muted: #4c626b;
  --line: #d8e2e6;
  --teal: #006653;
  --paper: #f2f6f7;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-size: 1rem; line-height: 1.5; }
button, input, textarea { font: inherit; }
button, a, input, label { -webkit-tap-highlight-color: transparent; }
button, a.button { touch-action: manipulation; }
:focus-visible { outline: 3px solid #16816a; outline-offset: 3px; }

.wrap { width: min(100% - 2rem, 48rem); margin-inline: auto; }
.top { background: #101e27; color: white; }
.wordmark { display: flex; align-items: center; gap: .8rem; min-height: 3.9rem; font-size: 1.125rem; font-weight: 760; }
.wordmark span { border-left: 1px solid #4d6069; padding-left: .8rem; color: #b6c9ce; font-size: .875rem; font-weight: 500; }
.intro { margin: 2.5rem 0 1.45rem; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.45rem, 7vw, 3.7rem); line-height: 1.03; letter-spacing: -.052em; }
.intro p { max-width: 32rem; margin-top: .8rem; color: var(--muted); }
.panel { background: white; border: 1px solid var(--line); border-radius: 1.1rem; }
.controls { padding: clamp(1rem, 4vw, 1.5rem); }
fieldset { margin: 0; padding: 0; min-width: 0; border: 0; }
legend { padding: 0; margin-bottom: .6rem; font-weight: 700; }
.choices { display: flex; flex-wrap: wrap; gap: .45rem; }
.choices label { position: relative; }
.choices input { position: absolute; opacity: 0; }
.choices span { display: flex; align-items: center; min-height: 44px; padding: .56rem .75rem; border: 1px solid var(--line); border-radius: .65rem; color: #324a53; cursor: pointer; font-size: .875rem; }
.choices input:checked + span { background: #e3f4ed; border-color: #78ad9e; color: #005d4c; font-weight: 700; }
.choices input:focus-visible + span { outline: 3px solid #16816a; outline-offset: 2px; }
.choices input:disabled + span { cursor: default; }

.optional { display: flex; gap: .55rem; align-items: start; margin-block: 1.05rem; font-size: .875rem; color: var(--muted); }
.optional input { margin: .17rem 0 0; width: 1.05rem; height: 1.05rem; accent-color: var(--teal); flex: 0 0 auto; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .55rem 1rem; border-radius: .7rem; border: 1px solid transparent; font-weight: 700; text-decoration: none; cursor: pointer; }
.primary { background: var(--teal); color: white; }
.primary:hover { background: #005544; }
.secondary { border-color: var(--line); background: white; color: var(--ink); }
.secondary:hover { background: #edf5f3; }
button:disabled { cursor: wait; opacity: .7; }
.controls > .primary { width: 100%; }
.privacy { margin-top: .7rem; color: var(--muted); font-size: .84rem; }

#results { margin-top: 1.8rem; }
.result-head { display: flex; align-items: baseline; justify-content: space-between; gap: .65rem; }
.result-head h2 { font-size: 1.45rem; letter-spacing: -.035em; }
#meta { color: var(--muted); font-size: .83rem; overflow-wrap: anywhere; margin-top: .18rem; }
#progress { color: var(--teal); font-size: .85rem; font-weight: 720; text-align: right; flex-shrink: 0; }
.meter { height: .3rem; border-radius: 1rem; overflow: hidden; background: #dce7e8; margin: .8rem 0 1rem; }
#fill { height: 100%; width: 0; background: var(--teal); transition: width .15s ease-out; }
.actions { padding: 1rem; margin-bottom: 1rem; }
.actions > p { font-size: .875rem; color: var(--muted); }
.action-buttons { display: flex; gap: .45rem; flex-wrap: wrap; margin-top: .7rem; }
#action-status:not(:empty) { margin-top: .55rem; }
#copy-fallback { width: 100%; min-height: 7rem; margin-top: .65rem; }
.group { margin-bottom: .75rem; overflow: hidden; }
.group h3 { background: #eaf1f2; padding: .6rem .92rem; font-size: .9rem; font-weight: 750; }
.row { padding: .62rem .92rem; border-top: 1px solid #e8eef0; }
.row-title { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.row-name { font-size: .94rem; font-weight: 690; }
.row-time { font-size: .85rem; font-weight: 720; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.row-status, .row-path { font-size: .82rem; overflow-wrap: anywhere; }
.row-status { color: var(--muted); }
.row-path { color: #566f78; }
.ok { color: var(--teal); }
.reply { color: #2c5f82; }
.error, .timeout { color: #992e35; }
.legend, .footer { color: var(--muted); font-size: .83rem; }
.footer { padding-block: 1.8rem; }
@media (min-width: 52rem) {
  .wrap { width: min(100% - 4rem, 67rem); }
  .start-area { display: grid; grid-template-columns: 1fr minmax(21rem, .82fr); align-items: center; gap: 2rem; padding-block: 2.6rem 1.35rem; }
  .intro { margin: 0; }
  #groups { columns: 2; column-gap: 1rem; }
  .group { break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) { #fill { transition: none; } }
