/* Recast workspace — Adel Labs digital-app shell + editor stage. */

@font-face { font-family: Manrope; src: url('assets/manrope.woff2'); font-display: swap; }
@font-face { font-family: Plex; src: url('assets/plex.woff2'); font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #17191d;
  --surface: #202329;
  --surface-2: #262a31;
  --sunken: #131519;
  --ivory: #f1efe9;
  --muted: #b6b7bc;
  --faint: #8b8d94;
  --line: #34373e;
  --line-soft: #2a2d33;
  --oxide: #813d38;
  --oxide-lit: #984941;
  --accent: #d98c84;
  --focus: #e6afa4;
  --ok: #7fa98c;
  --radius: 7px;
  --rail: 232px;
  --insp: 316px;
  --fast: 120ms;
  --slow: 180ms;
  --ease: cubic-bezier(.2, .7, .3, 1);
  font: 14px/1.5 Manrope, 'Segoe UI', Arial, sans-serif;
  color: var(--ivory);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; overflow-x: hidden; }
button, input, textarea, select { font: inherit; color: var(--ivory); }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip { position: fixed; top: -120px; left: 16px; z-index: 200; padding: 12px 16px; background: var(--ivory); color: var(--bg); border-radius: var(--radius); }
.skip:focus { top: 10px; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.micro, .rc-num { font-family: Plex, ui-monospace, Consolas, monospace; }
.micro { font-size: 10px; letter-spacing: .1em; color: var(--muted); }
.rc-num { font-size: 11px; letter-spacing: .02em; color: var(--muted); font-variant-numeric: tabular-nums; }
.rc-label { font: 500 10px/1.5 Plex, monospace; letter-spacing: .13em; text-transform: uppercase; color: var(--faint); margin: 0; }
.rc-hint { font-size: 11px; line-height: 1.6; color: var(--muted); margin: 8px 0 0; }

.recast-main { width: min(1560px, calc(100% - 80px)); margin-inline: auto; }
.intro-formats { margin: 12px 0 0; }
.da-actions .da-text-link { border: 0; background: none; padding: 0; font-weight: 500; cursor: pointer; }
.da-header-actions a { font-size: 12px; }

/* ---------- shared controls ---------- */

button {
  cursor: pointer;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
button:hover { background: #31353d; }
button:active { background: #3a3f48; }
button:disabled { opacity: .38; cursor: default; background: var(--surface-2); }

.rc-primary { background: var(--oxide); border-color: #a3615a; font-weight: 600; }
.rc-primary:hover { background: var(--oxide-lit); }
.rc-ghost { background: transparent; }
.rc-ghost:hover { background: #2c3037; }
.rc-wide { width: 100%; }

input, textarea, select {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--sunken);
  transition: border-color var(--fast) var(--ease);
}
input:hover, textarea:hover, select:hover { border-color: #454a53; }
input[type=color] { width: 44px; height: 44px; min-height: 44px; padding: 3px; }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; flex: none; }
textarea { resize: vertical; line-height: 1.6; min-height: 78px; }
label { display: block; font-size: 11px; color: #d6d5d0; margin: 0 0 6px; }
label > input, label > select { margin-top: 5px; }

.rc-inline { display: flex; align-items: center; gap: 10px; justify-content: space-between; margin: 10px 0 0; }
.rc-inline select { width: auto; min-width: 118px; min-height: 44px; margin: 0; }
.rc-check { display: flex; align-items: center; gap: 9px; min-height: 44px; margin: 6px 0 0; font-size: 12px; color: #d6d5d0; }
.rc-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0 0; }

.rc-seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--sunken); border: 1px solid var(--line); border-radius: 8px; }
.rc-seg button {
  min-height: 38px; padding: 0 13px; border: 0; border-radius: 6px; background: transparent;
  font-size: 12px; color: var(--muted);
}
.rc-seg button:hover { background: #2a2e35; color: var(--ivory); }
.rc-seg button[aria-pressed=true] { background: #45332f; color: var(--ivory); box-shadow: inset 0 0 0 1px #8d5c52; }
.rc-seg-sm { display: flex; width: 100%; }
.rc-seg-sm button { flex: 1; padding: 0 6px; }

/* ---------- bench frame ---------- */

.rc-bench {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
  scroll-margin-top: 0;
}

.rc-bench-top {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #23262c, #1f2228);
}
.rc-rail-toggle { width: 44px; padding: 0; flex: none; display: grid; place-items: center; }
.rc-rail-icon { width: 15px; height: 12px; border: 1.5px solid currentColor; border-radius: 2px; border-left-width: 5px; display: block; }
.rc-bench-top.rail-off .rc-rail-icon { border-left-width: 1.5px; }

.rc-doc { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1; }
.rc-doc-kind { font: 500 10px/1 Plex, monospace; letter-spacing: .1em; border: 1px solid var(--line); border-radius: 5px; padding: 8px 8px; color: var(--accent); flex: none; }
.rc-doc-text { min-width: 0; }
.rc-doc-text strong { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-doc-text span { display: block; font-size: 11px; color: var(--faint); }

.rc-pager { display: flex; align-items: center; gap: 6px; flex: none; }
.rc-pager button { width: 44px; padding: 0; }
.rc-pager .rc-num { min-width: 52px; text-align: center; }

.rc-top-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.rc-top-actions .rc-ghost { padding: 0 11px; font-size: 12px; }
.rc-history {
  font: 500 11px/1 Plex, monospace; color: var(--faint);
  border: 1px solid var(--line); border-radius: 20px; padding: 7px 10px; min-width: 32px; text-align: center;
}

/* The working stage is a fixed frame: each column scrolls inside it. */
.rc-bench-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--insp);
  height: clamp(560px, calc(100vh - 260px), 880px);
}
.rc-bench-body > * { min-height: 0; min-width: 0; }
.rc-bench-body.rail-open { grid-template-columns: var(--rail) minmax(0, 1fr) var(--insp); }
.rc-bench-body:not(.rail-open) .rc-rail { display: none; }

/* ---------- left rail ---------- */

.rc-rail {
  border-right: 1px solid var(--line);
  background: #1c1f24;
  display: flex; flex-direction: column;
  min-width: 0; overflow: hidden;
}
.rc-rail-block { padding: 14px 13px; border-bottom: 1px solid var(--line-soft); }
.rc-rail-block:last-child { border-bottom: 0; }
.rc-rail-grow { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.rc-rail-grow .rc-label { margin-bottom: 9px; }
.rc-rail-grow input[type=search] { margin-bottom: 8px; }

.rc-thumbs { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 10px; max-height: 210px; overflow: auto; }
.rc-thumb {
  position: relative; width: 96px; padding: 0; border-radius: 4px; overflow: hidden;
  border: 1px solid var(--line); background: #0f1114; min-height: 0; line-height: 0;
}
.rc-thumb img, .rc-thumb canvas { width: 100%; height: auto; display: block; opacity: .82; }
.rc-thumb[aria-current=true] { border-color: var(--accent); box-shadow: 0 0 0 2px #813d3866; }
.rc-thumb[aria-current=true] img, .rc-thumb[aria-current=true] canvas { opacity: 1; }
.rc-thumb-n { position: absolute; left: 4px; bottom: 3px; font: 500 9px/1 Plex, monospace; color: #e9e6df; text-shadow: 0 1px 3px #000; }
.rc-thumb-edited { position: absolute; right: 5px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.rc-text-list { flex: 1; min-height: 120px; overflow: auto; margin: 0 -13px -14px; border-top: 1px solid var(--line-soft); scrollbar-width: thin; }
.rc-text-list button {
  display: block; width: 100%; text-align: left; min-height: 44px;
  padding: 10px 13px; border: 0; border-radius: 0; border-bottom: 1px solid var(--line-soft);
  background: transparent; font-size: 11.5px; line-height: 1.45; color: #d2d1cc;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rc-text-list button:hover { background: #24272d; color: var(--ivory); }
.rc-text-list button[aria-selected=true] { background: #3d2d2b; color: var(--ivory); box-shadow: inset 2px 0 0 var(--accent); }
.rc-text-list button.is-edited::after { content: '·'; color: var(--accent); margin-left: 6px; font-weight: 700; }
.rc-text-empty { padding: 18px 13px; font-size: 11px; color: var(--faint); }

/* ---------- stage ---------- */

.rc-stage { display: flex; flex-direction: column; min-width: 0; background: var(--sunken); }

.rc-stage-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 14px; border-bottom: 1px solid var(--line); background: var(--surface);
}
.rc-zoom { display: flex; align-items: center; gap: 6px; }
.rc-zoom button { min-height: 38px; padding: 0 11px; font-size: 12px; }
.rc-zoom > button:first-child, .rc-zoom > #zoom-in { width: 38px; padding: 0; }
.rc-zoom .rc-num { min-width: 46px; text-align: center; }

.rc-viewport {
  position: relative; flex: 1; min-height: 480px; overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 0%, #1b1e23 0%, #101216 70%);
  touch-action: none; cursor: default;
}
.rc-viewport:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.rc-viewport.is-panning { cursor: grabbing; }
.rc-viewport.can-pan { cursor: grab; }
.rc-viewport.is-dropping::after {
  content: ''; position: absolute; inset: 10px; border: 2px dashed var(--accent); border-radius: 10px; pointer-events: none;
}
.rc-drop-hint {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  margin: 0; font: 500 11px/1 Plex, monospace; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); opacity: 0; transition: opacity var(--fast) var(--ease); pointer-events: none;
}
.rc-viewport.is-dropping .rc-drop-hint { opacity: 1; }

.rc-toast {
  position: absolute; left: 14px; right: 14px; bottom: 14px; margin: 0;
  padding: 10px 13px; border: 1px solid var(--line); border-radius: 8px;
  background: #22252bee; backdrop-filter: blur(6px);
  font-size: 11.5px; line-height: 1.5; color: #ddd9d2;
  opacity: 0; transform: translateY(6px); pointer-events: none;
  transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease);
}
.rc-toast.is-on { opacity: 1; transform: translateY(0); }

.rc-stagewrap {
  position: absolute; top: 0; left: 0; transform-origin: 0 0; line-height: 0;
  box-shadow: 0 24px 70px #0009, 0 0 0 1px #00000060;
  background: #fff;
}
.rc-stagewrap canvas { display: block; width: 100%; height: auto; }
.rc-stagewrap .rc-original { position: absolute; inset: 0; display: none; }
.rc-stage[data-view=split] .rc-original { display: block; clip-path: inset(0 var(--split-right, 50%) 0 0); }

.rc-overlay { position: absolute; inset: 0; }
.rc-hit { position: absolute; border: 1px solid transparent; border-radius: 2px; cursor: text; }
.rc-hit:hover { border-color: #ffffff55; background: #ffffff0d; }
.rc-hit.is-edited { border-color: transparent; }
.rc-stage[data-view=changes] .rc-hit.is-edited { border-color: var(--accent); background: #d98c841f; }

.rc-sel {
  position: absolute; border: 1px solid var(--accent); background: #d98c8412;
  box-shadow: 0 0 0 1px #00000055; pointer-events: none;
}
.rc-handle {
  position: absolute; width: 11px; height: 11px; margin: -6px 0 0 -6px;
  background: var(--ivory); border: 1px solid #6c4b45; border-radius: 2px; pointer-events: auto;
}
.rc-handle[data-h=n] { cursor: ns-resize; } .rc-handle[data-h=s] { cursor: ns-resize; }
.rc-handle[data-h=e] { cursor: ew-resize; } .rc-handle[data-h=w] { cursor: ew-resize; }
.rc-handle[data-h=nw], .rc-handle[data-h=se] { cursor: nwse-resize; }
.rc-handle[data-h=ne], .rc-handle[data-h=sw] { cursor: nesw-resize; }
.rc-handle[data-h=baseline] { width: 22px; height: 5px; margin: -3px 0 0 -11px; border-radius: 3px; background: var(--accent); cursor: ns-resize; }
.rc-sel[data-kind=run] { border-style: dashed; }
.rc-sel-move { position: absolute; inset: 0; pointer-events: auto; cursor: move; }

.rc-divider {
  position: absolute; top: 0; bottom: 0; width: 24px; margin-left: -12px; z-index: 5;
  display: grid; place-items: center; cursor: ew-resize; background: transparent;
}
.rc-divider::before { content: ''; position: absolute; top: 0; bottom: 0; width: 1px; background: var(--accent); opacity: .85; }
.rc-divider-grip { width: 10px; height: 46px; border-radius: 6px; background: var(--accent); box-shadow: 0 2px 8px #0008; }
.rc-divider:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }

.rc-statusbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 14px; border-top: 1px solid var(--line); background: var(--surface);
  font: 11px/1.4 Plex, monospace; color: var(--muted); min-height: 40px;
}
.rc-status-name { color: #d9d7d1; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line); flex: none; }
.rc-privacy { margin-left: auto; color: var(--ok); white-space: nowrap; }
.rc-privacy[data-uploads='1'] { color: var(--accent); }

/* ---------- inspector ---------- */

.rc-inspector {
  border-left: 1px solid var(--line);
  background: #1c1f24;
  padding: 16px 15px 22px;
  overflow: auto;
  min-width: 0;
  scrollbar-width: thin;
}
.rc-sheet-handle, .rc-sheet-close { display: none; }

.rc-empty { padding: 40px 6px; text-align: center; color: var(--muted); }
.rc-empty-mark { font-size: 34px; color: #8c5b53; display: block; margin-bottom: 14px; }
.rc-empty h2 { font: 600 17px/1.3 Manrope, sans-serif; margin: 0 0 8px; color: var(--ivory); letter-spacing: -.01em; }
.rc-empty p { font-size: 12px; line-height: 1.6; margin: 0; }

.rc-insp-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.rc-insp-head .rc-label { flex: 1; }
.rc-tier {
  font: 500 10px/1 Plex, monospace; letter-spacing: .06em; padding: 7px 9px; border-radius: 20px;
  border: 1px solid var(--line); color: var(--muted); white-space: nowrap;
}
.rc-tier[data-tier=original] { color: #9dc0a8; border-color: #3d5545; }
.rc-tier[data-tier=metric] { color: #b9c3d6; border-color: #414a5c; }
.rc-tier[data-tier=matched] { color: var(--accent); border-color: #6b4740; }
.rc-tier[data-tier=overlay] { color: #d8c08a; border-color: #5c5033; }

.rc-fit { font-size: 11px; line-height: 1.55; color: var(--muted); margin: 8px 0 0; min-height: 17px; }
.rc-fit[data-over=true] { color: var(--accent); }

.rc-block { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.rc-block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.rc-face { font: 600 14px/1.3 Manrope, sans-serif; margin: 0 0 10px; letter-spacing: -.01em; }

.rc-candidates { display: grid; gap: 6px; margin-bottom: 10px; }
.rc-cand {
  display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; align-items: center;
  width: 100%; text-align: left; min-height: 52px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 6px; background: transparent;
}
.rc-cand:hover { background: #262a31; }
.rc-cand[aria-pressed=true] { border-color: var(--accent); background: #33262400; box-shadow: inset 0 0 0 1px #6b4740; }
.rc-cand-name { font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-cand-reason { grid-column: 2; font: 500 9px/1 Plex, monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.rc-cand-bar { grid-column: 1 / -1; height: 3px; border-radius: 2px; background: #2f333a; overflow: hidden; }
.rc-cand-bar i { display: block; height: 100%; background: var(--accent); }
.rc-cand-wait { font-size: 11px; color: var(--muted); padding: 10px 0; }

.rc-ink { display: flex; align-items: center; gap: 10px; }
.rc-ink .rc-num { flex: 1; text-transform: uppercase; }
.rc-ink button { min-height: 44px; font-size: 12px; }
.rc-ink button[aria-pressed=true] { border-color: var(--accent); color: var(--accent); }

.rc-nudge { display: flex; align-items: center; gap: 6px; }
.rc-nudge button { width: 44px; padding: 0; }
.rc-nudge .rc-num { margin-left: auto; }

.rc-apply { display: grid; gap: 8px; margin-top: 22px; }

/* ---------- type library ---------- */

.rc-library { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; margin-top: 12px; }
#library-inspector-host:empty { display: none; }
#library-section-host:empty::after {
  content: 'The library is open in the editor inspector.';
  display: block; margin-top: 20px; padding: 22px; border: 1px dashed var(--line); border-radius: 10px;
  font-size: 12.5px; color: var(--faint);
}
.rc-library-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px; border-bottom: 1px solid var(--line-soft); }
.rc-library-bar input[type=search] { flex: 1; min-width: 150px; }
.rc-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.rc-chips button { min-height: 36px; padding: 0 11px; border-radius: 20px; font-size: 11.5px; color: var(--muted); }
.rc-chips button[aria-pressed=true] { background: #45332f; color: var(--ivory); border-color: #8d5c52; }
.rc-library-move { font-size: 11.5px; color: var(--accent); min-height: 44px; display: inline-flex; align-items: center; }

.rc-library-scroll { height: 300px; overflow: auto; scrollbar-width: thin; }
.rc-library-sizer { position: relative; }
.rc-library-rows { position: absolute; left: 0; right: 0; top: 0; }
.rc-row {
  display: flex; align-items: center; gap: 12px;
  height: 56px; padding: 0 12px; border-bottom: 1px solid var(--line-soft);
}
.rc-row:hover { background: #24272d; }
.rc-row img { width: 0; height: 0; opacity: 0; flex: none; }
.rc-row-text { flex: 1; min-width: 0; display: block; }
.rc-row-name { display: block; font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-row-meta { display: block; margin-top: 3px; font: 9px/1.2 Plex, monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-row-use { flex: none; min-height: 36px; padding: 0 14px; font-size: 12px; }
.rc-row[data-active=true] { box-shadow: inset 2px 0 0 var(--accent); }
.rc-row[data-active=true] .rc-row-use { border-color: var(--accent); color: var(--accent); }
.rc-library-foot { padding: 12px; border-top: 1px solid var(--line-soft); }
.rc-upload { display: flex; align-items: center; justify-content: center; min-height: 44px; border: 1px dashed var(--line); border-radius: var(--radius); cursor: pointer; font-size: 12px; margin: 0; }
.rc-upload:hover { background: #2c3037; }

#type-library .rc-library { margin-top: 20px; }
#type-library .rc-library-scroll { height: 420px; }
#type-library .rc-row img { width: 156px; height: 26px; opacity: .85; border-radius: 3px; }

/* ---------- landing sections ---------- */

.rc-section { margin-top: 72px; }
.rc-section-head h2 { font: 500 clamp(24px, 2.4vw, 32px)/1.2 Manrope, sans-serif; letter-spacing: -.03em; margin: 0 0 10px; }
.rc-section-lead { font-size: 14px; line-height: 1.7; color: var(--muted); max-width: 620px; margin: 0; }

.rc-guide-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: start; }
.rc-guide-film video { width: 100%; border: 1px solid var(--line); border-radius: 8px; display: block; background: #000; }
.rc-guide-film .micro { margin: 10px 0 0; }
.rc-guide-grid h2 { font: 500 clamp(24px, 2.4vw, 32px)/1.2 Manrope, sans-serif; letter-spacing: -.03em; margin: 0 0 24px; }
.rc-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.rc-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 0 10px; }
.rc-steps .rc-num { color: var(--accent); padding-top: 3px; }
.rc-steps h3 { font: 600 13.5px/1.4 Manrope, sans-serif; margin: 0 0 6px; }
.rc-steps p { font-size: 12.5px; line-height: 1.65; color: var(--muted); margin: 0; }

.rc-why { margin-top: 56px; padding: 26px 28px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); max-width: 860px; }
.rc-why h3 { font: 500 20px/1.3 Manrope, sans-serif; letter-spacing: -.02em; margin: 8px 0 12px; }
.rc-why p { font-size: 13.5px; line-height: 1.75; color: var(--muted); margin: 0; }

.rc-features { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; }
.rc-features li { background: var(--bg); padding: 20px 18px; }
.rc-features h4 { font: 600 12.5px/1.4 Manrope, sans-serif; margin: 0 0 7px; }
.rc-features p { font-size: 11.5px; line-height: 1.6; color: var(--muted); margin: 0; }

/* ---------- overlays and dialogs ---------- */

#busy { position: fixed; inset: 0; z-index: 140; display: grid; place-items: center; background: #0f1116d6; }
.busy-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 30px 34px; max-width: 90vw; }
.busy-card strong { display: block; font-size: 14px; }
.busy-card p { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.spinner { display: block; width: 20px; height: 20px; margin-bottom: 18px; border: 2px solid #6b4a43; border-top-color: #e0c7bf; border-radius: 50%; animation: rc-spin .8s linear infinite; }
@keyframes rc-spin { to { transform: rotate(360deg); } }

.rc-dialog {
  width: min(520px, calc(100% - 32px)); max-height: 85vh; overflow: auto; padding: 24px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ivory);
}
.rc-dialog::backdrop { background: #0b0d10c4; }
.rc-dialog h2 { font: 600 19px/1.3 Manrope, sans-serif; letter-spacing: -.02em; margin: 0 0 6px; }
.rc-radios { display: grid; gap: 8px; margin: 18px 0 14px; }
.rc-radio { display: flex; gap: 11px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; margin: 0; }
.rc-radio:hover { background: #262a31; }
.rc-radio input { margin: 3px 0 0; }
.rc-radio > span { flex: 1; min-width: 0; }
.rc-radio strong { display: block; font-size: 13px; }
.rc-radio > span > span { display: block; font-size: 11.5px; line-height: 1.55; color: var(--muted); margin-top: 3px; }
.rc-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.rc-review-list { display: grid; gap: 7px; margin: 16px 0; }
.rc-review-list button { width: 100%; text-align: left; font-size: 12px; white-space: normal; padding: 11px 12px; }

/* ---------- responsive ---------- */

@media (max-width: 1280px) {
  :root { --rail: 206px; --insp: 288px; }
  .rc-features { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1040px) {
  :root { --insp: 272px; }
  .recast-main { width: calc(100% - 48px); }
  .rc-seg button { padding: 0 9px; font-size: 11.5px; }
  .rc-stage-bar { gap: 8px; padding: 9px 10px; }
  .rc-guide-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 760px) {
  .recast-main { width: calc(100% - 32px); }
  .rc-bench { border-radius: 10px; }
  .rc-bench-top { flex-wrap: wrap; padding: 9px 10px; gap: 8px; }
  .rc-doc { order: 1; flex: 1 1 100%; }
  .rc-rail-toggle { order: 0; }
  .rc-pager { order: 2; }
  .rc-top-actions { order: 3; margin-left: auto; }
  .rc-top-actions .rc-history { display: none; }

  .rc-bench-body, .rc-bench-body.rail-open, .rc-bench-body.rail-collapsed {
    display: flex; flex-direction: column; height: auto; min-height: 0;
  }
  .rc-bench-body .rc-stage { order: 0; }
  .rc-bench-body.rail-open .rc-rail {
    display: flex; order: 1; border-right: 0; border-top: 1px solid var(--line);
  }
  .rc-rail-block { padding: 12px 13px; }
  .rc-thumbs { max-height: none; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .rc-thumb { flex: none; width: 76px; }
  .rc-text-list { height: 200px; flex: none; }
  .rc-viewport { min-height: 380px; }
  .rc-stage-bar { padding: 8px 10px; }
  .rc-seg button { padding: 0 9px; font-size: 11.5px; }
  .rc-zoom #zoom-fit, .rc-zoom #zoom-100 { display: none; }
  .rc-statusbar { font-size: 10px; gap: 7px; padding: 8px 10px; }
  .rc-status-name { max-width: 120px; }
  .rc-privacy { margin-left: auto; }

  .rc-inspector {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
    max-height: 72vh; border: 1px solid var(--line); border-bottom: 0;
    border-radius: 14px 14px 0 0; padding: 8px 16px 26px;
    background: #1d2025; box-shadow: 0 -16px 50px #00000080;
    transform: translateY(102%);
    transition: transform var(--slow) var(--ease);
    overscroll-behavior: contain;
  }
  .rc-inspector.is-open { transform: translateY(0); }
  .rc-inspector .rc-empty { display: none; }
  .rc-sheet-handle { display: block; width: 42px; height: 4px; border-radius: 3px; background: #4a4e57; margin: 4px auto 12px; }
  .rc-sheet-close { display: inline-flex; align-items: center; justify-content: center; width: 44px; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--muted); }

  .rc-library-scroll, #type-library .rc-library-scroll { height: 280px; }
  #type-library .rc-row img { width: 108px; }
  .rc-section { margin-top: 48px; }
  .rc-why { padding: 20px; margin-top: 36px; }
  .rc-features { grid-template-columns: 1fr; }
}

/* Narrow chrome: the document line and pager share a row, actions take the next. */
@media (max-width: 480px) {
  .rc-doc { order: 1; flex: 1 1 50%; }
  .rc-pager { order: 2; }
  .rc-pager .rc-num { min-width: 40px; }
  .rc-top-actions { order: 3; flex: 1 1 100%; margin-left: 0; }
  .rc-top-actions .rc-primary { flex: 1; }
  #undo, #redo { width: 44px; padding: 0; font-size: 0; }
  #undo::after { content: '\0021B6'; font-size: 16px; }
  #redo::after { content: '\0021B7'; font-size: 16px; }
}

@media (max-width: 380px) {
  .recast-main { width: calc(100% - 24px); }
  .rc-grid2 { grid-template-columns: 1fr; }
  .rc-doc-kind { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* comparison section */
.compare{width:min(1440px,calc(100% - 80px));margin:64px auto 0;font-family:var(--da-font)}
.compare h2{font:600 clamp(24px,2.4vw,32px)/1.15 var(--da-font);letter-spacing:-.03em;margin:0 0 10px}
.compare>p{font:400 15px/1.65 var(--da-font);color:var(--da-muted);max-width:720px;margin:0 0 22px}
.table-scroll{overflow-x:auto;border:1px solid var(--da-line);border-radius:7px;scrollbar-width:thin}
.compare table{border-collapse:collapse;min-width:1120px;width:100%;font-size:13px;line-height:1.5}
.compare th,.compare td{padding:12px 14px;border-bottom:1px solid var(--da-line);vertical-align:top;text-align:left}
.compare thead th{font:600 12px/1.3 var(--da-font);letter-spacing:.02em;background:var(--da-surface);position:sticky;top:0}
.compare thead th:nth-child(2),.compare tbody td:first-of-type{background:rgba(217,140,132,.08)}
.compare tbody th{font:600 13px/1.4 var(--da-font);white-space:nowrap;color:var(--da-ink)}
.compare tbody td{color:#d7d5cf;max-width:260px}
.compare tfoot td,.compare-note{font:400 11px/1.5 var(--da-mono);color:var(--da-muted)}
.compare details{margin-top:14px;font-size:12px;color:var(--da-muted)}
.compare details summary{cursor:pointer;min-height:32px;line-height:32px}
.compare details a{color:var(--da-ink);overflow-wrap:anywhere}
.compare details ul{margin:6px 0 0;padding-left:18px}
@media(max-width:760px){.compare{width:calc(100% - 32px);margin-top:42px}}
