:root {
  --ink: #17211c;
  --muted: #66746d;
  --paper: #fbf7ec;
  --panel: rgba(255, 252, 243, 0.86);
  --line: rgba(23, 33, 28, 0.14);
  --green: #12614a;
  --green-dark: #0b3d31;
  --lime: #c9e45f;
  --orange: #e76f3c;
  --sand: #efe2c4;
  --shadow: 0 24px 80px rgba(36, 45, 39, 0.16);
  font-family: "Arita buri", "Noto Serif KR", "Iowan Old Style", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(201, 228, 95, 0.4), transparent 28rem),
    radial-gradient(circle at 88% 12%, rgba(231, 111, 60, 0.2), transparent 24rem),
    linear-gradient(135deg, #fbf7ec 0%, #f4ead2 48%, #e8f0dc 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(23, 33, 28, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 33, 28, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 92%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 247, 236, 0.78);
  backdrop-filter: blur(18px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0;
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #fff;
  background: var(--green-dark);
  border-radius: 14px;
  box-shadow: 7px 7px 0 var(--lime);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.05rem;
}

.brand small {
  color: var(--muted);
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 22px;
  color: var(--muted);
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  font-size: 0.92rem;
}

.hero,
.workflow,
.workspace,
.analysis,
.region-editor,
.text-review,
.results {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.is-hidden {
  display: none !important;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 48px;
  align-items: center;
  min-height: 620px;
  padding: 72px 0 52px;
}

.hero-copy {
  animation: rise 650ms ease both;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--orange);
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 900px;
  margin-bottom: 22px;
  font-size: clamp(2.6rem, 6vw, 5.9rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.hero-description,
.section-heading p,
.panel p,
.step p,
.footer {
  color: var(--muted);
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  line-height: 1.7;
}

.hero-description {
  max-width: 680px;
  font-size: 1.05rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  color: var(--green-dark);
  cursor: pointer;
  background: #fffaf0;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(18, 97, 74, 0.16);
}

.button.primary {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.button.ghost {
  background: transparent;
}

.button.small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.84rem;
}

.button.full-width {
  width: 100%;
  margin-top: 18px;
}

.hero-visual,
.panel,
.step,
.analysis-stage {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-visual {
  position: relative;
  display: grid;
  min-height: 430px;
  padding: 28px;
  overflow: hidden;
  border-radius: 34px;
  animation: rise 650ms 120ms ease both;
}

.hero-visual::before {
  position: absolute;
  top: -110px;
  right: -80px;
  width: 300px;
  height: 300px;
  content: "";
  background: conic-gradient(from 220deg, var(--lime), rgba(255, 250, 240, 0.9), var(--orange), var(--green), var(--lime));
  border-radius: 50%;
  opacity: 0.82;
}

.hero-visual::after {
  position: absolute;
  right: 30px;
  bottom: 28px;
  width: 140px;
  height: 140px;
  content: "";
  background: linear-gradient(135deg, rgba(18, 97, 74, 0.16), rgba(201, 228, 95, 0.28));
  border: 1px solid rgba(18, 97, 74, 0.12);
  border-radius: 28px;
  transform: rotate(8deg);
}

.label-board {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 22px;
  align-self: center;
  padding: 28px;
  background: rgba(255, 250, 240, 0.86);
  border: 1px solid rgba(23, 33, 28, 0.12);
  border-radius: 26px;
  box-shadow: 0 20px 56px rgba(18, 97, 74, 0.14);
}

.label-board-top,
.rule-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
}

.label-board-top span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.label-board-top strong {
  display: inline-grid;
  min-width: 54px;
  min-height: 34px;
  place-items: center;
  color: #fff;
  background: var(--green-dark);
  border-radius: 999px;
}

.label-grid {
  display: grid;
  grid-template-columns: 0.72fr 1fr 1.18fr 1fr 0.72fr;
  gap: 8px;
  min-height: 230px;
}

.label-cell {
  display: grid;
  place-items: center;
  color: var(--green-dark);
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  border: 1px solid rgba(18, 97, 74, 0.2);
  border-radius: 16px;
}

.label-cell.front {
  color: #fff;
  background: linear-gradient(160deg, var(--green), var(--green-dark));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.label-cell.side {
  background: rgba(201, 228, 95, 0.32);
}

.label-cell.flap {
  background: rgba(231, 111, 60, 0.12);
}

.rule-strip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  color: var(--green-dark);
  font-size: 0.72rem;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.workflow,
.workspace,
.analysis,
.region-editor,
.text-review,
.results {
  padding: 34px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-heading.compact {
  display: block;
  max-width: 760px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.step {
  min-height: 190px;
  padding: 22px;
  border-radius: 28px;
}

.step span {
  display: inline-grid;
  width: 40px;
  height: 40px;
  margin-bottom: 38px;
  place-items: center;
  color: #fff;
  background: var(--green-dark);
  border-radius: 50%;
}

.step.active {
  background: var(--green-dark);
}

.step.active,
.step.active p {
  color: #fff;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 0.84fr) minmax(0, 1.16fr);
  gap: 18px;
  align-items: stretch;
}

.panel {
  padding: 24px;
  border-radius: 30px;
}

.panel-header {
  display: flex;
  gap: 18px;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  color: var(--green-dark);
  white-space: nowrap;
  background: rgba(201, 228, 95, 0.4);
  border-radius: 999px;
}

.dropzone {
  display: grid;
  min-height: 220px;
  padding: 28px;
  place-items: center;
  text-align: center;
  cursor: pointer;
  background: #fffaf0;
  border: 2px dashed rgba(18, 97, 74, 0.28);
  border-radius: 28px;
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.dropzone.dragging {
  background: rgba(201, 228, 95, 0.24);
  border-color: var(--green);
  transform: scale(1.01);
}

.drop-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 12px;
  place-items: center;
  color: #fff;
  font-size: 2rem;
  background: var(--orange);
  border-radius: 18px;
}

.dropzone small {
  margin-top: 8px;
  color: var(--muted);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 18px;
}

label {
  color: var(--green-dark);
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  font-size: 0.86rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  margin-top: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fffaf0;
  border: 1px solid var(--line);
  border-radius: 14px;
}

input,
select {
  height: 44px;
}

textarea {
  min-height: 96px;
  padding-top: 12px;
  resize: vertical;
}

.file-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.file-item {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  background: rgba(255, 250, 240, 0.78);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.file-item small {
  color: var(--muted);
}

.preview-panel {
  min-height: 540px;
}

.preview-empty,
.preview-frame {
  display: grid;
  min-height: 436px;
  overflow: hidden;
  place-items: center;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(18, 97, 74, 0.08), transparent),
    #fffaf0;
  border: 1px solid var(--line);
  border-radius: 24px;
}

.preview-frame {
  align-items: start;
  justify-items: center;
  overflow: auto;
}

.preview-empty[hidden],
.preview-frame[hidden] {
  display: none;
}

.preview-empty span {
  display: grid;
  width: 120px;
  height: 120px;
  margin-bottom: 16px;
  place-items: center;
  color: var(--green);
  font-weight: 900;
  background: rgba(201, 228, 95, 0.32);
  border-radius: 32px;
}

.preview-frame iframe,
.preview-frame img {
  width: 100%;
  height: 436px;
  border: 0;
}

.preview-frame img {
  object-fit: contain;
  padding: 12px;
}

.preview-canvas {
  position: relative;
  width: 100%;
  min-height: 436px;
  transform-origin: top center;
}

.preview-canvas img {
  display: block;
}

.zoom-controls {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
}

.zoom-controls span {
  min-width: 52px;
  color: var(--green-dark);
  font-weight: 800;
  text-align: center;
}

.area-overlay {
  position: absolute;
  min-width: 44px;
  min-height: 28px;
  pointer-events: none;
  border: 2px solid var(--orange);
  border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(23, 33, 28, 0.02);
}

.area-overlay span {
  position: absolute;
  top: -28px;
  left: -2px;
  max-width: 220px;
  padding: 4px 8px;
  overflow: hidden;
  color: #fff;
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  font-size: 0.74rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--orange);
  border-radius: 8px 8px 8px 0;
}

.analysis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.analysis-stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  min-width: 0;
  gap: 8px 12px;
  align-items: center;
  padding: 16px;
  overflow: hidden;
  border-radius: 22px;
}

.analysis-stage span {
  display: block;
  width: 12px;
  height: 12px;
  background: var(--line);
  border-radius: 50%;
}

.analysis-stage.done span {
  background: var(--green);
  box-shadow: 0 0 0 7px rgba(18, 97, 74, 0.1);
}

.analysis-stage.active {
  border-color: rgba(18, 97, 74, 0.42);
  background: rgba(255, 250, 240, 0.98);
}

.analysis-stage.active span {
  background: var(--orange);
  animation: pulse 900ms ease-in-out infinite;
}

.analysis-stage strong,
.analysis-stage small {
  grid-column: 2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-stage small {
  max-width: 100%;
  height: 1.25em;
  color: var(--muted);
  line-height: 1.25;
}

.inline-progress {
  min-height: 42px;
  margin-top: 12px;
  padding: 12px 14px;
  overflow: hidden;
  color: var(--green-dark);
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(201, 228, 95, 0.24);
  border: 1px solid rgba(18, 97, 74, 0.18);
  border-radius: 16px;
}

.inline-progress::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  content: "";
  background: var(--orange);
  border-radius: 50%;
}

.analysis:not(.is-hidden) .inline-progress::before,
.inline-progress:not(:empty)::before {
  animation: pulse 900ms ease-in-out infinite;
}

.live-progress {
  grid-column: 1 / -1;
  min-height: 48px;
  padding: 14px 16px;
  overflow: hidden;
  color: var(--green-dark);
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(255, 250, 240, 0.86);
  border: 1px solid rgba(18, 97, 74, 0.18);
  border-radius: 18px;
}

.live-progress::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  content: "";
  background: var(--orange);
  border-radius: 50%;
  animation: pulse 900ms ease-in-out infinite;
}

.result-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 18px;
}

.text-result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
}

.calibration-panel {
  grid-column: 1 / -1;
}

.calibration-help {
  margin-bottom: 16px;
}

.calibration-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.calibration-grid textarea {
  min-height: 120px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
}

.calibration-output {
  max-height: 520px;
}

.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.editor-canvas-shell {
  min-height: 620px;
  overflow: auto;
  background: #fffaf0;
  border: 1px solid var(--line);
  border-radius: 24px;
}

.editor-canvas {
  position: relative;
  width: 100%;
  min-height: 620px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(18, 97, 74, 0.08), transparent),
    #fffaf0;
}

