:root {
  color-scheme: light;
  --ink: #17201d;
  --muted: #5d6864;
  --paper: #f5f3ed;
  --panel: #fffef9;
  --line: #d7d6cd;
  --accent: #176b57;
  --accent-dark: #0d4c3d;
  --warn: #8b3c2e;
  --soft: #e7efe9;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.5; }
button, input, textarea, select { font: inherit; }
button, input, textarea, select { border: 1px solid #aeb6b1; border-radius: 6px; }
input, textarea, select { width: 100%; padding: .65rem .7rem; background: white; color: var(--ink); }
textarea { resize: vertical; min-height: 3rem; }
button { min-height: 2.7rem; padding: .55rem 1rem; background: var(--accent); color: white; border-color: var(--accent); font-weight: 700; cursor: pointer; }
button:hover { background: var(--accent-dark); }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #f2b84b; outline-offset: 2px; }
button:disabled { opacity: .48; cursor: not-allowed; }
button.secondary { background: transparent; color: var(--accent-dark); }
button.danger { background: transparent; color: var(--warn); border-color: var(--warn); }
button.text-button { background: transparent; border: 0; color: var(--accent-dark); min-height: auto; padding: .25rem; }
.site-header { display: flex; justify-content: space-between; gap: 2rem; align-items: flex-end; padding: 2.25rem max(1rem, calc((100vw - 1180px) / 2)); background: #183c33; color: white; }
.site-header h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.7rem); letter-spacing: -.04em; }
.site-header p { max-width: 62ch; margin: .4rem 0 0; }
.header-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.header-actions .secondary { color: white; border-color: #b8d0c7; }
.eyebrow, .step { margin: 0; text-transform: uppercase; letter-spacing: .13em; font-size: .76rem; font-weight: 800; }
main { width: min(1180px, calc(100% - 2rem)); margin: 1.5rem auto 3rem; }
section { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: clamp(1rem, 3vw, 1.7rem); margin: 1rem 0; }
.notice { border-left: 5px solid var(--accent); }
h2, h3 { margin-top: 0; line-height: 1.2; }
.section-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: start; margin-bottom: 1rem; }
.section-heading h2 { margin: .15rem 0 0; }
.fingerprint { max-width: 50ch; overflow-wrap: anywhere; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .78rem; }
.field-grid { display: grid; gap: .8rem; margin-bottom: .8rem; }
.field-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
label, .button-field { display: grid; gap: .3rem; font-weight: 650; font-size: .92rem; }
.button-field span { color: transparent; user-select: none; }
.editor { background: #faf9f4; border: 1px solid var(--line); border-radius: 8px; padding: 1rem; margin-top: 1rem; }
.editor-heading { display: flex; justify-content: space-between; align-items: start; }
.hint { color: var(--muted); font-size: .9rem; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 7px; }
table { width: 100%; min-width: 710px; border-collapse: collapse; background: white; }
th, td { padding: .68rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
tr.selected td { background: var(--soft); }
.checks { display: flex; flex-wrap: wrap; gap: 1rem; margin: .8rem 0; }
.checks label, .check-label { display: flex; align-items: center; gap: .45rem; }
.checks input, .check-label input, legend input, td input[type="checkbox"] { width: auto; }
.review-row, .transfer-actions, .export-row, .http-actions { display: flex; align-items: end; gap: .7rem; flex-wrap: wrap; margin-top: 1rem; }
.review-row label, .export-row label { flex: 1 1 230px; }
.status { min-height: 1.4rem; color: var(--muted); overflow-wrap: anywhere; }
.status.error, .error-list { color: var(--warn); }
.status.success { color: var(--accent-dark); }
.summary-grid, .target-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin: 1rem 0; }
.summary-card, fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 1rem; min-width: 0; }
.summary-card h3 { margin-bottom: .3rem; }
.metric { font-size: 1.25rem; font-weight: 800; }
.counts { display: flex; flex-wrap: wrap; gap: .35rem .9rem; padding: 0; list-style: none; color: var(--muted); }
.badge { display: inline-block; padding: .15rem .45rem; border-radius: 999px; background: var(--soft); font-size: .78rem; font-weight: 750; }
.badge.regression { background: #f6ded9; color: #7c2e21; }
.badge.improvement { background: #dcefe5; color: #155c48; }
.badge.unpaired { background: #ece9df; color: #5d5747; }
.file-label { display: inline-grid; border: 1px solid #aeb6b1; border-radius: 6px; padding: .5rem .8rem; background: white; }
.file-label input { border: 0; padding: .2rem 0 0; }
.error-list ul { margin: .4rem 0; padding-left: 1.2rem; }
fieldset label { margin-bottom: .65rem; }
fieldset code { overflow-wrap: anywhere; font-size: .8rem; }
fieldset:disabled { opacity: .6; }
footer { width: min(1180px, calc(100% - 2rem)); margin: 0 auto 2rem; color: var(--muted); font-size: .85rem; }

@media (max-width: 720px) {
  .site-header { align-items: stretch; flex-direction: column; padding: 1.4rem 1rem; }
  .header-actions button { flex: 1 1 145px; }
  main { width: min(100% - 1rem, 1180px); margin-top: .5rem; }
  section { padding: .85rem; }
  .field-grid.two, .field-grid.three, .summary-grid, .target-grid { grid-template-columns: 1fr; }
  .create-row button { width: 100%; }
  .section-heading { flex-direction: column; }
  .review-row > *, .transfer-actions > *, .export-row > *, .http-actions > * { width: 100%; flex-basis: 100%; }
}
