:root {
  color-scheme: light;
  --paper: #f8f5ed;
  --white: #fffdf8;
  --ink: #242820;
  --muted: #555a4c;
  --line: #dcd6c8;
  --accent: #785226;
  --green: #253b30;
  font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .62; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #8c622e; outline-offset: 3px; }
.shell { max-width: 980px; margin-inline: auto; padding-inline: 24px; }
.masthead { border-bottom: 1px solid var(--line); }
.bar { min-height: 70px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand { color: var(--ink); display: inline-flex; gap: 9px; align-items: center; text-decoration: none; font-weight: 800; font-size: 1.1rem; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; background: var(--green); color: #fff; border-radius: 7px; }
.brand-accent { color: var(--accent); }
.languages { display: flex; gap: 4px; }
.languages button { padding: 5px 9px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--muted); font-size: .82rem; }
.languages button[aria-pressed="true"] { border-color: var(--line); color: var(--ink); background: var(--white); }
.intro { padding-top: clamp(35px, 7vw, 76px); }
.eyebrow { margin: 0; color: var(--accent); font-size: .83rem; letter-spacing: .07em; font-weight: 700; }
h1 { margin: 13px 0 17px; font: 700 clamp(2.25rem, 6vw, 4.2rem)/1.14 "AppleMyungjo", Georgia, serif; letter-spacing: -.04em; }
.lede { color: var(--muted); max-width: 36rem; margin: 0; }
.steps { padding: 0; margin: 30px 0 13px; list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .88rem; color: var(--muted); }
.steps li { display: flex; align-items: center; gap: 6px; }
.steps li span:first-child { font-variant-numeric: tabular-nums; font-size: .75rem; }
.steps li[aria-current] { color: var(--green); font-weight: 750; }
.workspace { display: grid; grid-template-columns: 1.65fr 1fr; gap: 16px; }
.panel, .sample { border-radius: 14px; padding: clamp(21px, 4vw, 35px); }
.panel { background: var(--white); border: 1px solid var(--line); }
.panel h2, .sample h2 { margin: 0; font-size: 1.3rem; line-height: 1.35; }
.panel > p { color: var(--muted); margin: 8px 0 17px; font-size: .9rem; }
.file-label { display: block; font-size: .86rem; font-weight: 700; margin: 0 0 7px; }
input[type="file"] { width: 100%; max-width: 100%; color: var(--muted); border: 1px dashed #a99e89; border-radius: 7px; padding: 9px; font-size: .88rem; background: #faf7ef; }
input::file-selector-button { margin-right: 10px; color: var(--green); background: #ede8dc; border: 0; border-radius: 4px; padding: 6px 9px; font-weight: 650; cursor: pointer; }
.primary { display: block; width: fit-content; border: 0; border-radius: 7px; padding: 10px 17px; background: var(--green); color: white; margin-top: 15px; font-size: .91rem; font-weight: 700; }
.primary:hover:not(:disabled) { background: #365445; }
.sample { background: var(--green); color: #fffaf0; }
.sample-kicker { font-size: .73rem; letter-spacing: .09em; color: #e6ceaa; }
.sample-rule { width: 40px; height: 1px; background: #c9a16d; margin: 14px 0; }
.sample dl { margin-bottom: 0; font-size: .84rem; }
.sample dl div { display: flex; gap: 9px; border-top: 1px solid #547060; padding: 7px 0; }
.sample dt { color: #e6ceaa; }
.sample dd { margin: 0; }
.review { margin-top: 16px; }
.blocks { border: 1px solid var(--line); border-radius: 7px; max-height: min(60vh, 37rem); overflow: auto; }
.block { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(8.5rem, auto); align-items: start; gap: 10px; padding: 11px; border-bottom: 1px solid var(--line); }
.block:last-child { border-bottom: 0; }
.block-index { color: var(--accent); font-size: .78rem; }
.block p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .88rem; }
.block select { width: 100%; color: var(--ink); background: var(--white); border: 1px solid #aaa18f; border-radius: 4px; padding: 4px; font-size: .82rem; }
.panel .status { margin: 10px 0 0; overflow-wrap: anywhere; }
.panel .status:empty { display: none; }
.panel .status[data-error="true"] { color: #9a3029; }
.footer { display: flex; gap: 12px; justify-content: space-between; border-top: 1px solid var(--line); margin: 35px 0 0; padding-block: 14px 23px; color: var(--muted); font-size: .78rem; }
@media (max-width: 640px) {
  .shell { padding-inline: 17px; }
  .workspace { grid-template-columns: 1fr; }
  .block { grid-template-columns: auto minmax(0, 1fr); }
  .block select { grid-column: 2; max-width: 11rem; }
}
h1, .sample h2 { white-space: pre-line; }
.review summary { cursor: pointer; font-weight: 700; }
.review details > p { margin: 8px 0 15px; font-size: .9rem; color: var(--muted); }
.secondary {
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--green);
  background: var(--white);
  padding: 8px 12px;
  margin-block: 10px;
}
.review select, .review textarea {
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 6px;
}
.ai-tools { margin: 12px 0; padding: 10px; border: 1px solid var(--line); border-radius: 7px; }
.ai-tools p { margin: 6px 0; }
.ai-tools a { color: var(--green); margin-inline-start: 8px; }
.ai-tools label, .ai-tools textarea { display: block; width: 100%; }
.show-body { display: block; margin-top: 12px; }
#analysis-summary { color: var(--muted); font-size: .85rem; margin: 4px 0 8px; }
.blocks:empty { display: none; }