.editor-canvas img {
  display: block;
  width: 100%;
  height: 620px;
  object-fit: contain;
  padding: 12px;
  user-select: none;
  -webkit-user-drag: none;
}

.editable-region {
  position: absolute;
  min-width: 36px;
  min-height: 26px;
  cursor: move;
  background: rgba(231, 111, 60, 0.08);
  border: 2px solid var(--orange);
  border-radius: 10px;
}

.editable-region.selected {
  background: rgba(201, 228, 95, 0.14);
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(18, 97, 74, 0.12);
}

.editable-region span {
  position: absolute;
  top: -28px;
  left: -2px;
  max-width: 220px;
  padding: 4px 8px;
  overflow: hidden;
  color: #fff;
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  font-size: 0.74rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--orange);
  border-radius: 8px 8px 8px 0;
}

.editable-region.selected span {
  background: var(--green);
}

.region-handle {
  position: absolute;
  right: -7px;
  bottom: -7px;
  width: 14px;
  height: 14px;
  cursor: nwse-resize;
  background: var(--green);
  border: 2px solid #fff;
  border-radius: 50%;
}

.region-form {
  display: grid;
  gap: 14px;
}

.region-coords {
  padding: 12px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.6;
  background: #fffaf0;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.review-card {
  grid-column: 1 / -1;
}

