:root {
  --ink: #f4f7fb;
  --muted: #8a93a4;
  --paper: #0b0c10;
  --surface: #17181e;
  --surface-2: #202128;
  --line: #30323c;
  --green: #39d98a;
  --green-dark: #0eb978;
  --mint: rgba(45, 212, 141, .14);
  --amber: #f0b84f;
  --amber-soft: rgba(240, 184, 79, .14);
  --red: #ff6b63;
  --red-soft: rgba(255, 107, 99, .14);
  --blue: #4cc9ff;
  --shadow: 0 22px 70px rgba(0, 0, 0, .35);
}

.single-submit-shell {
  display: grid;
  gap: 1.25rem;
  max-width: 880px;
}

.single-submit-form {
  display: grid;
  gap: .8rem;
}

.single-submit-form input {
  width: 100%;
}

.single-submit-form #link {
  min-height: 108px;
  color: var(--ink);
  font-size: .96rem;
}

.submission-result .detail-list {
  margin: 0;
}

.contact-card {
  text-align: center;
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; background: radial-gradient(circle at 50% -10%, #1d1d25 0, #0b0c10 42%, #07080b 100%); color: var(--ink); font: 15px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; padding: .75rem 1rem; background: var(--ink); color: white; }
.skip-link:focus { top: 1rem; }
.topbar { background: transparent; color: white; border-bottom: 0; }
.topbar__inner { max-width: 1280px; margin: 2.5rem auto 0; padding: 1.15rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: rgba(23,24,30,.94); border: 1px solid var(--line); border-radius: 3px; box-shadow: var(--shadow); }
.topbar h1 { margin: .1rem 0 0; font-size: clamp(1.45rem, 3vw, 1.9rem); letter-spacing: -.04em; text-shadow: 0 0 18px rgba(76,201,255,.16); }
.topbar__actions { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; justify-content: flex-end; }
.eyebrow { margin: 0; color: #719081; font: 700 .68rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .16em; }
.topbar .eyebrow { color: #a7c7b7; }
.connection { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .7rem; border: 1px solid rgba(255,255,255,.10); border-radius: 999px; font-size: .78rem; background: rgba(255,255,255,.04); }
.connection::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: #efb74f; box-shadow: 0 0 0 4px rgba(239,183,79,.12); }
.connection[data-state="ok"]::before { background: #6bd2a7; }
.connection[data-state="error"]::before { background: #ef7a72; }
.shell { max-width: 1280px; margin: auto; padding: .8rem 1.5rem 5rem; display: grid; gap: .85rem; }
.hero { min-height: 130px; padding: clamp(1.1rem, 3vw, 1.8rem); border-radius: 3px; background: rgba(23,24,30,.94); border: 1px solid var(--line); display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; box-shadow: var(--shadow); overflow: hidden; position: relative; }
.hero::after { content: ""; position: absolute; left: 11rem; right: 11rem; bottom: 1rem; height: 2.8rem; border-radius: 4px; opacity: .72; background-image: radial-gradient(circle, rgba(57,217,138,.75) 0 5px, transparent 6px), radial-gradient(circle, rgba(255,255,255,.14) 0 5px, transparent 6px); background-position: 0 0, 16px 16px; background-size: 16px 16px; }
.hero > * { position: relative; z-index: 1; }
.hero h2 { margin: .35rem 0 .6rem; font-size: clamp(1.35rem, 3vw, 2rem); line-height: 1.05; letter-spacing: -.04em; max-width: 720px; }
.hero p:not(.eyebrow) { margin: 0; max-width: 720px; color: var(--muted); }
.hero__mode { min-width: 250px; padding: .9rem 1rem; background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 8px; display: grid; gap: .2rem; backdrop-filter: blur(10px); }
.hero__mode span, .hero__mode small { color: var(--muted); overflow-wrap: anywhere; }
.hero__mode strong { font-size: 1.25rem; }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-title h2 { margin: .2rem 0 0; font-size: 1.35rem; letter-spacing: -.02em; }
.section-title--wrap { flex-wrap: wrap; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.metric, .panel { background: rgba(23,24,30,.94); border: 1px solid var(--line); box-shadow: var(--shadow); }
.metric { padding: 1rem 1.1rem; border-radius: 3px; display: grid; gap: .2rem; }
.metric span, .metric small { color: var(--muted); }
.metric output { font-size: clamp(1.5rem, 3vw, 2.15rem); font-weight: 760; letter-spacing: -.04em; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 1rem; align-items: stretch; }
.panel { border-radius: 3px; padding: 1.3rem; min-width: 0; }
.panel--submit { border-top: 4px solid var(--green); }
label { font-weight: 650; }
textarea { width: 100%; margin-top: .5rem; resize: vertical; min-height: 120px; padding: .9rem 1rem; border: 1px solid #2c2e37; border-radius: 3px; background: #24252c; color: #98a1ad; font: .86rem/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; transition: border .15s, box-shadow .15s; }
input[type="text"], input[type="url"] { width: 100%; margin: .5rem 0 .35rem; padding: .8rem .9rem; border: 1px solid #2c2e37; border-radius: 3px; background: #24252c; color: #f4f7fb; font: .92rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; }
input#cdk, input[id*="card"], input[id*="cdk"] { text-transform: uppercase; letter-spacing: .04em; }
input[type="password"], input[type="number"], input[type="datetime-local"] { width: 100%; margin: .5rem 0 .35rem; padding: .8rem .9rem; border: 1px solid #2c2e37; border-radius: 3px; background: #24252c; color: #f4f7fb; }
#api-run-id { text-transform: none; letter-spacing: normal; }
textarea:focus, input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 3px solid rgba(49,92,147,.25); outline-offset: 2px; }
textarea:focus, input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(49,92,147,.12); }
.help, .muted { color: var(--muted); }
.help { margin: .55rem 0; font-size: .85rem; }
code { padding: .1rem .3rem; border-radius: 5px; background: #24252c; color: #d8e4f2; font-family: ui-monospace, monospace; }
.counter { display: inline-flex; min-width: 2.5rem; justify-content: center; padding: .3rem .55rem; border-radius: 999px; background: #edf0ea; color: var(--muted); font-size: .8rem; }
.cost-row { margin: 1rem 0; padding: .8rem .9rem; background: #f4f6f1; border-radius: 10px; display: flex; justify-content: space-between; gap: 1rem; }
.cost-row output { font-weight: 750; }
.validation-list { margin: 0 0 .8rem; padding-left: 1.25rem; color: var(--red); font-size: .85rem; }
.button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; padding: .52rem .9rem; border-radius: 999px; border: 1px solid transparent; text-decoration: none; font-weight: 700; cursor: pointer; transition: transform .12s, background .12s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .48; }
.button--primary { background: var(--green); color: white; }
.button--primary:hover:not(:disabled) { background: var(--green-dark); }
.button--ghost { color: white; background: rgba(255,255,255,.055); border-color: rgba(255,255,255,.08); }
.button--danger { background: var(--red); color: white; }
.button--danger:hover:not(:disabled) { background: #842720; }
.button--wide { width: 100%; min-height: 48px; }
.notice { margin: .8rem 0 0; padding: .72rem .85rem; border-radius: 9px; background: var(--mint); color: var(--green-dark); }
.notice--error { background: var(--red-soft); color: #7c2924; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; max-height: 410px; overflow: auto; }
.timeline li { border-left: 3px solid var(--line); padding: .45rem .65rem .45rem .85rem; display: grid; gap: .15rem; background: rgba(255,255,255,.02); }
.timeline li[data-tone="active"] { border-color: var(--amber); }
.timeline li[data-tone="success"] { border-color: var(--green); }
.timeline li[data-tone="error"] { border-color: var(--red); }
.timeline strong { overflow-wrap: anywhere; }
.timeline small { color: var(--muted); }
.timeline .timeline-error { color: var(--red); }
.filters { display: flex; gap: .65rem; align-items: center; flex-wrap: wrap; }
.toggle { display: inline-flex; align-items: center; gap: .4rem; font-weight: 500; }
select { min-height: 40px; padding: .45rem 2rem .45rem .65rem; border: 1px solid #2c2e37; border-radius: 3px; background: #24252c; color: var(--ink); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: .85rem .65rem; text-align: left; border-bottom: 1px solid #2a2c35; vertical-align: middle; }
th { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; }
td { overflow-wrap: anywhere; }
.task-link { max-width: 360px; color: var(--blue); }
.status { display: inline-flex; align-items: center; white-space: nowrap; padding: .28rem .55rem; border-radius: 999px; background: #edf0ea; font-size: .78rem; font-weight: 750; }
.status--1, .status--2 { background: var(--amber-soft); color: #714708; }
.status--3 { background: var(--mint); color: var(--green-dark); }
.status--4, .status--5 { background: var(--red-soft); color: #7c2924; }
.status--extract-running { background: var(--amber-soft); color: #714708; }
.status--extract-success { background: var(--mint); color: var(--green-dark); }
.status--extract-failed, .status--extract-stopped { background: var(--red-soft); color: #7c2924; }
.icon-button, .detail-button { min-width: 42px; min-height: 42px; border: 1px solid var(--line); border-radius: 9px; background: white; cursor: pointer; }
.detail-button { padding: .35rem .65rem; color: var(--green-dark); font-weight: 700; }
.empty { margin: 1rem 0 0; padding: 1.5rem; text-align: center; color: var(--muted); background: rgba(255,255,255,.025); border-radius: 3px; }
dialog { width: min(700px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 25px 80px rgba(0,0,0,.22); padding: 1.2rem; color: var(--ink); }
dialog::backdrop { background: rgba(14,24,19,.58); backdrop-filter: blur(3px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.dialog-head h2 { margin: 0; }
.detail-list { display: grid; grid-template-columns: max-content minmax(0,1fr); gap: .55rem 1rem; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; overflow-wrap: anywhere; }
pre { max-height: 280px; overflow: auto; padding: 1rem; border-radius: 3px; background: #0c0d11; border: 1px solid #2c2e37; color: #8af7cd; white-space: pre-wrap; word-break: break-word; font: .82rem/1.6 ui-monospace, monospace; }
.toast-region { position: fixed; right: 1rem; bottom: 1rem; z-index: 50; display: grid; gap: .5rem; }
.toast { max-width: 360px; padding: .8rem 1rem; border-radius: 10px; background: var(--ink); color: white; box-shadow: var(--shadow); }
.extract-panel { border-top: 4px solid var(--blue); }
.extract-grid { display: grid; grid-template-columns: minmax(320px,.8fr) minmax(360px,1.2fr); gap: 1.2rem; }
.extract-form { display: grid; gap: .65rem; align-content: start; }
.extract-form .field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.extract-form label { display: grid; gap: .15rem; }
.extract-form select { width: 100%; margin-top: .5rem; }
.extract-list-title { margin: 0 0 .75rem; }
.extract-list { display: grid; gap: .7rem; max-height: 480px; overflow: auto; }
.extract-task { padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 3px; background: rgba(255,255,255,.025); display: grid; gap: .55rem; }
.extract-task__head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.extract-task code { overflow-wrap: anywhere; }
.extract-task progress { width: 100%; height: .65rem; accent-color: var(--blue); }
.extract-task__message { margin: 0; color: var(--muted); }
.extract-task__links { display: flex; gap: .6rem; flex-wrap: wrap; }
.extract-task__links a { color: var(--blue); font-weight: 700; }
.extract-cancel { justify-self: start; min-height: 38px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--red); cursor: pointer; font-weight: 700; }
.api-playground { border-top: 4px solid var(--amber); }
.api-grid { display: grid; grid-template-columns: minmax(320px,1fr) minmax(320px,1fr); gap: 1.2rem; align-items: start; }
.api-output-grid { margin-top: 1.2rem; display: grid; grid-template-columns: minmax(320px,1fr) minmax(320px,1fr); gap: 1.2rem; align-items: start; }
.button-row { display: flex; gap: .65rem; align-items: center; flex-wrap: wrap; }
.button-row .button { flex: 1 1 180px; }
.api-task .button-row { margin-top: .2rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

.cdk-check-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem;
}
.cdk-check-row input { min-width: 0; }
.cdk-check-button { white-space: nowrap; }

@media (max-width: 860px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-grid { grid-template-columns: 1fr; }
  .hero { align-items: flex-start; flex-direction: column; }
  .hero__mode { width: 100%; }
  .extract-grid { grid-template-columns: 1fr; }
  .api-grid, .api-output-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .topbar__inner { align-items: flex-start; flex-direction: column; }
  .topbar__actions { justify-content: flex-start; }
  .shell { padding: 1rem .8rem 4rem; gap: 1.25rem; }
  .hero { padding: 1.4rem; min-height: auto; }
  .metric-grid { grid-template-columns: 1fr; }
  .panel { padding: 1rem; }
  .cost-row, .section-title { align-items: flex-start; flex-direction: column; }
  .filters { width: 100%; }
  .extract-form .field-grid { grid-template-columns: 1fr; }
  .cdk-check-row { grid-template-columns: 1fr; }
  .cdk-check-button { width: 100%; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  tbody { display: grid; gap: .75rem; }
  tr { padding: .75rem; border: 1px solid var(--line); border-radius: 11px; }
  td { display: grid; grid-template-columns: 6.5rem minmax(0,1fr); gap: .5rem; padding: .45rem 0; border-bottom: 1px dashed #e3e6df; }
  td:last-child { border: 0; }
  td::before { content: attr(data-label); color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
  .task-link { max-width: none; }
}
