/* Black-Bar site — same "Blackline" world as the review app (DESIGN.md).
   Ink-black bar as the shell, cool stone ground, bond-paper panels,
   redline crimson for marked changes, solid ink for what gets removed,
   insertion blue for selection, focus and substitutes. System UI type. */

* { box-sizing: border-box; }

:root {
  --ground: #e5e7ea;
  --panel: #ffffff;
  --panel-2: #f5f6f7;
  --panel-3: #edeef0;
  --rule: #dfe1e4;
  --rule-strong: #c9ccd1;
  --ink: #141518;
  --ink-2: #393b41;
  --muted: #5f6269;
  --shell: #141518;
  --shell-2: #23252a;
  --shell-text: #f3f3f0;
  --shell-muted: #a6a9b0;
  --shell-rule: rgba(255, 255, 255, 0.14);
  --redline: #b3142c;
  --redline-wash: rgba(179, 20, 44, 0.11);
  --insert: #1f4fbf;
  --insert-soft: #edf2fc;
  --font-ui: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', 'Apple SD Gothic Neo',
    'Malgun Gothic', 'Noto Sans KR', system-ui, sans-serif;
  --font-code: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color: var(--ink);
  background: var(--ground);
  font: 16px/1.55 var(--font-ui);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  scroll-padding-top: 24px;
}