.debug-card {
  grid-column: 1 / -1;
}

.area-list,
.issue-list,
.panel-text-list {
  display: grid;
  gap: 12px;
}

.area-card,
.issue-card,
.panel-text-card {
  padding: 16px;
  background: #fffaf0;
  border: 1px solid var(--line);
  border-radius: 20px;
}

.area-card header,
.issue-card header,
.panel-text-card header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.tag {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 10px;
  color: var(--green-dark);
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  background: rgba(201, 228, 95, 0.38);
  border-radius: 999px;
}

.tag.warning {
  color: #7c330f;
  background: rgba(231, 111, 60, 0.18);
}

.text-block {
  min-height: 360px;
  max-height: 540px;
  padding: 18px;
  overflow: auto;
  color: #27312d;
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  line-height: 1.75;
  white-space: pre-wrap;
  background: #fffaf0;
  border: 1px solid var(--line);
  border-radius: 22px;
}

.debug-log {
  max-height: 420px;
  padding: 16px;
  overflow: auto;
  color: #d8f5df;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-wrap;
  background: #17211c;
  border-radius: 18px;
}

.issue-card strong {
  display: block;
  margin-bottom: 6px;
}

.issue-card p,
.area-card p,
.panel-text-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  line-height: 1.65;
}

.panel-text-card dl {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
}

.panel-text-card dt {
  color: var(--green-dark);
  font-weight: 900;
}

.panel-text-card dd {
  margin: 4px 0 0;
  color: var(--ink);
  line-height: 1.65;
}

.text-value-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
}

.text-value-list li {
  margin: 0;
}

.footer {
  width: min(1180px, calc(100% - 32px));
  margin: 40px auto 0;
  padding: 24px 0 42px;
  border-top: 1px solid var(--line);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(231, 111, 60, 0.28);
  }

  50% {
    transform: scale(1.25);
    box-shadow: 0 0 0 9px rgba(231, 111, 60, 0);
  }
}

@media (max-width: 920px) {
  .hero,
  .workspace,
  .editor-layout,
  .calibration-grid,
  .text-result-layout,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .steps,
  .analysis {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .nav {
    align-items: flex-start;
  }

  .nav-links {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 42px;
  }

  .hero-visual {
    min-height: 320px;
    padding: 18px;
  }

  .label-board {
    padding: 18px;
  }

  .label-grid {
    min-height: 180px;
  }

  .rule-strip {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .steps,
  .analysis,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .panel-header {
    display: block;
  }

  .button.small {
    margin-top: 12px;
  }
}

/* Text-first review */

.review-mode-shell,
.quick-review,
.quick-analysis,
.quick-results {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.review-mode-shell {
  padding: 4px 0 34px;
}

.review-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 760px;
  padding: 8px;
  margin: 0 auto;
  background: rgba(255, 250, 240, 0.72);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 18px 54px rgba(36, 45, 39, 0.1);
  backdrop-filter: blur(16px);
}

.review-mode-tab {
  min-height: 72px;
  padding: 12px 18px;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 18px;
}

.review-mode-tab,
.review-mode-tab small,
.mode-helper,
.scope-field,
.scope-coverage,
.raw-copy-field,
.confirmation-row,
.quick-actions,
.review-method-list,
.boundary-note,
.quick-analysis,
.result-summary-card,
.quick-result-grid,
.quick-issue-card,
.corrected-copy,
.evidence-card,
.limitation-panel {
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
}

.review-mode-tab.is-active {
  color: #fff;
  background: var(--green-dark);
  box-shadow: 0 12px 26px rgba(11, 61, 49, 0.22);
}

.review-mode-tab small {
  display: block;
  margin-top: 4px;
  color: inherit;
  font-size: 0.74rem;
  font-weight: 500;
  opacity: 0.72;
}

.mode-helper {
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: center;
}

body[data-review-mode="text"] .mode-file-section {
  display: none !important;
}

body[data-review-mode="file"] .quick-review,
body[data-review-mode="file"] .quick-analysis,
body[data-review-mode="file"] .quick-results {
  display: none !important;
}

.quick-review,
.quick-analysis,
.quick-results {
  padding: 34px 0;
}

.quick-review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.46fr) minmax(300px, 0.54fr);
  gap: 18px;
  align-items: start;
}

.quick-input-panel {
  padding: 30px;
}

.quick-guide-panel {
  position: sticky;
  top: 98px;
  padding: 30px;
  background:
    linear-gradient(150deg, rgba(11, 61, 49, 0.98), rgba(18, 97, 74, 0.96));
}

