/*  main.css  —  Business 29 guided tutorial (de-identified synthetic)
 *
 *  Visual grammar: notice-paper / ledger lines, Korean-first serif,
 *  charcoal/forest/brick/brass direction (consistent with Phase 1/2 UX).
 */

:root {
  --paper: #eee7d8; --paper2: #f8f3e8; --ink: #2b332e; --muted: #716b60;
  --forest: #425247; --brick: #954b40; --brass: #9b8552; --line: #b8ad99;
  --wash: #d8e1d5; --wash2: #f0d7d2; --shadow: 0 18px 50px rgba(48,43,35,.12);
}

* { box-sizing: border-box; }
html { background: #d8d0c0; color: var(--ink); font-family: system-ui,-apple-system,"Apple SD Gothic Neo","Noto Sans KR",sans-serif; }
body {
  margin: 0; background: linear-gradient(90deg,rgba(255,255,255,.12) 1px,transparent 1px), var(--paper);
  background-size: 28px 28px;
}
.skip-link { position: fixed; left: 12px; top: -80px; background: #ffe500; color: #111; padding: 12px 18px; z-index: 99; }
.skip-link:focus { top: 12px; }
.shell { max-width: 1580px; margin: auto; min-height: 100vh; }

h1, h2, h3, p, li, small, figcaption { word-break: keep-all; overflow-wrap: normal; }
.masthead { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 22px 28px; padding: 28px 38px 20px; border-bottom: 3px solid var(--ink); background: rgba(248,243,232,.92); }
.ledger-no { display: grid; place-items: center; width: 64px; height: 64px; border: 3px double var(--ink); font: 700 25px Georgia, serif; }
.identity-copy { min-width: 0; }
.identity-copy .eyebrow { margin: 0 0 6px; font-size: 12px; letter-spacing: .16em; font-weight: 800; }
.identity-copy h1 { margin: 0; font: 700 clamp(24px, 2.6vw, 40px)/1.2 Georgia,"Nanum Myeongjo",serif; }
.identity-copy .subtitle { margin: 8px 0 0; font: 500 15px system-ui; color: var(--muted); }
.synthetic-note { min-width: 0; max-width: 400px; font-size: 11px; line-height: 1.6; color: var(--muted); text-align: right; }

.tut-nav { position: sticky; top: 0; z-index: 30; background: rgba(238,231,216,.97); border-bottom: 1px solid var(--ink); display: flex; align-items: center; gap: 18px; padding: 10px 38px; flex-wrap: wrap; }
.chapter-tabs { display: flex; gap: 4px; overflow: auto; padding: 3px; }
.chapter-tabs button { border: 0; border-left: 1px solid var(--line); background: transparent; padding: 9px 13px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.chapter-tabs button i { font-style: normal; color: var(--brick); font-size: 10px; margin-right: 7px; }
.chapter-tabs button[aria-selected="true"] { background: var(--forest); color: white; }
.scenario-select { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; }
.scenario-select select { padding: 8px 10px; border: 1px solid var(--ink); background: white; font: inherit; }

.review-stage { padding: 30px 38px 60px; min-height: 720px; }
.review-stage:focus { outline: none; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 22px; border-bottom: 2px solid var(--ink); padding-bottom: 14px; flex-wrap: wrap; }
.section-head h2 { font: 700 clamp(26px,4vw,44px)/1.15 Georgia,"Nanum Myeongjo",serif; margin: 0; }
.section-head .folio { font-size: 11px; letter-spacing: .12em; color: var(--muted); font-weight: 800; }

.status { display: inline-block; padding: 5px 8px; border: 1px solid currentColor; font-size: 10px; letter-spacing: .06em; font-weight: 900; text-transform: uppercase; }
.st-confirm { color: #745d21; background: #f3e7b9; }
.st-missing { color: #843e35; background: var(--wash2); }
.st-review { color: #7a5b12; background: #f3e7b9; }
.st-hold { color: #843e35; background: var(--wash2); }
.st-keep { color: #254d3a; background: #d8e6d8; }
.st-normal { color: #254d3a; background: #d8e6d8; }

.steps { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.step-card { background: var(--paper2); border: 1px solid var(--line); border-top: 5px solid var(--brass); padding: 18px; }
.step-card .no { font: 800 11px ui-monospace, monospace; color: var(--brick); letter-spacing: .1em; }
.step-card h3 { font: 700 22px Georgia, "Nanum Myeongjo", serif; margin: 8px 0 6px; }
.step-card p { margin: 0; line-height: 1.65; font-size: 14px; }

.guide-note { margin-top: 20px; background: var(--paper2); border: 1px solid var(--ink); border-left: 8px solid var(--forest); padding: 18px 22px; }
.guide-note h4 { margin: 0 0 8px; font: 700 18px Georgia, serif; color: var(--forest); }
.guide-note p { margin: 0; line-height: 1.7; }

.scenario-card { margin-top: 22px; background: var(--paper2); border: 2px double var(--ink); padding: 18px 22px; }
.scenario-card h4 { margin: 0 0 8px; font: 700 20px Georgia, serif; }
.scenario-card p { margin: 0 0 10px; line-height: 1.65; }
.scenario-card .status { margin-right: 6px; }

.demo-tag { display: inline-block; padding: 3px 7px; border: 1px dashed var(--brass); color: var(--brass); font-size: 10px; font-weight: 800; letter-spacing: .05em; margin-right: 6px; vertical-align: middle; }
.guide-note h4 .demo-tag { color: var(--muted); border-color: var(--line); }

.ledger-strip { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0; }
.ledger-strip span { border: 1px solid var(--ink); padding: 5px 8px; font-size: 11px; }

footer { display: flex; justify-content: space-between; gap: 20px; border-top: 3px solid var(--ink); padding: 20px 38px; font-size: 11px; background: var(--paper2); }

@media(max-width: 900px) {
  .masthead { grid-template-columns: auto minmax(0, 1fr); }
  .synthetic-note { grid-column: 1 / -1; text-align: left; max-width: none; }
  .tut-nav { align-items: flex-start; flex-direction: column; }
  .chapter-tabs { max-width: 100%; }
  .scenario-select { margin-left: 0; width: 100%; }
  .steps { grid-template-columns: 1fr; }
}
@media(max-width: 520px) {
  body { background: var(--paper); }
  .masthead, .review-stage { padding-left: 16px; padding-right: 16px; }
  .masthead { gap: 14px 16px; padding-top: 18px; }
  .ledger-no { width: 50px; height: 50px; }
  .identity-copy h1 { font-size: 24px; line-height: 1.25; }
  .identity-copy .subtitle { font-size: 13px; line-height: 1.5; }
  .chapter-tabs { width: 100%; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .section-head h2 { font-size: 30px; }
  .step-card { padding: 14px; }
  footer { flex-direction: column; padding: 18px 16px; }
}
/* 390px contract marker */
@media(max-width: 390px) {
  .masthead, .review-stage { padding-left: 12px; padding-right: 12px; }
  .identity-copy h1 { font-size: 22px; }
  .chapter-tabs button { padding: 8px 10px; }
  .step-card h3 { font-size: 19px; }
  .guide-note, .scenario-card { padding: 14px; }
}
@media(prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
