/*
  손나루 화면 체계 (system.css) — loaded after every legacy sheet and left unlayered,
  so it wins over the `legacy` cascade layer without specificity games.

  Direction: "작업 지시서와 나루 노선". Information sits on a warm paper page,
  separated by hairline rules instead of stacked rounded cards. A single white
  sheet carries the document that matters on each screen (the work order, the
  review comparison). A green route line with stops — 나루, the crossing —
  shows where a request is between the AI and the person; the amber stop marks
  "you are here". Status uses words first and colour second.

  All values come from tokens.css. Breakpoints: 720px (tablet) and 1100px (desktop sidebar).
*/

/* ---------- Base ---------- */
html { background: var(--paper); color: var(--ink); scroll-padding-top: 96px; }
body { background: var(--paper); color: var(--ink); font-size: var(--fs-base); line-height: var(--lh-body); -webkit-text-size-adjust: 100%; }
h1, h2, h3, h4 { color: var(--ink); font-weight: var(--fw-bold); line-height: var(--lh-heading); letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: var(--fs-2xl); }
h2 { font-size: 1.2rem; }
h3 { font-size: var(--fs-lg); }
p, li, dd { text-wrap: pretty; }
/* Undo the legacy `overflow-wrap:anywhere` that split Korean words such as “잘 모르겠|어요”. */
p, dd, dt, label, button, summary, li, legend, h1, h2, h3, a, span, strong { overflow-wrap: break-word; }
/* Element defaults sit below the legacy layer so link-styled buttons keep their own colours. */
@layer base {
  a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: .18em; }
  a:hover { color: var(--green-deep); text-decoration-thickness: 2px; }
}
summary { min-height: var(--target-min); }
strong, b { font-weight: var(--fw-bold); }
small { font-size: var(--fs-xs); }
::selection { background: var(--green-wash); color: var(--ink); }
.muted { color: var(--muted); }
.pre-wrap { white-space: pre-wrap; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* One focus treatment everywhere: a dark ring with a paper-coloured gap, visible on green buttons too. */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.btn:focus-visible, summary:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; box-shadow: 0 0 0 3px var(--paper); }
.upload-button:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }

