:root {
  color-scheme: light;
  --bg: #f3f5f4;
  --panel: #ffffff;
  --panel-soft: #f8faf9;
  --line: #d9e0dd;
  --line-strong: #b9c8c3;
  --text: #18231f;
  --muted: #66736e;
  --faint: #8a9692;
  --accent: #1d6b5f;
  --accent-dark: #135047;
  --accent-soft: #e8f2f0;
  --warn: #8d4f2d;
  --shadow: 0 16px 40px rgba(30, 48, 43, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #eef4f2 0, rgba(238, 244, 242, 0) 340px),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.shell {
  min-height: 100vh;
  padding: 22px;
}

.topbar {
  max-width: 1480px;
  margin: 0 auto 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.app-version {
  margin: 4px 0 0;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.3;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.25;
}

h1 {
  font-size: 28px;
  font-weight: 750;
}

h2 {
  font-size: 18px;
  font-weight: 720;
}

h3 {
  font-size: 16px;
  font-weight: 700;
}

.topbar-status {
  min-width: 92px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  font-size: 13px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.feature-nav {
  min-height: 36px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 3px;
  background: rgba(255, 255, 255, 0.76);
}

.feature-tab {
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}

.feature-tab.active {
  background: var(--accent);
  color: #fff;
}

.welcome-text {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(380px, 510px) minmax(0, 1fr);
  gap: 18px;
  max-width: 1480px;
  margin: 0 auto;
}

.platform-home {
  max-width: 1480px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.home-overview {
  min-height: 132px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.home-overview h2 {
  font-size: 24px;
}

.home-lead {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.home-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.home-metric {
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: grid;
  align-content: center;
  gap: 7px;
}

.home-metric span {
  color: var(--faint);
  font-size: 12px;
}

.home-metric strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
}

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

.feature-card {
  min-height: 300px;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feature-card[data-feature-card="authenticity"] {
  border-top-color: #5367a6;
}

.feature-card[data-feature-card="empirical"] {
  border-top-color: #9a6a2f;
}

.feature-card-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.feature-state {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
}

.feature-state.pending {
  background: #f7eee4;
  color: #82501e;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.feature-tags span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--panel-soft);
  font-size: 12px;
}

.feature-card button {
  width: 100%;
}

.muted-card {
  background: #fffdf9;
}

.locked-card {
  opacity: 0.72;
}

.shared-base {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.shared-resource-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.shared-resource-grid article {
  min-height: 118px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  display: grid;
  align-content: start;
  gap: 8px;
}

.shared-resource-grid strong {
  font-size: 14px;
}

.shared-resource-grid span {
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
}

.shared-resource-grid small {
  color: var(--muted);
  line-height: 1.45;
  font-size: 12px;
}

.feature-roadmap {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 16px;
}

.feature-roadmap div {
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  display: grid;
  align-content: start;
  gap: 8px;
}

.feature-roadmap span {
  color: var(--muted);
  line-height: 1.5;
  font-size: 13px;
}

.input-panel,
.result-panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.input-panel {
  min-height: calc(100vh - 118px);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.guide {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 13px;
  color: var(--muted);
  background: var(--panel-soft);
}

.guide.guide-pulse {
  animation: guidePulse 1.4s ease-in-out 2;
}

.guide summary {
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

.guide p {
  margin: 8px 0 0;
  line-height: 1.65;
  font-size: 13px;
}

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

.analysis-flow div {
  min-height: 98px;
  padding: 11px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: grid;
  gap: 6px;
  align-content: start;
}

.analysis-flow span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
}

.analysis-flow strong {
  font-size: 13px;
  color: var(--text);
}

.analysis-flow small {
  color: var(--muted);
  line-height: 1.45;
  font-size: 12px;
}

.field-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  padding-top: 2px;
}

.field-head.compact {
  padding-top: 0;
}

.clear-btn {
  min-height: 34px;
  padding: 0 12px;
  background: #fff;
  color: #8a4b21;
  border-color: #dfc6b6;
}

.clear-btn:hover:not(:disabled) {
  background: #fff6ef;
  border-color: #c89372;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
}

.checkline input {
  width: auto;
  margin: 0;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px 12px;
  color: var(--text);
  font: inherit;
  background: #fff;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 107, 95, 0.12);
}

textarea {
  resize: vertical;
  line-height: 1.65;
}

#caseText {
  min-height: 40vh;
}

.revision-box {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

#empiricalWorkspace textarea {
  min-height: 104px;
}

.empirical-next {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.empirical-next h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.empirical-workbench-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
}

.empirical-workbench-nav button {
  min-height: 36px;
  padding: 0 12px;
  border-color: #cbd9d4;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  white-space: nowrap;
}

.empirical-workbench-nav button.active {
  border-color: var(--accent);
  background: #e8f3ef;
  color: var(--accent-dark);
}

.empirical-stage-guide {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr);
  gap: 10px;
  margin-bottom: 14px;
}

.empirical-stage-guide:empty {
  display: none;
}

.empirical-stage-guide > div {
  border: 1px solid #d8e3df;
  border-radius: 8px;
  padding: 12px;
  background: #f8fbfa;
}

.empirical-stage-guide strong {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-size: 14px;
}

.empirical-stage-guide ul {
  margin: 0;
  padding-left: 18px;
}

.empirical-stage-guide li,
.empirical-stage-guide p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

[data-empirical-stage-panel][hidden] {
  display: none !important;
}

.compact-list {
  display: grid;
  gap: 10px;
}

.compact-list-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-soft);
  display: grid;
  gap: 5px;
}

.compact-list-item strong {
  color: var(--text);
}

.compact-list-title {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  font: inherit;
  font-weight: 760;
  text-align: left;
  line-height: 1.45;
}

.compact-list-title:hover:not(:disabled) {
  transform: none;
  text-decoration: underline;
}

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

.learning-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.learning-overview-card,
.learning-quality-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.learning-overview-card {
  display: grid;
  gap: 7px;
  align-content: start;
  min-width: 0;
}

.learning-overview-card.muted {
  background: #f8faf9;
}

.learning-overview-card strong,
.learning-quality-panel strong {
  color: var(--accent-dark);
  line-height: 1.35;
}

.learning-overview-card span,
.learning-overview-card small,
.learning-quality-panel span {
  color: var(--muted);
  line-height: 1.55;
}

.learning-overview-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  line-height: 1.55;
}

.learning-overview-card li {
  overflow-wrap: anywhere;
}

.learning-quality-panel {
  display: grid;
  gap: 9px;
  margin-bottom: 14px;
}

.learning-card {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.learning-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.65;
}

.learning-card small {
  color: var(--muted);
  line-height: 1.55;
}

.compact-list-item span,
.compact-list-item small {
  color: var(--muted);
  line-height: 1.55;
}

.compact-list-item span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.empirical-material-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.empirical-material-form label:nth-last-child(-n + 2) {
  grid-column: 1 / -1;
}

.empirical-material-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  margin-top: 12px;
}

.plan-advanced-fields {
  margin-top: 4px;
}

.plan-advanced-fields label {
  margin-top: 12px;
}

.sample-batch-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.retrieval-run-panel {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #b8d7ca;
  border-radius: 8px;
  background: #f4faf7;
}

.retrieval-run-panel strong {
  color: var(--accent-dark);
}

.retrieval-run-panel span,
.retrieval-run-panel small {
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.retrieval-next-step,
.statistics-next-step {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #b8d7ca;
  border-radius: 8px;
  background: #f4faf7;
}

.retrieval-next-step strong,
.statistics-next-step strong {
  color: var(--accent-dark);
}

.retrieval-next-step span,
.statistics-next-step span {
  color: var(--muted);
  line-height: 1.55;
}

.retrieval-next-step .mini-btn,
.statistics-next-step .mini-btn {
  justify-self: start;
}

.sample-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 12px;
}

.sample-overview-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.sample-overview-card.warn {
  border-color: #f0c36d;
  background: #fffaf0;
}

.sample-overview-card small {
  display: block;
  color: var(--muted);
  line-height: 1.35;
}

.sample-overview-card strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 24px;
  line-height: 1.1;
}

