:root {
  --navy: #203050; --blue: #0050a0; --blue2: #2060a0; --cyan: #00b0e0;
  --ink: #1c2430; --muted: #5f6b7a; --line: #d9e1ea; --bg: #f2f6fa;
  --white: #fff; --th: #eef3f8; --yellow: #f0c010; --danger: #a81526;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ink); background: var(--bg); font-size: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; min-width: 300px; }
a { color: var(--blue); text-underline-offset: .18em; }
a:hover { color: var(--blue2); }
h1, h2, h3 { color: var(--navy); line-height: 1.22; margin: 0; font-weight: 650; }
h1 { font-size: clamp(1.75rem, 3.3vw, 2.6rem); overflow-wrap: anywhere; margin-bottom: .5rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: .55rem 0 1rem; }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid var(--blue2); outline-offset: 3px; }
button, .button {
  appearance: none; display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; border: 1px solid var(--blue); border-radius: 7px; background: var(--blue);
  color: var(--white); font-weight: 650; padding: .55rem .95rem; text-decoration: none; cursor: pointer;
  white-space: nowrap;
}
button:hover, .button:hover { background: var(--blue2); color: var(--white); }
button:disabled { cursor: default; background: #e1e7ee; color: #5f6b7a; border-color: var(--line); }
.secondary { background: var(--white); color: var(--blue); border-color: #bacbde; }
.secondary:hover { color: var(--navy); background: #eaf3fb; }
.dark-button { background: transparent; border-color: #7686a0; }
input:not([type="checkbox"]), select {
  width: 100%; min-height: 44px; padding: .5rem .7rem; border: 1px solid #afbed0;
  border-radius: 7px; color: var(--ink); background: var(--white);
}
input[type="file"] { border: 0; padding: .35rem 0; background: transparent; min-height: 0; }
input[type="file"]::file-selector-button {
  padding: .36rem .75rem; margin-right: .75rem; background: white; border: 1px solid #afbed0;
  border-radius: 6px; color: var(--blue); font: inherit; font-weight: 600;
}
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--blue); }
.test-banner { background: var(--yellow); color: var(--navy); font-size: .875rem; font-weight: 650; padding: .42rem max(1rem, calc((100vw - 1240px) / 2)); }
.shell { width: min(1240px, calc(100% - 3rem)); margin-inline: auto; }
.top { background: var(--navy); border-bottom: 4px solid var(--cyan); color: var(--white); }
.top-content { min-height: 78px; display: flex; align-items: center; gap: 1rem; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: .85rem; color: white; text-decoration: none; font-size: 1.23rem; font-weight: 650; }
.brand:hover { color: white; text-decoration: underline; }
.brand-mark { width: 5px; height: 32px; border-radius: 2px; background: var(--cyan); flex: 0 0 auto; }
.top-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.top-actions a { color: var(--white); font-size: .925rem; }
.login-label { color: #c9d6e6; font-size: .9rem; overflow-wrap: anywhere; }
.main { padding-block: 2rem 2.5rem; }
.page-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; }
.page-head p, .hint { color: var(--muted); }
.compact { margin-bottom: .6rem; align-items: center; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 1.25rem;
  margin-bottom: 1rem; min-width: 0;
}
.access-card { max-width: 440px; margin: 1.5rem auto; padding: 1.65rem; }
.fields { display: grid; gap: .85rem; }
.fields label { display: grid; gap: .28rem; font-weight: 600; }
.fields .hint { margin: 0; }
.hint, small { font-size: .9rem; }
.alert, .success { margin: .8rem 0; border-inline-start: 4px solid var(--danger); background: #fde8ea; padding: .65rem .85rem; }
.success { background: #e6f4eb; border-color: #187240; }
.upload-form, .row, .review-actions { display: flex; align-items: center; gap: .85rem; }
.upload-form { align-items: end; }
.drop {
  flex: 1; display: grid; gap: .32rem; min-width: 0; padding: 1rem 1.15rem; background: #eaf3fb;
  border: 1px dashed var(--blue2); border-radius: 9px; font-weight: 600; color: var(--navy);
}
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .94rem; }
th, td { text-align: start; padding: .68rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--th); color: var(--navy); font-weight: 650; }
tr:last-child td { border-bottom: 0; }
td small { display: block; color: var(--muted); margin: .18rem 0; overflow-wrap: anywhere; }
.table-scroll a { overflow-wrap: anywhere; }
.status { display: inline-block; border-radius: 5px; padding: .14rem .42rem; background: #eaf3fb; font-size: .84rem; font-weight: 650; }
.ready { background: #e6f4eb; color: #115f31; }
.failed, .needs { background: #fde8ea; color: var(--danger); }
.processing, .queued { background: #fff3cd; color: var(--navy); }
.back { display: inline-block; margin-bottom: .7rem; }
.summary { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .75rem; }
.metric { display: flex; flex-direction: column; gap: .34rem; margin: 0; border-top: 3px solid var(--blue); }
.metric span { color: var(--muted); }
.metric strong { color: var(--navy); font-size: 1.8rem; font-variant-numeric: tabular-nums; }
.parser summary, .review summary, .card summary { cursor: pointer; color: var(--blue); font-weight: 600; }
.review-actions { margin-bottom: .7rem; }
.search select { width: auto; }
.review { min-width: 820px; }
.review th:first-child, .review td:first-child { width: 45px; padding-inline: .6rem; }
.review th:nth-child(2) { width: 13%; }
.review th:nth-child(3) { width: 33%; }
.review th:nth-child(4) { width: 23%; }
.review .wrap { overflow-wrap: anywhere; }
.review ul { margin: .4rem 0; padding-left: 1.2rem; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .85rem; margin-top: 1rem; }
.advice { border-top: 1px solid var(--line); padding-top: .9rem; margin-top: .8rem; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 360px; overflow: auto; background: var(--th); padding: 1rem; font-size: .85rem; }
.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; padding-block: .8rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
@media (max-width: 760px) {
  .shell { width: calc(100% - 1.5rem); }
  .top-content { flex-wrap: wrap; padding-block: .65rem; gap: .6rem; }
  .top-actions { gap: .7rem; }
  .main { padding-top: 1.25rem; }
  .page-head, .upload-form { align-items: stretch; flex-direction: column; }
  .summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .card { padding: .9rem; }
  .review-actions, .search { flex-wrap: wrap; }
  .search input[type="search"] { flex-basis: 100%; }
  .search select { flex: 1; min-width: 0; }
}
