:root {
  --ink: #0f1424;
  --muted: #5d6478;
  --line: #e3e6ee;
  --bg: #ffffff;
  --card: #ffffff;
  --soft: #f4f6fb;
  --signal: #144fff;
  --signal-ink: #ffffff;
  --error: #c0262f;
  --ok: #157347;
  --radius: 12px;
  --font: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #eef1f8; --muted: #a1a8bb; --line: #2a3043; --bg: #0f1320; --card: #161b2b; --soft: #1c2234; --signal: #4d7aff;
  }
}
:root[data-theme="dark"] { --ink: #eef1f8; --muted: #a1a8bb; --line: #2a3043; --bg: #0f1320; --card: #161b2b; --soft: #1c2234; --signal: #4d7aff; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.5; font-size: 16px; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; padding-top: 24px; padding-bottom: 32px; }
.error { color: var(--error); }
h1 { font-size: clamp(24px, 3.4vw, 36px); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 12px; }
h2 { font-size: 20px; margin: 0 0 6px; }

.top { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 2; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; color: var(--ink); }
.mark { width: 22px; height: 22px; border-radius: 6px; background: var(--signal); position: relative; }
.mark::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: 5px; height: 3px; border-radius: 2px; background: #fff; }
.steps { display: flex; gap: 6px; font-size: 13px; color: var(--muted); }
.steps span { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.steps span.on { color: var(--signal); border-color: var(--signal); }
.steps span.done { color: var(--ok); border-color: var(--ok); }
@media (max-width: 640px) { .steps { display: none; } }

.hero { padding: 40px 0 20px; max-width: 760px; }
.hero p { color: var(--muted); margin: 0; font-size: 17px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 16px 0; }
.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 36px 16px; text-align: center; cursor: pointer; display: flex; flex-direction: column; gap: 6px; background: var(--soft); transition: border-color .15s; }
.drop:hover, .drop:focus-visible, .drop.over { border-color: var(--signal); outline: none; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); }
select, input[type="number"], input[type="password"], textarea {
  font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
}
textarea { width: 100%; resize: vertical; min-height: 48px; line-height: 1.35; }
fieldset.targets { border: 0; padding: 0; margin: 16px 0 0; }
legend { font-size: 14px; color: var(--muted); padding: 0; margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 14px; cursor: pointer; background: var(--bg); color: var(--ink); user-select: none; }
.chip[aria-pressed="true"] { background: var(--signal); color: var(--signal-ink); border-color: var(--signal); }
.row { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.wrap-row { flex-wrap: wrap; align-items: flex-end; }
button, .button { font: inherit; font-weight: 600; border-radius: 8px; padding: 9px 16px; cursor: pointer; border: 1px solid var(--line); background: var(--bg); color: var(--ink); text-decoration: none; display: inline-block; }
button.primary { background: var(--signal); color: var(--signal-ink); border-color: var(--signal); }
button.ghost { background: transparent; }
button:disabled { opacity: .5; cursor: not-allowed; }
.bar { position: relative; height: 10px; background: var(--soft); border-radius: 999px; overflow: hidden; margin-top: 14px; }
.bar > div { height: 100%; width: 0; background: var(--signal); transition: width .3s; }
.bar > span { position: absolute; left: 0; top: 14px; font-size: 13px; color: var(--muted); }
.bar { margin-bottom: 24px; }

.jobhead { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-top: 8px; }
.tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; padding: 8px 12px; color: var(--muted); font-weight: 600; }
.tabs button[aria-selected="true"] { color: var(--signal); border-bottom-color: var(--signal); }
.toolbar { display: flex; gap: 8px; align-items: center; margin: 12px 0; flex-wrap: wrap; }
.spacer { flex: 1; }
.cues { border: 1px solid var(--line); border-radius: var(--radius); max-height: 460px; overflow: auto; }
.cue { display: grid; grid-template-columns: 150px 1fr; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); align-items: start; }
.cue:last-child { border-bottom: 0; }
.cue .t { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); padding-top: 8px; }
.cue .t small { display: block; }
.cue .orig { font-size: 13px; color: var(--muted); white-space: pre-wrap; margin-top: 6px; }
@media (max-width: 640px) { .cue { grid-template-columns: 1fr; } }
.empty { padding: 24px; text-align: center; color: var(--muted); }
.panel { border-top: 1px solid var(--line); padding: 12px 0 4px; margin-top: 12px; }
.panel summary { font-weight: 600; cursor: pointer; }
.renders { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 8px; }
.renders li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; background: var(--soft); border-radius: 8px; font-size: 14px; flex-wrap: wrap; }
.renders .bar { flex: 1; margin: 0; min-width: 120px; height: 8px; }
.how { padding: 24px 0 8px; max-width: 760px; }
.how ol { padding-left: 20px; color: var(--muted); }
.how li { margin: 6px 0; }

/* ---- account + sign-in */
.auth { display: flex; align-items: center; gap: 8px; position: relative; }
.small-btn { padding: 6px 12px; font-size: 14px; }
.small-text { font-size: 13px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; padding: 0; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background: var(--signal); color: #fff; border: 0; font-weight: 700; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.menu { position: absolute; right: 0; top: 44px; width: 280px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.12); z-index: 5; }
.menu-head { display: flex; flex-direction: column; margin-bottom: 10px; }
.menu-head span { font-size: 13px; word-break: break-all; }
.menu-row { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.menu-bar { height: 6px; background: var(--soft); border-radius: 999px; overflow: hidden; margin: 6px 0 8px; }
.menu-bar div { height: 100%; background: var(--signal); width: 0; }
.notice { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--soft); border: 1px solid var(--line); margin-top: 8px; flex-wrap: wrap; }
.modal { position: fixed; inset: 0; background: rgba(10,14,30,.55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 20; }
.modal-card { background: var(--card); border-radius: 14px; padding: 24px; width: 100%; max-width: 400px; position: relative; }
.modal-card h2 { margin-top: 0; }
.close { position: absolute; right: 10px; top: 8px; border: 0; background: transparent; font-size: 22px; line-height: 1; padding: 6px; }
.wide { width: 100%; margin-top: 8px; }
.or { text-align: center; color: var(--muted); font-size: 13px; margin: 14px 0 6px; }
#emailForm label { margin-bottom: 4px; }
#emailForm input { width: 100%; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
@media (max-width: 640px) { .plans { grid-template-columns: 1fr; } }
.plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.plan h3 { margin: 0 0 4px; }
.plan .price { font-size: 22px; font-weight: 700; }
.plan ul { padding-left: 18px; color: var(--muted); margin: 8px 0 0; }