.sample-risk-panel {
  display: grid;
  gap: 8px;
  margin: 10px 0 12px;
  padding: 12px;
  border: 1px solid #f0c36d;
  border-radius: 8px;
  background: #fffaf0;
}

.sample-risk-panel strong {
  color: var(--text);
}

.sample-risk-panel ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.55;
}

.sample-risk-panel li,
.sample-dedup-details small,
.sample-dedup-details span {
  overflow-wrap: anywhere;
}

.sample-review-note {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #b8d7ca;
  border-radius: 8px;
  background: #f4faf7;
}

.sample-review-note strong {
  color: var(--accent-dark);
}

.sample-review-note span {
  color: var(--muted);
  line-height: 1.6;
}

.manual-sample-details {
  margin-top: 12px;
}

.manual-retrieval-details {
  margin: 10px 0 14px;
}

.sample-dedup-details .compact-list-item {
  gap: 7px;
}

.sample-dedup-details .mini-btn {
  justify-self: start;
}

.chart-gate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0;
}

.chart-gate-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.chart-gate-card.warn {
  border-color: #f0c36d;
  background: #fffaf0;
}

.chart-gate-card span,
.chart-gate-card small {
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.wide-label {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.wide-label textarea {
  min-height: 92px;
}

.material-result {
  margin-top: 12px;
}

.empirical-review-list {
  display: grid;
  gap: 10px;
}

.review-feedback-card span {
  white-space: normal;
  display: block;
  max-height: 220px;
  overflow: auto;
}

.empirical-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.empirical-chart-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fff;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.empirical-chart-card h3 {
  margin: 0;
  font-size: 15px;
}

.empirical-bar-list {
  display: grid;
  gap: 9px;
}

.empirical-bar-row {
  display: grid;
  grid-template-columns: minmax(78px, 0.85fr) minmax(100px, 1.4fr) minmax(62px, auto);
  gap: 8px;
  align-items: center;
  min-width: 0;
  font-size: 13px;
}

.empirical-bar-row span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
}

.empirical-bar-row strong {
  white-space: nowrap;
  color: var(--text);
}

.empirical-bar-track {
  height: 9px;
  border-radius: 999px;
  background: #e8efec;
  overflow: hidden;
}

.empirical-bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.retrieval-plan-editor {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
}

.retrieval-plan-editor > summary,
.manual-retrieval-details > summary {
  cursor: pointer;
  font-weight: 760;
  color: var(--text);
}

.retrieval-decision-group {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.retrieval-decision-group.ready {
  border-color: #b8d7ca;
  background: #f7fbf9;
}

.retrieval-decision-group.review {
  border-color: #e4d29a;
  background: #fffdf4;
}

.retrieval-decision-group.blocked {
  background: #fafafa;
}

.retrieval-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.retrieval-group-head h3 {
  margin: 0;
}

.retrieval-group-head span {
  color: var(--muted);
  font-weight: 700;
}

.retrieval-decision-list {
  gap: 10px;
}

.retrieval-decision-card {
  border-left: 4px solid #d8e1de;
}

.retrieval-decision-card.ready {
  border-left-color: var(--accent);
}

.retrieval-decision-card.warn {
  border-left-color: #f0b94d;
}

.retrieval-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.retrieval-select-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text);
}

