:root {
  --ink: #0d2346;
  --ink-soft: #31445f;
  --muted: #68778b;
  --muted-light: #96a1af;
  --line: #dfe6ef;
  --line-dark: #d2ddea;
  --canvas: #f3f7fc;
  --surface: #ffffff;
  --surface-soft: #fafbfc;
  --accent: #16305c;
  --accent-dark: #0d2346;
  --accent-soft: #eaf1fa;
  --green: #2f7962;
  --green-soft: #eaf5f0;
  --amber: #b8873b;
  --amber-soft: #f5efe4;
  --rose: #a35268;
  --rose-soft: #faedf1;
  --blue: #315e9b;
  --blue-soft: #eaf1fa;
  --violet: #7557a5;
  --violet-soft: #f3eef9;
  --shadow-sm: 0 1px 2px rgba(18, 28, 45, 0.04);
  --shadow-md: 0 14px 40px rgba(28, 38, 56, 0.1);
  --sidebar-width: 232px;
}

/* Realistic sample document and first-visit interactive guide */
.sample-demo-file { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; margin: 18px 0; padding: 13px 15px; border: 1px solid #d7e2ef; border-radius: 12px; background: linear-gradient(135deg, #f7faff, #fff); box-shadow: 0 9px 24px rgba(22, 48, 92, .06); }
.sample-file-type { grid-row: 1 / 3; display: grid; width: 48px; height: 56px; place-items: center; border-radius: 8px; background: var(--accent); color: #fff; font-size: 0.50000rem; font-weight: 900; letter-spacing: .08em; }
.sample-demo-file > div { min-width: 0; }.sample-demo-file > div strong, .sample-demo-file > div small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.sample-demo-file > div strong { color: var(--accent-dark); font-size: 0.81250rem; }.sample-demo-file > div small { margin-top: 5px; color: var(--muted); font-size: 0.68750rem; }
.sample-demo-file ol { display: flex; gap: 5px; margin: 0; padding: 0; list-style: none; }.sample-demo-file li { position: relative; padding: 6px 8px 6px 20px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: 0.62500rem; font-weight: 750; }.sample-demo-file li::before { content: "✓"; position: absolute; left: 8px; }.sample-demo-file > em { grid-column: 2 / 4; color: #8290a0; font-size: 0.62500rem; font-style: normal; }
.sample-demo-file.is-tour-processing li { animation: proof-pipeline 480ms ease both; }.sample-demo-file.is-tour-processing li:nth-child(2) { animation-delay: 140ms; }.sample-demo-file.is-tour-processing li:nth-child(3) { animation-delay: 280ms; }.sample-demo-file.is-tour-processing li:nth-child(4) { animation-delay: 420ms; }
@keyframes proof-pipeline { from { opacity: .25; transform: translateY(5px); background: #edf1f5; } to { opacity: 1; transform: none; } }
.ai-drop-zone.is-tour-upload { border-color: #5d82b0; background: #eef5fc; box-shadow: 0 0 0 4px rgba(49, 94, 155, .12); }.ai-drop-zone.is-tour-upload > svg { animation: proof-file-drop 800ms cubic-bezier(.2,.9,.2,1) both; } @keyframes proof-file-drop { from { opacity: 0; transform: translateY(-22px); } to { opacity: 1; transform: none; } }
.guided-tour { position: fixed; inset: 0; z-index: 900; pointer-events: auto; }
.tour-spotlight { position: fixed; z-index: 901; border: 1px solid rgba(255, 255, 255, .95); border-radius: 18px; box-shadow: 0 0 0 9999px rgba(5, 16, 34, .66), 0 0 0 4px rgba(255, 255, 255, .95), 0 0 0 7px rgba(72, 117, 175, .62), 0 18px 48px rgba(4, 15, 33, .24); pointer-events: none; transition: opacity 180ms ease; }
.tour-pointer { --tour-flip-x: 1; --tour-flip-y: 1; position: fixed; z-index: 902; width: 112px; height: 149px; pointer-events: none; transition: opacity 180ms ease; filter: drop-shadow(0 9px 0 rgba(4,15,33,.25)); }
.tour-pointer svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transform-origin: center; animation: tour-cursor-click 1.4s steps(2, end) infinite; }
.tour-pointer-halo { fill: #ffe27a; stroke: #ffe27a; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.tour-pointer-side { fill: #eab63d; stroke: #05070a; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.tour-pointer-arrow { fill: #f8c94b; stroke: #05070a; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
.tour-pointer-hatch { fill: none; stroke: #05070a; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.tour-replay-button { min-height: 36px; padding: 0 14px; border: 1px solid #d3deea; border-radius: 999px; flex: none; white-space: nowrap; background: #fff; color: var(--accent, #16305c); cursor: pointer; font-size: 0.75rem; font-weight: 750; transition: border-color 160ms ease, background 160ms ease; }
.tour-replay-button:hover { border-color: #aabed4; background: #f7faff; }
.tour-spotlight.is-repositioning, .tour-pointer.is-repositioning { opacity: 0 !important; transition: none; }
.tour-popover { position: fixed; z-index: 903; display: grid; gap: 14px; max-height: calc(100vh - 40px); padding: 24px; overflow: auto; border: 1px solid rgba(201, 216, 234, .9); border-radius: 20px; background: rgba(255, 255, 255, .985); box-shadow: 0 28px 80px rgba(5, 22, 48, .25), 0 2px 8px rgba(11, 34, 66, .08); pointer-events: auto; }
/* Free scrolling while the tour is open drifted the spotlight and pointer off their target; each step scrolls its target into view itself, then re-locks. */
html.tour-scroll-lock, body.tour-scroll-lock { overflow: hidden; }
.guided-tour:not([hidden]) .tour-popover { animation: tour-popover-in 280ms cubic-bezier(.2,.8,.2,1) both; }.guided-tour:not([hidden]) .tour-spotlight { animation: tour-spotlight-in 260ms ease both; }.guided-tour:not([hidden]) .tour-pointer { animation: tour-pointer-in 260ms cubic-bezier(.2,.8,.2,1) both; }
@keyframes tour-popover-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } } @keyframes tour-spotlight-in { from { opacity: 0; } to { opacity: 1; } } @keyframes tour-pointer-in { from { opacity: 0; transform: translate(-8px, -8px) scale(.82); } to { opacity: 1; transform: none; } } @keyframes tour-cursor-click { 0%, 42%, 100% { transform: scaleX(var(--tour-flip-x)) scaleY(var(--tour-flip-y)); } 50%, 56% { transform: translate(2px, 3px) scale(.94) scaleX(var(--tour-flip-x)) scaleY(var(--tour-flip-y)); } }.tour-popover > header, .tour-popover > footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }.tour-popover > header span { color: var(--accent); font-size: 0.68750rem; font-weight: 850; letter-spacing: .08em; }.tour-popover > header button { min-height: 36px; padding: 0 4px; border: 0; background: transparent; color: #6f7e90; cursor: pointer; font-size: 0.81250rem; font-weight: 650; }.tour-popover > header button:hover { color: var(--accent); }
.tour-progress { height: 3px; overflow: hidden; border-radius: 999px; background: #e3eaf3; }.tour-progress i { display: block; width: 25%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #4d79b1); transition: width 280ms ease; }.tour-step-label { margin: 0 0 -7px; color: #708195; font-size: 0.68750rem; font-weight: 750; }.tour-popover h2 { margin: 0; color: var(--accent-dark); font-size: 1.50000rem; line-height: 1.3; letter-spacing: -.035em; }.tour-description { margin: 0; color: #4f6075; font-size: 0.87500rem; line-height: 1.65; }
.tour-simulation { min-height: 112px; padding: 16px; border: 1px solid #d9e4f0; border-radius: 14px; background: linear-gradient(145deg, #f4f8fd, #edf4fb); }.tour-popover > footer { margin-top: 2px; }.tour-popover > footer button { min-height: 44px; padding: 0 17px; border: 1px solid #d3deea; border-radius: 12px; background: #fff; color: #4f6075; cursor: pointer; font-size: 0.81250rem; font-weight: 750; transition: transform 160ms ease, border-color 160ms ease, background 160ms ease; }.tour-popover > footer button:hover { border-color: #aabed4; background: #f7faff; }.tour-popover > footer button:last-child { margin-left: auto; min-width: 138px; border-color: var(--accent); background: var(--accent); color: #fff; box-shadow: 0 8px 22px rgba(22, 48, 92, .2); }.tour-popover > footer button:last-child:hover { background: #234373; transform: translateY(-1px); }.tour-popover > footer button:disabled { opacity: .42; cursor: not-allowed; transform: none; }.tour-popover button:focus-visible { outline: 3px solid rgba(49, 94, 151, .28); outline-offset: 2px; }
.tour-proof-file { display: grid; grid-template-columns: auto 1fr; gap: 7px 11px; align-items: center; }.tour-proof-file > span { grid-row: 1 / 4; display: grid; width: 48px; height: 56px; place-items: center; border-radius: 9px; background: var(--accent); color: #fff; font-size: 0.62500rem; font-weight: 850; animation: proof-file-drop 650ms ease both; }.tour-proof-file strong { overflow: hidden; color: #223a5d; font-size: 0.81250rem; text-overflow: ellipsis; white-space: nowrap; }.tour-proof-file small { color: #6a7787; font-size: 0.68750rem; }.tour-proof-file i { height: 6px; overflow: hidden; border-radius: 999px; background: #dce5ef; }.tour-proof-file i b { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--blue); animation: proof-read 1.2s ease both; } @keyframes proof-read { from { width: 0; } }
.tour-proof-pipeline { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }.tour-proof-pipeline span { display: flex; justify-content: space-between; padding: 10px; border-radius: 9px; background: #fff; color: #536276; font-size: 0.68750rem; }.tour-proof-pipeline b { color: var(--green); font-size: 0.62500rem; }
.tour-proof-diff p { margin: 0; color: #273c5a; font-size: 0.81250rem; line-height: 1.8; }.tour-proof-diff del { padding: 2px 3px; border-radius: 4px; background: #f8e4e8; color: #9b465a; text-decoration-thickness: 1px; }.tour-proof-diff ins { padding: 2px 3px; border-radius: 4px; background: #dff1e9; color: #276b54; text-decoration: none; }.tour-proof-diff small { display: block; margin-top: 10px; color: #718095; font-size: 0.68750rem; }
.tour-proof-review { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }.tour-proof-review span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: #dfeaf7; color: var(--accent); font-size: 0.68750rem; font-weight: 850; animation: proof-reviewer-in 400ms ease both; }.tour-proof-review span:nth-child(2) { animation-delay: 100ms; }.tour-proof-review span:nth-child(3) { animation-delay: 200ms; }.tour-proof-review span.meta { background: var(--amber-soft); color: #8a6224; animation-delay: 300ms; }.tour-proof-review strong, .tour-proof-review small { width: 100%; }.tour-proof-review strong { margin-top: 5px; color: var(--accent-dark); font-size: 0.81250rem; }.tour-proof-review small { color: #6b7889; font-size: 0.68750rem; } @keyframes proof-reviewer-in { from { opacity: 0; transform: scale(.65); } }

@media (max-width: 720px) {
  .sample-demo-file { grid-template-columns: auto minmax(0, 1fr); }.sample-demo-file ol { grid-column: 1 / -1; flex-wrap: wrap; }.sample-demo-file > em { grid-column: 1 / -1; }.sample-demo-file > div strong, .sample-demo-file > div small { white-space: normal; }
  .tour-spotlight { border-radius: 14px; }.tour-pointer { width: 94px; height: 125px; }.tour-popover { grid-template-rows: auto auto auto auto auto minmax(0, 1fr) auto; gap: 8px; max-height: min(54dvh, 440px); padding: 16px; overflow: hidden; border-radius: 16px; }.tour-popover h2 { font-size: 1.25000rem; line-height: 1.25; }.tour-description { font-size: 0.78125rem; line-height: 1.55; }.tour-simulation { min-height: 0; padding: 10px; overflow: auto; }.tour-popover > footer button { min-height: 44px; padding-inline: 12px; }
}
@media (max-height: 640px) { .tour-pointer { width: 94px; height: 125px; }.tour-popover { grid-template-rows: auto auto auto auto auto auto; gap: 6px; padding: 14px; }.tour-popover h2 { font-size: 1.12500rem; }.tour-description { font-size: 0.75000rem; line-height: 1.45; }.tour-simulation { display: none; } }
@media (max-height: 480px) { .tour-popover { gap: 3px; padding: 10px; }.tour-description { display: none; } }
@media (prefers-reduced-motion: reduce) { .guided-tour:not([hidden]) .tour-popover, .guided-tour:not([hidden]) .tour-spotlight, .guided-tour:not([hidden]) .tour-pointer, .tour-pointer svg, .tour-progress i, .sample-demo-file li, .ai-drop-zone.is-tour-upload > svg, .tour-proof-file > span, .tour-proof-file i b, .tour-proof-review span { animation: none; transition: none; } }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 18px; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
  font-family: Pretendard, "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.06250rem;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid rgba(184, 135, 59, 0.3);
  outline-offset: 2px;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell { min-height: 100vh; }

/* Sidebar */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 18px 18px;
  background: #fbfbfc;
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  width: max-content;
  margin: 0 7px 26px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 33px;
  height: 33px;
  position: relative;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 8px 7px;
  border-radius: 9px;
  background: var(--ink);
  transform: rotate(-2deg);
}

.brand-mark i {
  display: block;
  height: 1.5px;
  border-radius: 2px;
  background: #fff;
}
.brand-mark i:nth-child(1) { width: 12px; }
.brand-mark i:nth-child(2) { width: 18px; }
.brand-mark i:nth-child(3) { width: 14px; margin-left: 4px; }

.brand { max-width: 100%; overflow: hidden; }
.brand-copy { min-width: 0; display: grid; gap: 1px; overflow: hidden; }
.brand-copy strong { overflow: hidden; font-size: 1.31250rem; letter-spacing: -0.04em; text-overflow: ellipsis; white-space: nowrap; }
.brand-copy small { max-width: 100%; overflow: hidden; color: var(--muted-light); font-size: 0.62500rem; font-weight: 700; letter-spacing: 0.05em; text-overflow: ellipsis; white-space: nowrap; }

.new-review-button {
  width: 100%;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 9px;
  background: var(--ink);
  color: #fff;
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(23, 32, 43, 0.12);
}
.new-review-button:hover { background: #26313e; }
.new-review-button svg { width: 17px; }

.side-nav { margin-top: 26px; }
.side-nav p {
  margin: 22px 10px 8px;
  color: #a1a9b4;
  font-size: 0.75000rem;
  font-weight: 750;
  letter-spacing: 0.13em;
}
.side-nav a {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 10px;
  margin: 3px 0;
  border-radius: 8px;
  color: #596575;
  text-decoration: none;
  font-size: 1.00000rem;
  font-weight: 560;
  transition: color 160ms, background 160ms;
}
.side-nav a:hover { color: var(--ink); background: #f0f1f4; }
.side-nav a.active { color: var(--ink); background: #eceef2; font-weight: 700; }
.side-nav a svg { width: 18px; flex: 0 0 auto; }
.side-nav a span {
  min-width: 21px;
  height: 19px;
  display: grid;
  place-items: center;
  margin-left: auto;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line-dark);
  color: var(--muted);
  font-size: 0.81250rem;
  font-weight: 700;
}

.usage-card {
  padding: 13px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.usage-card > div { display: flex; justify-content: space-between; align-items: center; }
.usage-card span { color: var(--muted); font-size: 0.81250rem; }
.usage-card strong { font-size: 0.81250rem; }
.usage-card > i {
  display: block;
  height: 4px;
  margin: 10px 0 8px;
  overflow: hidden;
  border-radius: 4px;
  background: #eceef2;
}
.usage-card > i span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.usage-card button { border: 0; padding: 0; background: transparent; color: var(--accent); font-size: 0.81250rem; font-weight: 700; cursor: pointer; }
.service-card p { margin: 0; color: var(--muted); font-size: 0.68750rem; line-height: 1.5; }
.service-card.connected strong { color: var(--green); }
.service-card.connected > i span { width: 100% !important; background: var(--green); }

.account-card {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 9px 7px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  text-align: left;
  cursor: default;
}
.account-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #dfe5f1; color: #40506b; font-size: 0.81250rem; font-weight: 750; }
.account-card > span:nth-child(2) { display: grid; gap: 2px; }
.account-card strong { font-size: 0.87500rem; }
.account-card small { color: var(--muted-light); font-size: 0.75000rem; }
.logout-button { border: 0; padding: 4px; background: transparent; color: var(--muted); font-size: 0.68750rem; cursor: pointer; }
.logout-button:hover { color: #a44450; }

/* Main shell */
.main { min-height: 100vh; margin-left: var(--sidebar-width); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 18;
  height: 63px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 0.87500rem; }
.breadcrumb span, .breadcrumb b { color: var(--muted-light); font-weight: 500; }
.breadcrumb strong { font-weight: 700; }
.topbar-actions { display: flex; align-items: center; gap: 7px; }
.save-state { display: flex; align-items: center; gap: 6px; margin-right: 8px; color: var(--muted); font-size: 0.81250rem; }
.save-state i { width: 6px; height: 6px; border-radius: 50%; background: #42a47f; box-shadow: 0 0 0 3px #eaf6f1; }
.icon-button, .mobile-menu {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}
.icon-button:hover, .mobile-menu:hover { border-color: var(--line); background: var(--surface-soft); }
.icon-button svg, .mobile-menu svg { width: 18px; }
.mobile-menu { display: none; }
.top-new-button {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 5px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 0.87500rem;
  font-weight: 650;
  cursor: pointer;
}
.top-new-button svg { width: 15px; }
.top-work-button { height: 34px; display: inline-flex; align-items: center; gap: 5px; padding: 0 10px; border: 1px solid var(--line-dark); border-radius: 8px; background: #fff; color: var(--ink-soft); font-size: 0.75000rem; font-weight: 700; cursor: pointer; }
.top-work-button:hover { border-color: #b8c8dc; background: #f3f7fc; color: var(--accent); }
.top-work-button.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.top-work-button.primary:hover { background: var(--accent-dark); }
.top-work-button:disabled { cursor: default; opacity: .45; }

.page-content { max-width: 1500px; margin: 0 auto; padding: 30px 32px 55px; }

.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.eyebrow { margin: 0 0 7px; color: var(--accent); font-size: 0.75000rem; font-weight: 750; letter-spacing: 0.14em; }
.page-intro h1 { margin: 0; font-size: 2.12500rem; line-height: 1.15; letter-spacing: -0.045em; }
.intro-copy { margin: 8px 0 0; color: var(--muted); font-size: 0.93750rem; }
.intro-actions { display: flex; align-items: center; gap: 8px; }
.primary-button, .secondary-button {
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 15px;
  border-radius: 8px;
  font-size: 0.87500rem;
  font-weight: 650;
  cursor: pointer;
}
.primary-button { border: 1px solid var(--accent); background: var(--accent); color: #fff; }
.primary-button:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.secondary-button { border: 1px solid var(--line-dark); background: var(--surface); color: var(--ink-soft); }
.secondary-button:hover { border-color: #c8ced7; background: var(--surface-soft); }
.primary-button svg, .secondary-button svg { width: 16px; }

/* Interactive feature sample inside the existing workspace */
.workspace-login-button { height: 34px; padding: 0 13px; border: 1px solid var(--line-dark); border-radius: 8px; background: #fff; color: var(--ink-soft); font-size: 0.81250rem; font-weight: 750; cursor: pointer; }
.workspace-login-button:hover { border-color: #bfc5d0; background: var(--surface-soft); }
.workspace-login-button[hidden] { display: none; }
.guest-workspace .save-state { display: none; }
.workspace-sample { margin-top: 22px; overflow: hidden; border: 1px solid #dfe2eb; border-radius: 14px; background: #fff; box-shadow: 0 12px 34px rgba(24, 34, 49, .07); }
.workspace-sample-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 23px 24px 20px; }
.workspace-sample-heading .eyebrow { margin-bottom: 8px; }
.workspace-sample-heading h2 { margin: 0; font-size: 1.43750rem; letter-spacing: -.035em; }
.workspace-sample-heading p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 0.81250rem; line-height: 1.6; }
.sample-data-badge { flex: 0 0 auto; min-height: 27px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: 0.68750rem; font-weight: 750; }
.sample-feature-tabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 0 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fafbfc; }
.sample-feature-tabs button { min-width: 0; min-height: 50px; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 7px 8px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font-size: 0.75000rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.sample-feature-tabs button:hover { color: var(--ink); background: #f5f6fa; }
.sample-feature-tabs button.active { border-bottom-color: var(--accent); background: #fff; color: var(--accent); }
.sample-feature-tabs button span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; background: #eef0f4; color: #7c8794; font-size: 0.56250rem; }
.sample-feature-tabs button.active span { background: var(--accent-soft); color: var(--accent); }
.sample-feature-panel { padding: 19px 20px 21px; outline: none; }
.sample-feature-panel:focus-visible { box-shadow: inset 0 0 0 3px rgba(22, 48, 92, .16); }
.sample-process-bar { min-height: 38px; display: flex; align-items: center; justify-content: center; gap: 15px; margin-bottom: 14px; padding: 6px 12px; border-radius: 9px; background: #f5f6fa; color: var(--muted); font-size: 0.68750rem; }
.sample-process-bar span { display: inline-flex; align-items: center; gap: 6px; }
.sample-process-bar i { width: 19px; height: 19px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--accent); font-size: 0.56250rem; font-style: normal; font-weight: 800; box-shadow: 0 0 0 1px var(--line); }
.sample-process-bar strong { color: var(--ink-soft); font-size: inherit; }
.sample-process-bar b { color: #b0b7c1; font-weight: 500; }
.sample-compare-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(250px, .78fr); gap: 11px; }
.sample-compare-grid[hidden], .sample-review-example[hidden] { display: none; }
.sample-diff-legend { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 14px; color: var(--muted); font-size: 0.56250rem; font-weight: 700; }
.sample-diff-legend[hidden] { display: none; }
.sample-diff-legend span { display: inline-flex; align-items: center; gap: 5px; }
.sample-diff-legend i { width: 16px; height: 7px; border-radius: 2px; }
.sample-diff-legend i.removed { background: #fde2e2; box-shadow: inset 0 -1px #c85c5c; }
.sample-diff-legend i.added { background: #dce9fb; box-shadow: inset 0 -1px #315e9b; }
.sample-change { margin: 0 -1px; padding: 1px 2px; border-radius: 3px; color: inherit; }
.sample-change.removed { background: #fde2e2; box-shadow: inset 0 -1px #c85c5c; text-decoration: line-through; text-decoration-color: #b74b4b; }
.sample-change.added { background: #dce9fb; box-shadow: inset 0 -1px #315e9b; }
.sample-document, .sample-rationale { min-width: 0; min-height: 195px; margin: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.sample-document > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px; border-bottom: 1px solid var(--line); background: #fafbfc; }
.sample-document header span { color: var(--muted-light); font-size: 0.56250rem; font-weight: 850; letter-spacing: .1em; }
.sample-document header strong { font-size: 0.75000rem; }
.sample-document p { margin: 0; padding: 19px 18px; color: #384555; font-family: Georgia, "Times New Roman", "Noto Serif KR", serif; font-size: 0.93750rem; line-height: 1.9; word-break: keep-all; }
.sample-document.before p { color: #616b78; }
.sample-document.after { border-color: #cfe4db; background: #fbfefd; }
.sample-document.after > header { background: #f3faf7; }
.sample-document.after header span, .sample-document.after header strong { color: var(--green); }
.sample-rationale { padding: 14px; background: #fafbfc; }
.sample-rationale > header { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 9px; align-items: center; }
.sample-rationale header > div { min-width: 0; display: grid; gap: 3px; }
.sample-rationale header strong { font-size: 0.75000rem; }
.sample-rationale header small { color: var(--muted); font-size: 0.62500rem; line-height: 1.4; }
.sample-rationale ul { display: grid; gap: 7px; margin: 14px 0 0; padding: 0 0 0 17px; color: #536071; font-size: 0.68750rem; line-height: 1.5; }
.sample-checks { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line); }
.sample-checks span { display: inline-flex; align-items: center; gap: 4px; padding: 5px 7px; border-radius: 6px; background: #fff; color: var(--muted); font-size: 0.56250rem; }
.sample-checks i { color: var(--green); font-style: normal; font-weight: 850; }
.sample-review-example { display: grid; grid-template-columns: minmax(240px, .68fr) minmax(0, 1.32fr); gap: 12px; }
.sample-review-input { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(170px, .35fr) minmax(0, 1fr); align-items: stretch; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.sample-review-input header { display: grid; align-content: center; gap: 5px; padding: 12px 14px; border-right: 1px solid var(--line); background: #f3f7fc; }
.sample-review-input header span { color: var(--accent); font-size: 0.50000rem; font-weight: 850; letter-spacing: .1em; }
.sample-review-input header strong { font-size: 0.68750rem; }
.sample-review-input p { margin: 0; padding: 12px 14px; color: #536071; font-size: 0.62500rem; line-height: 1.6; }
.sample-reviewers { display: grid; gap: 7px; }
.sample-reviewers article { min-height: 58px; display: grid; grid-template-columns: 31px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 9px 11px; border: 1px solid #d8e8e1; border-radius: 9px; background: #f7fbf9; }
.sample-reviewers article.meta { border-color: #cbd8e8; border-style: dashed; background: #f6f9fd; }
.sample-reviewers article > span { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 7px; background: var(--green-soft); color: var(--green); font-size: 0.62500rem; font-weight: 850; }
.sample-reviewers article.meta > span { background: var(--accent-soft); color: var(--accent); }
.sample-reviewers article > div { min-width: 0; display: grid; gap: 3px; }
.sample-reviewers strong { font-size: 0.68750rem; }
.sample-reviewers small { color: var(--muted); font-size: 0.56250rem; }
.sample-reviewers i { color: var(--green); font-size: 0.56250rem; font-style: normal; font-weight: 750; white-space: nowrap; }
.sample-review-result { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfc; }
.sample-score-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.sample-score-row > div { display: grid; grid-template-columns: 1fr auto; align-items: baseline; padding: 9px; border-radius: 7px; background: #fff; }
.sample-score-row small { grid-column: 1 / -1; color: var(--muted); font-size: 0.56250rem; }
.sample-score-row strong { margin-top: 3px; font-size: 1.25000rem; }
.sample-score-row span { color: var(--muted-light); font-size: 0.56250rem; }
.sample-decision { margin-top: 9px; padding: 12px 13px; border-left: 3px solid var(--accent); border-radius: 7px; background: #f3f3ff; }
.sample-decision span { display: block; color: var(--accent); font-size: 0.50000rem; font-weight: 850; letter-spacing: .1em; }
.sample-decision strong { display: block; margin-top: 5px; scroll-margin-block-end: 36px; font-size: 0.81250rem; }
.sample-decision p, .sample-finding-grid p { margin: 6px 0 0; color: #566273; font-size: 0.62500rem; line-height: 1.55; }
.sample-finding-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
.sample-finding-grid article { padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.sample-finding-grid strong { font-size: 0.62500rem; }
.sample-limitation { margin: 8px 0 0; color: var(--amber); font-size: 0.56250rem; line-height: 1.45; }
.workspace-sample-footer { min-height: 63px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 11px 20px; border-top: 1px solid var(--line); background: #fafbfc; }
.workspace-sample-footer p { display: grid; gap: 3px; margin: 0; }
.workspace-sample-footer strong { font-size: 0.68750rem; }
.workspace-sample-footer span { color: var(--muted); font-size: 0.62500rem; line-height: 1.4; }
.workspace-sample-footer button { min-height: 37px; padding: 0 15px; border: 0; border-radius: 8px; background: var(--ink); color: #fff; font-size: 0.75000rem; font-weight: 750; cursor: pointer; white-space: nowrap; }
.workspace-sample-footer button:hover { background: #26313e; }

/* Summary */
.summary-strip {
  min-height: 92px;
  display: grid;
  grid-template-columns: repeat(4, minmax(125px, 1fr)) minmax(190px, 1.25fr);
  align-items: stretch;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.summary-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 19px 17px;
  position: relative;
}
.summary-item::after { content: ""; position: absolute; top: 20px; right: 0; bottom: 20px; width: 1px; background: var(--line); }
.summary-icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; }
.summary-icon svg { width: 17px; }
.summary-icon.waiting { background: #f2f3f5; color: #677282; }
.summary-icon.editing { background: var(--accent-soft); color: var(--accent); }
.summary-icon.review { background: var(--amber-soft); color: var(--amber); }
.summary-icon.complete { background: var(--green-soft); color: var(--green); }
.summary-item > div { display: grid; gap: 3px; }
.summary-item small { color: var(--muted); font-size: 0.81250rem; }
.summary-item strong { font-size: 1.62500rem; line-height: 1; letter-spacing: -0.04em; }
.summary-quality { display: grid; grid-template-columns: 1fr auto; align-content: center; gap: 3px 10px; padding: 16px 20px; background: #fbfbfd; border-radius: 0 11px 11px 0; }
.summary-quality > span { align-self: end; color: var(--muted); font-size: 0.81250rem; }
.summary-quality > strong { grid-row: 1 / 3; grid-column: 2; align-self: center; color: var(--green); font-size: 1.87500rem; letter-spacing: -0.05em; }
.summary-quality > strong small { font-size: 0.87500rem; }
.summary-quality p { margin: 0; color: var(--green); font-size: 0.75000rem; }
.summary-quality p i { display: inline-block; width: 5px; height: 5px; margin-right: 4px; border-radius: 50%; background: #52a586; }

/* Queue and details */
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  margin-top: 16px;
}
.queue-card, .detail-panel { border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow-sm); }
.queue-card { min-width: 0; overflow: hidden; }
.queue-heading {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}
.queue-heading h2 { display: inline; margin: 0; font-size: 1.06250rem; letter-spacing: -0.02em; }
.queue-heading p { display: inline; margin: 0 0 0 7px; color: var(--muted-light); font-size: 0.81250rem; }
.compact-add { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); cursor: pointer; }
.compact-add:hover { border-color: var(--accent); color: var(--accent); }
.compact-add svg { width: 14px; }

.queue-toolbar { min-height: 57px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 15px; border-bottom: 1px solid var(--line); }
.language-tabs { display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 8px; background: #f3f4f6; }
.language-tabs button { height: 27px; padding: 0 9px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 0.81250rem; cursor: pointer; white-space: nowrap; }
.language-tabs button span { margin-left: 3px; color: #a0a8b2; font-size: 0.75000rem; }
.language-tabs button.active { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(22, 32, 46, 0.1); }
.queue-tools { display: flex; gap: 6px; }
.search-field { width: 165px; height: 31px; display: flex; align-items: center; gap: 6px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.search-field:focus-within { border-color: #9eb3cf; box-shadow: 0 0 0 3px rgba(22, 48, 92, 0.08); }
.search-field svg { width: 14px; color: #8a94a1; flex: 0 0 auto; }
.search-field input { width: 100%; min-width: 0; border: 0; outline: 0; padding: 0; background: transparent; color: var(--ink); font-size: 0.81250rem; }
.search-field input::placeholder { color: #aab0b8; }
.filter-select { height: 31px; position: relative; display: flex; align-items: center; }
.filter-select select { height: 100%; min-width: 91px; appearance: none; padding: 0 25px 0 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink-soft); font-size: 0.81250rem; outline: 0; cursor: pointer; }
.filter-select svg { width: 13px; position: absolute; right: 7px; pointer-events: none; color: #7d8794; }

.table-wrap { min-height: 452px; overflow-x: auto; }
.table-wrap:focus-visible { outline: 3px solid rgba(22, 48, 92, .22); outline-offset: -3px; }
.table-scroll-hint { display: none; }
.manuscript-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.manuscript-table th { height: 37px; padding: 0 9px; background: #fafbfc; border-bottom: 1px solid var(--line); color: #9099a5; font-size: 0.75000rem; font-weight: 650; text-align: left; letter-spacing: 0.015em; }
.manuscript-table th:first-child { width: 31%; padding-left: 18px; }
.manuscript-table th:nth-child(2) { width: 9%; }
.manuscript-table th:nth-child(3) { width: 20%; }
.manuscript-table th:nth-child(4) { width: 17%; }
.manuscript-table th:nth-child(5) { width: 13%; }
.manuscript-table th:last-child { width: 36px; }
.manuscript-table td { height: 68px; padding: 0 9px; border-bottom: 1px solid #edf0f3; vertical-align: middle; }
.manuscript-table td:first-child { padding-left: 18px; }
.manuscript-table tbody tr { transition: background 140ms; }
.manuscript-table tbody tr:hover { background: #fafbfe; }
.manuscript-table tbody tr.selected { background: #f6f7ff; box-shadow: inset 2px 0 var(--accent); }
.manuscript-table tbody tr.processing { background: #f6f9fd; }
.manuscript-table tbody tr.processing:hover { background: #f6f9fd; }
.manuscript-table tbody tr:last-child td { border-bottom: 0; }

.manuscript-cell { min-width: 0; display: flex; align-items: center; gap: 10px; }
.file-type-icon { width: 31px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; position: relative; border: 1px solid #dfe3e9; border-radius: 5px; background: #f7f8fa; color: #687485; font-size: 0.62500rem; font-weight: 800; }
.file-type-icon::after { content: ""; position: absolute; top: -1px; right: -1px; width: 7px; height: 7px; background: linear-gradient(225deg, var(--surface) 48%, #dfe3e9 50%, #f1f3f6 54%); border-radius: 0 4px 0 0; }
.manuscript-copy { min-width: 0; }
.manuscript-title { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 0; padding: 0; background: transparent; color: var(--ink); font-size: 0.87500rem; font-weight: 680; text-align: left; cursor: pointer; }
.manuscript-title:hover { color: var(--accent); }
.manuscript-copy small { display: block; max-width: 100%; margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #97a0ab; font-size: 0.75000rem; }

.language-badge { display: inline-flex; align-items: center; gap: 4px; color: #536070; font-size: 0.75000rem; font-weight: 650; white-space: nowrap; }
.language-badge i { width: 5px; height: 5px; border-radius: 50%; background: #8d9bae; }
.language-badge.ko i { background: #5678b7; }
.language-badge.en i { background: #8161aa; }
.language-badge.mixed i { background: #bf8057; }
.language-badge.pending { color: var(--accent); }
.language-badge.pending i { background: var(--accent); animation: aiPulse 1.1s ease-in-out infinite; }
.scope-tags { display: flex; flex-wrap: wrap; gap: 3px; }
.scope-tag, .detail-tag { display: inline-flex; align-items: center; border: 1px solid transparent; border-radius: 6px; max-width: 100%; overflow-wrap: anywhere; }
.scope-tag { min-height: 19px; padding: 2px 6px; line-height: 1.4; font-size: 0.68750rem; font-weight: 650; }
.scope-tag.grammar { background: var(--blue-soft); color: var(--blue); border-color: #ddebf5; }
.scope-tag.style { background: var(--violet-soft); color: var(--violet); border-color: #e7ddf2; }
.scope-tag.logic { background: var(--amber-soft); color: var(--amber); border-color: #f4e8ca; }
.scope-tag.ai { background: var(--rose-soft); color: var(--rose); border-color: #f1dde4; }
.scope-more { color: var(--muted-light); font-size: 0.68750rem; }

.status-button {
  height: 25px;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid var(--status-border);
  border-radius: 13px;
  background: var(--status-bg);
  color: var(--status-fg);
  font-size: 0.75000rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.status-button i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.75; }
.status-button svg { width: 10px; margin-left: 1px; }
.status-button:hover { filter: brightness(0.98); }
.status-button.processing { --status-border: #d6d9f5; --status-bg: #f4f4ff; --status-fg: var(--accent); cursor: wait; }
.status-button.processing i { animation: aiPulse 1.1s ease-in-out infinite; }
.updated-cell { color: #87919e; font-size: 0.75000rem; line-height: 1.45; }
.updated-cell strong { display: block; color: #5d6876; font-weight: 600; }
.row-analysis { min-width: 64px; min-height: 34px; padding: 0 12px; border: 1px solid #cedaE8; border-radius: 7px; background: #f6f9fd; color: var(--accent); font-size: 0.75000rem; font-weight: 750; cursor: pointer; }
.row-analysis:hover { border-color: var(--accent); background: var(--accent-soft); }
.row-analysis:disabled, .row-analysis.processing { cursor: wait; border-color: #dfe1f0; background: #f2f3f8; color: #7d84ba; opacity: 1; }
.row-processing { display: inline-flex; align-items: center; gap: 5px; margin-left: 6px; color: var(--accent); font-weight: 700; }
.row-processing i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--accent); animation: aiPulse 1.1s ease-in-out infinite; }
.pending-upload .manuscript-title { color: #4853ba; cursor: wait; }

.empty-state { min-height: 330px; display: grid; place-content: center; justify-items: center; text-align: center; }
.empty-state[hidden] { display: none; }
.empty-state > span { width: 40px; height: 40px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 50%; background: #f1f2f5; color: #7d8794; font-size: 1.50000rem; }
.empty-state strong { font-size: 1.00000rem; }
.empty-state p { margin: 5px 0 0; color: var(--muted); font-size: 0.81250rem; }

/* Detail panel */
.detail-panel { position: sticky; top: 16px; overflow: hidden; }
.detail-header { display: grid; grid-template-columns: 38px 1fr 26px; gap: 10px; align-items: start; padding: 17px; border-bottom: 1px solid var(--line); }
.detail-file-icon { width: 36px; height: 42px; display: grid; place-items: center; position: relative; border: 1px solid #dce1e7; border-radius: 5px; background: #f6f7f9; color: #657182; font-size: 0.62500rem; font-weight: 800; }
.detail-file-icon::after { content: ""; position: absolute; top: -1px; right: -1px; border-style: solid; border-width: 0 0 8px 8px; border-color: transparent transparent #dce1e7 transparent; }
.detail-title-wrap { min-width: 0; }
.detail-label { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.detail-label span { color: var(--accent); font-size: 0.68750rem; font-weight: 750; letter-spacing: 0.04em; }
.detail-label i { color: #9aa2ad; font-size: 0.68750rem; font-style: normal; white-space: nowrap; }
.detail-title-wrap h2 { margin: 5px 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.93750rem; letter-spacing: -0.025em; }
.detail-title-wrap p { margin: 0; color: var(--muted); font-size: 0.68750rem; }
.detail-more { width: 26px; height: 25px; border: 0; border-radius: 6px; background: transparent; color: #89929e; font-size: 0.81250rem; cursor: pointer; }
.detail-more:hover { background: #f1f2f5; }
.detail-tags { min-height: 38px; display: flex; align-items: center; gap: 5px; padding: 8px 17px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.detail-files { padding: 11px 17px; border-bottom: 1px solid var(--line); }
.inline-upload { color: var(--accent); font-size: 0.68750rem; font-weight: 700; cursor: pointer; }
.inline-upload input, .steer-file input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.detail-file-list { display: grid; gap: 5px; margin-top: 8px; }
.detail-file-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 6px; background: #f7f8fa; font-size: 0.68750rem; }
.detail-file-item a { overflow: hidden; color: #596574; text-overflow: ellipsis; white-space: nowrap; }
.detail-file-item span { color: var(--muted-light); }
.detail-file-item button { border: 0; background: transparent; color: #a55d65; font-size: 0.87500rem; cursor: pointer; }
.detail-file-empty { margin: 0; color: var(--muted-light); font-size: 0.68750rem; }
.detail-tag { min-height: 20px; gap: 4px; padding: 2px 8px; line-height: 1.4; background: #f6f7f9; border-color: #e5e8ed; color: #687484; font-size: 0.68750rem; font-weight: 650; }
.detail-tag i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.72; }

.progress-head { padding: 14px 17px 7px; }
.progress-head > div { display: flex; align-items: center; justify-content: space-between; }
.progress-head span { color: var(--muted); font-size: 0.75000rem; }
.progress-head strong { color: var(--accent); font-size: 0.75000rem; }
.progress-head > i { height: 4px; display: block; margin-top: 8px; overflow: hidden; border-radius: 4px; background: #eceef2; }
.progress-head > i span { height: 100%; display: block; border-radius: inherit; background: var(--accent); transition: width 260ms ease; }

.editing-flow { padding: 4px 17px 13px; border-bottom: 1px solid var(--line); }
.flow-step { min-height: 43px; display: grid; grid-template-columns: 25px 1fr auto; gap: 9px; align-items: center; position: relative; width: 100%; padding: 3px 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.flow-step:not(:last-child)::after { content: ""; position: absolute; left: 12px; top: 32px; height: 15px; width: 1px; background: #dfe3e9; }
.flow-index { width: 25px; height: 25px; display: grid; place-items: center; z-index: 1; border: 1px solid #dce1e7; border-radius: 50%; background: var(--surface); color: #8d96a2; font-size: 0.68750rem; font-weight: 750; }
.flow-step.complete .flow-index { border-color: #c8e3d8; background: var(--green-soft); color: var(--green); font-size: 0; }
.flow-step.complete .flow-index::after { content: "✓"; font-size: 0.75000rem; }
.flow-step.active .flow-index { border-color: var(--accent); background: var(--accent); color: #fff; box-shadow: 0 0 0 3px var(--accent-soft); }
.flow-copy { display: grid; gap: 2px; }
.flow-copy strong { color: #404b59; font-size: 0.81250rem; }
.flow-copy small { color: #929ba6; font-size: 0.68750rem; }
.flow-step.active .flow-copy strong { color: var(--accent); }
.flow-state { color: #9ba3ad; font-size: 0.68750rem; }
.flow-step.complete .flow-state { color: var(--green); }
.flow-step.active .flow-state { color: var(--accent); font-weight: 700; }

.editor-summary { padding: 13px 17px 15px; border-bottom: 1px solid var(--line); background: #fbfbfc; }
.panel-section-title { display: flex; align-items: center; justify-content: space-between; }
.panel-section-title h3 { margin: 0; font-size: 0.81250rem; }
.panel-section-title > span { padding: 2px 5px; border-radius: 4px; background: var(--green-soft); color: var(--green); font-size: 0.62500rem; font-weight: 800; letter-spacing: 0.06em; }
.panel-section-title button { border: 0; padding: 0; background: transparent; color: var(--accent); font-size: 0.68750rem; font-weight: 650; cursor: pointer; }
.summary-metrics { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 11px; }
.summary-metrics p { display: grid; gap: 3px; margin: 0; text-align: center; border-right: 1px solid var(--line); }
.summary-metrics p:last-child { border-right: 0; }
.summary-metrics strong { font-size: 1.06250rem; }
.summary-metrics span { color: var(--muted); font-size: 0.68750rem; }

.change-preview { padding: 14px 17px 10px; }
.preview-block { margin-top: 9px; padding: 9px 10px; border-radius: 7px; border: 1px solid var(--line); }
.preview-block > span { display: block; margin-bottom: 5px; color: #9aa2ad; font-size: 0.62500rem; font-weight: 750; }
.preview-block p { display: -webkit-box; margin: 0; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: #687382; font-family: Georgia, "Times New Roman", "Noto Serif KR", serif; font-size: 0.75000rem; line-height: 1.55; }
.preview-block.original { background: #fafafa; }
.preview-block.revised { background: #f3f7fc; border-color: #d6e1ee; }
.preview-block.revised > span { color: var(--accent); }
.preview-block.revised p { color: #3e4655; }
.editor-note { margin: 8px 1px 0; color: #828c99; font-size: 0.68750rem; line-height: 1.45; }
.editor-note::before { content: "E"; display: inline-grid; place-items: center; width: 15px; height: 15px; margin-right: 5px; border-radius: 50%; background: #e8eaf9; color: var(--accent); font-size: 0.62500rem; font-weight: 800; vertical-align: middle; }
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding: 12px 17px; border-bottom: 1px solid var(--line); background: #fbfbfc; }
.open-editor-button, .run-editor-button { width: 100%; height: 36px; display: flex; align-items: center; justify-content: space-between; margin: 0; padding: 0 13px; border-radius: 8px; font-size: 0.81250rem; font-weight: 650; cursor: pointer; }
.run-editor-button { justify-content: center; border: 1px solid var(--accent); background: var(--accent); color: #fff; }
.run-editor-button:hover { background: var(--accent-dark); }
.run-editor-button:disabled, .editor-actions button:disabled { cursor: wait; opacity: .55; }
.open-editor-button { border: 0; background: var(--ink); color: #fff; }
.open-editor-button:hover { background: #26313e; }
.open-editor-button svg { width: 15px; }

/* Floating status menu */
.status-menu {
  position: fixed;
  z-index: 100;
  width: 170px;
  padding: 5px;
  border: 1px solid var(--line-dark);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.status-menu[hidden] { display: none; }
.status-option {
  width: 100%;
  height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.81250rem;
  text-align: left;
  cursor: pointer;
}
.status-option:hover, .status-option:focus { background: #f4f5f7; outline: 0; }
.status-option i { width: 7px; height: 7px; border-radius: 50%; background: var(--option-color); }
.status-option b { margin-left: auto; color: var(--accent); font-size: 0.81250rem; }

/* Dialog */
dialog { color: var(--ink); }
dialog::backdrop { background: rgba(19, 27, 38, 0.48); backdrop-filter: blur(3px); }
.new-dialog { width: min(690px, calc(100% - 32px)); max-height: calc(100vh - 40px); padding: 0; overflow: auto; border: 0; border-radius: 14px; background: var(--surface); box-shadow: 0 30px 85px rgba(13, 22, 36, 0.22); }
.new-dialog form { display: block; }
.auth-dialog { width: min(470px, calc(100% - 32px)); }
.auth-body { grid-template-columns: 1fr; }
.auth-note { grid-column: 1 / -1; margin: 0; padding: 10px 11px; border-radius: 7px; background: #f4f6fa; color: var(--muted); font-size: 0.75000rem; line-height: 1.55; }
.dialog-head { display: flex; justify-content: space-between; gap: 24px; padding: 24px 26px 20px; border-bottom: 1px solid var(--line); }
.dialog-head p { margin: 0 0 6px; color: var(--accent); font-size: 0.68750rem; font-weight: 800; letter-spacing: 0.14em; }
.dialog-head h2 { margin: 0; font-size: 1.50000rem; letter-spacing: -0.04em; }
.dialog-head span { display: block; margin-top: 7px; color: var(--muted); font-size: 0.81250rem; }
.dialog-close { width: 31px; height: 31px; border: 0; border-radius: 7px; background: #f2f3f5; color: var(--muted); font-size: 1.37500rem; cursor: pointer; }
.dialog-close:hover { background: #e9ebef; color: var(--ink); }
.dialog-body { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 22px 26px 24px; }
.form-field { display: grid; gap: 7px; }
.form-field.wide, .scope-field.wide, .upload-field.wide { grid-column: 1 / -1; }
.form-field > span, .scope-field legend { color: #45515f; font-size: 0.81250rem; font-weight: 700; }
.form-field input, .form-field select { width: 100%; height: 40px; padding: 0 11px; border: 1px solid var(--line-dark); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 0.87500rem; outline: 0; }
.form-field input:focus, .form-field select:focus { border-color: #9eb3cf; box-shadow: 0 0 0 3px rgba(22, 48, 92, 0.08); }
.scope-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.scope-field legend { margin-bottom: 8px; }
.scope-field > div { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.scope-field label { position: relative; cursor: pointer; }
.scope-field input { position: absolute; opacity: 0; pointer-events: none; }
.scope-field label > span { min-height: 54px; display: grid; grid-template-columns: 8px 1fr; grid-template-rows: auto auto; align-content: center; column-gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fbfbfc; }
.scope-field input:checked + span { border-color: #c7d5e5; background: #f6f9fd; box-shadow: inset 0 0 0 1px #e4ebf4; }
.scope-field input:focus-visible + span { outline: 3px solid rgba(22, 48, 92, 0.2); outline-offset: 2px; }
.scope-field .scope-dot { grid-row: 1 / 3; align-self: center; width: 7px; height: 7px; border-radius: 50%; }
.scope-dot.grammar { background: var(--blue); }.scope-dot.style { background: var(--violet); }.scope-dot.logic { background: var(--amber); }.scope-dot.ai { background: var(--rose); }
.scope-field strong { font-size: 0.81250rem; }
.scope-field small { color: var(--muted); font-size: 0.68750rem; }
.upload-field { min-height: 98px; display: grid; place-items: center; align-content: center; gap: 3px; border: 1px dashed #cfd5dd; border-radius: 9px; background: #fafbfc; cursor: pointer; }
.upload-field:hover { border-color: #aeb4ef; background: #f9f9ff; }
.upload-field input { position: absolute; opacity: 0; pointer-events: none; }
.upload-field svg { width: 20px; margin-bottom: 4px; color: var(--accent); }
.upload-field strong { color: #4f5b69; font-size: 0.81250rem; }
.upload-field small { color: #9aa2ad; font-size: 0.68750rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 15px 26px; border-top: 1px solid var(--line); background: #fafbfc; }

/* Full editor */
.editor-dialog { width: calc(100vw - 26px); max-width: none; height: calc(100vh - 26px); max-height: none; margin: 13px; padding: 0; overflow: hidden; overscroll-behavior: contain; border: 0; border-radius: 12px; background: var(--canvas); box-shadow: 0 25px 90px rgba(10, 18, 31, 0.3); }
.editor-shell { min-height: 0; height: 100%; display: grid; grid-template-rows: 58px minmax(0, 1fr); }
.editor-topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 17px; border-bottom: 1px solid var(--line); background: var(--surface); }
.editor-document { min-width: 0; display: flex; align-items: center; gap: 9px; }
.editor-close { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: #657181; cursor: pointer; }
.editor-close:hover { background: #f0f1f4; }
.editor-close svg { width: 17px; }
.editor-file-icon { width: 28px; height: 32px; display: grid; place-items: center; border: 1px solid #dfe3e8; border-radius: 5px; background: #f6f7f9; color: #687485; font-size: 0.62500rem; font-weight: 800; }
.editor-document > div { min-width: 0; display: grid; gap: 3px; }
.editor-document strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.81250rem; }
.editor-document small { color: var(--muted); font-size: 0.68750rem; }
.editor-status { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.68750rem; }
.editor-status i { width: 5px; height: 5px; border-radius: 50%; background: #42a47f; }
.editor-actions { display: flex; justify-content: flex-end; gap: 7px; }
.editor-export, .editor-complete, .editor-next { height: 32px; display: flex; align-items: center; gap: 6px; padding: 0 11px; border-radius: 7px; font-size: 0.75000rem; font-weight: 650; cursor: pointer; }
.editor-export { border: 1px solid var(--line-dark); background: var(--surface); }
.editor-export.danger { border-color: #eccfd3; color: #a44450; }
.editor-export svg { width: 14px; }
.editor-next { border: 1px solid #b9ddcf; background: #eff9f5; color: var(--green); }
.editor-next:hover { border-color: var(--green); background: var(--green-soft); }
.editor-next[hidden] { display: none; }
.editor-complete { border: 1px solid var(--accent); background: var(--accent); color: #fff; }
.editor-complete:hover { background: var(--accent-dark); }
.editor-layout { min-height: 0; height: 100%; position: relative; display: grid; grid-template-columns: 210px minmax(500px, 1fr) 255px; overflow: hidden; }
.change-connectors { position: absolute; inset: 0; z-index: 5; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.change-connectors[hidden] { display: none; }
.change-connectors path { fill: none; stroke: rgba(22, 48, 92, .72); stroke-width: 1.6; filter: drop-shadow(0 1px 1px rgba(13, 35, 70, .12)); }
.change-connectors circle { fill: #fff; stroke: var(--accent); stroke-width: 1.5; }

.editor-rail { min-height: 0; max-height: 100%; padding: 20px 15px; border-right: 1px solid var(--line); background: var(--surface); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.rail-heading { display: flex; justify-content: space-between; align-items: center; padding: 0 5px 12px; }
.rail-heading span { color: var(--muted); font-size: 0.75000rem; font-weight: 650; }
.rail-heading strong { color: var(--accent); font-size: 0.68750rem; }
.stage-guide { margin: 0 4px 13px; padding: 9px 10px; border: 1px solid #d7e1ed; border-radius: 8px; background: #f6f9fd; }
.stage-guide strong { display: block; color: var(--accent); font-size: 0.68750rem; }
.stage-guide p { margin: 4px 0 0; color: #687386; font-size: 0.62500rem; line-height: 1.5; }
.rail-stage { width: 100%; min-height: 52px; display: grid; grid-template-columns: 25px 1fr; gap: 9px; align-items: center; position: relative; padding: 4px 5px; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; }
.rail-stage:not(:last-child)::after { content: ""; position: absolute; top: 38px; bottom: -8px; left: 17px; width: 1px; background: #e0e4e9; }
.rail-stage:hover { background: #f7f8fa; }
.rail-stage.selected { background: var(--accent-soft); }
.rail-stage > span { width: 25px; height: 25px; display: grid; place-items: center; z-index: 1; border: 1px solid #d9dee5; border-radius: 50%; background: var(--surface); color: #8c96a2; font-size: 0.68750rem; font-weight: 750; }
.rail-stage.complete > span { border-color: #c8e3d8; background: var(--green-soft); color: var(--green); font-size: 0; }
.rail-stage.complete > span::after { content: "✓"; font-size: 0.75000rem; }
.rail-stage.selected > span { border-color: var(--accent); background: var(--accent); color: #fff; box-shadow: 0 0 0 3px rgba(22, 48, 92, 0.1); }
.rail-stage > div { min-width: 0; display: grid; gap: 3px; }
.rail-stage strong { font-size: 0.75000rem; }
.rail-stage small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #949da8; font-size: 0.68750rem; }
.rail-stage.selected strong { color: var(--accent); }
.principle-card { display: flex; gap: 9px; margin-top: 25px; padding: 11px; border: 1px solid #dcebe5; border-radius: 8px; background: #f4faf7; }
.principle-card svg { width: 18px; flex: 0 0 auto; color: var(--green); }
.principle-card strong { display: block; color: #376b5b; font-size: 0.68750rem; }
.principle-card p { margin: 4px 0 0; color: #6e8c82; font-size: 0.62500rem; line-height: 1.55; }

.editor-main { min-width: 0; min-height: 0; height: 100%; display: grid; grid-template-rows: auto auto auto auto minmax(0, 1fr); overflow: hidden; background: #f1f2f5; }
.editor-toolbar { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 24px; border-bottom: 1px solid var(--line); background: var(--surface); }
.editor-toolbar p { margin: 0 0 4px; color: var(--accent); font-size: 0.62500rem; font-weight: 800; letter-spacing: 0.12em; }
.editor-toolbar h2 { margin: 0; font-size: 1.25000rem; letter-spacing: -0.035em; }
.editor-toolbar > div:first-child > span { display: block; margin-top: 5px; color: var(--muted); font-size: 0.68750rem; }
.view-toggle { display: flex; padding: 3px; border-radius: 7px; background: #f1f2f5; }
.view-toggle button { height: 26px; padding: 0 9px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 0.68750rem; cursor: pointer; }
.view-toggle button.active { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(20, 30, 45, 0.1); }
.editor-live-strip { min-height: 48px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 8px 24px; border-bottom: 1px solid #d7e1ed; background: #f6f9fd; }
.editor-live-strip[hidden] { display: none; }
.editor-live-strip > span { display: flex; align-items: center; gap: 5px; color: var(--accent); font-size: 0.62500rem; font-weight: 800; letter-spacing: .08em; }
.editor-live-strip > span i { width: 7px; height: 7px; border-radius: 50%; background: #42a47f; box-shadow: 0 0 0 4px rgba(66, 164, 127, .12); animation: aiPulse 1.1s ease-in-out infinite; }
.editor-live-strip > div { min-width: 0; display: grid; gap: 2px; }
.editor-live-strip strong { font-size: 0.75000rem; }
.editor-live-strip small { overflow: hidden; color: var(--muted); font-size: 0.68750rem; text-overflow: ellipsis; white-space: nowrap; }
.editor-live-strip time { color: var(--accent); font-size: 0.75000rem; font-variant-numeric: tabular-nums; }
.editor-completion-notice { min-height: 48px; display: grid; grid-template-columns: 25px minmax(0, 1fr); gap: 9px; align-items: center; padding: 8px 22px; border-bottom: 1px solid #cfe5da; background: #f2faf6; }
.editor-completion-notice[hidden] { display: none; }
.editor-completion-notice > span { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: #fff; font-size: 0.81250rem; font-weight: 800; }
.editor-completion-notice > div { min-width: 0; display: grid; gap: 2px; }
.editor-completion-notice strong { color: #2c6855; font-size: 0.75000rem; }
.editor-completion-notice small { overflow: hidden; color: #668277; font-size: 0.68750rem; text-overflow: ellipsis; white-space: nowrap; }
.editor-pagebar { min-height: 42px; display: grid; grid-template-columns: 29px auto 29px 1fr auto; gap: 8px; align-items: center; padding: 6px 18px; border-bottom: 1px solid var(--line); background: #fbfbfc; }
.editor-pagebar > button { height: 28px; border: 1px solid var(--line-dark); border-radius: 6px; background: #fff; color: #596574; cursor: pointer; }
.editor-pagebar > button:disabled { opacity: .4; cursor: default; }
.editor-pagebar > div { min-width: 88px; display: grid; gap: 1px; text-align: center; }
.editor-pagebar strong { font-size: 0.75000rem; font-variant-numeric: tabular-nums; }
.editor-pagebar div span { max-width: 180px; overflow: hidden; color: var(--muted); font-size: 0.62500rem; text-overflow: ellipsis; white-space: nowrap; }
.editor-pagebar .draft-save-status { justify-self: end; color: var(--green); font-size: 0.68750rem; }
.editor-pagebar .draft-save-status.saving { color: var(--amber); }
.editor-pagebar .draft-save-status.error { color: #a44450; }
.editor-pagebar .manual-edit-toggle { width: auto; padding: 0 10px; border-color: #c7d5e5; color: var(--accent); font-size: 0.68750rem; font-weight: 700; }
.editor-pagebar .manual-edit-toggle.active { border-color: var(--accent); background: var(--accent); color: #fff; }
.document-compare { min-height: 0; height: 100%; display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 1px; padding: 18px; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; -webkit-overflow-scrolling: touch; }
.document-compare:focus-visible, .comment-panel:focus-visible { outline: 3px solid rgba(22, 48, 92, 0.2); outline-offset: -3px; }
.document-pane { min-width: 0; overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 4px 18px rgba(27, 38, 56, 0.05); }
.document-pane > header { height: 36px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; border-bottom: 1px solid var(--line); background: #fbfbfc; }
.document-pane > header span { font-size: 0.68750rem; font-weight: 700; }
.document-pane > header small { color: #9aa2ad; font-size: 0.62500rem; font-weight: 800; letter-spacing: 0.1em; }
.revised-pane > header span, .revised-pane > header small { color: var(--accent); }
.paper-page { min-width: 0; min-height: 460px; padding: 27px 28px 45px; overflow: hidden; }
.paper-meta { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid var(--line); color: #929ba6; font-size: 0.62500rem; }
.paper-page h3 { margin: 25px 0 18px; font-family: Georgia, "Times New Roman", "Noto Serif KR", serif; font-size: 1.06250rem; line-height: 1.45; text-align: center; }
.paper-page p { min-width: 0; max-width: 100%; margin: 0; color: #3e4957; font-family: Georgia, "Times New Roman", "Noto Serif KR", serif; font-size: 0.87500rem; line-height: 2; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; }
.paper-page p.direct-editing { min-height: 390px; padding: 11px; border: 1px solid #9eb3cf; border-radius: 7px; background: #fff; outline: none; box-shadow: 0 0 0 3px rgba(22, 48, 92, .08); cursor: text; }
.paper-page p.direct-editing:empty::before { content: "현재 페이지를 직접 수정하세요."; color: #9aa2ad; }
.paper-page mark.diff-before, .paper-page mark.diff-after, .paper-page mark.diff-rejected, .paper-page mark.diff-kept { padding: 2px 1px; border-radius: 2px; }
.paper-page mark.diff-before { background: #fff0f0; color: #874f58; text-decoration: line-through; text-decoration-color: #cf939c; }
.paper-page mark.diff-after { background: #eaf7f0; color: #256c54; box-shadow: inset 0 -1px #88c6ad; }
.paper-page mark.diff-rejected { background: #f1f3f6; color: #6c7580; box-shadow: inset 0 -1px #b7bec7; }
.paper-page mark.diff-kept { background: #fff6df; color: #765f2b; box-shadow: inset 0 -1px #d8bd78; }
.paper-page mark.change-linked { position: relative; z-index: 6; outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: 0 0 0 5px rgba(22, 48, 92, .12); }
.paper-page del { padding: 1px 2px; background: #fff0f0; color: #a56464; text-decoration-color: #dca4a4; }
.paper-page ins { padding: 1px 2px; background: #eaf7f0; color: #256c54; text-decoration: none; border-bottom: 1px solid #88c6ad; }
.document-compare.original { grid-template-columns: minmax(480px, 760px); justify-content: center; }
.document-compare.original .revised-pane { display: none; }
.document-compare.revised { grid-template-columns: minmax(480px, 760px); justify-content: center; }
.document-compare.revised .original-pane { display: none; }

.comment-panel { min-height: 0; max-height: 100%; padding: 18px 15px; border-left: 1px solid var(--line); background: var(--surface); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; -webkit-overflow-scrolling: touch; }
.comment-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; color: #536070; font-size: 0.75000rem; font-weight: 700; }
.comment-heading b { min-width: 18px; height: 18px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: 0.68750rem; }
.active-comment { padding: 12px; border: 1px solid #dfe2f6; border-radius: 9px; background: #fafaff; }
.active-comment > div { display: flex; align-items: center; gap: 8px; }
.comment-avatar { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; font-size: 0.68750rem; font-weight: 800; }
.active-comment > div p { display: grid; gap: 2px; margin: 0; }
.active-comment > div strong { font-size: 0.68750rem; }
.active-comment > div small { color: #919aa6; font-size: 0.62500rem; }
.active-comment > p { margin: 11px 0; color: #5b6675; font-size: 0.75000rem; line-height: 1.65; }
.active-comment footer { display: flex; align-items: center; justify-content: space-between; padding-top: 9px; border-top: 1px solid #e5e7f6; }
.active-comment footer span { padding: 3px 5px; border-radius: 4px; background: #eceefe; color: var(--accent); font-size: 0.62500rem; font-weight: 650; }
.active-comment footer button { border: 0; background: transparent; color: var(--muted); font-size: 0.62500rem; cursor: pointer; }
.editor-change-list { margin-top: 18px; }
.editor-change-list > div:first-child { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.editor-change-list h3 { margin: 0; color: #536070; font-size: 0.75000rem; }
.editor-change-list > div:first-child b { min-width: 18px; height: 18px; display: grid; place-items: center; border-radius: 9px; background: #eef0ff; color: var(--accent); font-size: 0.68750rem; }
#editorChanges { display: grid; gap: 8px; }
.change-card { overflow: hidden; border: 1px solid #dfe4e8; border-radius: 8px; background: #fff; }
.change-card.change-linked { position: relative; z-index: 6; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(22, 48, 92, .12), 0 7px 20px rgba(13, 35, 70, .1); }
.change-card header { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 8px; border-bottom: 1px solid var(--line); background: #fafbfc; font-size: 0.68750rem; }
.change-card header span { color: var(--muted); font-weight: 700; }
.change-card header b { color: var(--green); }
.change-decision { flex: 0 0 auto; display: grid; grid-template-columns: 1fr 1fr; padding: 2px; border: 1px solid #dfe3e8; border-radius: 7px; background: #eef0f3; }
.change-decision button { min-width: 33px; height: 23px; padding: 0 6px; border: 0; border-radius: 5px; background: transparent; color: #7d8793; font-size: 0.62500rem; font-weight: 750; cursor: pointer; }
.change-decision button.active[data-change-decision="accept"] { background: #fff; color: var(--green); box-shadow: 0 1px 3px rgba(29, 45, 39, .13); }
.change-decision button.active[data-change-decision="reject"] { background: #fff; color: #a44f5a; box-shadow: 0 1px 3px rgba(49, 32, 35, .13); }
.change-card.unselected { border-color: #e5d6d9; }
.change-card.needs-review { border-color: #e5c98e; }
.change-card .review-warning { display: block; padding: 6px 8px; background: #fff8e9; color: #866423; font-size: 0.62500rem; line-height: 1.45; }
.change-card p { min-width: 0; display: grid; gap: 3px; margin: 0; padding: 7px 8px; color: #596574; font-size: 0.68750rem; line-height: 1.55; overflow-wrap: anywhere; }
.change-card p + p { border-top: 1px dashed #e5e8ec; }
.change-card small { color: #9aa2ad; font-size: 0.62500rem; font-weight: 700; }
.change-card del, .change-card ins { text-decoration: none; }
.change-card .change-before del { color: #9a5963; text-decoration: line-through; text-decoration-color: #dda7ae; }
.change-card .change-after ins { color: #287158; }
.change-card footer { padding: 7px 8px; background: #f7f8fb; color: #687483; font-size: 0.62500rem; line-height: 1.45; }
.change-card.skipped { border-color: #ecd9c7; }
.change-card.skipped header b { color: var(--amber); }
.change-card.skipped footer { background: #fff9ef; color: #806637; }
.editor-structure-list { margin-top: 18px; }
.editor-structure-list > div:first-child { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.editor-structure-list h3 { margin: 0; color: #536070; font-size: 0.75000rem; }
.editor-structure-list > div:first-child b { min-width: 18px; height: 18px; display: grid; place-items: center; border-radius: 9px; background: #fff2df; color: #9a671b; font-size: 0.68750rem; }
#editorStructuralSuggestions { display: grid; gap: 8px; }
.structure-card { padding: 9px; border: 1px solid #e5d5b6; border-radius: 8px; background: #fffaf1; }
.structure-card header { display: flex; justify-content: space-between; gap: 7px; }
.structure-card header strong { font-size: 0.68750rem; line-height: 1.4; }
.structure-card header span { flex: 0 0 auto; color: #956518; font-size: 0.62500rem; font-weight: 800; text-transform: uppercase; }
.structure-card p { margin: 7px 0; color: #667180; font-size: 0.68750rem; line-height: 1.55; }
.structure-card small { display: block; color: #8b7654; font-size: 0.62500rem; line-height: 1.45; white-space: pre-line; }
.structure-card.resolved { border-color: #d8dde3; background: #f7f8fa; }
.structure-card.resolved.accepted { border-color: #bcdccc; background: #f2f9f6; }
.structure-card.resolved.rejected { border-color: #e5c8cd; background: #fff6f7; }
.structure-card.resolved.accepted header span { color: var(--green); }
.structure-card.resolved.rejected header span { color: #a44f5a; }
.structure-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 8px; }
.structure-actions button { min-height: 27px; border: 1px solid #dbc9a7; border-radius: 6px; background: #fff; color: #735b31; font-size: 0.62500rem; cursor: pointer; }
.structure-actions button.active[data-structure-decision="accepted"] { border-color: #68a68d; background: #eaf5f0; color: #2f7962; font-weight: 800; }
.structure-actions button.active[data-structure-decision="rejected"] { border-color: #d69ca5; background: #fff0f1; color: #9a4a55; font-weight: 800; }
.changes-empty { margin: 0; padding: 11px; border-radius: 7px; background: #f5f6f8; color: var(--muted); font-size: 0.68750rem; line-height: 1.5; }
.changes-empty.running { background: #f1f2ff; color: var(--accent); }
.check-list { margin-top: 22px; }
.check-list h3 { margin: 0 0 10px; color: #536070; font-size: 0.75000rem; }
.check-item { display: grid; grid-template-columns: 16px 1fr; gap: 7px; align-items: start; padding: 7px 0; color: #667180; font-size: 0.68750rem; line-height: 1.45; }
.check-item i { width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 0.62500rem; font-style: normal; }
.run-log { display: grid; gap: 6px; max-height: 150px; margin-top: 18px; overflow-y: auto; }
.run-log p { margin: 0; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 6px; padding: 7px 8px; border-radius: 6px; background: #f4f5f8; color: #657080; font-size: 0.68750rem; line-height: 1.45; }
.run-log time { color: #a0a8b3; font-size: 0.62500rem; font-variant-numeric: tabular-nums; }
.run-log-text { min-width: 0; white-space: pre-wrap; }
.run-log p.user { background: var(--accent-soft); color: #5058a8; }
.run-log p.error { background: #fff0f1; color: #9a4a55; }
.steer-form { display: grid; gap: 7px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.steer-form > label { color: #536070; font-size: 0.75000rem; font-weight: 700; }
.steer-form textarea { width: 100%; resize: vertical; padding: 8px; border: 1px solid var(--line-dark); border-radius: 7px; color: var(--ink); font: inherit; font-size: 0.68750rem; line-height: 1.5; outline: none; }
.steer-form textarea:focus { border-color: #9eb3cf; box-shadow: 0 0 0 3px rgba(22, 48, 92, .08); }
.steer-form > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.steer-file { color: var(--accent); font-size: 0.68750rem; font-weight: 700; cursor: pointer; }
.steer-form button { height: 29px; padding: 0 11px; border: 0; border-radius: 6px; background: var(--ink); color: #fff; font-size: 0.68750rem; cursor: pointer; }
.editor-status.running i { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.editor-status.error i { background: #c15d69; }

/* Toast */
.toast { position: fixed; z-index: 300; right: 24px; bottom: 24px; display: flex; align-items: center; gap: 9px; min-width: 260px; max-width: 380px; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line-dark); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-md); opacity: 0; pointer-events: none; transform: translateY(12px); transition: opacity 180ms, transform 180ms; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast > span { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 0.81250rem; font-weight: 800; }
.toast p { margin: 0; color: #4c5866; font-size: 0.81250rem; line-height: 1.4; }
.mobile-scrim { display: none; }

@media (max-width: 1260px) {
  :root { --sidebar-width: 210px; }
  .sidebar { padding-inline: 14px; }
  .page-content { padding-inline: 24px; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .summary-item { padding-inline: 13px; }
  .editor-layout { grid-template-columns: 190px minmax(480px, 1fr) 225px; }
  .sample-feature-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sample-feature-tabs button:nth-child(-n+3) { border-bottom-color: var(--line); }
  .sample-feature-tabs button.active { border-bottom-color: var(--accent); }
  .sample-compare-grid { grid-template-columns: 1fr 1fr; }
  .sample-rationale { grid-column: 1 / -1; min-height: 0; }
}

@media (max-width: 1060px) {
  .sidebar { transform: translateX(-100%); transition: transform 220ms ease; box-shadow: 15px 0 40px rgba(20, 30, 45, 0.12); }
  body.menu-open .sidebar { transform: translateX(0); }
  .main { margin-left: 0; }
  .mobile-menu { display: grid; }
  .breadcrumb { margin-right: auto; margin-left: 8px; }
  .mobile-scrim { position: fixed; inset: 0; z-index: 19; display: block; background: rgba(17, 25, 36, 0.38); opacity: 0; pointer-events: none; transition: opacity 220ms; }
  body.menu-open .mobile-scrim { opacity: 1; pointer-events: auto; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .editor-layout { grid-template-columns: 155px minmax(360px, 1fr) 220px; }
}

@media (max-width: 820px) {
  /* On small screens the sticky bar floated over the content while scrolling; static keeps it at the top of the page and out of the way. */
  .topbar { position: static; padding-inline: 16px; }
  .save-state, .topbar .icon-button { display: none; }
  .page-content { padding: 23px 16px 42px; }
  .page-intro { align-items: flex-start; }
  .intro-copy { max-width: 420px; line-height: 1.5; }
  .intro-actions .secondary-button { display: none; }
  .summary-strip { grid-template-columns: repeat(2, 1fr); }
  .summary-item:nth-child(2)::after, .summary-item:nth-child(4)::after { display: none; }
  .summary-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .summary-quality { grid-column: 1 / -1; border-top: 1px solid var(--line); border-radius: 0 0 11px 11px; }
  .workspace-grid { display: block; overflow: visible; }
  .queue-card { overflow: hidden; }
  .table-wrap { overflow-x: auto; }
  .manuscript-table { min-width: 720px; }
  .detail-panel { position: static; margin-top: 14px; }
  .editor-dialog { width: 100vw; height: 100vh; margin: 0; border-radius: 0; }
  .editor-topbar { grid-template-columns: 1fr auto; }
  .editor-status { display: none; }
  .editor-layout { grid-template-columns: 120px minmax(360px, 1fr) 200px; }
  .workspace-sample-heading { padding: 20px; }
  .workspace-sample-heading h2 { font-size: 1.25000rem; }
  .sample-data-badge { display: none; }
  .sample-review-example { grid-template-columns: 1fr; }
  .sample-review-input { grid-template-columns: 1fr; }
  .sample-review-input header { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 600px) {
  button, .side-nav a { min-height: 44px; }
  .compact-add { width: 44px; min-width: 44px; height: 44px; }
  .topbar { flex-wrap: wrap; height: auto; min-height: 58px; padding-block: 8px; gap: 6px; }
  .save-state, .top-work-button { display: none; }
  .workspace-login-button { padding: 0 12px; font-size: 0.75rem; white-space: nowrap; }
  .row-analysis, .detail-more, .detail-file-item button, .detail-file-item .edit-text-button,
  .inline-upload, .logout-button { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .flow-step { min-height: 44px; }
  /* The wrap rules above need height:auto — a second fixed height here was clipping the wrapped controls out of the bar. */
  .topbar { min-height: 64px; }
  .topbar-actions { gap: 4px; margin-left: auto; }
  .mobile-menu, .top-new-button { width: 44px; height: 44px; }
  #topAiConversation { width: 44px; padding: 0; justify-content: center; font-size: 0; }
  #topAiConversation span { font-size: 1.00000rem; }
  #topRunEditorButton { max-width: 84px; padding-inline: 8px; overflow: hidden; font-size: 0.68750rem; text-overflow: ellipsis; white-space: nowrap; }
  .breadcrumb { display: none; }
  .top-new-button { font-size: 0; padding: 0; justify-content: center; }
  .page-intro { display: block; }
  .page-intro h1 { font-size: 1.87500rem; }
  .intro-actions { margin-top: 17px; }
  .intro-actions .primary-button { width: 100%; }
  .summary-strip { margin-top: 18px; }
  .summary-item { padding: 15px 12px; }
  .summary-item strong { font-size: 1.37500rem; }
  .queue-heading { height: 57px; }
  .queue-toolbar { align-items: stretch; flex-direction: column; }
  .language-tabs { width: 100%; }
  .language-tabs button { flex: 1; height: 44px; }
  .queue-tools { width: 100%; }
  .search-field, .filter-select, .filter-select select { height: 44px; }
  .search-field { flex: 1; width: auto; }
  .table-scroll-hint { display: block; position: sticky; left: 0; width: min(100%, 360px); margin: 0; padding: 7px 12px; background: #f7f8fc; border-bottom: 1px solid var(--line); color: var(--accent); font-size: 0.68750rem; text-align: center; }
  .detail-panel { border-radius: 10px; }
  .dialog-body { grid-template-columns: 1fr; padding-inline: 18px; }
  .form-field.wide, .scope-field.wide, .upload-field.wide { grid-column: auto; }
  .scope-field > div { grid-template-columns: 1fr; }
  .dialog-head, .dialog-actions { padding-inline: 18px; }
  .editor-document .editor-file-icon { display: none; }
  .editor-document strong { max-width: 130px; }
  .editor-shell { grid-template-rows: 68px minmax(0, 1fr); }
  .editor-document strong { max-width: 80px; }
  .editor-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) minmax(180px, 32vh); overflow: hidden; }
  .editor-rail { max-height: 122px; display: grid; grid-template-columns: 160px max-content; gap: 8px; align-items: center; padding: 8px 10px; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid var(--line); }
  .rail-heading, .principle-card { display: none; }
  .stage-guide { margin: 0; }
  .rail-stages { display: flex; gap: 4px; }
  .rail-stage { min-width: 138px; }
  .rail-stage:not(:last-child)::after { display: none; }
  .editor-main { grid-column: 1; grid-row: 2; }
  .comment-panel { grid-column: 1; grid-row: 3; border-top: 1px solid var(--line); border-left: 0; }
  .editor-export { width: 44px; padding: 0; justify-content: center; font-size: 0; }
  #runStageButton { width: auto; padding: 0 8px; font-size: 0.68750rem; }
  #nextStageButton { max-width: 94px; padding: 0 8px; overflow: hidden; font-size: 0.68750rem; text-overflow: ellipsis; white-space: nowrap; }
  .editor-complete { padding-inline: 9px; }
  .ai-file-button { min-height: 44px; display: inline-flex; align-items: center; }
  .detail-actions { grid-template-columns: 1fr; }
  .toast { left: 16px; right: 16px; bottom: 16px; min-width: 0; }
  .workspace-login-button { min-width: 67px; }
  .workspace-sample { margin-top: 18px; border-radius: 11px; }
  .workspace-sample-heading { padding: 17px 16px; }
  .workspace-sample-heading h2 { font-size: 1.18750rem; line-height: 1.35; }
  .sample-feature-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 7px; }
  .sample-feature-tabs button { min-height: 48px; }
  .sample-feature-tabs button:nth-child(-n+4) { border-bottom-color: var(--line); }
  .sample-feature-tabs button.active { border-bottom-color: var(--accent); }
  .sample-feature-panel { padding: 14px 12px 16px; }
  .sample-process-bar { justify-content: flex-start; gap: 7px; overflow-x: auto; white-space: nowrap; }
  .sample-compare-grid { grid-template-columns: 1fr; }
  .sample-rationale { grid-column: auto; }
  .sample-document, .sample-rationale { min-height: 0; }
  .sample-score-row { grid-template-columns: repeat(2, 1fr); }
  .sample-finding-grid { grid-template-columns: 1fr; }
  .workspace-sample-footer { align-items: stretch; flex-direction: column; padding: 14px; }
  .workspace-sample-footer button { width: 100%; min-height: 44px; }
}

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

/* Account gate */
.auth-gate { position: fixed; inset: 0; z-index: 500; width: 100%; max-width: none; height: 100%; max-height: none; display: grid; place-items: center; margin: 0; padding: 22px; border: 0; background: transparent; }
.auth-gate:not([open]) { display: none; }
.auth-gate::backdrop { background: rgba(20, 27, 38, .48); backdrop-filter: blur(5px); }
.auth-card { position: relative; width: min(100%, 430px); display: grid; gap: 15px; padding: 38px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 22px 70px rgba(25, 34, 48, .22); }
.auth-close { position: absolute; top: 13px; right: 13px; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 1.56250rem; line-height: 1; cursor: pointer; }
.auth-close:hover { background: var(--surface-soft); color: var(--ink); }
.auth-mark { width: 40px; height: 40px; display: grid; align-content: center; gap: 5px; padding: 10px 9px; border-radius: 10px; background: var(--ink); }
.auth-mark i { height: 2px; display: block; border-radius: 2px; background: #fff; }
.auth-mark i:nth-child(1) { width: 14px; }.auth-mark i:nth-child(2) { width: 22px; }.auth-mark i:nth-child(3) { width: 17px; margin-left: 5px; }
.auth-card > p:first-of-type { margin: 3px 0 -9px; color: var(--accent); font-size: 0.75000rem; font-weight: 800; letter-spacing: .14em; }
.auth-card h1 { margin: 0; font-size: 1.87500rem; letter-spacing: -.04em; }
.auth-card > span { margin-top: -8px; color: var(--muted); font-size: 0.87500rem; line-height: 1.6; }
.auth-card label { display: grid; gap: 7px; }
.auth-card label b { font-size: 0.81250rem; }
.auth-card input { height: 43px; padding: 0 12px; border: 1px solid var(--line-dark); border-radius: 8px; background: #fff; outline: none; }
.auth-card input:focus { border-color: #9eb3cf; box-shadow: 0 0 0 3px rgba(22, 48, 92, .08); }
.google-start-button { height: 46px; border: 1px solid var(--line-dark); border-radius: 9px; background: #fff; font-size: 0.87500rem; font-weight: 800; cursor: pointer; box-shadow: var(--shadow-sm); }
.google-start-button:hover { border-color: #bfc5d0; background: var(--surface-soft); }
.google-start-button:disabled { cursor: wait; opacity: .65; }
.google-start-button[hidden] { display: none; }
.google-sign-in { min-height: 44px; display: flex; justify-content: center; align-items: center; margin-top: 4px; }
.google-sign-in[hidden] { display: none; }
.auth-status { min-height: 18px; margin: -6px 0 0; color: var(--muted); font-size: 0.75000rem; line-height: 1.5; text-align: center; }
.auth-status.error { color: #a74040; }
.legacy-auth-form { display: grid; gap: 12px; }
.legacy-auth-form[hidden] { display: none; }
.legacy-auth-form button { height: 44px; margin-top: 4px; border: 0; border-radius: 8px; background: var(--ink); color: #fff; font-weight: 700; cursor: pointer; }
.legacy-auth-form button:disabled { cursor: wait; opacity: .65; }
.auth-divider { display: flex; align-items: center; gap: 10px; color: var(--muted-light); font-size: 0.62500rem; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.auth-card > small { color: var(--muted-light); font-size: 0.68750rem; line-height: 1.55; text-align: center; }
.account-chip { height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 5px 0 4px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.account-chip > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; background: var(--accent-soft); color: var(--accent); font-size: 0.75000rem; font-weight: 800; }
.account-chip p { min-width: 0; display: grid; margin: 0; line-height: 1.2; }
.account-chip strong { max-width: 90px; overflow: hidden; font-size: 0.75000rem; text-overflow: ellipsis; white-space: nowrap; }
.account-chip small { max-width: 115px; overflow: hidden; color: var(--muted-light); font-size: 0.62500rem; text-overflow: ellipsis; white-space: nowrap; }
.account-chip button { height: 24px; padding: 0 6px; border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 0.62500rem; cursor: pointer; }

/* Conversational AI add */
.ai-add-card { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; align-items: center; margin-top: 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: var(--shadow-sm); }
.ai-add-heading { display: flex; align-items: center; gap: 10px; }
.ai-add-icon { width: 32px; height: 32px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: 1.12500rem; }
.ai-add-heading h2 { margin: 0; font-size: 0.87500rem; }
.ai-add-heading p { margin: 4px 0 0; color: var(--muted); font-size: 0.68750rem; line-height: 1.45; }
.ai-add-form { min-width: 0; }
.ai-drop-zone { min-width: 0; min-height: 82px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 15px; border: 1.5px dashed #cbd1dd; border-radius: 10px; background: #fafbfc; cursor: pointer; transition: border-color 140ms, background 140ms, box-shadow 140ms; }
.ai-drop-zone:hover, .ai-drop-zone:focus-visible, .ai-drop-zone.dragging { border-color: var(--accent); background: #f3f7fc; box-shadow: 0 0 0 4px rgba(22, 48, 92, .08); outline: none; }
.ai-drop-zone.busy { cursor: wait; border-style: solid; border-color: #aeb4ef; background: #f6f7ff; }
.ai-drop-zone input, .ai-chat-file input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ai-drop-zone > svg { width: 28px; color: var(--accent); }
.ai-drop-zone > span { min-width: 0; display: grid; gap: 4px; }
.ai-drop-zone strong { overflow: hidden; font-size: 0.81250rem; text-overflow: ellipsis; white-space: nowrap; }
.ai-drop-zone small { overflow: hidden; color: var(--muted); font-size: 0.68750rem; text-overflow: ellipsis; white-space: nowrap; }
.ai-drop-zone > b { padding: 6px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: 0.62500rem; white-space: nowrap; }

/* Two-line titles and resizable columns */
.manuscript-table col[data-column-col="manuscript"] { width: 31%; }
.manuscript-table col[data-column-col="language"] { width: 9%; }
.manuscript-table col[data-column-col="scope"] { width: 20%; }
.manuscript-table col[data-column-col="status"] { width: 17%; }
.manuscript-table col[data-column-col="updated"] { width: 13%; }
.manuscript-table col[data-column-col="menu"] { width: 92px; }
.manuscript-table th { position: relative; width: auto !important; }
.column-resizer { position: absolute; z-index: 2; top: 5px; right: -5px; width: 10px; height: 27px; padding: 0; border: 0; background: transparent; cursor: col-resize; touch-action: none; }
.column-resizer::after { content: ""; position: absolute; top: 5px; bottom: 5px; left: 4px; width: 1px; background: #d5dae1; opacity: 0; transition: opacity 120ms; }
.manuscript-table th:hover .column-resizer::after, .column-resizer:focus-visible::after, body.resizing-column .column-resizer::after { opacity: 1; }
.manuscript-title { display: -webkit-box; min-height: 29px; max-height: 29px; overflow: hidden; white-space: normal; text-overflow: clip; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.38; }
.manuscript-copy small { margin-top: 3px; }
.manuscript-link { margin-left: 5px; color: var(--accent); text-decoration: none; }

.detail-panel[hidden] { display: none; }
.detail-file-item { grid-template-columns: minmax(0, 1fr) auto auto auto; }
.detail-file-item .edit-text-button { padding: 3px 5px; border: 1px solid var(--line); border-radius: 4px; color: var(--accent); font-size: 0.62500rem; }
.detail-source-link { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: center; margin-top: 8px; padding: 7px 8px; border: 1px solid #dbe4ef; border-radius: 6px; background: #f6f9fd; font-size: 0.68750rem; }
.detail-source-link[hidden] { display: none; }
.detail-source-link span { color: var(--muted); }
.detail-source-link a { overflow: hidden; color: var(--accent); text-overflow: ellipsis; white-space: nowrap; }

/* AI drawer */
.ai-add-drawer { position: fixed; z-index: 220; inset: 0 0 0 auto; width: min(430px, 100vw); display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto; background: #fff; border-left: 1px solid var(--line); box-shadow: -18px 0 50px rgba(22, 30, 45, .12); transform: translateX(101%); transition: transform 220ms ease; }
body.ai-drawer-open .ai-add-drawer { transform: translateX(0); }
.ai-add-drawer > header { display: flex; justify-content: space-between; gap: 12px; padding: 21px 20px 17px; border-bottom: 1px solid var(--line); }
.ai-add-drawer header p { margin: 0 0 5px; color: var(--accent); font-size: 0.62500rem; font-weight: 800; letter-spacing: .13em; }
.ai-add-drawer header h2 { margin: 0; font-size: 1.12500rem; }
.ai-add-drawer header span { display: block; margin-top: 5px; color: var(--muted); font-size: 0.68750rem; }
.ai-add-drawer header button { width: 30px; height: 30px; border: 0; border-radius: 7px; background: #f2f3f5; cursor: pointer; }
.ai-drawer-files { display: flex; gap: 5px; min-height: 0; padding: 9px 20px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.ai-drawer-files:empty { display: none; }
.ai-drawer-files a { flex: 0 0 auto; max-width: 170px; overflow: hidden; padding: 5px 7px; border-radius: 5px; background: #f5f6f8; color: #596575; font-size: 0.62500rem; text-overflow: ellipsis; white-space: nowrap; }
.ai-progress-panel { padding: 13px 20px; border-bottom: 1px solid var(--line); background: #fafbff; }
.ai-progress-panel > div:first-child { display: flex; align-items: center; justify-content: space-between; }
.ai-progress-panel h3 { margin: 0; font-size: 0.75000rem; }
.ai-progress-panel > div > span { color: var(--accent); font-size: 0.62500rem; font-weight: 700; }
.ai-progress-panel > p { margin: 4px 0 8px; color: var(--muted-light); font-size: 0.62500rem; }
.ai-progress-feed { max-height: 105px; display: grid; gap: 4px; overflow-y: auto; }
.ai-progress-feed { max-height: 190px; padding: 2px 0; }
.ai-progress-feed p { margin: 0; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 7px; padding: 4px 6px 4px 14px; position: relative; border-radius: 5px; color: #596576; font-size: 0.68750rem; line-height: 1.45; }
.ai-progress-feed p::before { content: ""; position: absolute; left: 0; top: .55em; width: 4px; height: 4px; border-radius: 50%; background: #8e96ea; }
.ai-progress-feed p.active { background: #f1f2ff; color: #3f49b8; }
.ai-progress-feed p.active::before, .ai-progress-feed p.reasoning-live::before { animation: aiPulse 1.1s ease-in-out infinite; }
.ai-progress-feed p.completed::before { background: #55a184; }
.ai-progress-feed p.connected::before { background: #36a475; box-shadow: 0 0 0 3px rgba(54, 164, 117, .12); }
.ai-progress-feed p.error::before { background: #b75d71; }
.ai-progress-feed time { color: #a0a8b3; font-variant-numeric: tabular-nums; }
.ai-progress-text { min-width: 0; white-space: pre-wrap; }
.ai-progress-feed:empty::after { content: "Codex 이벤트를 기다리고 있습니다…"; color: var(--muted-light); font-size: 0.68750rem; }
@keyframes aiPulse { 50% { opacity: .3; transform: scale(.72); } }
.ai-chat-messages { min-height: 0; display: grid; align-content: start; gap: 9px; overflow-y: auto; padding: 18px 20px; }
.ai-chat-message { max-width: 88%; padding: 9px 11px; border-radius: 10px 10px 10px 3px; background: #f2f3f6; color: #46515f; font-size: 0.75000rem; line-height: 1.55; white-space: pre-wrap; }
.ai-chat-message.user { justify-self: end; border-radius: 10px 10px 3px 10px; background: var(--accent); color: #fff; }
.ai-chat-message.streaming::after { content: ""; display: inline-block; width: 5px; height: 11px; margin-left: 3px; background: currentColor; opacity: .45; animation: cursorBlink 800ms infinite; }
@keyframes cursorBlink { 50% { opacity: 0; } }
.ai-chat-form { display: grid; gap: 8px; padding: 14px 20px 18px; border-top: 1px solid var(--line); background: #fff; }
.ai-chat-form > label { color: #566170; font-size: 0.68750rem; font-weight: 700; }
.ai-chat-form textarea { width: 100%; resize: vertical; padding: 9px; border: 1px solid var(--line-dark); border-radius: 7px; outline: none; line-height: 1.5; }
.ai-chat-form textarea:focus { border-color: #9eb3cf; box-shadow: 0 0 0 3px rgba(22, 48, 92, .08); }
.ai-chat-form > div { display: flex; align-items: center; gap: 8px; }
.ai-chat-file { color: var(--accent); font-size: 0.68750rem; font-weight: 700; cursor: pointer; }
.ai-chat-form > div span { min-width: 0; flex: 1; overflow: hidden; color: var(--muted-light); font-size: 0.62500rem; text-overflow: ellipsis; white-space: nowrap; }
.ai-chat-form button { height: 30px; padding: 0 13px; border: 0; border-radius: 6px; background: var(--ink); color: #fff; font-size: 0.68750rem; cursor: pointer; }
.ai-drawer-scrim { position: fixed; z-index: 210; inset: 0; background: rgba(19, 27, 40, .22); opacity: 0; pointer-events: none; transition: opacity 220ms; }
body.ai-drawer-open .ai-drawer-scrim { opacity: 1; pointer-events: auto; }
.ai-chat-launcher { position: fixed; z-index: 205; right: 22px; bottom: 22px; min-width: 210px; min-height: 54px; display: flex; align-items: center; gap: 10px; padding: 7px 12px 7px 8px; border: 1px solid #dce0f7; border-radius: 13px; background: #fff; box-shadow: 0 12px 32px rgba(30, 41, 65, .16); cursor: pointer; text-align: left; }
.ai-chat-launcher[hidden], body.ai-drawer-open .ai-chat-launcher { display: none; }
.ai-chat-launcher-icon { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 1.25000rem; }
.ai-chat-launcher-copy { min-width: 0; flex: 1; display: grid; gap: 2px; }
.ai-chat-launcher-copy strong { font-size: 0.75000rem; }
.ai-chat-launcher-copy small { max-width: 135px; overflow: hidden; color: var(--muted); font-size: 0.62500rem; text-overflow: ellipsis; white-space: nowrap; }
.ai-chat-launcher > i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #b4bac4; }
.ai-chat-launcher.running > i { background: #36a475; box-shadow: 0 0 0 4px rgba(54, 164, 117, .12); animation: aiPulse 1.1s ease-in-out infinite; }

/* Extracted text editor */
.text-editor-dialog { width: min(900px, calc(100vw - 30px)); height: min(840px, calc(100vh - 30px)); padding: 0; border: 1px solid var(--line); border-radius: 12px; background: #eef0f3; box-shadow: 0 26px 80px rgba(20, 29, 43, .2); }
.text-editor-dialog::backdrop { background: rgba(18, 25, 37, .44); }
.text-editor-dialog form { height: 100%; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; }
.text-editor-dialog header { display: flex; align-items: start; justify-content: space-between; padding: 16px 19px; border-bottom: 1px solid var(--line); background: #fff; }
.text-editor-dialog header p { margin: 0 0 4px; color: var(--accent); font-size: 0.62500rem; font-weight: 800; letter-spacing: .12em; }
.text-editor-dialog header h2 { margin: 0; font-size: 1.06250rem; }
.text-editor-dialog header span { display: block; margin-top: 4px; color: var(--muted); font-size: 0.68750rem; }
.text-editor-dialog header button { width: 29px; height: 29px; border: 0; border-radius: 6px; background: #f2f3f5; cursor: pointer; }
.text-editor-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 9px 19px; border-bottom: 1px solid var(--line); background: #fafbfc; color: var(--muted); font-size: 0.68750rem; }
.text-editor-toolbar strong { color: var(--ink-soft); }
#textEditorText { width: min(720px, calc(100% - 32px)); height: calc(100% - 28px); justify-self: center; align-self: center; resize: none; padding: 52px 58px; border: 1px solid #dfe3e9; border-radius: 2px; background: #fff; box-shadow: 0 4px 18px rgba(24, 34, 49, .06); color: #252d37; font-family: Georgia, "Times New Roman", "Noto Serif KR", serif; font-size: 1.00000rem; line-height: 1.85; outline: none; }
#textEditorText:focus { border-color: #9eb3cf; box-shadow: 0 0 0 3px rgba(22, 48, 92, .08), 0 4px 18px rgba(13, 35, 70, .06); }
.text-editor-dialog footer { display: flex; justify-content: flex-end; gap: 7px; padding: 12px 19px; border-top: 1px solid var(--line); background: #fff; }
.text-editor-dialog footer button { height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: 0.75000rem; cursor: pointer; }
.text-editor-dialog footer button[type="submit"] { border-color: var(--ink); background: var(--ink); color: #fff; }

/* Manuscript analysis chooser */
.analysis-menu { position: fixed; z-index: 240; inset: 50% auto auto 50%; width: min(460px, calc(100vw - 28px)); padding: 0; overflow: hidden; border: 1px solid var(--line-dark); border-radius: 13px; background: #fff; box-shadow: 0 24px 70px rgba(20, 29, 43, .22); transform: translate(-50%, -50%); }
.analysis-menu[hidden] { display: none; }
.analysis-menu > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 19px 20px 16px; border-bottom: 1px solid var(--line); }
.analysis-menu header p { margin: 0 0 5px; color: var(--accent); font-size: 0.68750rem; font-weight: 800; letter-spacing: .08em; }
.analysis-menu header h2 { max-width: 350px; margin: 0; overflow: hidden; font-size: 1.18750rem; text-overflow: ellipsis; white-space: nowrap; }
.analysis-menu header span { display: block; max-width: 350px; margin-top: 5px; overflow: hidden; color: var(--muted); font-size: 0.75000rem; text-overflow: ellipsis; white-space: nowrap; }
.analysis-menu header button { width: 34px; height: 34px; border: 0; border-radius: 8px; background: #f1f2f5; color: var(--muted); font-size: 1.18750rem; cursor: pointer; }
.analysis-options { display: grid; gap: 9px; padding: 16px 20px; }
.analysis-options > button { min-height: 78px; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfc; text-align: left; cursor: pointer; }
.analysis-options > button:hover { border-color: #bfd0e3; background: #f6f9fd; }
.analysis-options > button:disabled { cursor: wait; opacity: .55; }
.analysis-options > button > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: 0.75000rem; font-weight: 800; }
.analysis-options > button > div { min-width: 0; display: grid; gap: 5px; }
.analysis-options strong { font-size: 0.93750rem; }
.analysis-options small { overflow: hidden; color: var(--muted); font-size: 0.75000rem; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.analysis-options > button > i { color: var(--accent); font-size: 1.06250rem; font-style: normal; }
.analysis-delete { min-height: 42px; width: calc(100% - 40px); margin: 0 20px 18px; border: 0; border-top: 1px solid var(--line); background: transparent; color: #9c5664; font-size: 0.75000rem; cursor: pointer; }
.analysis-menu-scrim { position: fixed; z-index: 230; inset: 0; background: rgba(18, 25, 37, .36); opacity: 0; pointer-events: none; }
body.analysis-menu-open .analysis-menu-scrim { opacity: 1; pointer-events: auto; }

/* Review Court simulation */
.reviewer-simulation-button { grid-column: 1 / -1; min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #c7d5e5; border-radius: 8px; background: #f3f7fc; color: var(--accent); font-size: 0.81250rem; font-weight: 750; cursor: pointer; }
.reviewer-simulation-button:hover { border-color: var(--accent); background: var(--accent-soft); }
.reviewer-simulation-button:disabled { cursor: default; opacity: .5; }
.top-work-button.reviewer { border-color: #cbd8e8; color: #315e9b; }
.top-work-button.running { border-color: #8f97ea; background: #f0f1ff; color: var(--accent); }
.review-dialog { width: min(1120px, calc(100vw - 32px)); height: min(900px, calc(100vh - 32px)); padding: 0; overflow: hidden; border: 1px solid var(--line-dark); border-radius: 15px; background: #f4f5f8; box-shadow: 0 28px 90px rgba(18, 26, 40, .25); }
.review-dialog::backdrop { background: rgba(18, 25, 37, .48); }
.review-shell { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.review-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 26px; border-bottom: 1px solid var(--line); background: #fff; }
.review-header p, .review-section-heading p { margin: 0 0 5px; color: var(--accent); font-size: 0.68750rem; font-weight: 800; letter-spacing: .12em; }
.review-header h2 { margin: 0; font-size: 1.50000rem; letter-spacing: -.035em; }
.review-header span { display: block; margin-top: 7px; color: var(--muted); font-size: 0.87500rem; }
.review-header > button { width: 38px; height: 38px; border: 0; border-radius: 9px; background: #f0f1f4; color: var(--muted); font-size: 1.31250rem; cursor: pointer; }
.review-body { min-height: 0; overflow-y: auto; padding: 24px 26px 32px; }
.review-live, .review-result { padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.review-result { margin-top: 18px; }
.review-result[hidden] { display: none; }
.review-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.review-section-heading h3 { margin: 0; font-size: 1.12500rem; }
.review-section-heading > span { padding: 6px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 0.75000rem; font-weight: 700; }
.review-section-heading > span.fallback { background: var(--rose-soft); color: var(--rose); }
.reviewer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.reviewer-card, .meta-review-card { display: grid; grid-template-columns: 36px minmax(0, 1fr) 9px; gap: 11px; align-items: center; min-height: 76px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfc; }
.reviewer-card > span, .meta-review-card > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: #eef0f4; color: #6c7786; font-size: 0.75000rem; font-weight: 800; }
.reviewer-card > div, .meta-review-card > div { min-width: 0; display: grid; gap: 5px; }
.reviewer-card strong, .meta-review-card strong { font-size: 0.87500rem; }
.reviewer-card small, .meta-review-card small { overflow: hidden; color: var(--muted); font-size: 0.75000rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.reviewer-card > i, .meta-review-card > i { width: 9px; height: 9px; border-radius: 50%; background: #c7ccd4; }
.reviewer-card.starting, .reviewer-card.working, .meta-review-card.starting, .meta-review-card.working { border-color: #c7d5e5; background: #f6f9fd; }
.reviewer-card.starting > i, .reviewer-card.working > i, .meta-review-card.starting > i, .meta-review-card.working > i { background: var(--accent); box-shadow: 0 0 0 4px rgba(22, 48, 92, .12); animation: aiPulse 1.1s ease-in-out infinite; }
.reviewer-card.completed, .meta-review-card.completed { border-color: #cae6dc; background: #f5fbf8; }
.reviewer-card.completed > i, .meta-review-card.completed > i { background: var(--green); }
.reviewer-card.unavailable, .meta-review-card.unavailable { border-color: #ecd4db; background: #fff8fa; }
.reviewer-card.unavailable > i, .meta-review-card.unavailable > i { background: var(--rose); }
.meta-review-card { margin-top: 11px; border-style: dashed; }
.review-score-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.review-score-grid > div { display: grid; grid-template-columns: 1fr auto auto; align-items: baseline; gap: 3px; padding: 12px; border-radius: 9px; background: #f5f6fa; }
.review-score-grid span { grid-column: 1 / -1; color: var(--muted); font-size: 0.75000rem; }
.review-score-grid strong { font-size: 1.56250rem; }
.review-score-grid small { color: var(--muted-light); font-size: 0.68750rem; }
.review-summary-card { margin-top: 14px; padding: 17px 18px; border-left: 4px solid var(--accent); border-radius: 8px; background: #f3f7fc; }
.review-summary-card h4, .review-findings-grid h4, .review-list-section h4 { margin: 0 0 9px; font-size: 0.93750rem; }
.review-summary-card p { margin: 0; color: #4d5867; font-size: 0.87500rem; line-height: 1.7; white-space: pre-wrap; }
.review-summary-card > strong { display: block; margin-top: 11px; color: var(--accent); font-size: 0.87500rem; }
.review-findings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.review-findings-grid > section, .review-list-section { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.review-finding, .review-row { padding: 11px 0; border-top: 1px solid var(--line); }
.review-finding:first-child, .review-row:first-child { border-top: 0; padding-top: 0; }
.review-finding strong, .review-row strong { color: #3d4856; font-size: 0.87500rem; line-height: 1.5; }
.review-finding p, .review-row p { margin: 5px 0 0; color: var(--muted); font-size: 0.81250rem; line-height: 1.55; white-space: pre-wrap; }
.review-finding small, .review-row small { display: block; margin-top: 6px; color: #768190; font-size: 0.75000rem; line-height: 1.45; }
.review-list-section { margin-top: 14px; }
.review-row.question { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; }
.review-row.question > span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 0.75000rem; font-weight: 800; }
.review-empty { margin: 0; color: var(--muted); font-size: 0.81250rem; }
.review-limitations { margin: 14px 0 0; padding: 12px 14px; border-radius: 8px; background: #fff8e9; color: #735d35; font-size: 0.81250rem; line-height: 1.55; }
.review-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 26px; border-top: 1px solid var(--line); background: #fff; }
.review-footer p { display: grid; gap: 3px; margin: 0; }
.review-footer strong { font-size: 0.81250rem; }
.review-footer span { color: var(--muted); font-size: 0.75000rem; }
.review-footer button { min-height: 42px; padding: 0 18px; border: 0; border-radius: 9px; background: var(--ink); color: #fff; font-size: 0.87500rem; font-weight: 700; cursor: pointer; }
.review-footer button:disabled { cursor: wait; opacity: .55; }

@media (min-width: 1280px) {
  body.ai-drawer-open .main { margin-right: 430px; transition: margin-right 220ms ease; }
  body.ai-drawer-open .ai-drawer-scrim { display: none; }
}

@media (max-width: 820px) {
  .account-chip p { display: none; }
  .account-chip button { font-size: 0; width: 22px; }
  .account-chip button::after { content: "↗"; font-size: 0.81250rem; }
  .ai-add-card { grid-template-columns: 1fr; }
  .ai-chat-launcher { right: 12px; bottom: 12px; min-width: 190px; min-height: 54px; }
  #textEditorText { width: calc(100% - 20px); padding: 30px 24px; }
  .review-dialog { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; border-radius: 0; }
  .reviewer-grid { grid-template-columns: 1fr; }
  .review-score-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  .auth-card { padding: 28px 22px; }
  .ai-add-card { padding: 14px; }
  .ai-drop-zone { min-height: 108px; grid-template-columns: 34px minmax(0, 1fr); }
  .ai-drop-zone > b { grid-column: 1 / -1; justify-self: stretch; min-height: 32px; display: grid; place-items: center; }
  .ai-add-drawer { width: 100vw; }
  .text-editor-dialog { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; border-radius: 0; }
  #topReviewerButton { width: 44px; padding: 0; justify-content: center; font-size: 0; }
  #topReviewerButton span { font-size: 1.00000rem; }
  #topRunEditorButton { max-width: 72px; }
  .review-header, .review-footer { padding-inline: 16px; }
  .review-body { padding: 16px; }
  .review-findings-grid { grid-template-columns: 1fr; }
  .review-footer p { display: none; }
  .review-footer button { width: 100%; }
}

/* Large-screen adaptive density: keep text, controls, and document space readable. */
@media (min-width: 1440px) {
  html { font-size: 19px; }
  :root { --sidebar-width: 244px; }
  .page-content { max-width: 1640px; }
}
@media (min-width: 1920px) {
  html { font-size: 20px; }
  :root { --sidebar-width: 258px; }
  .page-content { max-width: 1820px; padding-inline: 40px; }
}
@media (min-width: 2560px) {
  html { font-size: 21px; }
  :root { --sidebar-width: 276px; }
  .page-content { max-width: 2100px; padding-inline: 48px; }
}
@media (min-width: 3200px) {
  html { font-size: 22px; }
  :root { --sidebar-width: 294px; }
  .page-content { max-width: 2320px; padding-inline: 56px; }
}

.biz-footer { flex-basis: 100%; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--soft-muted, var(--muted-light, #96a1af)); font-size: 0.56250rem; line-height: 1.85; }
.biz-footer p { margin: 0; }
.biz-footer strong { color: inherit; font-weight: 750; }
.biz-footer a { color: inherit; font-weight: inherit; text-decoration: none; }
.arche-footer { display: grid; gap: 12px; margin: 30px 4px 14px; padding-top: 18px; border-top: 1px solid var(--line, #dfe6ef); }
.arche-footer .biz-footer { margin-top: 0; padding-top: 0; border-top: 0; }

.arche-footer .policy-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; width: auto; margin: 0; padding: 0; }
.arche-footer .policy-links button, .arche-footer .policy-links a { position: relative; padding: 2px 14px; border: 0; background: none; color: #5f6d7c; cursor: pointer; font: inherit; font-size: 0.68750rem; font-weight: 700; text-decoration: none; transition: color 140ms ease; }
.arche-footer .policy-links > :first-child { padding-left: 0; }
.arche-footer .policy-links > * + *::before { content: ""; position: absolute; left: 0; top: 50%; width: 1px; height: 11px; transform: translateY(-50%); background: var(--line, #dfe6ef); }
.arche-footer .policy-links [data-legal-open="privacy"] { color: var(--accent, #16305c); font-weight: 800; }
.arche-footer .policy-links button:hover, .arche-footer .policy-links a:hover { color: var(--accent, #16305c); }
.biz-footer .footer-copy { margin-top: 7px; }
