:root {
  color-scheme: light;
  --canvas: #f4f6f8;
  --bg: var(--canvas);
  --surface: #ffffff;
  --surface-muted: #eef1f4;
  --surface-strong: #e4e8ed;
  --text: #17212b;
  --ink: var(--text);
  --muted: #596675;
  --faint: #778391;
  --line: #d7dde4;
  --line-strong: #bac4cf;
  --accent: #1f5f9f;
  --accent-hover: #174b7f;
  --accent-soft: #e9f2fb;
  --success: #237253;
  --warning: #8a5c12;
  --danger: #a13f45;
  --radius: 10px;
  --shadow: 0 10px 30px rgb(23 33 43 / 0.07);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
}

body {
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background: var(--canvas);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgb(31 95 159 / 0.28);
  outline-offset: 2px;
}

button,
input,
select {
  font: inherit;
}

code,
time {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(30px, 3vw, 44px);
  font-weight: 720;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

h2 {
  margin-bottom: 14px;
  font-size: 19px;
  font-weight: 680;
  letter-spacing: -0.015em;
}

h3 {
  margin: 24px 0 10px;
  font-size: 15px;
  font-weight: 700;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 10;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--text);
  color: var(--surface);
  transform: translateY(-150%);
}

.skip-link:focus {
  color: var(--surface);
  transform: translateY(0);
}

.topbar {
  min-height: 64px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 0.96);
}

.wordmark {
  color: var(--text);
  font-size: 16px;
  font-weight: 760;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.wordmark:hover {
  color: var(--text);
}

.brand-label {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topbar nav a {
  padding: 7px 10px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.topbar nav a:hover {
  background: var(--surface-muted);
  color: var(--text);
}

main {
  width: min(100%, 1660px);
  margin: 0 auto;
  padding: 38px 28px 64px;
}

.intro,
.page-head {
  min-width: 0;
  margin-bottom: 28px;
}

.intro {
  max-width: 680px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.page-head > div {
  min-width: 0;
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.lede,
.description {
  max-width: 68ch;
  margin-bottom: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 16px;
}

.button {
  min-height: 40px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
  color: #ffffff;
}

.button:active,
.link-button:active {
  transform: translateY(1px);
}

.brand-grid {
  max-width: 760px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.brand-row {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}

.brand-row:last-child {
  border-bottom: 0;
}

.brand-row:hover {
  background: var(--accent-soft);
  color: var(--text);
}

.brand-row strong,
.brand-row small {
  display: block;
}

.brand-row strong {
  margin-bottom: 3px;
  font-size: 16px;
}

.brand-row small {
  color: var(--muted);
  font-size: 12px;
}

.brand-row > span:last-child {
  color: var(--accent);
  font-size: 20px;
}

.board {
  display: grid;
  grid-template-columns: repeat(6, minmax(180px, 1fr));
  gap: 12px;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 12px;
}

.column {
  min-height: 310px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.column h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 2px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 740;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.column h2 span {
  min-width: 23px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.task {
  display: block;
  margin-bottom: 9px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 2px 8px rgb(23 33 43 / 0.04);
}

.task:hover {
  border-color: var(--line-strong);
  color: var(--text);
  box-shadow: 0 6px 16px rgb(23 33 43 / 0.08);
  transform: translateY(-1px);
}

.task strong,
.task small {
  display: block;
}

.task strong {
  margin-bottom: 6px;
  font-size: 14px;
  line-height: 1.35;
}

.task small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.empty {
  margin: 0;
  color: var(--faint);
  font-size: 13px;
}

.column .empty {
  padding: 10px 3px;
}

.back {
  display: inline-flex;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.back:hover {
  color: var(--accent);
}

.detail {
  max-width: 1080px;
}

.detail > .description {
  margin-bottom: 28px;
}

.detail > section {
  margin-top: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.detail > section > :last-child {
  margin-bottom: 0;
}

.detail .analysis-ready {
  border-color: #b7cee4;
  background: var(--accent-soft);
}

.detail .analysis-ready h2 {
  color: #174b7f;
}

.manifest-hash {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
}

.detail ul {
  margin: 0;
  padding-left: 20px;
}

.detail li + li {
  margin-top: 7px;
}

.evidence {
  display: grid;
  grid-template-columns: minmax(120px, auto) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.evidence:last-child {
  border-bottom: 0;
}

.evidence strong {
  font-size: 13px;
}

.evidence code,
.detail code {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 11px;
}

.evidence small {
  color: var(--faint);
  font-size: 12px;
}

.evidence p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.timeline li:last-child {
  border-bottom: 0;
}

.timeline time {
  color: var(--faint);
  font-size: 12px;
}

.timeline strong {
  font-size: 13px;
}

.form-wrap {
  max-width: 680px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.form-wrap form {
  display: grid;
  gap: 8px;
  margin-top: 28px;
}

.form-wrap label,
.form-wrap legend {
  color: var(--text);
  font-size: 13px;
  font-weight: 680;
}

.form-wrap input,
.form-wrap select {
  width: 100%;
  min-height: 42px;
  margin-bottom: 9px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.form-wrap input:hover,
.form-wrap select:hover {
  border-color: #8593a1;
}

.form-wrap fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 16px;
  margin: 3px 0 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.form-wrap fieldset legend {
  padding: 0 5px;
}

.form-wrap fieldset label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 520;
}

.form-wrap fieldset input {
  width: 16px;
  min-height: auto;
  margin: 0;
  accent-color: var(--accent);
}

.form-wrap .button {
  width: fit-content;
  margin-top: 2px;
}

#form-status {
  min-height: 22px;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: 0;
}

.status {
  font-weight: 680;
}

.actions {
  display: flex;
  gap: 12px;
  white-space: nowrap;
}

.actions form {
  margin: 0;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.link-button:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ops-section {
  margin-top: 32px;
}

.ops-section h2 {
  margin-bottom: 12px;
}

.login-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(100%, 430px);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-mark {
  margin-bottom: 38px;
  font-size: 15px;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.login-card h1 {
  font-size: 31px;
}

.login-card p {
  margin-bottom: 24px;
  color: var(--muted);
}

.login-error {
  min-height: 22px;
  margin: 18px 0 0;
  color: var(--danger);
  font-size: 13px;
}

@media (max-width: 1100px) {
  .board {
    grid-auto-columns: minmax(250px, 32vw);
    grid-template-columns: none;
    grid-auto-flow: column;
    scroll-snap-type: x proximity;
  }

  .column {
    scroll-snap-align: start;
  }
}

@media (max-width: 720px) {
  .topbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    padding: 11px 16px;
  }

  .wordmark {
    margin-right: auto;
  }

  .brand-label {
    order: 3;
    flex-basis: 100%;
  }

  .topbar nav {
    max-width: calc(100vw - 170px);
    overflow-x: auto;
  }

  .topbar nav a {
    padding: 6px 7px;
  }

  main {
    width: 100%;
    padding: 28px 16px 48px;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .board {
    grid-auto-columns: minmax(260px, 84vw);
  }

  .evidence {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .evidence p {
    grid-column: 1;
    margin-top: 5px;
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .manifest-hash {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .form-wrap {
    padding: 20px;
  }

  .form-wrap fieldset {
    grid-template-columns: 1fr;
  }

  .login-card {
    padding: 24px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .button,
  .link-button,
  .task,
  .brand-row {
    transition:
      background-color 130ms ease,
      border-color 130ms ease,
      box-shadow 130ms ease,
      color 130ms ease,
      transform 130ms ease;
  }
}