.retrieval-select-row input {
  width: auto;
  min-width: 16px;
}

.tag-pill {
  display: inline-grid;
  place-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.upload-limit-hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.upload-limit-hint.warn {
  color: #8d4f2d;
}

.upload-limit-hint.error {
  color: #8d2d2d;
}

.auto-assist-panel {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #b8d7ca;
  border-radius: 8px;
  background: #f4faf7;
  color: var(--text);
}

.auto-assist-panel span,
.auto-assist-panel small {
  color: var(--muted);
  line-height: 1.55;
}

.auto-review-strip {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.auto-review-strip span {
  display: inline-grid;
  place-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e8f3ef;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 760;
}

.sample-decision-list {
  gap: 12px;
}

.sample-decision-card {
  border-left: 4px solid #b8d7ca;
}

.sample-decision-card.warn {
  border-left-color: #f0b94d;
}

.sample-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.sample-card-actions .mini-btn {
  min-height: 32px;
}

.sample-evidence-details p {
  margin: 6px 0;
  color: var(--muted);
  line-height: 1.65;
}

.material-summary {
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fbfdfc;
  color: var(--text);
  font: inherit;
  line-height: 1.65;
}

.matrix-result {
  display: grid;
  gap: 12px;
}

.matrix-result h3 {
  margin: 6px 0 0;
  font-size: 15px;
}

.matrix-table {
  max-height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.test-notice {
  margin: 0;
  padding: 10px 11px;
  border: 1px solid #d9cda5;
  border-radius: 8px;
  background: #fff8df;
  color: #6e5b1b;
  font-size: 13px;
  line-height: 1.6;
}

#feedbackText {
  min-height: 94px;
}

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

#empiricalWorkspace .actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-action-dock {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #cbd9d4;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0, #f5faf8 100%);
}

.auth-primary-btn {
  min-height: 56px;
  padding: 0 18px;
  display: grid;
  place-items: center;
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 24px rgba(29, 107, 95, 0.18);
}

.auth-primary-btn span {
  font-size: 19px;
  line-height: 1;
  font-weight: 850;
}

.auth-primary-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}

.auth-secondary-actions {
  display: grid;
  grid-template-columns: 0.8fr 1fr 1fr;
  gap: 8px;
}

.auth-option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

button {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  min-height: 42px;
  padding: 0 14px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

#confirmClearCaseBtn {
  background: #9f4f2d;
  border-color: #9f4f2d;
  color: #fff;
}

.ghost-btn,
.icon-btn,
.mini-btn {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 13px;
}

.icon-btn {
  width: 34px;
  padding: 0;
}

.mini-btn {
  min-height: 28px;
  padding: 4px 8px;
  margin-right: 5px;
}

.mini-btn.danger {
  color: #8d2d2d;
}

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

.draft-preview {
  max-height: 180px;
  overflow: auto;
  white-space: pre-wrap;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  line-height: 1.65;
}

.danger-btn {
  background: #8d2d2d;
  border-color: #8d2d2d;
  color: #fff;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

button:disabled {
  cursor: not-allowed;
  color: #9aa3ad;
  background: #f1f3f5;
}

button.soft-disabled:not(:disabled) {
  color: #7d8790;
  border-color: #d5dde2;
  background: #f5f7f8;
  box-shadow: none;
}

button.soft-disabled:not(:disabled):hover {
  transform: none;
  border-color: #c2ccd3;
  background: #eef2f4;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(22, 31, 28, 0.38);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(13, 26, 22, 0.24);
}

.modal p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

#quickVersionBtn {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.busy-track {
  position: relative;
  height: 10px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ecea;
}

.busy-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 18%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-dark), #2d9a86 58%, #75c7b9);
  animation: busyPulse 1.8s ease-in-out infinite;
}

#busyModalHint {
  margin-top: 12px;
  font-size: 12px;
}

.auth-run-estimate {
  display: grid;
  gap: 6px;
  border: 1px solid #dce5e1;
  border-radius: 8px;
  padding: 12px;
  background: #f7faf8;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.auth-run-estimate strong {
  color: var(--ink);
  font-size: 14px;
}

.auth-run-estimate span {
  display: block;
}

.admin-modal {
  width: min(1180px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
}

.login-modal {
  width: min(640px, 100%);
}

.login-modal-fields {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 12px;
  margin-top: 18px;
}

.form-status {
  min-height: 20px;
  margin: 10px 0 0;
  color: #9a4f12;
  font-size: 13px;
}

.modal-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-login,
.admin-panel,
.admin-create {
  display: grid;
  gap: 12px;
}

.admin-module-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 0 !important;
  border-top: 0 !important;
}

.admin-module-strip .admin-tab {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.admin-module-strip .admin-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.admin-tab-page {
  display: none;
}

.admin-tab-page.active {
  display: grid;
  gap: 12px;
}

.admin-create {
  grid-template-columns: 1fr 1fr 1fr auto;
  align-items: end;
  margin: 16px 0;
}

.admin-panel section {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.admin-status {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: stretch;
  border-top: 0 !important;
  padding-top: 0 !important;
}

.admin-maintenance-panel {
  border: 1px solid #e5c07b;
  border-radius: 8px;
  padding: 12px;
  background: #fffaf0;
}

.admin-maintenance-panel.active {
  border-color: #c97936;
  background: #fff3e2;
}

.admin-maintenance-panel h3 {
  margin: 0 0 6px;
}

.admin-maintenance-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: 10px;
}

.metric-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: var(--panel-soft);
}

