:root {
  --ink: #15222b;
  --muted: #60717c;
  --paper: #f4f1e9;
  --card: #fffdf8;
  --line: #d8d3c6;
  --accent: #0b6f68;
  --accent-dark: #07514c;
  --navy: #153246;
  --warning: #915d16;
  --danger: #9b3a32;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 85% 0, #dcebe5 0, transparent 28rem), var(--paper); }
button, input, select, textarea { font: inherit; }
.topbar { padding: 30px clamp(20px, 5vw, 72px) 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; background: var(--navy); color: #fff; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: clamp(28px, 4vw, 48px); letter-spacing: -.04em; }
h2 { margin-bottom: 0; font-size: 28px; }
h3 { margin-bottom: 16px; }
.subtitle { margin-bottom: 0; color: #c7d6de; }
.eyebrow { margin-bottom: 7px; font-size: 11px; font-weight: 800; letter-spacing: .16em; color: #68c5b8; }
.top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.badge { border: 1px solid #5e7b89; border-radius: 999px; padding: 8px 12px; color: #dbe8ed; font-size: 13px; }
.boundary-banner { padding: 12px clamp(20px, 5vw, 72px); display: flex; gap: 10px; background: #f5dcae; color: #664410; font-size: 14px; }
.tabs { padding: 0 clamp(20px, 5vw, 72px); display: flex; gap: 4px; overflow-x: auto; background: #fffdf8; border-bottom: 1px solid var(--line); }
.tab { padding: 15px 16px 12px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); white-space: nowrap; cursor: pointer; }
.tab.active { color: var(--accent-dark); border-bottom-color: var(--accent); font-weight: 750; }
main { width: min(1400px, calc(100% - 32px)); margin: 24px auto 64px; }
.status { min-height: 42px; margin-bottom: 18px; padding: 11px 14px; border: 1px solid #afd1ca; border-radius: 9px; background: #eaf7f3; color: var(--accent-dark); }
.status.error { border-color: #e0aaa5; background: #fbecea; color: var(--danger); }
.panel { display: none; }
.panel.active { display: block; }
.section-heading { margin: 26px 0 16px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.summary-grid { display: grid; grid-template-columns: repeat(6, minmax(130px, 1fr)); gap: 12px; margin-bottom: 16px; }
.metric { padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 5px 16px rgba(30, 45, 51, .04); }
.metric strong { display: block; margin-bottom: 5px; font-size: 30px; color: var(--navy); }
.metric span { color: var(--muted); font-size: 13px; }
.card { margin-bottom: 16px; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 5px 16px rgba(30, 45, 51, .04); }
.split-grid { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 16px; align-items: start; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 14px; }
.wide { grid-column: 1 / -1; }
label { display: grid; gap: 7px; margin-bottom: 13px; color: #40515b; font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #b9c0bd; border-radius: 7px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 3px solid #bce2db; border-color: var(--accent); }
textarea { min-height: 82px; resize: vertical; }
.check { display: flex; align-items: center; gap: 9px; }
.check input { width: 18px; min-height: 18px; }
.field-help, .muted { color: var(--muted); font-size: 13px; }
.button { min-height: 40px; padding: 9px 15px; border: 1px solid var(--accent); border-radius: 7px; background: var(--accent); color: #fff; font-weight: 750; cursor: pointer; }
.button:hover { background: var(--accent-dark); }
.button:disabled { cursor: wait; opacity: .6; }
.button.secondary { border-color: #68808d; background: transparent; }
.button.secondary:hover { background: #25465a; }
.notice { margin-bottom: 16px; padding: 14px 16px; border-left: 4px solid var(--warning); background: #fbf2e3; color: #63471c; }
.notice.danger { border-left-color: var(--danger); background: #f9e9e7; color: #702a25; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 11px 10px; border-bottom: 1px solid #e3dfd5; text-align: left; vertical-align: top; white-space: nowrap; }
th { color: #53636d; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
td.wrap { max-width: 360px; white-space: normal; overflow-wrap: anywhere; }
.empty { padding: 20px 0; color: var(--muted); }
.trial-code-list { display: grid; gap: 12px; margin-bottom: 16px; }
.trial-code-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 7px; }
.trial-code-row code { overflow-wrap: anywhere; min-width: 0; }
.trial-code-row .button { flex-shrink: 0; }
[hidden] { display: none !important; }
button:focus-visible { outline: 3px solid #57aa9c; outline-offset: 3px; }
@media (max-width: 680px) { .trial-code-row { align-items: stretch; flex-direction: column; } }
footer { padding: 24px; text-align: center; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }

@media (max-width: 1050px) {
  .summary-grid { grid-template-columns: repeat(3, 1fr); }
  .split-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .top-actions { justify-content: flex-start; }
  .boundary-banner { align-items: flex-start; flex-direction: column; }
  main { width: min(100% - 20px, 1400px); }
  .summary-grid, .split-grid, .form-grid { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .card { padding: 16px; }
}