.quick-guide-panel h3,
.quick-guide-panel strong {
  color: #fff;
}

.quick-guide-panel > h3 {
  margin-bottom: 26px;
  font-size: 1.35rem;
  line-height: 1.35;
}

.scope-form-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.15fr 0.9fr;
  gap: 12px;
}

.scope-field {
  min-width: 0;
}

.scope-field > span,
.raw-copy-field > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 22px;
}

.market-combobox {
  position: relative;
  margin-top: 8px;
}

.combo-trigger {
  display: flex;
  width: 100%;
  height: 44px;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  background: #fffaf0;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.combo-trigger:focus,
.scope-field select:focus,
.raw-copy-field textarea:focus {
  outline: 3px solid rgba(201, 228, 95, 0.5);
  border-color: var(--green);
}

.combo-caret {
  color: var(--muted);
  font-size: 0.72rem;
}

.combo-options {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 15;
  display: grid;
  width: min(330px, 88vw);
  gap: 4px;
  padding: 8px;
  background: #fffdf7;
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: 0 22px 50px rgba(23, 33, 28, 0.18);
}

.combo-options[hidden] {
  display: none;
}

.market-option {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  cursor: pointer;
  border-radius: 12px;
}

.market-option:hover {
  background: rgba(201, 228, 95, 0.18);
}

.market-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--green);
}

.market-option span {
  color: var(--ink);
}

.market-option small {
  color: var(--muted);
  font-weight: 600;
}

.scope-coverage {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  margin-top: 16px;
  background: rgba(201, 228, 95, 0.16);
  border: 1px solid rgba(18, 97, 74, 0.14);
  border-radius: 18px;
}

.scope-coverage.is-limited {
  background: rgba(239, 226, 196, 0.46);
}

.scope-coverage.is-sparse {
  background: rgba(231, 111, 60, 0.1);
  border-color: rgba(231, 111, 60, 0.28);
}

.scope-coverage > div {
  display: flex;
  gap: 9px;
  align-items: center;
}

.coverage-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  background: var(--green);
  border-radius: 50%;
}

.scope-coverage.is-sparse .coverage-dot {
  background: var(--orange);
}

.scope-coverage p {
  margin: 0 0 0 19px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.raw-copy-field {
  display: block;
  margin-top: 22px;
}

.raw-copy-field small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.raw-copy-field textarea {
  min-height: 310px;
  padding: 18px;
  margin-top: 9px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.65;
  background: rgba(255, 253, 247, 0.96);
  border-radius: 18px;
}

.confirmation-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 11px;
  align-items: start;
  padding: 14px 16px;
  margin-top: 14px;
  cursor: pointer;
  background: rgba(255, 250, 240, 0.72);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.confirmation-row input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--green);
}

.confirmation-row small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-weight: 500;
}

.quick-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
}

.quick-actions .primary {
  min-width: 190px;
}

.review-method-list {
  display: grid;
  gap: 18px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.review-method-list li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
}

.review-method-list li > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--green-dark);
  font-size: 0.72rem;
  font-weight: 900;
  background: var(--lime);
  border-radius: 11px;
}

.review-method-list p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
  line-height: 1.55;
}

.boundary-note {
  padding: 16px;
  margin-top: 26px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
}

.boundary-note p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
  line-height: 1.6;
}

.quick-analysis {
  padding: 28px;
  margin-top: 28px;
  color: #fff;
  background: var(--green-dark);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.quick-progress-heading {
  display: flex;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
}

.quick-progress-heading h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.6vw, 2.2rem);
}

.quick-progress-heading > strong {
  color: var(--lime);
  font-size: 2rem;
}

.quick-progress-track {
  height: 8px;
  margin: 22px 0 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

.quick-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--lime), #fff3b2);
  border-radius: inherit;
  transition: width 320ms ease;
}

.quick-stage-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.quick-stage-list span {
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.75rem;
  font-weight: 800;
}

.quick-stage-list span.is-active,
.quick-stage-list span.is-complete {
  color: #fff;
}

.quick-stage-list span.is-complete::after {
  margin-left: 6px;
  color: var(--lime);
  content: "완료";
  font-size: 0.66rem;
}

.quick-result-heading {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}

.result-summary-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 30px;
  color: #fff;
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.result-summary-card.status-revision {
  background: linear-gradient(135deg, #602716, #a54825);
}

.result-summary-card h3 {
  margin: 10px 0 7px;
  font-size: clamp(1.45rem, 3vw, 2.35rem);
}

.result-summary-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
}

.result-status-label {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 11px;
  color: var(--green-dark);
  font-size: 0.75rem;
  font-weight: 900;
  background: var(--lime);
  border-radius: 999px;
}

.summary-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 8px;
}

.summary-metric {
  min-width: 96px;
  padding: 14px;
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 17px;
}

.summary-metric strong,
.summary-metric small {
  display: block;
}

.summary-metric strong {
  font-size: 1.55rem;
}

.summary-metric small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.69rem;
}

.quick-result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 18px;
  margin-top: 18px;
}

.quick-issues-panel {
  grid-row: span 2;
}

.issue-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
}