.metric-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.metric-card strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.25;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
  max-width: 100%;
  overflow: visible;
}

.metric-card.warn strong {
  color: #8d2d2d;
}

.admin-table {
  overflow-x: auto;
}

.user-link {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  font: inherit;
  font-weight: 750;
  text-align: left;
}

.case-link {
  width: 100%;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 650;
  text-align: left;
  line-height: 1.55;
}

.case-link:hover:not(:disabled) {
  transform: none;
  color: var(--accent-dark);
  text-decoration: underline;
}

.user-link:hover:not(:disabled) {
  transform: none;
  text-decoration: underline;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.compact-metrics {
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  margin: 10px 0 12px;
}

.compact-metrics .metric-card {
  padding: 10px;
}

.compact-metrics .metric-card strong {
  font-size: clamp(15px, 1.2vw, 18px);
}

.admin-table .wide-cell {
  min-width: 180px;
  max-width: 360px;
  white-space: normal;
}

.inline-full-text {
  display: inline-block;
  max-width: 100%;
  vertical-align: top;
  font: inherit;
  color: inherit;
}

.inline-full-text summary {
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  list-style-position: inside;
}

.inline-full-text[open] summary {
  white-space: normal;
  overflow: visible;
}

.inline-full-text span {
  display: block;
  margin-top: 6px;
  max-height: 220px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.metric-card strong .inline-full-text span,
.admin-product-card dd .inline-full-text span {
  font-size: 13px;
  font-weight: 600;
}

.request-detail {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdfc;
}

.request-detail[hidden] {
  display: none;
}

.request-detail h4 {
  margin: 0 0 10px;
}

.admin-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.admin-product-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdfc;
  min-width: 0;
  overflow: visible;
}

.admin-product-card h4 {
  margin: 2px 0 8px;
}

.admin-product-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.admin-product-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(78px, 1fr));
  gap: 8px;
  margin: 8px 0 0;
}

.admin-product-card dl.shared-cache-stats {
  grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
}

.admin-product-card dt {
  color: var(--muted);
  font-size: 11px;
}

.admin-product-card dd {
  margin: 2px 0 0;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.25;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
  overflow: visible;
}

.admin-product-card dl.shared-cache-stats dd {
  font-size: 14px;
}

.admin-card-action {
  border-left: 3px solid var(--accent);
  padding-left: 8px;
  color: var(--ink) !important;
  background: #f7faf8;
}

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

.admin-card-details summary {
  cursor: pointer;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 750;
  list-style-position: inside;
}

.admin-card-details.compact-details {
  margin-top: 0;
}

.admin-product-card.compact {
  min-height: 110px;
}

.admin-insight-panel {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fff;
}

.admin-insight-panel:empty {
  display: none;
}

.admin-insight-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  margin-bottom: 10px;
}

.admin-insight-head h4 {
  margin: 0;
  font-size: 15px;
}

.admin-insight-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.admin-insight-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
}

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

.admin-route-card {
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: #f8faf9;
  display: grid;
  align-content: start;
  gap: 8px;
}

.admin-route-card strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.admin-route-card span {
  display: block;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  min-width: 0;
}

.admin-route-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-pkulaw-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 10px;
}

.admin-pkulaw-summary {
  border: 1px solid #bed3cd;
  border-radius: 8px;
  padding: 11px;
  background: #f5fbf8;
}

.admin-pkulaw-summary dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.admin-pkulaw-summary dt {
  color: var(--muted);
  font-size: 11px;
}

.admin-pkulaw-summary dd {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 850;
}

.admin-pkulaw-list {
  display: grid;
  gap: 7px;
}

.admin-pkulaw-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}

.admin-pkulaw-row strong,
.admin-pkulaw-row small {
  display: block;
  min-width: 0;
}

.admin-pkulaw-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.admin-pkulaw-row em {
  min-width: 46px;
  border-radius: 999px;
  padding: 4px 7px;
  background: #eef4f2;
  color: var(--accent-dark);
  font-style: normal;
  font-weight: 850;
  text-align: center;
}

.admin-cache-breakdown {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.admin-cache-breakdown div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  min-width: 0;
}

.admin-cache-breakdown div.cleanable {
  border-color: #f0c36d;
  background: #fffaf0;
}

.admin-cache-breakdown div.retained {
  border-color: #b8d7c5;
  background: #f5fbf7;
}

.admin-cache-breakdown strong,
.admin-cache-breakdown span,
.admin-cache-breakdown small {
  display: block;
}

.admin-cache-breakdown span {
  margin-top: 3px;
  font-weight: 800;
  white-space: nowrap;
  word-break: keep-all;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-cache-breakdown small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.failure-detail-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.failure-detail-list section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.failure-detail-list strong,
.failure-detail-list small {
  display: block;
}

.failure-detail-list small {
  margin-top: 4px;
  color: var(--muted);
}

.failure-detail-list pre {
  max-width: min(680px, 70vw);
  max-height: 220px;
  overflow: auto;
  margin: 8px 0 0;
  padding: 8px;
  border-radius: 6px;
  background: #f7faf8;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.admin-table table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 13px;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 9px;
  text-align: left;
  white-space: nowrap;
}

.admin-table th {
  color: var(--muted);
  background: var(--panel-soft);
  font-weight: 700;
}

.new-token-result {
  min-height: 22px;
  color: var(--accent-dark);
  font-weight: 700;
}

#analyzeBtn,
#reviseBtn,
#verifyBtn,
#authCheckBtn {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

#analyzeBtn:hover:not(:disabled),
#reviseBtn:hover:not(:disabled),
#verifyBtn:hover:not(:disabled),
#authCheckBtn:hover:not(:disabled) {
  background: var(--accent-dark);
}