body { margin: 0; }
a { color: inherit; text-underline-offset: 4px; }
a:hover { color: var(--insert); }
:focus-visible { outline: 2px solid var(--insert); outline-offset: 4px; }
::selection { background: #cddbf6; color: var(--ink); }
code { font-family: var(--font-code); font-size: 0.9em; }

.wrap { width: min(1120px, calc(100% - clamp(36px, 6vw, 80px))); margin-inline: auto; }

/* the black bar */
nav { background: var(--shell); color: var(--shell-text); }
nav .wrap, footer .wrap, .links, .actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
}
nav .wrap, footer .wrap { justify-content: space-between; }
nav .wrap { min-height: 60px; }
nav a, footer a { font-size: 14px; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
nav a { color: var(--shell-muted); }
nav a:hover { color: var(--shell-text); }
nav :focus-visible { outline-color: #8fb0ff; }
nav .brand { color: var(--shell-text); }
.brand { gap: 9px; font-size: 16px; font-weight: 650; letter-spacing: -0.01em; }
.brand svg { width: 22px; height: 22px; }
.skip { position: absolute; top: -80px; left: 20px; padding: 10px; background: var(--panel); color: var(--ink); }
.skip:focus { top: 12px; z-index: 2; }

/* hero */
.hero { padding: clamp(40px, 7vw, 88px) 0 36px; }
.home-hero { display: grid; gap: clamp(32px, 5vw, 56px); }
.hero-copy { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: end; gap: 48px; }
h1, h2, h3 { margin: 0 0 12px; font-weight: 700; text-wrap: balance; }
h1 { max-width: 20ch; font-size: clamp(2.5rem, 5.6vw, 4.5rem); line-height: 1.02; letter-spacing: -0.04em; }
.home-hero h1 { margin: 0; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.25rem); line-height: 1.12; letter-spacing: -0.03em; }
h3 { font-size: 1.05rem; letter-spacing: -0.01em; margin-bottom: 6px; }
p { margin: 0 0 16px; }

/* the struck word: accepted changes are struck to a solid ink line */
.struck {
  text-decoration: line-through;
  text-decoration-thickness: 0.16em;
  text-decoration-color: var(--ink);
  text-decoration-skip-ink: none;
  animation: struck-in 900ms 250ms var(--ease-out) both;
}
@keyframes struck-in {
  from { text-decoration-color: transparent; }
  to { text-decoration-color: var(--ink); }
}

.intro { max-width: 52ch; color: var(--ink-2); font-size: clamp(1.05rem, 1.8vw, 1.2rem); }
.actions { margin-top: 22px; }
.text-action { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }
.formats { margin: 14px 0 0; max-width: 46ch; font-size: .9rem; color: var(--muted); }
.button {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 10px 20px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
.button:hover { background: #000; color: #fff; box-shadow: 0 2px 6px rgba(20, 21, 24, 0.12), 0 10px 24px rgba(20, 21, 24, 0.12); }

.hero-preview { margin: 0; }
.hero-preview a { display: block; text-decoration: none; }
.workspace-crop {
  display: block;
  overflow: hidden;
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(20, 21, 24, 0.1), 0 18px 48px rgba(20, 21, 24, 0.16);
  outline: 1px solid rgba(20, 21, 24, 0.08);
}
.hero-preview img { display: block; width: 100%; height: auto; }
.image-caption { display: flex; align-items: center; justify-content: flex-end; min-height: 44px; font-size: .9rem; color: var(--muted); text-decoration: underline; }

/* three states, as in the app */
.states { padding: 40px 0 44px; border-top: 1px solid var(--rule-strong); }
.states > h2 { max-width: 24ch; }
.states > p { max-width: 62ch; color: var(--ink-2); }
.state-list { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--panel); border-radius: 10px; box-shadow: 0 1px 2px rgba(20, 21, 24, 0.06); }
.state-list li { display: grid; grid-template-columns: 4px minmax(0, 1fr); column-gap: 16px; padding: 22px 24px; }
.state-list li + li { border-left: 1px solid var(--rule); }
.state-list li::before { content: ''; grid-row: 1 / span 3; border-radius: 2px; background: var(--redline); }
.state-list li.accepted::before { background: var(--ink); }
.state-list li.exported::before { background: transparent; box-shadow: inset 0 0 0 1px var(--rule-strong); }
.state-list p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.state-sample { margin-bottom: 10px; font-size: 1.05rem; font-weight: 500; }
.state-sample .mark { background: var(--redline-wash); box-shadow: inset 0 -2px 0 var(--redline); padding: 0 2px; }
.state-sample .gone { text-decoration: line-through; text-decoration-thickness: 0.24em; text-decoration-color: var(--ink); text-decoration-skip-ink: none; }
.state-sample .bar { display: inline-block; width: 7.5em; height: .82em; vertical-align: -.06em; background: var(--ink); border-radius: 1px; }

/* sections */
.walkthrough, .setup { padding: 40px 0; }
#walkthrough, .setup { border-top: 1px solid var(--rule-strong); }
.standalone .walkthrough { padding-top: 0; }
.walkthrough > p, .setup > p { max-width: 66ch; color: var(--ink-2); }

[data-walkthrough] {
  --paper: var(--ground);
  --paper-2: var(--panel-2);
  --card: var(--panel);
  --line: var(--rule);
  --line-2: var(--rule-strong);
  --faint: #6b6e75;
  --serif: 'Times New Roman', Times, Batang, 'Nanum Myeongjo', 'Noto Serif KR', serif;
  --mono: var(--font-code);
}

.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 20px 0 16px; position: sticky; top: 0; z-index: 1; padding-block: 12px; background: var(--ground); }
.seg { display: inline-flex; padding: 3px; gap: 3px; border-radius: 9px; background: var(--panel-3); border: 1px solid var(--rule); }
.seg button {
  font: inherit; font-size: 0.9rem; font-weight: 500; min-height: 40px; padding: 0.4rem 0.95rem;
  background: transparent; border: none; border-radius: 6px; color: var(--muted); cursor: pointer;
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
.seg button:hover { color: var(--ink); }
.seg button:focus-visible { outline-offset: 1px; }
.seg button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(20, 21, 24, 0.1), 0 1px 4px rgba(20, 21, 24, 0.06); }
.seg-label { font-size: .9rem; color: var(--muted); }

.comparisons { overflow: hidden; border-radius: 10px; background: var(--card); box-shadow: 0 1px 2px rgba(20, 21, 24, 0.06); }
.comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.contract-clause { max-width: none; margin: 0; }
.contract-clause + .contract-clause { border-top: 1px solid var(--line); }
.contract-clause > summary { padding: 14px 24px; font-size: .8rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: var(--panel-2); }
.contract-clause > summary:hover { color: var(--ink); }
.contract-clause[open] > summary { border-bottom: 1px solid var(--line); }
.pane { min-width: 0; padding: 20px 24px; }
.pane:last-child { background: var(--panel-2); border-left: 1px solid var(--line); }
.pane-head { font-size: .85rem; font-weight: 500; color: var(--muted); margin-bottom: 8px; }
.surface {
  font-family: var(--serif); font-size: 1.08rem; line-height: 1.75; color: var(--ink);
  white-space: pre-wrap; overflow-wrap: anywhere;
}

/* redaction render styles */
.redact { display: inline-block; max-width: 100%; height: .85em; vertical-align: -.05em; background: var(--ink); border-radius: 1px; animation: bar-in 260ms var(--ease-out); }
@keyframes bar-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.lbl { background: var(--panel); border: 1px solid var(--rule-strong); border-radius: 4px; padding: 0 0.35em; font-family: var(--font-ui); font-size: 0.78em; font-weight: 600; color: var(--ink-2); overflow-wrap: anywhere; }
.fake { box-shadow: inset 0 -1.5px 0 var(--insert); color: var(--ink); }

.count { margin: 0 0 0 auto; font-size: .9rem; color: var(--muted); }
.choice-hint { font-size: .9rem; color: var(--muted); }
.try-install {
  margin-top: 24px;
  padding: 22px 24px;
  border-radius: 10px;
  background: var(--shell);
  color: var(--shell-text);
}
.try-install p { margin: 0 0 16px; max-width: 66ch; color: var(--shell-muted); }
.try-install strong { color: var(--shell-text); }
.try-install .actions { margin-top: 0; }
.try-install .button { background: var(--shell-text); color: var(--shell); }
.try-install .button:hover { background: #fff; color: var(--shell); }
.try-install .text-action:hover { color: #fff; }
.try-install :focus-visible { outline-color: #8fb0ff; }

/* original-pane details: marked change (open) vs struck (will be removed) */
.detail-toggle {
  max-width: 100%; padding: 0 2px; border: 0; border-radius: 2px; font: inherit; color: inherit;
  background: transparent; text-align: left; cursor: pointer; overflow-wrap: anywhere;
  text-decoration: line-through; text-decoration-thickness: 0.2em; text-decoration-color: var(--ink);
  text-decoration-skip-ink: none;
  transition: background-color 140ms var(--ease-out), text-decoration-color 200ms var(--ease-out);
}
.detail-toggle[aria-pressed="false"] {
  text-decoration: none;
  background: var(--redline-wash);
  box-shadow: inset 0 -2px 0 var(--redline);
}
.detail-toggle:hover { background: var(--insert-soft); }

details { max-width: 760px; margin-top: 16px; }
summary { display: list-item; padding-block: 10px; min-height: 44px; cursor: pointer; font-weight: 500; }
pre { padding: 16px 18px; background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font-code); font-size: .88rem; line-height: 1.6; }
footer { border-top: 1px solid var(--rule-strong); padding: 20px 0; color: var(--muted); }

@media (max-width: 900px) {
  .hero-copy { grid-template-columns: 1fr; gap: 16px; }
  .hero-copy .intro { max-width: 58ch; }
  .state-list { grid-template-columns: 1fr; }
  .state-list li + li { border-left: none; border-top: 1px solid var(--rule); }
}

@media (max-width: 700px) {
  .comparison { grid-template-columns: 1fr; }
  .pane:last-child { border-left: none; border-top: 1px solid var(--line); }
  .pane { padding: 16px 20px; }
  .seg button { padding-inline: .7rem; }
  .controls .count { width: 100%; margin: 0; }
}

@media (max-width: 620px) {
  .links { gap: 4px 16px; }
  .hero { padding-bottom: 28px; }
  .walkthrough, .setup, .states { padding-block: 28px; }
  .image-caption { justify-content: flex-start; }
  .seg-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.facts { padding: clamp(40px, 7vw, 88px) 0 56px; }
.facts h1 { max-width: 20ch; font-size: clamp(2.2rem, 4.4vw, 3.4rem); }
.facts h2 { margin-top: 36px; font-size: clamp(1.3rem, 2.6vw, 1.6rem); }
.facts p { max-width: 66ch; color: var(--ink-2); }