.issue-filter button,
.copy-version-tabs button {
  min-height: 31px;
  padding: 0 10px;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.issue-filter button.is-active,
.copy-version-tabs button.is-active {
  color: #fff;
  background: var(--green-dark);
  border-color: var(--green-dark);
}

.quick-issue-list {
  display: grid;
  gap: 12px;
}

.quick-issue-card {
  padding: 18px;
  background: rgba(255, 253, 247, 0.78);
  border: 1px solid var(--line);
  border-left: 5px solid var(--sand);
  border-radius: 18px;
}

.quick-issue-card[data-severity="must_fix"] {
  border-left-color: var(--orange);
}

.quick-issue-card[data-severity="manual_review"] {
  border-left-color: #d89b28;
}

.quick-issue-card[data-severity="recommended"] {
  border-left-color: var(--green);
}

.quick-issue-card header {
  display: flex;
  gap: 12px;
  align-items: start;
  justify-content: space-between;
}

.quick-issue-card h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.severity-badge {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 0 9px;
  color: var(--green-dark);
  white-space: nowrap;
  background: var(--sand);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
}

.quick-issue-card[data-severity="must_fix"] .severity-badge {
  color: #78260d;
  background: rgba(231, 111, 60, 0.18);
}

.quick-issue-card[data-severity="manual_review"] .severity-badge {
  color: #734900;
  background: rgba(216, 155, 40, 0.2);
}

.issue-market-line {
  margin: 6px 0 12px;
  color: var(--muted);
  font-size: 0.72rem;
}

.issue-original,
.issue-revision {
  padding: 12px;
  margin-top: 10px;
  color: var(--ink);
  white-space: pre-wrap;
  background: rgba(239, 226, 196, 0.28);
  border-radius: 12px;
}

.issue-original small,
.issue-revision small {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-weight: 800;
}

.quick-issue-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.65;
}

.issue-refs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
}

.issue-refs span {
  padding: 4px 8px;
  color: var(--green-dark);
  font-size: 0.65rem;
  font-weight: 800;
  background: rgba(201, 228, 95, 0.22);
  border-radius: 999px;
}

.copy-version-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.corrected-copy {
  min-height: 270px;
  max-height: 520px;
  padding: 18px;
  margin: 0;
  overflow: auto;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: rgba(255, 253, 247, 0.96);
  border: 1px solid var(--line);
  border-radius: 17px;
  font-size: 0.83rem;
  line-height: 1.65;
}

.evidence-panel {
  grid-column: 1 / -1;
}

.evidence-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.evidence-card {
  min-width: 0;
  padding: 16px;
  background: rgba(255, 253, 247, 0.78);
  border: 1px solid var(--line);
  border-radius: 17px;
}