.result-panel {
  min-height: calc(100vh - 118px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.result-head {
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tab,
.auth-tab {
  min-height: 36px;
  padding: 0 13px;
}

.tab.active,
.auth-tab.active {
  background: var(--accent-soft);
  border-color: var(--line-strong);
  color: var(--accent-dark);
}

.tab-page,
.auth-page {
  display: none;
  padding: 18px;
  overflow: auto;
}

.process-rail {
  padding: 14px 16px 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(96px, 1fr));
  gap: 8px;
}

.progress-shell {
  margin: 12px 16px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0, #f8faf9 100%);
}

.progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 9px;
}

#progressStage {
  color: var(--accent-dark);
  font-weight: 750;
  font-size: 13px;
}

#progressDetail {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.progress-track {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ecea;
}

.progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-dark), #2d9a86 58%, #75c7b9);
  transition: width 0.45s ease;
}

.progress-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  animation: progressShine 1.25s linear infinite;
}

.reasoning-panel {
  margin: 10px 16px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.reasoning-panel[hidden] {
  display: none;
}

.reasoning-panel summary {
  min-height: 40px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 750;
}

.reasoning-panel summary small {
  color: var(--faint);
  font-size: 12px;
  font-weight: 500;
}

#reasoningTrace {
  margin: 0;
  padding: 0 12px 12px 32px;
  color: var(--muted);
}

#reasoningTrace li {
  padding: 8px 0 8px 2px;
}

#reasoningTrace li::marker {
  color: var(--line-strong);
}

#reasoningTrace li.active::marker,
#reasoningTrace li.active strong {
  color: var(--accent-dark);
}

#reasoningTrace strong {
  display: block;
  color: var(--text);
  font-size: 13px;
}

#reasoningTrace p {
  margin: 4px 0 0;
  line-height: 1.6;
  font-size: 12px;
}

.step-review {
  margin: 12px 16px 0;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fbfdfc;
  box-shadow: 0 10px 28px rgba(30, 48, 43, 0.07);
}

.step-review[hidden] {
  display: none;
}

.step-review-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

#stepReviewBadge {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 750;
}

.choice-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 9px;
}

.choice-row label {
  min-height: 36px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
}

.choice-row input {
  width: auto;
  margin: 0;
}

#stepReviewFeedback {
  min-height: 58px;
}

.outline-compare {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdfc;
}

.outline-compare[hidden] {
  display: none;
}

.outline-compare h4 {
  margin: 0;
}

.section-hint {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.outline-version {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.outline-version summary {
  min-height: 48px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: minmax(180px, 0.72fr) minmax(180px, 1fr);
  gap: 12px;
  align-items: center;
  cursor: pointer;
}

.outline-version summary::marker {
  color: var(--accent-dark);
}

.outline-version-pick {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 750;
  color: var(--text);
}

.outline-version-pick input {
  width: auto;
  margin: 0;
}

.outline-version summary small {
  color: var(--muted);
  line-height: 1.45;
}

.outline-version-body {
  padding: 0 12px 12px 32px;
  border-top: 1px solid var(--line);
}

.outline-version-body ol {
  margin: 8px 0 0;
  padding-left: 20px;
}

.outline-version-body li {
  margin: 7px 0;
  line-height: 1.55;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.compare-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.compare-box h5 {
  margin: 0 0 8px;
  color: var(--accent-dark);
}

.compare-box ol {
  margin: 0;
  padding-left: 20px;
}

.compare-box li {
  margin: 7px 0;
  line-height: 1.55;
}

.compare-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.step-review-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

#continueStepBtn {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.stage {
  position: relative;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 10px 9px;
  background: var(--panel-soft);
  overflow: hidden;
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 0;
  background: rgba(29, 107, 95, 0.11);
  transition: width 0.5s ease;
}

.stage.done::before,
.stage.active::before {
  width: 100%;
}

.stage span,
.stage strong {
  position: relative;
  display: block;
}

.stage span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
}

.stage strong {
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.35;
}

.stage em {
  position: relative;
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.stage.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 107, 95, 0.10);
}

.tab-page.active {
  display: block;
}

.auth-page.active {
  display: block;
}

.auth-progress-panel {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfdfc;
}

.auth-progress-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.empty {
  min-height: 420px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--panel-soft);
  text-align: center;
  line-height: 1.7;
}

.compact-empty {
  min-height: 120px;
}

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

.claim-path-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 12px;
}

.graph-hint {
  margin: 0 0 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 13px;
}

.graph-card-section {
  margin-top: 14px;
}

.graph-card-head {
  margin-bottom: 10px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.graph-card-section h3 {
  margin: 0;
  color: var(--accent-dark);
}

.claim-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fff;
}

.claim-no {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 800;
  font-size: 13px;
}

.claim-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.claim-card p {
  margin: 5px 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

.claim-card strong {
  display: inline-block;
  min-width: 72px;
  margin-right: 6px;
  color: var(--text);
}

.block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  background: #fff;
}

.block + .block {
  margin-top: 14px;
}

.block h2,
.block h3 {
  margin: 0 0 10px;
}

.block p,
.block li {
  line-height: 1.75;
}