.skip-link { top: -200px; left: 12px; padding: .6rem 1rem; border-radius: var(--r-sm); background: var(--ink); color: #fff; font-weight: var(--fw-bold); text-decoration: none; }
.skip-link:focus { top: 12px; }

@media (prefers-reduced-motion: no-preference) {
  .btn, .task-card, summary::before, .segmented-choice span, .choice-row { transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease; }
}

/* Arrows appended to buttons repeat what the label already says. */
.btn > .icon-arrow, .task-next-action > .icon-arrow, .c-developer-link > .icon-arrow, .c-next-card .icon-arrow { display: none; }
.icon { width: 1.15em; height: 1.15em; flex: none; }

/* ---------- Brand ---------- */
.brand { align-items: center; gap: .6rem; min-height: var(--target-min); padding: 0; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.brand-symbol { width: 40px; height: 40px; min-width: 40px; padding: 0; border-radius: 10px; background: transparent; }
.brand-symbol img { width: 100%; height: 100%; display: block; }
.brand-name { display: inline-flex; flex-direction: column; font-size: var(--fs-lg); font-weight: 800; line-height: 1.15; color: var(--ink); }
.brand-name small { font-size: var(--fs-xs); font-weight: var(--fw-medium); letter-spacing: .08em; color: var(--muted); }

.c-public-header .brand, .sidebar .brand { display: inline-flex; }
@media (min-width: 1101px) { .topbar .mobile-brand { display: none; } }
@media (max-width: 1100px) { .topbar .mobile-brand { display: inline-flex; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: var(--control-h); padding: .55rem 1.2rem; border: 1.5px solid transparent; border-radius: var(--r-sm); background: var(--surface); background-image: none; box-shadow: none; color: var(--ink); font-size: var(--fs-base); font-weight: var(--fw-bold); line-height: 1.3; text-align: center; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-deep); border-color: var(--green-deep); color: #fff; }
.btn-secondary { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-secondary:hover { border-color: var(--ink); background: var(--surface); color: var(--ink); }
.btn-quiet { background: transparent; border-color: transparent; color: var(--green); text-decoration: underline; text-underline-offset: .2em; }
.btn-quiet:hover { background: var(--green-wash); color: var(--green-deep); }
.btn-danger-quiet { background: var(--surface); border-color: var(--red); color: var(--red); }
.btn-danger-quiet:hover { background: var(--red-wash); color: var(--red); }
.btn-small { min-height: var(--target-min); padding: .3rem .8rem; font-size: var(--fs-sm); }
.btn-block { display: flex; width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--sunk); border-color: var(--line); color: var(--muted); cursor: not-allowed; }
[aria-busy="true"] .btn[type="submit"]:disabled { cursor: progress; }
.btn.is-busy::after { content: ""; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: nr-spin .8s linear infinite; }
@keyframes nr-spin { to { transform: rotate(360deg); } }
.icon-btn, .back-button { align-items: center; justify-content: center; min-width: var(--target-min); min-height: var(--target-min); border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); box-shadow: none; }
.text-link { min-height: var(--target-min); color: var(--green); text-decoration: underline; background: none; border: 0; font-weight: var(--fw-medium); cursor: pointer; }

/* ---------- Fields ---------- */
.field-label { display: block; margin: var(--sp-3) 0 var(--sp-1); color: var(--ink); font-size: var(--fs-base); font-weight: var(--fw-bold); line-height: 1.4; }
.field-label > span { margin-left: .3em; color: var(--muted); font-size: var(--fs-sm); font-weight: var(--fw-regular); }
.field-label .field-required { color: var(--ink); }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]), select, textarea { width: 100%; min-height: var(--control-h); padding: .5rem .8rem; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font-size: var(--fs-base); line-height: 1.4; box-shadow: none; }
textarea { min-height: 6.4rem; resize: vertical; line-height: 1.55; }
select { appearance: none; padding-right: 2.6rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317231f' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; background-size: 1.1rem; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--ink); outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: none; }
input::placeholder, textarea::placeholder { color: #6b726c; opacity: 1; }
input[type="checkbox"], input[type="radio"] { width: 1.35rem; height: 1.35rem; min-width: 1.35rem; margin: .1rem 0 0; accent-color: var(--green); flex: none; }
.input-help, .helper-note, .panel-copy, .security-note { margin: var(--sp-1) 0 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.55; }
.security-note { display: flex; gap: .4rem; align-items: flex-start; }
.field-error { display: block; margin: var(--sp-1) 0 0; padding-left: .7rem; border-left: 3px solid var(--red); color: var(--red); font-size: var(--fs-sm); font-weight: var(--fw-bold); line-height: 1.5; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--red); border-width: 2px; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { padding: 0; }
.input-with-unit { position: relative; }
.input-with-unit > span { position: absolute; right: .9rem; top: 50%; transform: translateY(-50%); color: var(--muted); }

/* Error summary (GOV.UK pattern): what is wrong, with links to each field. */
.error-summary { margin: 0 0 var(--sp-3); padding: var(--sp-2) var(--sp-3); border: 3px solid var(--red); border-radius: var(--r-sm); background: var(--surface); }
.error-summary h2, .error-summary h3 { margin: 0 0 var(--sp-1); font-size: var(--fs-lg); color: var(--ink); }
.error-summary ul { margin: 0; padding-left: 1.2rem; }
.error-summary li { margin-top: .2rem; }
.error-summary a { color: var(--red); font-weight: var(--fw-bold); }

/* ---------- Choices: one large row per option, the whole row is the target ---------- */
.choice-field { margin: var(--sp-4) 0 0; }
.choice-field > legend, .choice-legend { display: block; margin-bottom: var(--sp-1); color: var(--ink); font-size: var(--fs-base); font-weight: var(--fw-bold); line-height: 1.4; }
.segmented-choice, .choice-rows { display: grid; grid-template-columns: 1fr; gap: var(--sp-1); }
.segmented-choice label, .choice-row { position: relative; display: flex; align-items: center; gap: .8rem; min-height: var(--control-h); margin: 0; padding: .45rem .9rem; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); cursor: pointer; }
.segmented-choice input, .choice-row input { position: static; opacity: 1; width: 1.35rem; height: 1.35rem; margin: 0; }
.segmented-choice span, .choice-row span { display: block; min-height: 0; padding: 0; border: 0; background: none; color: inherit; font-size: var(--fs-base); font-weight: var(--fw-medium); text-align: left; line-height: 1.4; }
.segmented-choice label:hover, .choice-row:hover { border-color: var(--ink); }
.segmented-choice label:has(input:checked), .choice-row:has(input:checked) { border: 2px solid var(--green); background: var(--green-wash); padding: calc(.45rem - .5px) calc(.9rem - .5px); }
.segmented-choice input:checked + span, .choice-row input:checked + span { border: 0; background: none; color: var(--green-deep); font-weight: var(--fw-bold); }
.segmented-choice label:has(input:focus-visible), .choice-row:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (min-width: 340px) {
  .segmented-choice { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .segmented-choice label:nth-child(3) { grid-column: 1 / -1; }
}
@media (min-width: 560px) {
  .segmented-choice { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .segmented-choice label:nth-child(3) { grid-column: auto; }
  .choice-rows.is-inline { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
}

/* Check rows (consents, review checks, photo review). */
.review-checks, .check-list { display: grid; gap: 0; margin: var(--sp-2) 0 0; padding: 0; border: 0; border-top: var(--rule); border-radius: 0; background: none; }
.review-checks label, .check-list label, .photo-review-check, .correction-toggle, .c-check, .m-option { display: flex; align-items: flex-start; gap: .8rem; min-height: var(--target-min); margin: 0; padding: .7rem .2rem; border: 0; border-bottom: var(--rule); border-radius: 0; background: none; color: var(--ink); font-size: var(--fs-base); line-height: 1.5; cursor: pointer; }
.review-checks label:has(input:checked), .check-list label:has(input:checked), .photo-review-check:has(input:checked), .c-check:has(input:checked) { background: var(--green-wash); }
.review-checks label input, .photo-review-check input, .c-check input, .correction-toggle input { margin-top: .15rem; }
.photo-review-check { margin-top: var(--sp-2); border-top: var(--rule); }

/* ---------- Disclosure ---------- */
details { border-radius: 0; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.secondary-details, .c-faq, .c-welcome-other, .token-login, .c-auth-alternatives, .review-history, .m-settings-fold, .m-card-details { margin: 0; padding: 0; border: 0; border-top: var(--rule); border-radius: 0; background: none; box-shadow: none; }
details > summary { display: flex; align-items: center; gap: .7rem; min-height: var(--control-h); margin: 0; padding: .5rem .1rem; border: 0; color: var(--ink); font-size: var(--fs-base); font-weight: var(--fw-medium); line-height: 1.4; }
details > summary::before { content: ""; flex: none; width: .5rem; height: .5rem; margin: 0 .25rem 0 .15rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
details[open] > summary::before { transform: rotate(45deg); }
.secondary-details[open] > summary, .c-faq[open] > summary, .c-welcome-other[open] > summary { margin: 0; border: 0; }
.secondary-details[open], .c-faq[open], .c-welcome-other[open], .review-history[open] { padding-bottom: var(--sp-3); }
.secondary-details > :not(summary), .c-faq > :not(summary), .c-welcome-other > :not(summary) { margin-left: 0; }
.secondary-details .panel { padding: 0; border: 0; background: none; }

/* ---------- Status, alerts, empty ---------- */
.badge { display: inline-flex; align-items: center; gap: .45em; width: auto; min-height: 0; margin: 0; padding: .1rem .55rem; border: 0; border-radius: var(--r-sm); background: var(--sunk); color: var(--ink); font-size: var(--fs-xs); font-weight: var(--fw-bold); line-height: 1.5; white-space: nowrap; }
.badge > span:empty { display: inline-block; width: .5em; height: .5em; border-radius: 50%; background: currentColor; }
.badge-neutral { background: var(--sunk); color: var(--ink); }
.badge-green { background: var(--green-wash); color: var(--green-deep); }
.badge-blue { background: var(--blue-wash); color: var(--blue); }
.badge-amber { background: var(--amber-wash); color: var(--amber); }
.badge-red { background: var(--red-wash); color: var(--red); }
.alert { display: block; margin: 0 0 var(--sp-3); padding: var(--sp-2) var(--sp-3); border: 0; border-left: 4px solid var(--blue); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--blue-wash); color: var(--ink); box-shadow: none; font-size: var(--fs-base); }
.alert p { margin: 0; color: var(--ink); }
.alert strong { display: block; margin-bottom: .2rem; font-size: var(--fs-lg); }
.alert-info { border-left-color: var(--blue); background: var(--blue-wash); }
.alert-warning { border-left-color: var(--amber-mark); background: var(--amber-wash); }
.alert-error { border-left-color: var(--red); background: var(--red-wash); }
.alert-success { border-left-color: var(--green); background: var(--green-wash); }
.alert .btn { margin-top: var(--sp-1); }
.empty-state { display: block; padding: var(--sp-4) 0; border: 0; border-top: var(--rule); border-bottom: var(--rule); border-radius: 0; background: none; text-align: left; }
.empty-state > .icon { width: 1.6rem; height: 1.6rem; color: var(--muted); }
.empty-state h3 { margin: var(--sp-1) 0 0; font-size: var(--fs-lg); color: var(--ink); }
.empty-state p { margin: .3rem 0 0; color: var(--muted); font-size: var(--fs-base); }
.empty-art, .guide-illustration.empty-art { display: none; }
.empty-reassurance { display: block; margin-top: .4rem; color: var(--muted); font-size: var(--fs-sm); }
.loading-inline { display: flex; align-items: center; gap: .6rem; color: var(--muted); }

/* ---------- Route (나루 노선): progress between AI, person and operator ---------- */
.route { --stop: 1.15rem; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin: 0; padding: 0; list-style: none; counter-reset: none; }
.route > li { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; min-width: 0; padding: 0 .3rem 0 0; color: var(--muted); font-size: var(--fs-xs); line-height: 1.35; }
.route > li::before { content: ""; position: absolute; top: calc(var(--stop) / 2 - 1.5px); left: 0; right: 0; height: 3px; background: var(--line); }
.route > li:last-child::before { right: auto; width: var(--stop); }
.route > li.is-done::before { background: var(--green); }
.route .route-dot { position: relative; z-index: 1; width: var(--stop); height: var(--stop); border: 3px solid var(--line-strong); border-radius: 50%; background: var(--paper); }
.route > li.is-done .route-dot { border-color: var(--green); background: var(--green); }
.route > li.is-current .route-dot { border-color: var(--amber-mark); background: var(--amber-mark); box-shadow: 0 0 0 4px var(--amber-wash); }
.route > li.is-current, .route > li.is-done { color: var(--ink); }
.route > li.is-current .route-label { font-weight: var(--fw-bold); }
.route > li.is-stopped .route-dot { border-color: var(--red); background: var(--surface); }
@media (max-width: 559px) {
  .route .route-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .route > li.is-current .route-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
  .route > li.is-current { grid-column: span 2; }
}

/* "지금 할 일" — the one thing the person should do next, with the route beneath it. */
.now-block { margin: 0 0 var(--sp-3); padding: var(--sp-3) 0 var(--sp-3); border-bottom: var(--rule); }
.now-block .now-label { margin: 0; color: var(--muted); font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.now-block .now-title { margin: .15rem 0 0; font-size: var(--fs-xl); line-height: 1.3; }
.now-block .now-copy { margin: .4rem 0 0; color: var(--ink); max-width: var(--measure); }
.now-block .route { margin-top: var(--sp-3); }
.now-block.is-attention { margin-top: 0; padding: var(--sp-3); border: 0; border-left: 4px solid var(--amber-mark); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--amber-wash); }
.now-block.is-stopped { padding: var(--sp-3); border: 0; border-left: 4px solid var(--red); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--red-wash); }
.now-block.is-done { padding: var(--sp-3); border: 0; border-left: 4px solid var(--green); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--green-wash); }
.now-note { margin: var(--sp-2) 0 0; padding: var(--sp-2); border-radius: var(--r-sm); background: var(--surface); }
.now-note strong { display: block; font-size: var(--fs-sm); color: var(--muted); font-weight: var(--fw-medium); }

/* ---------- Work order sheet: conditions as aligned rows ---------- */
.work-sheet { margin: 0 0 var(--sp-4); padding: var(--sp-1) var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.fact-list, .detail-list, .task-essentials { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; padding: 0; font-size: var(--fs-base); }
.fact-list > div, .detail-list > div, .task-essentials > div { display: grid; grid-template-columns: minmax(5.5em, 32%) minmax(0, 1fr); gap: var(--sp-2); align-items: baseline; padding: .65rem 0; border: 0; border-bottom: var(--rule); background: none; }
.fact-list > div:last-child, .detail-list > div:last-child, .task-essentials > div:last-child { border-bottom: 0; }
.fact-list dt, .detail-list dt, .task-essentials dt { margin: 0; color: var(--muted); font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.fact-list dd, .detail-list dd, .task-essentials dd { margin: 0; color: var(--ink); font-weight: var(--fw-medium); text-align: left; font-variant-numeric: tabular-nums; }
.fact-list .is-key dd { font-size: var(--fs-lg); font-weight: var(--fw-bold); }
.fact-note { margin: var(--sp-1) 0 var(--sp-2); color: var(--muted); font-size: var(--fs-sm); }

.work-brief { margin: 0 0 var(--sp-4); }
.work-brief h2 { margin: 0 0 var(--sp-1); font-size: var(--fs-lg); }
.work-brief .brief-text { max-width: var(--measure); margin: 0; }
.brief-reference { margin: 0; padding: var(--sp-2) var(--sp-3); border: 0; border-left: 4px solid var(--green); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--surface); color: var(--ink); font-size: var(--fs-lg); line-height: 1.5; }
.work-rules { margin-top: var(--sp-3); }
.work-rules h3 { margin: 0 0 var(--sp-1); font-size: var(--fs-base); }
.work-rules p { margin: 0; max-width: var(--measure); }

/* ---------- Steps inside the submit form ---------- */
.work-step { margin: 0; padding: var(--sp-4) 0 var(--sp-3); border-top: var(--rule); }
.work-step:first-child { border-top: 0; padding-top: var(--sp-2); }
.work-step-title { display: flex; align-items: baseline; gap: .6rem; margin: 0 0 var(--sp-1); font-size: 1.2rem; }
.work-step-title .step-no { display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; border-radius: 50%; background: var(--ink); color: #fff; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.work-step-lead { margin: 0 0 var(--sp-2); color: var(--muted); max-width: var(--measure); }
.submit-area { margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: var(--rule); }
.submit-area .input-help { margin-bottom: var(--sp-2); }

/* ---------- Answer / result rows ---------- */
.answer-summary { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; }
.answer-summary > div { display: grid; grid-template-columns: minmax(6em, 40%) minmax(0, 1fr); gap: var(--sp-2); padding: .65rem 0; border: 0; border-bottom: var(--rule); border-radius: 0; background: none; }
.answer-summary dt { margin: 0; color: var(--muted); font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.answer-summary dd { margin: 0; color: var(--ink); font-size: var(--fs-base); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
.answer-summary dd.is-empty, .value-empty { color: var(--muted); font-weight: var(--fw-regular); font-style: normal; }
.value-flag { display: inline-flex; align-items: center; gap: .35em; color: var(--amber); font-weight: var(--fw-bold); }
.value-flag::before { content: ""; width: .55em; height: .55em; border-radius: 50%; background: var(--amber-mark); }

/* ---------- Panels become ruled sections, not cards ---------- */
.panel { margin: 0; padding: var(--sp-4) 0; border: 0; border-top: var(--rule); border-radius: 0; background: none; box-shadow: none; }
.panel + .panel { margin-top: 0; }
.panel > h2:first-child, .panel > .section-heading:first-child h2, .panel form > h2:first-child { margin-top: 0; }
.panel h2 { margin: 0 0 var(--sp-2); }
.action-panel { padding: var(--sp-4) 0; border-top: var(--rule); background: none; }
.action-panel h2 { font-size: var(--fs-xl); }
.action-panel > .btn { margin-top: var(--sp-2); }
.action-panel > p { margin: .3rem 0 0; max-width: var(--measure); }

/* ---------- Page headings ---------- */
.page-heading { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--sp-2); margin: 0 0 var(--sp-3); }
.page-heading h1 { margin: 0; }
.page-heading .eyebrow { display: none; }
.page-subtitle { max-width: var(--measure); margin: .35rem 0 0; color: var(--muted); font-size: var(--fs-base); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin: var(--sp-4) 0 var(--sp-1); }
.section-heading h2 { display: flex; align-items: baseline; gap: .5rem; margin: 0; font-size: 1.2rem; }
.section-heading h2 > span { min-width: 0; padding: 0; border-radius: 0; background: none; color: var(--muted); font-weight: var(--fw-medium); font-variant-numeric: tabular-nums; }
.eyebrow, .c-kicker, .c-worker-kicker { color: var(--muted); font-size: var(--fs-sm); font-weight: var(--fw-medium); letter-spacing: 0; text-transform: none; }

/* ---------- Task list: ledger rows ---------- */
.task-grid { display: grid; grid-template-columns: 1fr; gap: 0; border-top: var(--rule); }
.task-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "status status" "title reward" "place place" "due due" "desc desc" "next next"; gap: .25rem var(--sp-2); width: 100%; min-width: 0; margin: 0; padding: var(--sp-3) var(--sp-1); border: 0; border-bottom: var(--rule); border-radius: 0; background: none; box-shadow: none; color: var(--ink); text-align: left; cursor: pointer; }
.task-card:hover { background: var(--surface); border-color: var(--line); box-shadow: none; }
.task-card-top { grid-area: status; display: flex; gap: .5rem; align-items: center; }
.task-card h3 { grid-area: title; margin: 0; font-size: var(--fs-lg); line-height: 1.4; }
.task-card .task-address { grid-area: place; display: flex; gap: .35rem; margin: 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.45; }
.task-card .task-address .icon { margin-top: .15em; }
.task-card-bottom { display: contents; }
.task-card-bottom > span { grid-area: due; display: flex; align-items: center; gap: .35rem; color: var(--ink); font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.task-card-bottom > strong { grid-area: reward; align-self: start; color: var(--ink); font-size: var(--fs-lg); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.task-card-bottom > strong small { display: block; color: var(--muted); font-size: var(--fs-xs); font-weight: var(--fw-medium); }
.task-card .task-description { grid-area: desc; display: -webkit-box; margin: .2rem 0 0; padding: 0; border-radius: 0; background: none; color: var(--ink); font-size: var(--fs-sm); line-height: 1.5; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.task-card .task-description:empty { display: none; }
.task-next-action { grid-area: next; display: block; margin: .3rem 0 0; padding: 0; color: var(--green); font-size: var(--fs-sm); font-weight: var(--fw-bold); text-decoration: underline; text-underline-offset: .2em; }
.task-card .task-number { display: none; }
.task-number { color: var(--muted); font-size: var(--fs-xs); }
.task-card .task-deadline { grid-area: place; }

/* ---------- Stats and budget ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: var(--sp-2) 0; border-top: var(--rule); }
.stat-card, .stat-card.stat-accent { padding: var(--sp-2) 0; border: 0; border-bottom: var(--rule); border-radius: 0; background: none; box-shadow: none; }
.stat-card > span { color: var(--muted); font-size: var(--fs-sm); }
.stat-card > strong { display: block; margin-top: .1rem; color: var(--ink); font-size: var(--fs-xl); font-variant-numeric: tabular-nums; }
.budget-card { padding: var(--sp-3) 0; border: 0; border-top: var(--rule); border-radius: 0; background: none; box-shadow: none; }

/* ---------- Evidence (photos) ---------- */
.evidence-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); }
.evidence-slot { min-width: 0; padding: 0; border: 0; border-radius: 0; background: none; overflow: visible; }
.evidence-slot-heading { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-1); margin: 0 0 var(--sp-1); }
.evidence-slot-heading strong { font-size: var(--fs-base); }
.evidence-slot-heading > span { font-size: var(--fs-xs); color: var(--muted); font-weight: var(--fw-medium); white-space: nowrap; }
.evidence-slot-heading > .evidence-ready { color: var(--green-deep); font-weight: var(--fw-bold); }
.evidence-slot-heading > .muted { display: inline; }
.evidence-empty { display: grid; gap: var(--sp-1); margin: 0; padding: 0; border: 0; background: none; }
.evidence-empty p { margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.photo-example { position: relative; margin: 0; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--sunk); overflow: hidden; }
.photo-example img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.photo-example figcaption { position: absolute; left: .5rem; top: .5rem; padding: .05rem .45rem; border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font-size: var(--fs-xs); font-weight: var(--fw-bold); }
.evidence-photo { position: relative; margin: 0 0 var(--sp-1); border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line); background: var(--sunk); }
.evidence-photo .photo-button { display: block; width: 100%; padding: 0; border: 0; border-radius: 0; background: var(--sunk); cursor: zoom-in; }
.evidence-photo .photo-button img { display: block; width: 100%; height: auto; max-height: 360px; aspect-ratio: 4 / 3; object-fit: contain; background: var(--sunk); }
.photo-button > span { position: static; display: flex; align-items: center; justify-content: center; gap: .3rem; width: 100%; min-height: var(--target-min); padding: .3rem; border-top: var(--rule); background: var(--surface); color: var(--ink); font-size: var(--fs-sm); font-weight: var(--fw-bold); }
.photo-delete { position: absolute; top: .4rem; right: .4rem; width: var(--target-min); height: var(--target-min); display: inline-grid; place-items: center; border: 1.5px solid var(--ink); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); }
.upload-button { margin-top: var(--sp-1); min-height: var(--control-h); border: 1.5px dashed var(--green); background: var(--surface); color: var(--green-deep); font-weight: var(--fw-bold); }
.upload-button:hover { background: var(--green-wash); border-style: solid; }
.photo-privacy-note { margin: 0 0 var(--sp-2); color: var(--ink); font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.photo-example-note { margin-top: var(--sp-1); }
.photo-quality-guide { margin-top: var(--sp-2); }
.photo-quality-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-1); }
.photo-quality-example { margin: 0; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.photo-quality-example figcaption { padding: .3rem .5rem; font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--ink); }
.photo-quality-grid + p { font-size: var(--fs-xs); }
.submission-reminder, .workspace > .submission-reminder, .detail-primary > .submission-reminder { display: block; margin: 0 0 var(--sp-3); padding: var(--sp-2) var(--sp-3); border: 0; border-left: 4px solid var(--green); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--surface); }
.submission-reminder > span, .detail-primary > .submission-reminder > span { display: flex; align-items: center; gap: .35rem; color: var(--muted); font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.submission-reminder p, .detail-primary > .submission-reminder p { margin: .15rem 0 0; font-size: var(--fs-lg); line-height: 1.5; }
.photo-review { margin-top: var(--sp-3); padding-top: 0; border-top: 0; }

/* ---------- Task detail layout ---------- */
.task-topline { display: flex; align-items: flex-start; gap: var(--sp-2); margin: 0 0 var(--sp-2); }
.task-topline > .back-button { display: inline-flex; flex: none; width: var(--target-min); height: var(--target-min); min-width: var(--target-min); margin: .1rem 0 0; border-radius: var(--r-sm); }
.task-detail-heading { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .7rem; flex: 1; min-width: 0; margin: 0; }
.task-detail-heading h1, .task-topline h1 { margin: 0; font-size: var(--fs-2xl); line-height: 1.3; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; align-items: start; }
.detail-primary { min-width: 0; }
.detail-sidebar { min-width: 0; margin-top: var(--sp-3); }
.detail-sidebar > .panel { padding: 0; }
.worker-task-brief { margin: 0 0 var(--sp-3); padding: 0; border: 0; border-radius: 0; background: none; }
.task-welcome { display: grid; gap: var(--sp-2); padding: var(--sp-2) 0; }
.task-welcome .guide-illustration, .task-welcome-art { display: none; }
.illustration-tag { display: none; }
.task-welcome p { display: flex; gap: .5rem; margin: .2rem 0; }
.progress-steps { margin: 0 0 var(--sp-2); padding: 0; border: 0; border-radius: 0; background: none; }
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { display: grid; grid-template-columns: auto 1fr; gap: .6rem; padding: .4rem 0; border-bottom: var(--rule); }
.timeline p { margin: 0; font-size: var(--fs-sm); }
.timeline time { color: var(--muted); font-size: var(--fs-xs); }
.timeline-dot { width: .6rem; height: .6rem; margin-top: .45rem; border-radius: 50%; background: var(--line-strong); }

/* ---------- Admin review: compare request with result ---------- */
.review-sheet { margin: 0 0 var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.review-sheet > header { padding: var(--sp-2) var(--sp-3); border-bottom: var(--rule); }
.review-sheet > header h2 { margin: 0; font-size: var(--fs-lg); }
.review-sheet > header p { margin: .2rem 0 0; color: var(--muted); font-size: var(--fs-sm); }
.compare-table { width: 100%; border-collapse: collapse; font-size: var(--fs-base); }
.compare-table caption { text-align: left; }
.compare-table th, .compare-table td { white-space: normal; padding: .7rem var(--sp-3); border-bottom: var(--rule); text-align: left; vertical-align: top; }
.compare-table thead th { color: var(--muted); font-size: var(--fs-sm); font-weight: var(--fw-medium); background: var(--paper); }
.compare-table tbody th { width: 40%; color: var(--ink); font-weight: var(--fw-medium); }
.compare-table tbody th small { display: block; color: var(--muted); font-weight: var(--fw-regular); }
.compare-table td { font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
.compare-table tr:last-child > * { border-bottom: 0; }
.compare-table tr.is-flagged > * { background: var(--amber-wash); }
@media (max-width: 719px) {
  .compare-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compare-table, .compare-table tbody, .compare-table tr, .compare-table th, .compare-table td { display: block; width: 100%; }
  .compare-table tr { padding: .6rem var(--sp-2); border-bottom: var(--rule); }
  .compare-table tbody th, .compare-table td { width: auto; padding: 0; border: 0; background: none; }
  .compare-table td { margin-top: .2rem; }
  .compare-table td::before { content: attr(data-label) " "; color: var(--muted); font-size: var(--fs-xs); font-weight: var(--fw-medium); margin-right: .3rem; }
}
.review-points { margin: 0; padding: var(--sp-2) var(--sp-3); border-bottom: var(--rule); background: var(--amber-wash); }
.review-points h3 { margin: 0 0 .2rem; font-size: var(--fs-base); }
.review-points ul { margin: 0; padding-left: 1.2rem; }
.review-points li { margin: .15rem 0; }
.review-points.is-clear { background: var(--green-wash); }
.review-evidence { padding: var(--sp-2) var(--sp-3); border-top: var(--rule); }
.review-evidence h3 { margin: 0 0 var(--sp-1); font-size: var(--fs-base); }
.reference-box { margin: 0; padding: var(--sp-2) var(--sp-3); border: 0; border-left: 4px solid var(--green); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--surface); }
.reference-box strong { display: block; color: var(--muted); font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.reference-box p { margin: .2rem 0 0; font-size: var(--fs-lg); }
.review-comparison { display: grid; grid-template-columns: 1fr; gap: var(--sp-2); margin: var(--sp-2) 0 0; }
.review-comparison > * { min-width: 0; padding: 0; border-radius: 0; background: none; }
.review-comparison h3 { margin: 0 0 var(--sp-1); color: var(--ink); font-size: var(--fs-base); }
.review-comparison p, .review-comparison dd { color: var(--ink); }
.review-comparison > .reference-box { padding: var(--sp-2) var(--sp-3); background: var(--surface); }
.review-panel h2 { font-size: 1.2rem; }
.decision { margin-top: var(--sp-3); }
.decision-options { display: grid; gap: var(--sp-1); margin-top: var(--sp-2); }
.review-actions { display: grid; grid-template-columns: 1fr; gap: var(--sp-1); margin-top: var(--sp-3); }
.review-actions .btn { width: 100%; min-height: var(--control-h); }
.review-actions + .input-help, .decision-help { margin-top: var(--sp-1); }
.decision-help { color: var(--muted); font-size: var(--fs-sm); }
.history-entry { padding: var(--sp-2) 0; border-bottom: var(--rule); }
.history-entry h3 { margin: 0; font-size: var(--fs-base); }
.history-entry time { color: var(--muted); font-size: var(--fs-xs); }
.answer-correction .correction-toggle { margin-top: var(--sp-1); border-top: var(--rule); }
.work-spec { padding-top: 0; border-top: 0; }

/* ---------- App shell ---------- */
.app-shell { background: var(--paper); }
.sidebar { background: var(--paper); border-right: var(--rule); box-shadow: none; padding: var(--sp-3) var(--sp-2) var(--sp-2); }
.sidebar .brand { margin: 0 0 var(--sp-3); padding: 0 .4rem; }
.sidebar .workspace-label { margin: 0 0 var(--sp-1); padding: 0 .6rem; color: var(--muted); font-size: var(--fs-xs); font-weight: var(--fw-medium); }
.nav-item { display: flex; align-items: center; gap: .7rem; width: 100%; min-height: var(--target-min); padding: .45rem .6rem; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink); font-size: var(--fs-base); font-weight: var(--fw-medium); text-align: left; cursor: pointer; }
.nav-item:hover { background: var(--sunk); }
.sidebar .nav-item.active { background: var(--surface); color: var(--green-deep); font-weight: var(--fw-bold); box-shadow: inset 3px 0 0 var(--green); }
.sidebar .trust-mark { padding: var(--sp-2); border: 0; border-top: var(--rule); border-radius: 0; background: none; color: var(--muted); font-size: var(--fs-xs); }
.user-card { display: flex; align-items: center; gap: .6rem; padding: var(--sp-2) 0 0; border-top: var(--rule); }
.user-card .avatar { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--green-wash); color: var(--green-deep); font-size: var(--fs-xs); font-weight: var(--fw-bold); }
.user-card small { display: block; color: var(--muted); font-size: var(--fs-xs); }
.topbar { min-height: 64px; height: auto; padding: .5rem var(--gutter); background: var(--paper); border-bottom: var(--rule); box-shadow: none; backdrop-filter: none; }
.topbar .breadcrumb { color: var(--muted); font-size: var(--fs-sm); }
.topbar .connection { color: var(--muted); font-size: var(--fs-xs); }
.reading-controls { display: inline-flex; gap: .4rem; }
.reading-controls > button, .reading-controls > button[aria-pressed] { min-width: var(--target-min); min-height: var(--target-min); padding: .2rem .7rem; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font-size: var(--fs-sm); font-weight: var(--fw-bold); box-shadow: none; }
.reading-controls > button[aria-pressed="true"] { border-color: var(--green); background: var(--green-wash); color: var(--green-deep); }
.workspace { max-width: 64rem; padding: var(--sp-4) var(--gutter) var(--sp-6); }
.demo-banner { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; min-height: 0; padding: .45rem var(--gutter); border: 0; border-bottom: var(--rule); background: var(--amber-wash); color: var(--ink); font-size: var(--fs-xs); line-height: 1.45; }
.demo-label { padding: 0 .4rem; border: 1px solid var(--amber); border-radius: var(--r-sm); background: none; color: var(--amber); font-size: var(--fs-xs); font-weight: var(--fw-bold); }
.workspace-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-1); padding: var(--sp-2) var(--gutter); border-top: var(--rule); background: none; color: var(--muted); font-size: var(--fs-xs); }
.footer-separator { color: var(--muted); margin-inline: .35rem; }
.mobile-nav { gap: 0; padding: .25rem .3rem calc(.25rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line-strong); background: var(--surface); box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.mobile-nav > .nav-item, .mobile-nav .mobile-menu > summary { flex: 1; min-width: 0; min-height: 60px; flex-direction: column; justify-content: center; align-items: center; gap: .2rem; padding: .3rem .1rem; border-radius: var(--r-sm); background: none; color: var(--ink); font-size: var(--fs-xs); font-weight: var(--fw-medium); text-align: center; line-height: 1.25; box-shadow: none; }
.mobile-nav > .nav-item.active, .mobile-nav .mobile-menu > summary.active { background: none; color: var(--green-deep); font-weight: var(--fw-bold); box-shadow: inset 0 3px 0 var(--green); }
.mobile-nav .mobile-menu[open] > summary { background: var(--sunk); color: var(--ink); }
.mobile-menu-panel { border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-pop); padding: var(--sp-1); gap: .2rem; }
.mobile-menu-panel .nav-item, .mobile-menu-panel > button { min-height: var(--control-h); border-radius: var(--r-sm); background: none; font-size: var(--fs-base); }
.mobile-menu-panel .nav-item.active { background: var(--green-wash); color: var(--green-deep); }
.install-hint { margin-top: var(--sp-4); padding: 0; border: 0; border-top: var(--rule); border-radius: 0; background: none; }
.install-hint h2 { margin: var(--sp-2) 0 .2rem; font-size: var(--fs-lg); }
.install-hint p, .install-hint li { color: var(--muted); font-size: var(--fs-sm); }
.invite-session-notice { padding: var(--sp-3); border: 0; border-left: 4px solid var(--amber-mark); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--amber-wash); margin-bottom: var(--sp-3); }
.toast-root { gap: .4rem; }
.toast { border-radius: var(--r-sm); background: var(--ink); color: #fff; box-shadow: var(--shadow-pop); font-size: var(--fs-sm); padding: .7rem 1rem; }
.toast-error { background: var(--red); }
.modal-backdrop { background: rgb(23 35 31 / 55%); backdrop-filter: none; }
.image-dialog, .confirm-dialog { border: 0; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-pop); }
.json-result { font-size: var(--fs-xs); background: var(--sunk); border-radius: var(--r-sm); }
.guide-illustration { border-radius: var(--r-md); overflow: hidden; }
.process-guide { padding: var(--sp-2) 0; border: 0; border-radius: 0; background: none; }
.process-guide .guide-illustration { display: none; }
.process-steps { display: grid; gap: var(--sp-1); margin: var(--sp-1) 0 0; padding: 0; list-style: none; }
.process-steps li { display: grid; grid-template-columns: auto 1fr; gap: 0 .7rem; padding: .4rem 0; border-bottom: var(--rule); }
.process-icon { grid-row: span 2; display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--green-wash); color: var(--green-deep); }
.process-icon b { display: none; }
.process-steps p { margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.cancellation-panel { display: grid; gap: var(--sp-2); }
.result-meta { display: flex; flex-wrap: wrap; gap: .3rem var(--sp-3); margin-top: var(--sp-2); color: var(--muted); font-size: var(--fs-sm); }
.result-meta strong { color: var(--ink); }

/* Task screens hide the fixed bottom menu: the back button leads out, and nothing covers fields or the submit button. */
.app-shell.is-task .mobile-nav { display: none; }
.app-shell.is-task .workspace-footer { padding-bottom: var(--sp-3); }

@media (max-width: 1100px) {
  html { scroll-padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .app-shell.is-task { --nav-space: 0px; }
  .workspace-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 719px) {
  .workspace { padding: var(--sp-3) var(--gutter) var(--sp-5); }
  .topbar { min-height: 60px; padding-inline: var(--gutter); }
  .page-heading h1, .task-detail-heading h1, .task-topline h1 { font-size: 1.4rem; }
  .brand-symbol { width: 36px; height: 36px; min-width: 36px; }
  .demo-banner { padding-inline: var(--gutter); }
  .review-actions { grid-template-columns: 1fr; }
}
@media (min-width: 360px) {
  .evidence-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
}
@media (min-width: 560px) {
  .evidence-grid.generic-evidence { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
}
@media (min-width: 720px) {
  .fact-list > div, .detail-list > div, .task-essentials > div { grid-template-columns: 9em minmax(0, 1fr); }
  .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .review-comparison { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .review-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cancellation-panel { grid-template-columns: 1fr auto; align-items: center; }
}
@media (min-width: 1101px) {
  .detail-layout { grid-template-columns: minmax(0, 1fr) 17rem; gap: var(--sp-5); }
  .detail-sidebar { position: sticky; top: var(--sp-3); margin-top: 0; }
  .task-card { padding-inline: var(--sp-2); }
  .review-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--sp-4); align-items: start; }
  .review-layout > .review-decide { position: sticky; top: var(--sp-3); }
}

/* Large text (24px root): keep long Korean labels from crowding narrow screens. */
:root[data-text-size="large"] .mobile-nav > .nav-item > span, :root[data-text-size="large"] .mobile-nav .mobile-menu > summary > span { font-size: .75rem; }
:root[data-text-size="large"] .fact-list > div, :root[data-text-size="large"] .answer-summary > div { grid-template-columns: 1fr; gap: 0; }

/* ======================================================================
   Public pages
   ====================================================================== */
.c-public { background: var(--paper); color: var(--ink); }
.c-public-header { position: static; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); max-width: var(--container); min-height: 64px; margin: 0 auto; padding: .5rem var(--gutter); border-bottom: var(--rule); background: var(--paper); box-shadow: none; backdrop-filter: none; }
.c-public-header .c-header-links { display: flex; align-items: center; gap: .3rem var(--sp-2); margin-left: auto; }
.c-public-header .c-header-links a { display: inline-flex; align-items: center; min-height: var(--target-min); font-weight: var(--fw-medium); }
.c-public main { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

/* Participant home */
.c-worker-home main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.c-worker-hero { display: block; padding: var(--sp-5) 0 var(--sp-4); border: 0; background: none; }
.c-worker-intro h1, .c-worker-hero h1 { margin: 0; font-size: clamp(2rem, 1.4rem + 2.4vw, var(--fs-3xl)); line-height: 1.2; letter-spacing: -.02em; }
.c-worker-lead { max-width: 30em; margin: var(--sp-2) 0 0; color: var(--ink); font-size: var(--fs-lg); line-height: 1.6; }
.c-worker-start { display: grid; justify-items: start; gap: .4rem; margin-top: var(--sp-4); }
.c-worker-start > .btn { width: auto; min-width: min(100%, 16rem); min-height: 60px; padding-inline: 1.6rem; font-size: var(--fs-lg); }
.c-worker-start > p { margin: 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.5; }
.c-worker-start .c-business-route { margin-top: var(--sp-2); font-size: var(--fs-base); }
.c-welcome-access { max-width: 34rem; margin-top: var(--sp-3); }
.c-access-card, .login-card.c-access-card { padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: none; }
.c-access-card h2 { margin: 0; font-size: var(--fs-xl); }
.c-access-card .c-muted { margin: .3rem 0 0; color: var(--muted); }
.c-access-tabs { display: grid; grid-template-columns: 1fr; gap: .3rem; }
.c-auth-alternatives .c-access-tabs > button { min-height: var(--control-h); border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font-weight: var(--fw-medium); }
.c-auth-alternatives .c-access-tabs > button.active { border-color: var(--green); background: var(--green-wash); color: var(--green-deep); }
input.invite-code { font-size: var(--fs-lg) !important; }

/* The crossing: AI 요청 → 사람의 선택·수행 → 검수 → 결과 회신 */
.c-worker-how { padding: var(--sp-4) 0; border-top: var(--rule); background: none; }
.c-worker-how h2 { margin: 0 0 var(--sp-1); font-size: var(--fs-xl); }
.c-worker-how > p { margin: 0 0 var(--sp-3); color: var(--muted); max-width: var(--measure); }
.c-worker-how > ol.crossing, .crossing { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.c-worker-how .crossing h3::before { content: none; }
.c-worker-how .crossing p { font-size: var(--fs-base); line-height: 1.55; color: var(--ink); }
.c-worker-how .crossing p.crossing-who { font-size: var(--fs-sm); color: var(--muted); }
.c-worker-how .crossing h3 { font-size: var(--fs-lg); line-height: 1.35; margin: 0; }
.c-worker-how .crossing > li, .crossing > li { position: relative; display: grid; align-items: start; grid-template-columns: 2.6rem minmax(0, 1fr); gap: 0 var(--sp-2); padding: 0 0 var(--sp-3); }
.crossing > li::before { content: ""; position: absolute; left: calc(1.3rem - 1.5px); top: 2.6rem; bottom: 0; width: 3px; background: var(--green); }
.crossing > li:last-child { padding-bottom: 0; }
.crossing > li:last-child::before { display: none; }
.c-worker-how .crossing .crossing-stop, .crossing .crossing-stop { display: grid; place-items: center; flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--green); color: #fff; font-size: var(--fs-xs); font-weight: var(--fw-bold); }
.crossing .crossing-stop .icon { width: 1.3rem; height: 1.3rem; }
.crossing > li.is-ai .crossing-stop { border-radius: var(--r-sm); background: var(--surface); color: var(--ink); border: 2px solid var(--ink); }
.crossing > li.is-person .crossing-stop { background: var(--amber-mark); color: #fff; }
.crossing .crossing-who { margin: .1rem 0 0; color: var(--muted); font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.crossing h3 { margin: 0; font-size: var(--fs-lg); }
.crossing li > div > p:not(.crossing-who) { margin: .2rem 0 0; color: var(--ink); }
.c-worker-how ol li > span:not(.crossing-stop) { display: none; }

/* What kinds of work: each kind returns a different result */
.c-work-kinds { padding: var(--sp-4) 0; border-top: var(--rule); }
.c-work-kinds h2 { margin: 0 0 var(--sp-1); font-size: var(--fs-xl); }
.c-work-kinds > p { margin: 0 0 var(--sp-3); max-width: var(--measure); color: var(--muted); }
.work-kind-list { display: grid; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.work-kind { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 0 var(--sp-2); padding: var(--sp-2) var(--sp-3) var(--sp-2) var(--sp-2); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.work-kind svg { grid-row: span 3; width: 3rem; height: 3rem; }
.work-kind h3 { margin: 0; font-size: var(--fs-lg); }
.work-kind .work-kind-tag { justify-self: start; margin: .15rem 0 0; padding: 0 .4rem; border-radius: var(--r-sm); background: var(--sunk); color: var(--ink); font-size: var(--fs-xs); font-weight: var(--fw-bold); }
.work-kind .work-kind-tag.is-live { background: var(--green-wash); color: var(--green-deep); }
.work-kind dl { display: grid; gap: 0; margin: var(--sp-1) 0 0; }
.work-kind dl > div { display: grid; grid-template-columns: 4.5em minmax(0, 1fr); gap: var(--sp-1); padding: .3rem 0; border-top: var(--rule); }
.work-kind dt { color: var(--muted); font-size: var(--fs-sm); }
.work-kind dd { margin: 0; font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.c-work-kinds .c-worker-art { grid-area: auto; align-self: start; margin: 0 0 var(--sp-3); }
.c-work-kinds .c-worker-art .c-welcome-illustration { display: block; max-width: none; margin: 0; border-radius: var(--r-md); overflow: hidden; }
.c-work-kinds .c-worker-art figcaption { text-align: left; }
.c-work-kinds .c-worker-art img { display: block; width: 100%; height: auto; border-radius: var(--r-md); }
.c-work-kinds .c-worker-art figcaption, .c-worker-art figcaption { margin-top: .3rem; color: var(--muted); font-size: var(--fs-xs); }
.c-work-kinds .c-kinds-note { margin: var(--sp-2) 0 0; color: var(--muted); font-size: var(--fs-sm); }
@media (max-width: 899px) {
  .c-work-kinds .c-worker-art img { aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 35%; }
  .work-kind { padding: var(--sp-2); }
  .work-kind dl > div { grid-template-columns: 5em minmax(0, 1fr); }
}

.c-worker-pay { display: block; padding: var(--sp-4) 0; border: 0; border-top: var(--rule); border-radius: 0; background: none; }
.c-worker-pay > span { display: none; }
.c-worker-pay h2 { margin: 0; font-size: var(--fs-xl); }
.c-worker-pay p { margin: .4rem 0 0; max-width: var(--measure); }
.c-worker-pay .input-help { font-size: var(--fs-sm); }
.c-worker-secondary { display: grid; gap: 0; padding: var(--sp-2) 0 var(--sp-5); border-top: var(--rule); }
.c-worker-secondary > details:first-child { border-top: 0; }
.c-welcome-other p { margin: 0 0 var(--sp-1); max-width: var(--measure); }
.c-welcome-other-actions, .c-hero-actions { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin: var(--sp-1) 0; }
.c-welcome-status { margin: var(--sp-2) 0 0; padding: var(--sp-2) 0 0; border-top: var(--rule); color: var(--muted); font-size: var(--fs-sm); }
.c-demo-section { border-top: var(--rule); }

/* Public footer */
.c-public-footer, .c-compact-footer { max-width: var(--container); margin: 0 auto; padding: var(--sp-4) var(--gutter) var(--sp-5); border-top: 1px solid var(--line-strong); background: none; color: var(--ink); font-size: var(--fs-sm); }
.c-compact-footer .c-footer-brand > p, .c-compact-footer .c-readiness-link, .c-compact-footer > nav > a { font-size: var(--fs-sm); }
.c-public-footer nav { display: flex; flex-wrap: wrap; gap: .2rem var(--sp-2); margin-top: var(--sp-2); }
.c-public-footer nav a { display: inline-flex; align-items: center; min-height: var(--target-min); }
.c-footer-brand span { font-weight: var(--fw-bold); }
.c-footer-brand p { margin: .1rem 0 0; color: var(--muted); }

/* Business page: same system, quieter */
.c-business-home .c-preview-notice { display: flex; flex-wrap: wrap; gap: .2rem var(--sp-2); margin: var(--sp-3) 0 0; padding: var(--sp-2) var(--sp-3); border: 0; border-left: 4px solid var(--amber-mark); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--amber-wash); color: var(--ink); box-shadow: none; }
.c-visual-hero { padding: var(--sp-5) 0 var(--sp-4); background: none; border: 0; }
.c-visual-hero h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, var(--fs-3xl)); line-height: 1.2; }
.c-visual-hero h1 em { font-style: normal; color: var(--green-deep); }
.c-hero-copy { max-width: 32em; font-size: var(--fs-lg); }
.c-current-work, .c-hero-assurance { color: var(--muted); font-size: var(--fs-sm); }
.c-section { padding: var(--sp-5) 0; border-top: var(--rule); background: none; }
.c-section-heading h2 { font-size: var(--fs-2xl); line-height: 1.25; }
.c-section-heading p { max-width: var(--measure); color: var(--muted); }
.c-everyday-grid, .c-home-values { gap: var(--sp-2); }
.c-everyday-card, .c-home-values > article, .c-membership-strip, .c-home-price-note, .c-cost-card, .c-journey-detail, .c-flow-preview, .c-scene { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: none; background-image: none; }
.c-journey-rail { gap: var(--sp-1); }
.c-journey-step { border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); box-shadow: none; }
.c-journey-step.is-current { border-color: var(--green); background: var(--green-wash); }
.c-step-arrow { display: none; }

@media (min-width: 900px) {
  .c-worker-home main { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); column-gap: var(--sp-6); align-items: start; }
  .c-worker-home main > section, .c-worker-home main > div { grid-column: 1 / -1; }
  .c-worker-home main > .c-worker-hero { grid-column: 1; grid-row: 1; padding-top: var(--sp-6); }
  .c-worker-home main > .c-worker-how { grid-column: 2; grid-row: 1; margin-top: var(--sp-6); padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
  .c-work-kinds { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); grid-template-rows: auto auto 1fr auto; column-gap: var(--sp-5); }
  .c-work-kinds > h2 { grid-column: 1; grid-row: 1; }
  .c-work-kinds > p { grid-column: 1; grid-row: 2; }
  .c-work-kinds .c-worker-art { grid-column: 1; grid-row: 3 / span 2; margin: 0; }
  .c-work-kinds .work-kind-list { grid-column: 2; grid-row: 1 / span 3; }
  .c-work-kinds .c-kinds-note { grid-column: 2; grid-row: 4; }
  .c-worker-pay, .c-worker-secondary { max-width: 46rem; }
}

/* ======================================================================
   Matching (m-*) and commercial (c-*) logged-in screens adopt the same quiet surfaces
   ====================================================================== */
.m-proposal, .m-request, .m-card, .m-panel, .c-next-card, .c-contract-card, .c-payment-record, .c-account-status, .c-record-grid > *, .m-work-spec, .c-contract-types, .worker-reward, .worker-now { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: none; background-image: none; }
.m-process { gap: var(--sp-1); }
.m-facts > div, .m-key-facts > div { border-color: var(--line); }
.c-next-card { min-height: var(--control-h); text-align: left; }
.c-payment-state, .m-status { border-radius: var(--r-sm); }
.c-fieldset { border: 0; border-top: var(--rule); padding: var(--sp-2) 0 0; }
.m-primary-jump { min-height: 60px; }
.review-sheet > .review-comparison { margin: 0; padding: var(--sp-2) var(--sp-3); }
.photo-review .evidence-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-1); }
.photo-review .evidence-photo .photo-button img { max-height: 140px; }
.photo-review .evidence-slot-heading > span { display: none; }
.work-kind svg { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.work-kind svg .g-paper { fill: var(--surface); stroke: var(--ink); }
.work-kind svg .g-ink { stroke: var(--ink); }
.work-kind svg .g-green { stroke: var(--green); }
.work-kind svg .g-mark { fill: var(--amber-mark); stroke: none; }

.review-request { margin: 0; padding: 0 var(--sp-3); border-top: 0; border-bottom: var(--rule); }
.review-request ul { margin: var(--sp-1) 0 0; padding-left: 1.2rem; }
.c-public-header .c-header-links { flex: none; }
.c-public-header .c-header-links a { white-space: nowrap; }
.c-demo-section.c-welcome-demo { margin: 0; padding: 0; border: 0; border-top: var(--rule); border-radius: 0; background: none; }
.c-demo-section.c-welcome-demo > summary { display: flex; align-items: center; min-height: var(--control-h); padding: .5rem .1rem; font-weight: var(--fw-medium); }
.answer-summary > .full dd, .compare-table td.pre-wrap { font-weight: var(--fw-regular); }
@media (max-width: 379px) { .c-public-header .brand-name small { display: none; } }

/* Price stages on /payments reuse the crossing line, numbered because it is a real sequence. */
.p-stage-figure { margin: 0; padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.p-stage-figure figcaption { margin-top: var(--sp-2); color: var(--muted); font-size: var(--fs-sm); }
.p-stages .crossing-stop { font-size: var(--fs-sm); }
.p-stages .p-stage-title { display: block; font-size: var(--fs-base); }
.p-stages p { margin: .15rem 0 0; color: var(--muted); font-size: var(--fs-sm); }

/* Business page fixes */
.c-visual-hero h1 em { background: none; color: inherit; font-style: normal; }
.c-journey-step, .c-journey-step strong, .c-journey-step .c-step-number, .c-journey-step .c-step-short { color: var(--ink); }
.c-journey-step.is-current, .c-journey-step.is-current * { color: var(--green-deep); }
.c-journey-step .c-step-short { color: var(--muted); }
.p-stage-figure figcaption { position: static; inset: auto; padding: 0; background: none; color: var(--muted); }

/* Date/time and other native inputs do not always match :focus-visible; show the ring on any focus. */
input:focus, select:focus, textarea:focus { outline: 3px solid var(--focus); outline-offset: 2px; }
/* Legacy secondary text on public pages measured 5.2–6.8:1; bring it to the muted token (8.3:1). */
.p-eyebrow, .p-page dt, .p-note, .p-page p, .p-card-icon, .c-card-step, .c-slide-count, .c-check-dot, .c-preview-output, .c-journey-words p, .c-preview-label span { color: var(--muted); }
.p-page dd { color: var(--ink); }
/* One disclosure marker only: legacy +/− markers are replaced by the chevron above. */
.secondary-details > summary::after, .c-faq > summary::after, .c-welcome-other > summary::after, .token-login > summary::after, .c-auth-alternatives > summary::after, .review-history > summary::after, .m-settings-fold > summary::after, .m-card-details > summary::after, .install-hint summary::after { content: none; display: none; }

/* Photo buttons sit inside a clipping frame, so their focus ring is drawn inside the button. */
.evidence-photo .photo-button:focus-visible { outline: 3px solid var(--focus); outline-offset: -5px; box-shadow: inset 0 0 0 6px var(--surface); }
/* Task screens hide the bottom menu on phones, so the top bar keeps its logout button there. */
@media (max-width: 720px) { .app-shell.is-task .topbar .mobile-logout { display: inline-flex; } }

/* Public main: concrete AI requests, with illustrative examples kept apart from verified records. */
.c-case-home main { display: block; }
.c-case-home .c-worker-hero { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "visual" "actions" "access"; gap: var(--sp-2); padding: var(--sp-4) 0; }
.c-case-home .c-worker-intro { grid-area: intro; }
.c-case-home .c-worker-intro h1 { font-size: clamp(1.8rem, 1.45rem + 2vw, 2.7rem); }
.c-case-home .c-worker-lead { max-width: 27em; margin-top: var(--sp-2); font-size: var(--fs-base); }
.c-case-home .c-worker-start { grid-area: actions; display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); margin: 0; }
.c-case-home .c-worker-start > .btn { flex: 1 1 12rem; min-width: 0; min-height: var(--control-h); padding: .6rem .8rem; font-size: var(--fs-base); }
.c-case-home .c-worker-start > p { flex: 1 0 100%; font-size: var(--fs-sm); }
.c-case-home .c-welcome-access { grid-area: access; width: 100%; margin-top: 0; }
.c-main-visual { grid-area: visual; min-width: 0; margin: 0; }
.c-main-visual picture, .c-main-visual img { display: block; width: 100%; }
.c-main-visual img { height: auto; aspect-ratio: 4 / 3; object-fit: contain; border-radius: var(--r-md); }
.c-main-visual figcaption { margin-top: .25rem; color: var(--muted); font-size: var(--fs-xs); }
.c-main-cases, .c-main-record, .c-case-home main > .c-main-how { padding: var(--sp-4) 0; border-top: var(--rule); }
.c-main-section-heading h2, .c-main-record h2, .c-case-home .c-main-how h2 { margin: 0; font-size: var(--fs-xl); line-height: 1.35; }
.c-main-section-heading > p { max-width: var(--measure); margin: var(--sp-1) 0 var(--sp-2); color: var(--muted); }
.c-case-filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.c-case-filters button { min-width: 0; min-height: var(--control-h); padding: .45rem .7rem; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.c-case-filters button[aria-pressed="true"] { border-color: var(--green); background: var(--green-wash); color: var(--green-deep); box-shadow: inset 0 -3px var(--green); }
.c-case-count { margin: var(--sp-1) 0; color: var(--muted); font-size: var(--fs-sm); }
.c-ai-case-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); }
.c-ai-case { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.c-ai-case-visual { display: block; min-height: 0; padding: var(--sp-2); border-bottom: var(--rule); background: var(--green-wash); color: var(--green-deep); }
.c-ai-case-visual .c-case-role { display: block; margin-bottom: .35rem; font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.c-ai-case-visual > h3 { margin: 0; font-size: var(--fs-lg); line-height: 1.35; }
.c-ai-case[data-case-id="tidy"] .c-ai-case-visual { background: var(--amber-wash); color: var(--amber); }
.c-ai-case[data-case-id="research"] .c-ai-case-visual { background: var(--sunk); color: var(--ink); }
.c-case-art { margin: 0; border-bottom: var(--rule); background: var(--paper); }
.c-case-art picture { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 3 / 2; }
.c-case-art img { display: block; width: 100%; height: 100%; max-height: 100%; object-fit: contain; }
.c-case-art figcaption { padding: .3rem var(--sp-2); color: var(--muted); font-size: var(--fs-xs); }
.c-ai-case-body { padding: var(--sp-2); }
.c-case-kind { margin: 0 0 .4rem; color: var(--muted); font-size: var(--fs-xs); }
.c-ai-case blockquote { margin: var(--sp-2) 0; padding: .1rem 0 .1rem var(--sp-2); border-left: 3px solid var(--green); font-size: var(--fs-base); font-weight: var(--fw-medium); line-height: 1.6; }
.c-case-tags { display: flex; flex-wrap: wrap; gap: .5rem .8rem; margin: 0; padding: 0; list-style: none; }
.c-case-tags li { display: inline-flex; align-items: center; gap: .3rem; font-size: var(--fs-sm); }
.c-case-tags .icon { width: 1rem; height: 1rem; color: var(--green-deep); }
.c-case-example, .c-main-flow-more { margin-top: var(--sp-2); border-top: var(--rule); }
.c-case-example summary, .c-main-flow-more summary { display: list-item; min-height: var(--control-h); padding: .6rem 0; color: var(--green-deep); font-size: var(--fs-sm); font-weight: var(--fw-medium); cursor: pointer; }
.c-case-example dl { margin: 0; }
.c-case-example dl > div { padding: var(--sp-1) 0; border-top: var(--rule); }
.c-case-example dt { color: var(--muted); font-size: var(--fs-xs); }
.c-case-example dd { margin: .2rem 0 0; font-size: var(--fs-sm); }
.c-case-example p, .c-main-flow-more p { margin: var(--sp-1) 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.6; }
.c-main-scope-note { margin: var(--sp-2) 0 0; color: var(--muted); font-size: var(--fs-sm); }
.c-main-record { scroll-margin-top: var(--sp-3); }
.c-record-label { margin: 0 0 var(--sp-1); color: var(--green-deep); font-size: var(--fs-sm); font-weight: var(--fw-bold); }
.c-record-proof { margin-top: var(--sp-3); padding: var(--sp-3); border: 1px solid var(--green); border-radius: var(--r-md); background: var(--surface); }
.c-record-source { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem var(--sp-2); margin: 0 0 var(--sp-1); }
.c-record-source strong { color: var(--green-deep); font-size: var(--fs-xl); }
.c-record-source span { color: var(--muted); font-size: var(--fs-sm); }
.c-record-proof h3 { margin: 0; font-size: var(--fs-lg); }
.c-record-proof ol { display: grid; gap: .5rem; margin: var(--sp-2) 0; padding-left: 1.3em; font-size: var(--fs-sm); }
.c-record-limit { margin: var(--sp-2) 0; color: var(--muted); font-size: var(--fs-sm); }
.c-record-proof > a { display: inline-flex; align-items: center; min-height: var(--control-h); font-weight: var(--fw-medium); }
.c-case-home main > .c-main-how { grid-column: auto; grid-row: auto; margin-top: 0; padding: var(--sp-4) 0; border: 0; border-top: var(--rule); border-radius: 0; background: none; }
.c-main-stepper { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-1); margin-top: var(--sp-2); }
.c-main-stepper button { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); gap: .25rem .4rem; min-width: 0; min-height: var(--control-h); padding: .7rem .5rem; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); text-align: left; color: var(--ink); }
.c-main-stepper button > span { grid-row: 1 / span 2; align-self: center; color: var(--green-deep); font-size: var(--fs-lg); font-weight: var(--fw-bold); }
.c-main-stepper strong { font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.c-main-stepper small { color: var(--muted); font-size: var(--fs-xs); }
.c-main-stepper button[aria-pressed="true"] { border-color: var(--green); box-shadow: inset 0 -3px var(--green); background: var(--green-wash); }
.c-main-step-detail { min-height: 5rem; margin-top: var(--sp-1); padding: var(--sp-2); border-left: 3px solid var(--green); background: var(--surface); }
.c-main-step-detail p { margin: 0; font-size: var(--fs-base); line-height: 1.6; }
@media (max-width: 359px) { .c-main-stepper { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 700px) {
  .c-ai-case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .c-main-stepper { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .c-record-proof ol { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); }
}
@media (min-width: 900px) {
  .c-case-home .c-worker-hero { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); grid-template-areas: "intro visual" "actions visual" "access visual"; align-items: center; gap: var(--sp-2) var(--sp-4); padding: var(--sp-5) 0; }
  .c-main-visual { align-self: center; }
  .c-main-record { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: var(--sp-4); align-items: center; }
  .c-record-proof { margin-top: 0; }
}

/* Keep all three header actions in separate tracks when Korean type grows. */
@media (max-width: 559px) {
  .c-case-home .c-public-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand reading" "links links"; align-items: center; column-gap: var(--sp-2); row-gap: .2rem; }
  .c-case-home .c-public-header > .brand { grid-area: brand; justify-self: start; width: auto; max-width: 100%; min-width: 0; margin: 0; }
  .c-case-home .c-public-header > .reading-controls { grid-area: reading; justify-self: end; margin: 0; }
  .c-case-home .c-public-header > .c-header-links { grid-area: links; justify-self: stretch; display: flex; flex-wrap: wrap; min-width: 0; max-width: 100%; margin: 0; }
  .c-case-home .c-public-header .c-header-links a { min-height: var(--target-min); white-space: normal; }
}
/* Pages without the app's legacy root size (policy pages) still read at the 20px / 24px setting. */
@layer base {
  :root { font-size: 20px; }
  :root[data-text-size="large"] { font-size: 24px; }
}
:root[data-text-size="large"] { font-size: 24px !important; }

.p2-public-header{max-width:1200px;margin:auto;padding:16px 20px;display:flex;flex-wrap:wrap;align-items:center;gap:12px;border-bottom:1px solid var(--line)}.p2-public-header .brand{display:flex;gap:10px;margin-right:auto;text-decoration:none}.p2-public-header .brand small{display:block;font-size:12px;letter-spacing:.15em}.p2-public-header nav{display:flex;flex-wrap:wrap;gap:16px}.p2-public-header nav a{display:inline-flex;align-items:center;min-height:44px;color:var(--ink)}@media(max-width:720px){.p2-public-header nav{flex-basis:100%;justify-content:space-between;gap:8px}.p2-public-header .btn{padding:.4rem .6rem}}

/* Keep each page's policy and seller facts; share only the footer layout. */
.p2-public-footer{display:flex!important;flex-wrap:wrap;align-items:center;gap:1rem!important;padding:1.5rem 1rem!important;text-align:left!important;border-top:1px solid var(--line);margin-top:2rem}.p2-public-footer nav{display:flex;flex-wrap:wrap;gap:.6rem 1rem}.p2-public-footer a{display:inline-flex;align-items:center;min-height:44px}.p2-public-footer p{flex-basis:100%;margin:0}