.evidence-card header {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.evidence-card header strong {
  font-size: 0.78rem;
}

.evidence-card header small {
  color: var(--muted);
  font-size: 0.68rem;
}

.evidence-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.evidence-card details {
  margin-top: 10px;
}

.evidence-card summary {
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
}

.evidence-detail {
  padding-top: 9px;
  color: var(--ink);
  font-size: 0.72rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.limitation-panel {
  grid-column: 1 / -1;
}

.verification-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.verification-list li {
  padding: 14px;
  color: var(--muted);
  background: rgba(239, 226, 196, 0.28);
  border-radius: 15px;
  font-size: 0.77rem;
  line-height: 1.55;
}

.empty-result {
  padding: 34px 18px;
  color: var(--muted);
  text-align: center;
  background: rgba(239, 226, 196, 0.24);
  border-radius: 18px;
}

@media (max-width: 920px) {
  .quick-review-layout,
  .quick-result-grid {
    grid-template-columns: 1fr;
  }

  .quick-guide-panel {
    position: static;
  }

  .quick-issues-panel {
    grid-row: auto;
  }

  .evidence-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .review-mode-tabs,
  .scope-form-grid,
  .result-summary-card,
  .summary-metrics,
  .evidence-list,
  .verification-list {
    grid-template-columns: 1fr;
  }

  .review-mode-tab {
    text-align: center;
  }

  .quick-input-panel,
  .quick-guide-panel,
  .quick-analysis,
  .result-summary-card {
    padding: 22px;
    border-radius: 24px;
  }

  .quick-actions,
  .quick-result-heading,
  .quick-progress-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .quick-actions .button {
    width: 100%;
  }

  .quick-stage-list {
    grid-template-columns: 1fr;
  }

  .quick-stage-list span {
    display: none;
  }

  .quick-stage-list span.is-active,
  .quick-stage-list span.is-complete {
    display: block;
  }

  .summary-metric {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    text-align: left;
  }
}

/* Editorial compliance workspace */

body.editorial-ui {
  --ink: #171d1a;
  --muted: #747a76;
  --paper: #fbfcfa;
  --panel: #ffffff;
  --line: #d9ddda;
  --green: #167256;
  --green-dark: #105d47;
  --lime: #dcece5;
  --orange: #a84d3a;
  --sand: #f2f4f1;
  --shadow: none;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Noto Sans", "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.editorial-ui::before {
  display: none;
}

.editorial-ui button,
.editorial-ui input,
.editorial-ui select,
.editorial-ui textarea {
  font: inherit;
}

.editorial-ui button:focus-visible,
.editorial-ui a:focus-visible,
.editorial-ui input:focus-visible,
.editorial-ui select:focus-visible,
.editorial-ui textarea:focus-visible {
  outline: 2px solid rgba(22, 114, 86, 0.34);
  outline-offset: 3px;
}

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

.editorial-ui .site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 66px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.editorial-ui .nav {
  justify-content: flex-start;
  width: min(1360px, calc(100% - 64px));
  min-height: 65px;
  padding: 0;
  margin: 0 auto;
}

.editorial-ui .brand {
  gap: 0;
  padding-right: 26px;
}

.editorial-ui .brand::after {
  width: 1px;
  height: 32px;
  margin-left: 26px;
  content: "";
  background: var(--line);
}

.editorial-ui .brand strong {
  color: #141a17;
  font-size: 1.45rem;
  font-weight: 750;
  letter-spacing: -0.045em;
}

.editorial-ui .review-mode-tabs {
  display: flex;
  grid-template-columns: none;
  align-self: stretch;
  gap: 28px;
  max-width: none;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.editorial-ui .review-mode-tab {
  position: relative;
  min-height: 65px;
  padding: 0;
  color: #6f7471;
  font-size: 0.96rem;
  font-weight: 650;
  text-align: center;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.editorial-ui .review-mode-tab::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  content: "";
  background: transparent;
}

.editorial-ui .review-mode-tab:hover {
  color: var(--ink);
}

.editorial-ui .review-mode-tab.is-active {
  color: var(--green-dark);
  background: transparent;
  box-shadow: none;
}

.editorial-ui .review-mode-tab.is-active::after {
  background: var(--green);
}

.editorial-ui .hero,
.editorial-ui .workflow,
.editorial-ui .workspace,
.editorial-ui .analysis,
.editorial-ui .region-editor,
.editorial-ui .text-review,
.editorial-ui .results,
.editorial-ui .quick-review,
.editorial-ui .quick-analysis,
.editorial-ui .quick-results {
  width: min(1360px, calc(100% - 64px));
}

.editorial-ui .hero {
  display: block;
  min-height: 0;
  padding: 54px 0 42px;
}

.editorial-ui .hero-copy {
  animation: none;
}

.editorial-ui h1,
.editorial-ui h2,
.editorial-ui h3 {
  font-family: inherit;
}

.editorial-ui h1 {
  max-width: none;
  margin: 0 0 15px;
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  font-weight: 720;
  line-height: 1.12;
  letter-spacing: -0.048em;
}

.editorial-ui h2 {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -0.035em;
}

.editorial-ui h3 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.editorial-ui .hero-description {
  max-width: 1080px;
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.75;
}

.editorial-ui .hero-visual,
.editorial-ui .review-mode-shell {
  display: none;
}

.editorial-ui .quick-review {
  padding: 0 0 72px;
}

.review-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0 0 40px;
}

.review-progress-step {
  display: flex;
  min-width: 0;
  gap: 10px;
  align-items: center;
  color: #989d99;
  font-size: 0.92rem;
}

.review-progress-step::after {
  height: 1px;
  min-width: 32px;
  flex: 1;
  margin-left: 4px;
  content: "";
  background: #d8dcda;
}

.review-progress-step:last-child::after {
  display: none;
}

.review-progress-step > span {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid #b8bdb9;
  border-radius: 50%;
  font-size: 0.77rem;
  font-weight: 700;
}

.review-progress-step > strong {
  white-space: nowrap;
  font-weight: 650;
}

.review-progress-step.is-active,
.review-progress-step.is-complete {
  color: var(--green);
}

.review-progress-step.is-active > span {
  border: 2px solid var(--green);
}

.review-progress-step.is-complete > span {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.review-progress-step.is-active::after,
.review-progress-step.is-complete::after {
  background: var(--green);
}

.scope-section {
  padding: 0 0 43px;
  border-bottom: 1px solid var(--line);
}

.scope-heading {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.scope-heading h2 {
  margin: 0;
}

.editorial-ui .status-pill {
  min-height: 27px;
  padding: 0 10px;
  color: var(--green-dark);
  font-size: 0.72rem;
  font-weight: 650;
  background: #edf5f1;
  border: 1px solid #d5e8df;
  border-radius: 4px;
}

.editorial-ui .scope-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 44px;
  max-width: 1200px;
}

.editorial-ui label,
.editorial-ui .scope-field {
  color: #444b47;
  font-size: 0.85rem;
  font-weight: 600;
}

.editorial-ui .scope-field > span {
  min-height: 20px;
}

.editorial-ui .market-combobox {
  margin-top: 10px;
}

.editorial-ui .combo-trigger,
.editorial-ui .scope-field select,
.editorial-ui input,
.editorial-ui select {
  height: 52px;
  margin-top: 10px;
  padding: 0 16px;
  color: #333a36;
  background: #fff;
  border: 1px solid #cfd4d1;
  border-radius: 4px;
  box-shadow: none;
}

.editorial-ui .combo-trigger {
  margin-top: 0;
}

.editorial-ui .combo-trigger:hover,
.editorial-ui .scope-field select:hover {
  border-color: #aeb5b0;
}

.editorial-ui .combo-trigger:focus,
.editorial-ui .scope-field select:focus,
.editorial-ui .raw-copy-field textarea:focus {
  outline: 2px solid rgba(22, 114, 86, 0.2);
  outline-offset: 0;
  border-color: var(--green);
}

.editorial-ui .combo-caret {
  color: #747a76;
  font-size: 0.67rem;
  font-weight: 600;
}

.editorial-ui .combo-options {
  gap: 2px;
  padding: 7px;
  background: #fff;
  border: 1px solid #cfd4d1;
  border-radius: 6px;
  box-shadow: 0 14px 38px rgba(24, 31, 27, 0.12);
}

.editorial-ui .market-option {
  border-radius: 3px;
}

.editorial-ui .market-option:hover {
  background: #f0f5f2;
}

.editorial-ui .quick-review-layout {
  display: grid;
  grid-template-columns: 312px minmax(0, 1fr);
  gap: 56px;
  align-items: stretch;
  margin-top: 32px;
}

.editorial-ui .quick-guide-panel {
  position: static;
  top: auto;
  padding: 10px 46px 4px 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.editorial-ui .scope-coverage {
  gap: 8px;
  padding: 0 0 24px;
  margin: 0 0 24px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #e4e7e5;
  border-radius: 0;
}

.editorial-ui .scope-coverage.is-limited,
.editorial-ui .scope-coverage.is-sparse {
  background: transparent;
  border-color: #e4e7e5;
}

.editorial-ui .scope-coverage > div {
  gap: 8px;
  align-items: flex-start;
}

.editorial-ui .scope-coverage strong {
  color: var(--green);
  font-size: 0.92rem;
  line-height: 1.45;
}

.editorial-ui .coverage-dot {
  width: 7px;
  height: 7px;
  margin-top: 7px;
  background: var(--green);
}

.editorial-ui .scope-coverage.is-sparse .coverage-dot {
  background: #a84d3a;
}

.editorial-ui .scope-coverage p {
  margin: 0 0 0 15px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.65;
}

.evidence-point {
  padding: 0 0 23px;
  margin: 0 0 23px;
  border-bottom: 1px solid #e4e7e5;
}

.evidence-point:last-child {
  margin-bottom: 0;
  border-bottom: 0;
}

.evidence-point strong {
  display: block;
  margin-bottom: 8px;
  color: var(--green-dark);
  font-size: 0.91rem;
}

.evidence-point p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.7;
}

.editorial-ui .quick-input-panel {
  min-width: 0;
  padding: 4px 0 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.editor-heading {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: flex-start;
  min-height: 36px;
  margin-bottom: 10px;
}

.editor-heading h3 {
  margin: 0;
  font-size: 1rem;
}

.editorial-ui .button {
  min-height: 40px;
  padding: 0 15px;
  color: #3b4540;
  font-weight: 650;
  background: #fff;
  border: 1px solid #cfd4d1;
  border-radius: 4px;
  box-shadow: none;
  transition:
    color 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.editorial-ui .button:hover {
  color: var(--green-dark);
  background: #f5f8f6;
  border-color: #aeb7b2;
  box-shadow: none;
  transform: none;
}

.editorial-ui .button.primary {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.editorial-ui .button.primary:hover {
  color: #fff;
  background: var(--green-dark);
  border-color: var(--green-dark);
}

.editorial-ui .editor-heading .button {
  min-height: 34px;
  padding: 0 12px;
  color: var(--green-dark);
  font-size: 0.78rem;
  background: #f5f9f7;
  border-color: #d9e7e0;
}

.editorial-ui .raw-copy-field {
  display: block;
  margin: 0;
}

.editor-textarea-shell {
  display: grid;
  height: 276px;
  grid-template-columns: 42px minmax(0, 1fr);
  overflow: hidden;
  background: #fff;
  border: 1px solid #cfd4d1;
  border-radius: 4px;
  box-shadow: inset 0 1px 1px rgba(21, 28, 24, 0.02);
}

.editor-textarea-shell:focus-within {
  outline: 2px solid rgba(22, 114, 86, 0.2);
  outline-offset: 0;
  border-color: var(--green);
}

.editor-line-numbers {
  height: 100%;
  padding: 18px 10px;
  margin: 0;
  overflow: hidden;
  color: #a0a5a1;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.72;
  text-align: right;
  background: #fafbf9;
  border-right: 1px solid #e4e7e5;
  user-select: none;
}

.editorial-ui .raw-copy-field textarea {
  height: 100%;
  min-height: 100%;
  padding: 18px 20px;
  margin: 0;
  color: #2f3532;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
  line-height: 1.72;
  background: #fff;
  border: 0;
  border-radius: 0;
  outline: 0;
  box-shadow: none;
}

.editorial-ui .raw-copy-field textarea::placeholder {
  color: #9aa09c;
}

.editorial-ui .raw-copy-field textarea:focus {
  outline: 0;
  border: 0;
}

.editor-counter {
  display: block;
  margin-top: 9px;
  color: #858b87;
  font-size: 0.75rem;
  font-weight: 500;
}

.editor-footer {
  display: flex;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
  margin-top: 38px;
}

.editorial-ui .confirmation-row {
  display: grid;
  max-width: 620px;
  grid-template-columns: 18px 1fr;
  gap: 9px;
  align-items: start;
  padding: 0;
  margin: 0;
  color: #555d58;
  font-size: 0.78rem;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.editorial-ui .confirmation-row input {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
}

.editorial-ui .confirmation-row small {
  margin-top: 4px;
  color: #8a908c;
  font-size: 0.71rem;
  line-height: 1.5;
}

.editorial-ui .quick-actions {
  flex: 0 0 auto;
  margin: 0;
}

.editorial-ui .quick-actions .primary {
  min-width: 244px;
  min-height: 56px;
  padding: 0 26px;
  border-radius: 3px;
  font-size: 0.96rem;
}

.editorial-ui .panel,
.editorial-ui .step,
.editorial-ui .analysis-stage {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
  backdrop-filter: none;
}

.editorial-ui .workflow,
.editorial-ui .workspace,
.editorial-ui .analysis,
.editorial-ui .region-editor,
.editorial-ui .text-review,
.editorial-ui .results {
  padding: 34px 0;
}

.editorial-ui .section-heading {
  align-items: end;
  margin-bottom: 24px;
}

.editorial-ui .workflow > .section-heading {
  display: block;
}

.editorial-ui .workflow > .section-heading h2 {
  margin: 0;
}

.editorial-ui .section-heading .eyebrow,
.editorial-ui .panel .eyebrow {
  color: var(--green);
}

.editorial-ui .step {
  border-radius: 6px;
}

.editorial-ui .step.active {
  color: #fff;
  background: var(--green-dark);
}

.editorial-ui .dropzone,
.editorial-ui .preview-empty,
.editorial-ui .preview-frame {
  background: #fafbf9;
  border-color: #cfd4d1;
  border-radius: 6px;
}

.editorial-ui .drop-icon,
.editorial-ui .preview-empty span {
  color: var(--green-dark);
  background: #e8f2ed;
  border-radius: 6px;
}

.editorial-ui .quick-analysis {
  padding: 28px 30px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
}

.editorial-ui .quick-progress-heading > strong {
  color: var(--green);
}

.editorial-ui .quick-progress-track {
  background: #e5e9e6;
}

.editorial-ui .quick-progress-track span {
  background: var(--green);
}

.editorial-ui .quick-stage-list span {
  color: #969c98;
}

.editorial-ui .quick-stage-list span.is-active,
.editorial-ui .quick-stage-list span.is-complete {
  color: var(--green-dark);
}

.editorial-ui .quick-stage-list span.is-complete::after {
  color: var(--green);
}

.editorial-ui .result-summary-card,
.editorial-ui .result-summary-card.status-revision {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  box-shadow: none;
}

.editorial-ui .result-summary-card.status-revision {
  border-left-color: #a84d3a;
}

.editorial-ui .result-summary-card p,
.editorial-ui .summary-metric small {
  color: var(--muted);
}

.editorial-ui .result-status-label {
  color: var(--green-dark);
  background: #e8f2ed;
  border-radius: 4px;
}

.editorial-ui .summary-metric {
  color: var(--ink);
  background: #f6f8f6;
  border-color: #e0e4e1;
  border-radius: 5px;
}

.editorial-ui .quick-issue-card,
.editorial-ui .corrected-copy,
.editorial-ui .evidence-card,
.editorial-ui .empty-result {
  background: #fff;
  border-radius: 6px;
}

.editorial-ui .issue-filter button,
.editorial-ui .copy-version-tabs button,
.editorial-ui .severity-badge,
.editorial-ui .issue-refs span {
  border-radius: 4px;
}

.editorial-ui .issue-filter button.is-active,
.editorial-ui .copy-version-tabs button.is-active {
  background: var(--green);
  border-color: var(--green);
}

.editorial-ui .footer {
  width: min(1360px, calc(100% - 64px));
  padding: 26px 0 36px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

@media (max-width: 920px) {
  .editorial-ui .nav,
  .editorial-ui .hero,
  .editorial-ui .workflow,
  .editorial-ui .workspace,
  .editorial-ui .analysis,
  .editorial-ui .region-editor,
  .editorial-ui .text-review,
  .editorial-ui .results,
  .editorial-ui .quick-review,
  .editorial-ui .quick-analysis,
  .editorial-ui .quick-results,
  .editorial-ui .footer {
    width: min(100% - 40px, 1360px);
  }

  .editorial-ui .scope-form-grid {
    gap: 18px;
  }

  .editorial-ui .quick-review-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .editorial-ui .quick-guide-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    padding: 0 0 24px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .editorial-ui .scope-coverage,
  .editorial-ui .evidence-point {
    padding: 0;
    margin: 0;
    border: 0;
  }
}

@media (max-width: 700px) {
  .editorial-ui .site-header,
  .editorial-ui .nav {
    min-height: 58px;
  }

  .editorial-ui .nav {
    width: calc(100% - 28px);
  }

  .editorial-ui .brand {
    padding-right: 16px;
  }

  .editorial-ui .brand::after {
    height: 26px;
    margin-left: 16px;
  }

  .editorial-ui .brand strong {
    font-size: 1.15rem;
  }

  .editorial-ui .review-mode-tabs {
    gap: 17px;
  }

  .editorial-ui .review-mode-tab {
    min-height: 58px;
    font-size: 0.82rem;
  }

  .editorial-ui .hero,
  .editorial-ui .workflow,
  .editorial-ui .workspace,
  .editorial-ui .analysis,
  .editorial-ui .region-editor,
  .editorial-ui .text-review,
  .editorial-ui .results,
  .editorial-ui .quick-review,
  .editorial-ui .quick-analysis,
  .editorial-ui .quick-results,
  .editorial-ui .footer {
    width: calc(100% - 28px);
  }

  .editorial-ui .hero {
    padding: 38px 0 32px;
  }

  .editorial-ui h1 {
    font-size: 2rem;
  }

  .review-progress {
    gap: 9px;
  }

  .review-progress-step {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 7px;
    font-size: 0.76rem;
  }

  .review-progress-step::after {
    display: none;
  }

  .review-progress-step > span {
    width: 28px;
    height: 28px;
    font-size: 0.67rem;
  }

  .editorial-ui .scope-form-grid,
  .editorial-ui .quick-guide-panel {
    grid-template-columns: 1fr;
  }

  .editorial-ui .scope-form-grid {
    gap: 18px;
  }

  .editorial-ui .quick-guide-panel {
    gap: 18px;
  }

  .editorial-ui .editor-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .editorial-ui .quick-actions,
  .editorial-ui .quick-actions .primary {
    width: 100%;
  }

  .editorial-ui .raw-copy-field textarea {
    min-height: 100%;
  }

  .editor-textarea-shell {
    height: 360px;
  }
}