.block ul {
  margin: 0;
  padding-left: 20px;
}

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

.evaluation-grid section {
  min-height: 112px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.evaluation-grid div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.evaluation-grid span {
  color: var(--accent-dark);
  font-weight: 800;
}

.evaluation-grid p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 12px;
}

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

.coverage-grid section {
  min-height: 116px;
  padding: 12px;
  border: 1px solid #c9ddd7;
  border-radius: 8px;
  background: #f5fbf9;
}

.coverage-grid small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.coverage-grid strong {
  display: block;
  margin-top: 5px;
  color: #113f38;
  font-size: 24px;
  line-height: 1.1;
}

.coverage-grid p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 12px;
}

.verification-plan .section-title-row span {
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.plan-step {
  min-height: 138px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.plan-step.done {
  border-color: #91c8b4;
  background: #f3fbf7;
}

.plan-step.pending {
  border-color: #e0c47c;
  background: #fffaf0;
}

.plan-step.off {
  opacity: .72;
}

.plan-step div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.plan-step strong {
  color: var(--text);
  font-size: 14px;
}

.plan-step em {
  color: var(--accent-dark);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.plan-step p,
.plan-step span {
  display: block;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.plan-step small {
  display: inline-flex;
  margin-top: 9px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(19, 80, 71, .1);
  color: var(--accent-dark);
  font-weight: 800;
}

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

.round-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.round-card {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  min-height: 118px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.round-card > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #113f38;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.round-card strong,
.round-card em {
  display: block;
}

.round-card strong {
  font-size: 14px;
}

.round-card em {
  margin-top: 3px;
  color: var(--accent-dark);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.round-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.round-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.round-meter {
  margin-top: 8px;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe9e6;
}

.round-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #287c6d, #6aa58a);
}

.radar-wrap {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: 18px;
  align-items: center;
  margin: 10px 0 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(246,248,251,.92));
}

.radar-chart {
  width: 100%;
  max-width: 300px;
  height: auto;
  display: block;
}

.radar-chart text {
  font-size: 13px;
  fill: var(--text);
  font-weight: 700;
}

.radar-chart .radar-score {
  fill: #0d332f;
  font-size: 11px;
  font-weight: 800;
  paint-order: stroke;
  stroke: rgba(255,255,255,.94);
  stroke-width: 4px;
}

.radar-chart .score-excellent { fill: #08764f; }
.radar-chart .score-good { fill: #087b8c; }
.radar-chart .score-caution { fill: #9a6400; }
.radar-chart .score-danger { fill: #b33d1f; }
.radar-chart .score-zero { fill: #b42318; }

.score-excellent { color: #08764f; }
.score-good { color: #087b8c; }
.score-caution { color: #9a6400; }
.score-danger { color: #b33d1f; }
.score-zero { color: #b42318; }

.radar-wrap p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.diagnosis-report {
  display: grid;
  gap: 12px;
}

.diagnosis-lead {
  min-height: 116px;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.diagnosis-lead.warn {
  border-left-color: #9a3d2f;
  background: #fff8f5;
}

.diagnosis-lead h2 {
  font-size: 24px;
}

.diagnosis-lead strong {
  min-width: 80px;
  text-align: right;
  color: var(--accent-dark);
  font-size: 30px;
}

.diagnosis-item {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.diagnosis-item:first-of-type {
  border-top: 0;
}

.diagnosis-item div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.diagnosis-item span {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
}

.diagnosis-item em {
  margin-left: auto;
  color: #8a4b21;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.auth-warning {
  margin-bottom: 12px;
  padding: 11px 12px;
  border: 1px solid #d9cda5;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  background: #fff8df;
  color: #6e5b1b;
  line-height: 1.55;
  font-size: 13px;
}

.auth-score-grid {
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.trust-policy {
  border-color: #bed3cd;
  background: #f4faf8;
}

.evidence-summary {
  margin-bottom: 12px;
  border-color: #bed3cd;
  background: #f7fbfa;
}

.evidence-table td:nth-child(2) {
  min-width: 180px;
  max-width: 360px;
  word-break: break-word;
}

.evidence-table td:nth-child(3) {
  font-weight: 700;
  color: var(--accent-dark);
}

.risk-group {
  margin-top: 12px;
}

.risk-item {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.risk-item:first-of-type {
  border-top: 0;
}

.risk-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

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

.risk-item blockquote {
  margin: 10px 0;
  padding: 9px 11px;
  border-left: 4px solid var(--line-strong);
  background: var(--panel-soft);
  color: var(--text);
  line-height: 1.65;
}

.risk-item p {
  margin: 8px 0 0;
}

.risk-item .suggestion {
  color: var(--accent-dark);
}

.risk-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.risk-badge.critical {
  background: #fdecec;
  color: #9f2424;
}

.risk-badge.high {
  background: #fff0df;
  color: #9a4b12;
}

.risk-badge.medium {
  background: #fff8df;
  color: #7a6217;
}

.risk-badge.low {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.reference-diagnostics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 160px;
}

.ref-diag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.ref-diag strong {
  color: var(--text);
}

.ref-diag.ref-critical,
.ref-diag.ref-high {
  border-color: #e7bda1;
  background: #fff5ed;
  color: #8e3d0e;
}

.ref-diag.ref-medium {
  border-color: #e4d39b;
  background: #fffbea;
  color: #756017;
}

.ref-diag.ref-low {
  border-color: #c7dcd5;
  background: #f5fbf9;
  color: var(--accent-dark);
}

.muted-inline {
  color: var(--muted);
  font-size: 12px;
}

.marked-text {
  display: grid;
  gap: 8px;
}

.marked-text p {
  margin: 0;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  line-height: 1.7;
  background: #fff;
}

.marked-text p span {
  margin-right: 8px;
  color: var(--faint);
  font-size: 12px;
}

.mark-line.mark-critical {
  border-color: #f1b7b7;
  background: #fff4f4;
}

.mark-line.mark-high {
  border-color: #edc29e;
  background: #fff7ef;
}

.mark-line.mark-medium {
  border-color: #d9cda5;
  background: #fffbee;
}

.mark-line.mark-low {
  border-color: var(--line-strong);
  background: var(--panel-soft);
}

th,
td {
  border: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
  line-height: 1.58;
}

th {
  background: var(--panel-soft);
  color: #384540;
}

#graphSvg {
  width: 100%;
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfcfc 0, #f7faf9 100%);
}

.node circle {
  fill: #eff7f5;
  stroke: var(--accent);
  stroke-width: 2;
}

.node rect {
  fill: #eff7f5;
  stroke: var(--accent);
  stroke-width: 1.8;
}

.node-party rect {
  fill: #edf4fb;
  stroke: #497597;
}

.node-effect rect {
  fill: #f4f0e9;
  stroke: var(--warn);
}

.node-defense rect {
  fill: #fbf3ef;
  stroke: #aa6849;
  stroke-dasharray: 5 4;
}

.node text {
  font-size: 14px;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}

.node[data-graph-detail] {
  cursor: pointer;
}

.node[data-graph-detail]:hover rect,
.node[data-graph-detail]:focus rect {
  stroke-width: 2.6;
  filter: drop-shadow(0 8px 14px rgba(19, 80, 71, 0.16));
}

.node[data-graph-detail]:focus {
  outline: none;
}

.graph-title {
  fill: var(--text);
  font-size: 19px;
  font-weight: 700;
}

.graph-subtitle {
  fill: var(--muted);
  font-size: 13px;
}

.edge {
  stroke: #73827d;
  stroke-width: 1.7;
  marker-end: url(#arrow);
}

.edge-label {
  fill: var(--warn);
  font-size: 13px;
  text-anchor: middle;
}

.graph-detail-popover {
  position: fixed;
  z-index: 60;
  width: min(360px, calc(100vw - 32px));
  padding: 12px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(30, 48, 43, 0.18);
  color: var(--text);
}

.graph-detail-popover strong {
  display: block;
  margin-bottom: 6px;
  color: var(--accent-dark);
  font-size: 14px;
}

.graph-detail-popover p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.65;
  color: var(--muted);
  font-size: 13px;
}

.revision-delivery {
  display: grid;
  gap: 14px;
}

.revision-empty {
  display: grid;
  gap: 12px;
}

.revision-empty-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.revision-empty-steps span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel-soft);
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
}

.revision-workbench {
  display: grid;
  gap: 14px;
}

.revision-workbench-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.revision-workbench-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.revision-workbench-head > span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.revision-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.revision-stats div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel-soft);
}

.revision-stats small,
.revision-meta-line span {
  color: var(--muted);
  font-size: 12px;
}

.revision-stats strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 18px;
}

.revision-meta-line,
.revision-record-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.revision-meta-line span,
.revision-record-stats span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  background: #fff;
}

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

.revision-side-by-side {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.revision-snapshot {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.revision-snapshot.after {
  border-color: var(--accent);
}

.revision-snapshot h4,
.revision-history-head h2 {
  margin: 0 0 10px;
}

.revision-snapshot-grid {
  display: grid;
  gap: 10px;
}

.revision-snapshot-grid div {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.revision-snapshot-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--accent-dark);
}

.revision-diff-list {
  display: grid;
  gap: 8px;
}

.revision-diff-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: #fff;
}

.revision-diff-item span {
  border-radius: 999px;
  padding: 3px 7px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

.revision-diff-item.add span {
  color: #135047;
  background: #dff3ec;
}

.revision-diff-item.remove span {
  color: #8d4f2d;
  background: #f9eadf;
}

.revision-diff-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.revision-version {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.revision-version.active {
  border-color: var(--accent);
  box-shadow: 0 12px 28px rgba(19, 80, 71, 0.1);
}

.revision-version-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
  cursor: pointer;
  list-style: none;
}

.revision-version-head::-webkit-details-marker {
  display: none;
}

.revision-version:not([open]) .revision-version-head {
  margin-bottom: 0;
}

.revision-version-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.revision-version-head span {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 700;
}

.revision-grid,
.revision-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.revision-compare {
  margin-top: 12px;
}

.revision-grid section,
.revision-compare section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-soft);
}

.revision-grid h4,
.revision-compare h4 {
  margin: 0 0 8px;
  color: var(--accent-dark);
}

.revision-grid p,
.revision-compare p,
.revision-compare li {
  margin: 0;
  line-height: 1.65;
  color: var(--muted);
}

.revision-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.node {
  opacity: 0;
  animation: nodeIn 0.42s ease forwards;
}

.edge,
.edge-label {
  opacity: 0;
  animation: edgeIn 0.5s ease forwards;
}

@keyframes nodeIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes edgeIn {
  from {
    opacity: 0;
    stroke-dasharray: 12 8;
  }
  to {
    opacity: 1;
    stroke-dasharray: 0 0;
  }
}

@keyframes progressShine {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

@keyframes busyPulse {
  0% {
    width: 18%;
    transform: translateX(0);
  }
  50% {
    width: 64%;
    transform: translateX(24%);
  }
  100% {
    width: 28%;
    transform: translateX(260%);
  }
}

@keyframes guidePulse {
  0%, 100% {
    border-color: var(--line);
    box-shadow: none;
  }
  50% {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(29, 107, 95, 0.12);
  }
}

.auth-human-panel,
.auth-secondary-panel {
  border-color: rgba(29, 107, 95, 0.24);
  background: linear-gradient(180deg, rgba(247, 252, 250, 0.96), rgba(255, 255, 255, 0.98));
}

.auth-human-panel .section-head,
.auth-secondary-panel .section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.auth-human-panel .section-head h2,
.auth-secondary-panel .section-head h2 {
  margin: 0 0 4px;
}

.auth-human-panel .section-head p,
.auth-secondary-panel .section-head p,
.review-summary {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.auth-human-panel .section-head span,
.auth-secondary-panel .section-head span {
  border-radius: 999px;
  background: rgba(29, 107, 95, 0.12);
  color: var(--accent);
  font-weight: 800;
  padding: 6px 12px;
  white-space: nowrap;
}

.auth-review-control {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(29, 107, 95, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.evidence-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: flex-start;
  margin-top: 10px;
  padding: 9px 11px;
  border: 1px solid rgba(103, 122, 115, 0.18);
  border-radius: 8px;
  background: rgba(247, 250, 248, 0.8);
  color: var(--muted);
  line-height: 1.5;
}

.evidence-status strong {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--text);
  white-space: nowrap;
}

.evidence-status span {
  flex: 1 1 240px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.evidence-status em {
  margin-left: auto;
  font-style: normal;
  font-weight: 800;
  color: var(--warning);
  white-space: nowrap;
}

.evidence-confirmed {
  border-color: rgba(29, 107, 95, 0.28);
  background: rgba(230, 246, 239, 0.78);
}

.evidence-supported {
  border-color: rgba(57, 117, 192, 0.22);
  background: rgba(235, 243, 253, 0.72);
}

.evidence-pending,
.evidence-local {
  border-color: rgba(189, 133, 42, 0.28);
  background: rgba(255, 248, 236, 0.72);
}

.auth-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.auth-review-actions .mini-btn.active {
  border-color: var(--accent);
  background: rgba(29, 107, 95, 0.12);
  color: var(--accent);
}

.auth-review-control input {
  width: 100%;
  min-height: 36px;
  margin-bottom: 6px;
}

.auth-review-control small,
.secondary-review-item em {
  color: var(--muted);
}

.auth-review-footer {
  display: grid;
  grid-template-columns: 1fr max-content;
  gap: 12px;
  align-items: stretch;
  margin-top: 12px;
}

.auth-secondary-toggle {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 12px;
  border: 1px solid rgba(29, 107, 95, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.auth-secondary-toggle input {
  margin-top: 4px;
}

.auth-secondary-toggle strong,
.auth-secondary-toggle small {
  display: block;
}

.auth-secondary-toggle small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.6;
}

.inline-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 0;
  color: var(--text);
  line-height: 1.6;
}

.inline-check input {
  margin-top: 5px;
}

.secondary-review-item {
  border-top: 1px solid rgba(19, 80, 71, 0.12);
  padding: 14px 0;
}

.secondary-review-item:first-of-type {
  border-top: 0;
}

.secondary-review-item > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
}

.secondary-review-item p {
  color: var(--muted);
  line-height: 1.7;
}

.admin-log-section {
  margin-bottom: 22px;
}

.admin-log-section h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

@media (max-width: 980px) {
  .shell {
    padding: 14px;
  }

  .topbar,
  .result-head,
  .graph-card-head,
  .field-head {
    align-items: stretch;
    flex-direction: column;
  }

  .workspace,
  .analysis-flow,
  .grid,
  .process-rail,
  .feature-grid,
  .home-metrics,
  .feature-roadmap,
  .shared-resource-grid,
  .empirical-stage-guide,
  .learning-overview-grid,
  .sample-overview-grid,
  .chart-gate-grid,
  .learning-card-grid,
  .evaluation-grid,
  .coverage-grid,
  .plan-grid,
  .round-grid,
  .round-grid.compact,
  .radar-wrap,
  .admin-product-grid {
    grid-template-columns: 1fr;
  }

  .revision-grid,
  .revision-compare,
  .revision-side-by-side,
  .revision-empty-steps,
  .revision-stats {
    grid-template-columns: 1fr;
  }

  .revision-workbench-head {
    flex-direction: column;
  }

  .revision-primary-actions {
    justify-content: stretch;
  }

  .revision-primary-actions button {
    width: 100%;
  }

  .home-overview {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-insight-head {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-route-grid,
  .admin-pkulaw-grid,
  .empirical-chart-grid,
  .admin-pkulaw-summary dl {
    grid-template-columns: 1fr;
  }

  .empirical-bar-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .retrieval-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .progress-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  #progressDetail {
    text-align: left;
  }

  .input-panel,
  .result-panel {
    min-height: auto;
  }

  .login-modal-fields,
	  .admin-status,
	  .metric-grid,
	  .admin-create,
	  .auth-score-grid,
	  .auth-option-grid,
	  .empirical-material-form {
	    grid-template-columns: 1fr;
	  }

  .auth-secondary-actions {
    grid-template-columns: 1fr 1fr;
  }

  .evidence-status {
    display: flex;
  }

  .evidence-status em {
    margin-left: 0;
  }

  .auth-review-footer {
    grid-template-columns: 1fr;
  }

  #caseText {
    min-height: 320px;
  }

  .tabs {
    justify-content: flex-start;
  }
}
