:root {
  --blue: #2563eb;
  --blue-700: #1d4ed8;
  --cyan: #06b6d4;
  --green: #10b981;
  --purple: #7c3aed;
  --amber: #f59e0b;
  --red: #ef4444;
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #dbe4f0;
  --paper: #ffffff;
  --paper-soft: #f6f8fb;
  --paper-warm: #eef5ff;
  --screen: #071426;
  --screen-2: #0d2038;
  --screen-3: #122a47;
  --screen-line: rgba(56, 189, 248, 0.28);
  --screen-text: #d9ecff;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.06);
  --radius: 8px;
  --header-height: 76px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper-soft);
  font-family: "Microsoft YaHei", "Noto Sans SC", "PingFang SC", "Segoe UI", Arial, sans-serif;
  line-height: 1.65;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
  min-width: 0;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 40px;
  background: linear-gradient(120deg, var(--blue), var(--purple));
  color: white;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.24);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 320px;
  text-decoration: none;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius);
  background: white;
  color: var(--blue);
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
}

.brand strong,
.brand small {
  display: block;
  letter-spacing: 0;
}

.brand strong {
  font-size: 1.02rem;
  line-height: 1.25;
}

.brand small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
}

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}

.nav-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-weight: 700;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  color: white;
  outline: none;
}

.nav-link.active {
  background: white;
  color: var(--blue);
  box-shadow: var(--shadow-soft);
}

.nav-primary {
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.nav-emphasis {
  border: 1px solid rgba(255, 255, 255, 0.38);
}

.site-footer {
  padding: 28px 7vw;
  background: #172033;
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
}

.site-footer p {
  margin: 4px 0;
}

.page-main {
  min-height: calc(100svh - var(--header-height));
}

.page-hero {
  padding: 56px 7vw 34px;
  background: linear-gradient(135deg, #eff6ff, #faf5ff);
  border-bottom: 1px solid var(--line);
}

.page-hero-inner {
  max-width: 1240px;
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  color: var(--blue);
  font-weight: 800;
  font-size: 0.82rem;
}

.page-hero h1,
.section-heading h2,
.hero-copy h1,
.dashboard-title h1 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.2;
}

.page-hero h1 {
  font-size: 2.35rem;
}

.page-hero p {
  max-width: 780px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.section {
  padding: 56px 7vw;
}

.section.soft {
  background: var(--paper);
}

.section-heading {
  max-width: 900px;
  margin: 0 0 28px;
}

.section-heading.center {
  margin-inline: auto;
  text-align: center;
}

.section-heading h2 {
  font-size: 1.95rem;
}

.section-heading p {
  margin: 10px 0 0;
  color: var(--muted);
}

.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.btn.primary {
  background: linear-gradient(120deg, var(--blue), var(--purple));
  color: white;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.btn.secondary {
  background: white;
  color: var(--blue);
  border-color: rgba(37, 99, 235, 0.24);
}

.ratio-control {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: var(--radius);
  background: #eef5ff;
}

.ratio-control button {
  min-height: 34px;
  padding: 7px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--blue-700);
  font-weight: 800;
}

.ratio-control button.active {
  background: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.14);
}

.ratio-control.dark {
  background: rgba(12, 43, 73, 0.9);
  border: 1px solid var(--screen-line);
}

.ratio-control.dark button {
  color: #d9ecff;
}

.ratio-control.dark button.active {
  color: white;
  background: linear-gradient(120deg, rgba(6, 182, 212, 0.28), rgba(245, 158, 11, 0.22));
  box-shadow: none;
}

.chart {
  width: 100%;
  min-height: 320px;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-soft);
}

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

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

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Home */
.hero-cover {
  position: relative;
  min-height: clamp(560px, calc(100svh - 118px), 760px);
  display: grid;
  align-items: end;
  isolation: isolate;
  overflow: hidden;
  color: white;
  background:
    linear-gradient(90deg, rgba(5, 12, 24, 0.88), rgba(5, 12, 24, 0.52), rgba(5, 12, 24, 0.14)),
    url("../images/hero-industrial.webp") center / cover no-repeat;
}

.hero-cover::after {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(5, 12, 24, 0.8));
  content: "";
  z-index: -1;
}

.hero-shell {
  width: min(1240px, calc(100% - 14vw));
  margin: 0 auto;
  padding: 54px 0 42px;
}

.hero-copy {
  max-width: 760px;
}

.hero-copy .eyebrow {
  color: #93c5fd;
}

.hero-copy h1 {
  font-size: 3.25rem;
  max-width: 720px;
}

.hero-copy p {
  max-width: 720px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.hero-readout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  margin-top: 34px;
  max-width: 880px;
}

.hero-score,
.hero-meta {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(7, 20, 38, 0.62);
  backdrop-filter: blur(10px);
}

.hero-score {
  display: grid;
  align-content: center;
  padding: 18px;
}

.hero-score span,
.hero-meta span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.82rem;
}

.hero-score strong {
  color: #facc15;
  font-size: 2.7rem;
  line-height: 1;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
}

.hero-meta article {
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.hero-meta strong {
  font-size: 1.22rem;
}

.dimension-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.dimension-strip span {
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--tone) 55%, transparent);
  border-radius: 999px;
  color: white;
  background: color-mix(in srgb, var(--tone) 22%, transparent);
  font-size: 0.84rem;
}

.module-grid,
.workflow-grid {
  display: grid;
  gap: 18px;
}

.module-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.module-card {
  min-height: 180px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-soft);
  text-decoration: none;
}

.module-card span {
  color: var(--blue);
  font-weight: 900;
}

.module-card h3 {
  margin: 0;
  font-size: 1.16rem;
}

.module-card p {
  margin: 0;
  color: var(--muted);
}

.workflow-grid {
  grid-template-columns: minmax(0, 0.85fr) minmax(420px, 1.15fr);
  align-items: stretch;
}

.workflow-copy {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.workflow-copy p {
  margin: 0 0 18px;
  color: var(--muted);
}

.workflow-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.workflow-list li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: center;
}

.workflow-list span {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: linear-gradient(120deg, var(--blue), var(--purple));
  font-weight: 900;
}

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

.summary-card {
  padding: 22px;
}

.summary-card h3 {
  margin: 0 0 8px;
}

.summary-card p {
  margin: 0;
  color: var(--muted);
}

/* Model */
.model-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(460px, 1fr);
  gap: 22px;
}

.dimension-grid {
  display: grid;
  gap: 14px;
}

.dimension-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--tone);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-soft);
}

.dimension-card > span {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius);
  color: white;
  background: var(--tone);
  font-weight: 900;
}

.dimension-card h3 {
  margin: 0;
}

.dimension-card p {
  margin: 4px 0 0;
  color: var(--muted);
}

.dimension-card ul {
  grid-column: 2;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0;
  margin: 4px 0 0;
  list-style: none;
}

.dimension-card li {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--ink-soft);
  background: #f8fafc;
  font-size: 0.84rem;
}

.chart-panel {
  padding: 20px;
}

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

.weight-summary article {
  padding: 12px;
  border-radius: var(--radius);
  background: var(--paper-soft);
}

.weight-summary span,
.weight-summary strong {
  display: block;
}

.weight-summary span {
  color: var(--muted);
  font-size: 0.82rem;
}

.weight-summary strong {
  margin-top: 4px;
  font-size: 1.1rem;
}

.weight-details {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.weight-lead {
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--tone) 28%, var(--line));
  border-left: 4px solid var(--tone);
  border-radius: var(--radius);
  background: linear-gradient(120deg, color-mix(in srgb, var(--tone) 9%, white), #fff);
}

.weight-lead span,
.weight-insight-grid span {
  color: var(--muted);
  font-size: 0.82rem;
}

.weight-lead strong,
.weight-insight-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
}

.weight-lead p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

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

.weight-insight-grid article {
  min-width: 0;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--paper-soft);
}

.weight-insight-grid strong {
  line-height: 1.5;
}

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

.level-scale article {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.level-scale strong {
  color: var(--blue);
}

.level-scale span {
  color: var(--muted);
}

/* Assessment */
.assessment-shell {
  display: grid;
  gap: 18px;
}

.assessment-rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

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

.step-list li {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--ink-soft);
  font-weight: 700;
}

.step-list span {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: linear-gradient(120deg, var(--blue), var(--purple));
}

.preset-rail {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.preset-rail button {
  width: 160px;
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: white;
  text-align: left;
}

.preset-rail button.active {
  border-color: rgba(37, 99, 235, 0.3);
  background: #eef5ff;
}

.preset-rail span {
  color: var(--muted);
  font-size: 0.82rem;
}

.assessment-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
  gap: 22px;
  align-items: start;
}

.assessment-form {
  display: grid;
  gap: 16px;
}

.form-section {
  padding: 18px;
}

.form-section h3 {
  margin: 0 0 14px;
  font-size: 1rem;
}

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

.field-grid label {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-weight: 700;
}

.field-grid select,
.field-grid input[type="range"] {
  width: 100%;
}

.field-grid select {
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--ink);
  background: white;
}

.field-grid select:focus,
.field-grid input:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.18);
  border-color: var(--blue);
}

.field-grid output {
  justify-self: start;
  padding: 2px 8px;
  border-radius: 6px;
  color: white;
  background: var(--blue);
}

.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.result-stack {
  position: sticky;
  top: calc(var(--header-height) + 18px);
  display: grid;
  gap: 16px;
}

.result-panel {
  padding: 20px;
}

.score-head {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.score-ring {
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, white 0 56%, transparent 57%),
    conic-gradient(var(--green) var(--score-angle, 0deg), #e2e8f0 0);
}

.score-ring strong,
.score-ring span {
  grid-area: 1 / 1;
}

.score-ring strong {
  margin-top: -14px;
  color: var(--blue);
  font-size: 2.35rem;
  line-height: 1;
}

.score-ring span {
  margin-top: 46px;
  color: var(--muted);
  font-weight: 800;
}

.score-copy h3 {
  margin: 0 0 6px;
}

.score-copy p {
  margin: 0;
  color: var(--muted);
}

.score-copy small {
  display: inline-flex;
  margin-top: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--blue);
  background: #eef5ff;
  font-weight: 800;
}

.level-excellent {
  color: var(--green);
}

.level-good {
  color: var(--blue);
}

.level-medium {
  color: var(--amber);
}

.level-poor {
  color: var(--red);
}

.score-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.score-metrics article {
  padding: 10px;
  border-radius: var(--radius);
  background: var(--paper-soft);
}

.score-metrics span,
.score-metrics strong,
.score-metrics small {
  display: block;
}

.score-metrics span,
.score-metrics small {
  color: var(--muted);
  font-size: 0.74rem;
}

.score-metrics span {
  white-space: nowrap;
}

.score-metrics strong {
  margin-top: 4px;
  font-size: 1.14rem;
}

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

.compact-chart {
  min-height: 250px;
}

.recommendations {
  display: grid;
  gap: 10px;
}

.recommendations div {
  padding: 12px;
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  color: var(--ink-soft);
  background: #f8fafc;
}

.recommendations .danger {
  border-color: var(--red);
  background: #fff1f2;
}

.recommendations .warning {
  border-color: var(--amber);
  background: #fffbeb;
}

.recommendations .success {
  border-color: var(--green);
  background: #ecfdf5;
}

/* Detection */
.detection-layout {
  display: grid;
  gap: 18px;
}

.detection-group {
  padding: 20px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-soft);
}

.tone-blue {
  border-left-color: var(--blue);
}

.tone-purple {
  border-left-color: var(--purple);
}

.tone-green {
  border-left-color: var(--green);
}

.tone-amber {
  border-left-color: var(--amber);
}

.detection-group header h3 {
  margin: 0;
}

.detection-group header p {
  margin: 4px 0 0;
  color: var(--muted);
}

.detection-group > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.detection-group section {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--paper-soft);
}

.detection-group h4 {
  margin: 0 0 6px;
}

.detection-group section p {
  margin: 0;
  color: var(--muted);
}

.detection-group ul {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0;
  margin: 12px 0 0;
  list-style: none;
}

.detection-group li {
  padding: 4px 8px;
  border-radius: 999px;
  background: white;
  color: var(--blue);
  font-size: 0.84rem;
  font-weight: 800;
}

.table-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.table-toolbar input {
  min-width: 300px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-soft);
}

table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--ink);
  background: #eef5ff;
  font-weight: 900;
}

td {
  color: var(--ink-soft);
}

tbody tr:hover {
  background: #f8fbff;
}

/* Visualization */
.analysis-toolbar {
  display: grid;
  grid-template-columns: minmax(420px, 0.92fr) minmax(520px, 1.08fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.analysis-summary {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 16px 20px;
  align-items: center;
  overflow: hidden;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), transparent 42%),
    linear-gradient(180deg, #ffffff, #f8fbff);
}

.analysis-summary::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--blue), var(--cyan));
  content: "";
}

.summary-score {
  display: grid;
  gap: 8px;
}

.summary-score span,
.summary-copy span {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.summary-copy h3 {
  margin: 2px 0 0;
  font-size: 1.28rem;
}

.analysis-summary strong {
  color: var(--blue);
  font-size: 3.15rem;
  line-height: 1;
}

.summary-copy p {
  margin: 6px 0 0;
  color: var(--ink-soft);
}

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

.analysis-kpis article {
  min-height: 86px;
  padding: 12px;
  border: 1px solid rgba(37, 99, 235, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.analysis-kpis span,
.analysis-kpis em {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
}

.analysis-kpis strong {
  display: block;
  margin: 5px 0 4px;
  overflow: hidden;
  color: var(--ink);
  font-size: clamp(0.92rem, 1vw, 1.05rem);
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-trend-panel {
  padding: 18px 20px;
}

.analysis-trend-panel .compact-chart {
  min-height: 252px;
}

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

.analysis-grid .panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 18px;
}

.analysis-grid .chart {
  flex: 1;
  min-height: 302px;
}

.analysis-grid .span-2 {
  grid-column: span 2;
}

.area-radar,
.area-risk,
.area-district {
  grid-column: span 2;
}

.area-material,
.area-region {
  grid-column: span 4;
}

.area-inspection,
.area-insight {
  grid-column: span 2;
}

.area-material .chart,
.area-inspection .chart {
  min-height: 320px;
}

.area-region .chart {
  min-height: 360px;
}

.panel-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--blue);
  background: #eef5ff;
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.analysis-findings {
  display: grid;
  gap: 9px;
}

.analysis-findings article {
  padding: 10px 11px;
  border: 1px solid rgba(37, 99, 235, 0.1);
  border-radius: 8px;
  background: #f8fbff;
}

.analysis-findings span,
.analysis-rank-mini span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.analysis-findings strong,
.analysis-rank-mini strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  line-height: 1.35;
}

.analysis-findings p,
.analysis-rank-mini p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.45;
}

.analysis-rank-mini {
  margin-top: 10px;
  padding: 10px;
  border-radius: 8px;
  background: linear-gradient(180deg, #0f172a, #172033);
  color: white;
}

.analysis-rank-mini strong,
.analysis-rank-mini p {
  color: white;
}

.analysis-rank-mini span {
  color: #a8c7e8;
}

.analysis-rank-mini ul {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.analysis-rank-mini li {
  display: grid;
  grid-template-columns: minmax(86px, 1fr) 60px 64px;
  gap: 8px;
  align-items: center;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.82rem;
}

.analysis-rank-mini b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-rank-mini li span {
  color: #d9ecff;
  font-size: 0.82rem;
}

.analysis-rank-mini em {
  justify-self: end;
  color: #facc15;
  font-style: normal;
  font-weight: 900;
}

.analysis-rank-mini em.high {
  color: #ff737b;
}

/* Dashboard */
body.dashboard-page {
  height: 100svh;
  overflow: hidden;
  color: var(--screen-text);
  background: var(--screen);
}

.dashboard-app {
  height: 100svh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(13, 32, 56, 0.96), rgba(7, 20, 38, 0.98)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 84px);
}

.dashboard-topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  min-height: 68px;
  padding: 10px 14px;
  border: 1px solid var(--screen-line);
  border-radius: var(--radius);
  background: rgba(18, 42, 71, 0.84);
}

.dashboard-title {
  display: flex;
  gap: 14px;
  align-items: center;
}

.dashboard-back {
  min-width: 42px;
  min-height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--screen-line);
  border-radius: var(--radius);
  color: #7dd3fc;
  text-decoration: none;
}

.dashboard-title .eyebrow {
  margin-bottom: 2px;
  color: #7dd3fc;
}

.dashboard-title h1 {
  color: white;
  font-size: 1.35rem;
}

.dashboard-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

#clock {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid var(--screen-line);
  border-radius: var(--radius);
  color: #7dd3fc;
  background: rgba(12, 43, 73, 0.64);
  font-variant-numeric: tabular-nums;
}

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

.kpi-card {
  min-height: 82px;
  display: grid;
  align-content: center;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--tone) 45%, transparent);
  border-radius: var(--radius);
  background: rgba(18, 42, 71, 0.84);
}

.kpi-card span {
  color: #a9c6de;
  font-size: 0.78rem;
}

.kpi-card strong {
  color: var(--tone);
  font-size: 1.34rem;
  line-height: 1.15;
}

.kpi-card small {
  color: #d9ecff;
  font-size: 0.76rem;
}

.dashboard-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(420px, 1.45fr) minmax(300px, 1fr) minmax(300px, 1fr);
  grid-template-rows: minmax(0, 1.32fr) minmax(0, 0.92fr) minmax(0, 0.88fr);
  gap: 10px;
}

.screen-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 12px;
  border: 1px solid var(--screen-line);
  border-radius: var(--radius);
  background: rgba(18, 42, 71, 0.82);
  overflow: hidden;
}

.screen-panel .panel-heading {
  min-height: 26px;
  margin-bottom: 8px;
}

.screen-panel .panel-heading h3 {
  color: white;
}

.screen-panel .panel-heading span {
  color: #fcd34d;
  font-weight: 800;
}

.screen-panel .chart {
  min-height: 0;
  height: 100%;
}

.map-panel {
  grid-column: 2 / span 2;
  grid-row: 1;
  position: relative;
}

.map-panel .panel-heading {
  position: relative;
  z-index: 3;
}

.pipeline-overlay {
  position: absolute;
  z-index: 2;
  top: 56px;
  right: 28%;
  bottom: 56px;
  left: 33%;
  width: auto;
  height: auto;
  pointer-events: none;
  overflow: visible;
  mix-blend-mode: screen;
  opacity: 0.88;
}

.pipe {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.55;
  stroke-dasharray: 10 8;
  animation: pipeFlow 8s linear infinite;
  filter: drop-shadow(0 0 5px currentColor);
}

.pipe-safe {
  color: #34d399;
  stroke: #34d399;
}

.pipe-medium {
  color: #facc15;
  stroke: #facc15;
}

.pipe-high {
  color: #ff4d5a;
  stroke: #ff4d5a;
  stroke-width: 1.9;
}

.pipe-nodes .station,
.pipe-nodes .inject {
  stroke: #071426;
  stroke-width: 1.4;
}

.pipe-nodes .station {
  fill: #7dd3fc;
}

.pipe-nodes .inject {
  fill: #facc15;
}

@keyframes pipeFlow {
  to {
    stroke-dashoffset: -72;
  }
}

.score-panel {
  grid-column: 1;
  grid-row: 1;
}

.score-summary {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
}

.score-summary strong {
  color: #facc15;
  font-size: 3.8rem;
  line-height: 1;
}

.score-summary span {
  padding: 5px 12px;
  border-radius: 999px;
  color: white;
  background: var(--blue);
  font-weight: 900;
}

.score-summary p {
  margin: 0;
  color: #a9c6de;
}

.rank-panel {
  grid-column: 1 / span 2;
}

.config-panel {
  grid-column: 3 / span 2;
}

.rank-list,
.config-list {
  display: grid;
  gap: 5px;
  overflow: hidden;
}

.rank-item,
.config-item {
  min-height: 0;
  display: grid;
  gap: 4px;
  padding: 7px 10px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius);
  background: rgba(7, 20, 38, 0.45);
  overflow: hidden;
}

.rank-item {
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  line-height: 1.2;
}

.rank-item b {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  color: white;
  background: var(--red);
}

.rank-item strong,
.config-item strong {
  color: white;
}

.rank-item span,
.config-item small,
.config-item span {
  color: #a9c6de;
}

.config-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
}

.rank-item em {
  font-style: normal;
  font-weight: 800;
}

.risk-high {
  color: #f87171;
}

.risk-medium {
  color: #fbbf24;
}

/* Dashboard reset to the original three-column screen hierarchy */
.dashboard-app {
  grid-template-rows: 76px minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
}

.dashboard-header {
  display: grid;
  grid-template-columns: minmax(330px, 0.94fr) minmax(430px, 1.08fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 0;
  padding: 8px 10px;
  border: 1px solid var(--screen-line);
  border-radius: var(--radius);
  background: rgba(18, 42, 71, 0.84);
}

.dashboard-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
  overflow: hidden;
}

.dashboard-brand .eyebrow {
  margin-bottom: 2px;
  color: #7dd3fc;
}

.dashboard-brand h1 {
  color: white;
  max-width: 100%;
  overflow: hidden;
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-brand .dashboard-back {
  min-width: 38px;
  min-height: 38px;
}

.dashboard-kpis {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.dashboard-summary {
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-card {
  min-width: 92px;
  min-height: 58px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1px;
  padding: 5px 10px;
  border: 1px solid rgba(245, 158, 11, 0.42);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.24), rgba(245, 158, 11, 0.16));
}

.summary-card span {
  color: #a9c6de;
  font-size: 0.72rem;
  line-height: 1.1;
}

.summary-card strong {
  color: #facc15;
  font-size: 1.36rem;
  line-height: 1;
}

.summary-card small {
  color: white;
  font-size: 0.72rem;
  line-height: 1.1;
}

.dashboard-summary #clock {
  min-height: 34px;
  padding: 5px 8px;
  font-size: 0.72rem;
  line-height: 1;
  white-space: nowrap;
}

.dashboard-summary .ratio-control {
  gap: 4px;
}

.dashboard-summary .ratio-control button {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 0.78rem;
  line-height: 1.1;
}

.dashboard-kpis .kpi-card {
  min-height: 58px;
  gap: 1px;
  padding: 6px 8px;
}

.dashboard-kpis .kpi-card strong {
  font-size: 1.08rem;
  line-height: 1;
}

.dashboard-kpis .kpi-card small {
  font-size: 0.7rem;
  line-height: 1.1;
}

.dashboard-kpis .kpi-card span {
  line-height: 1.1;
}

.dashboard-main {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(250px, 0.92fr) minmax(620px, 1.9fr) minmax(300px, 0.96fr);
  gap: 8px;
}

.dashboard-column,
.dashboard-center {
  min-height: 0;
  display: grid;
  gap: 8px;
}

.dashboard-left {
  grid-template-rows: minmax(132px, 1.02fr) minmax(132px, 0.96fr) minmax(176px, 1.36fr) minmax(176px, 1.36fr);
}

.dashboard-center {
  grid-template-rows: minmax(326px, 1.58fr) minmax(168px, 0.82fr) minmax(140px, 0.68fr);
}

.dashboard-right {
  grid-template-rows: minmax(246px, 1fr) minmax(0, 1.58fr);
}

.dashboard-main .screen-panel {
  padding: 10px;
}

.dashboard-main .screen-panel .panel-heading {
  min-height: 22px;
  margin-bottom: 6px;
}

.dashboard-main .screen-panel .panel-heading h3 {
  font-size: 0.94rem;
}

.dashboard-main .screen-panel .chart {
  min-height: 0;
}

.dashboard-main .map-panel,
.dashboard-main .score-panel,
.dashboard-main .rank-panel,
.dashboard-main .config-panel {
  grid-column: auto;
  grid-row: auto;
}

.dashboard-bottom-charts,
.dashboard-bottom-extra {
  min-height: 0;
  display: grid;
  gap: 8px;
}

.dashboard-bottom-charts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-bottom-extra {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.map-legend {
  position: absolute;
  z-index: 2;
  left: 12px;
  bottom: 12px;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: rgba(7, 20, 38, 0.72);
  color: #d9ecff;
  font-size: 0.74rem;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.map-legend span::before {
  width: 12px;
  height: 3px;
  display: inline-block;
  border-radius: 999px;
  content: "";
}

.map-legend .safe::before {
  background: #34d399;
}

.map-legend .medium::before {
  background: #facc15;
}

.map-legend .high::before {
  background: #ff4d5a;
}

.map-legend .station::before {
  width: 8px;
  height: 8px;
  background: #7dd3fc;
}

.score-summary p {
  font-size: 0.82rem;
  line-height: 1.5;
}

.score-summary {
  gap: 5px;
}

.score-summary strong {
  font-size: 3rem;
}

.score-summary p {
  font-size: 0.75rem;
  line-height: 1.35;
}

.rank-table {
  min-height: 0;
  display: grid;
  align-content: start;
}

.rank-row {
  min-height: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 66px 74px;
  gap: 8px;
  align-items: center;
  padding: 9px 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  color: #d9ecff;
  font-size: 0.82rem;
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-head {
  border-radius: var(--radius);
  background: rgba(7, 20, 38, 0.62);
  color: #a9c6de;
  font-weight: 800;
}

.rank-row b {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  color: white;
  background: var(--red);
}

.rank-row strong {
  color: white;
}

.rank-row span {
  color: #a9c6de;
}

.rank-row em {
  font-style: normal;
  font-weight: 800;
}

.config-list {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 6px;
  overflow: hidden;
}

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

.config-metrics div {
  min-width: 0;
  padding: 8px;
  border-radius: var(--radius);
  background: rgba(7, 20, 38, 0.5);
}

.config-metrics span,
.config-metrics small {
  color: #a9c6de;
  font-size: 0.68rem;
}

.config-metrics strong {
  display: block;
  margin-top: 2px;
  color: #facc15;
  font-size: 1.02rem;
  line-height: 1;
}

.config-plans {
  min-height: 0;
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.config-item {
  min-height: 0;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 9px 10px;
}

.config-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.config-top strong {
  min-width: 0;
}

.config-top em {
  flex: 0 0 auto;
  color: #7dd3fc;
  font-style: normal;
  font-weight: 900;
}

.config-progress {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
}

.config-progress i {
  display: block;
  width: var(--progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #10b981, #facc15);
}

.config-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.config-tags b {
  padding: 2px 6px;
  border-radius: 999px;
  color: #d9ecff;
  background: rgba(56, 189, 248, 0.16);
  font-size: 0.66rem;
  line-height: 1.2;
}

.config-item small {
  overflow: visible;
  white-space: normal;
  line-height: 1.28;
  font-size: 0.72rem;
}

.config-rules {
  display: grid;
  gap: 5px;
}

.config-rules div {
  min-width: 0;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border-radius: var(--radius);
  background: rgba(7, 20, 38, 0.48);
}

.config-rules span {
  color: #7dd3fc;
  font-size: 0.68rem;
}

.config-rules strong {
  overflow: hidden;
  color: #d9ecff;
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alert-list {
  min-height: 0;
  position: relative;
  overflow: hidden;
}

.alert-list::before,
.alert-list::after {
  display: none;
}

.alert-list::before {
  top: 0;
  background: linear-gradient(180deg, rgba(18, 42, 71, 0.92), transparent);
}

.alert-list::after {
  bottom: 0;
  background: linear-gradient(0deg, rgba(18, 42, 71, 0.92), transparent);
}

.alert-track {
  display: grid;
  gap: 6px;
  animation: alertTicker 28s linear infinite;
}

.alert-list:hover .alert-track {
  animation-play-state: paused;
}

@keyframes alertTicker {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-50%);
  }
}

.alert-item {
  min-height: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 6px 10px;
  border-left: 3px solid;
  border-radius: var(--radius);
  background: rgba(7, 20, 38, 0.45);
}

.alert-item > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.alert-item.urgent {
  border-color: #ff4d5a;
}

.alert-item.warning {
  border-color: #f59e0b;
}

.alert-item.notice {
  border-color: #38bdf8;
}

.alert-item time {
  color: #7dd3fc;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.alert-item strong {
  color: #fff;
  font-size: 0.8rem;
  line-height: 1.2;
}

.alert-item span,
.alert-item small {
  color: #a9c6de;
  font-size: 0.7rem;
  line-height: 1.22;
}

.alert-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.task-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: var(--radius);
  background: rgba(7, 20, 38, 0.45);
}

.task-item b {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 5px;
  color: #071426;
  font-size: 0.74rem;
}

.task-item b.done {
  border-color: #34d399;
  background: #34d399;
}

.task-item strong,
.task-item span {
  display: block;
}

.task-item strong {
  overflow: hidden;
  color: #fff;
  font-size: 0.68rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.task-item span {
  margin-top: 2px;
  color: #a9c6de;
  font-size: 0.66rem;
  line-height: 1.1;
}

@media (max-height: 820px) {
  .dashboard-app {
    grid-template-rows: 68px minmax(0, 1fr);
    gap: 6px;
    padding: 6px;
  }

  .dashboard-main,
  .dashboard-column,
  .dashboard-center,
  .dashboard-bottom-charts,
  .dashboard-bottom-extra {
    gap: 6px;
  }

  .dashboard-header {
    padding: 6px 8px;
  }

  .dashboard-brand .eyebrow {
    font-size: 0.72rem;
    line-height: 1;
  }

  .dashboard-brand h1 {
    font-size: 0.76rem;
  }

  .dashboard-kpis .kpi-card {
    min-height: 50px;
    padding: 5px 7px;
  }

  .dashboard-kpis .kpi-card strong {
    font-size: 1rem;
  }

  .dashboard-kpis .kpi-card span,
  .dashboard-kpis .kpi-card small {
    font-size: 0.66rem;
  }

  .summary-card {
    min-height: 50px;
  }

  .dashboard-main .screen-panel {
    padding: 8px;
  }

  .dashboard-main .screen-panel .panel-heading {
    margin-bottom: 4px;
  }

  .dashboard-main .screen-panel .panel-heading h3 {
    font-size: 0.86rem;
  }

  .score-summary strong {
    font-size: 2.45rem;
  }

  .score-summary p {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .map-legend {
    bottom: 8px;
    padding: 5px 8px;
    font-size: 0.68rem;
  }

  .alert-item span {
    display: none;
  }

  .alert-item {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 6px;
    padding: 5px 8px;
  }

  .alert-track {
    gap: 5px;
    animation-duration: 24s;
  }

  .alert-item strong,
  .alert-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.1;
  }

  .alert-item strong {
    font-size: 0.72rem;
  }

  .alert-item small {
    font-size: 0.64rem;
  }

  .config-list,
  .config-plans,
  .config-rules {
    gap: 5px;
  }

  .config-metrics {
    gap: 5px;
  }

  .config-metrics div,
  .config-item {
    padding: 6px 8px;
  }

  .config-metrics strong {
    font-size: 0.9rem;
  }

  .config-item {
    gap: 4px;
  }

  .config-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.66rem;
  }

  .config-tags b {
    padding: 1px 5px;
    font-size: 0.6rem;
  }

  .config-rules div {
    padding: 5px 8px;
  }

  .task-item {
    padding: 5px;
  }

  .task-item strong {
    -webkit-line-clamp: 1;
  }
}

/* Responsive */
@media (max-width: 1320px) {
  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .primary-nav {
    width: 100%;
    order: 3;
    justify-content: flex-start;
  }

  .workflow-grid,
  .model-layout,
  .assessment-layout {
    grid-template-columns: 1fr;
  }

  .result-stack {
    position: static;
  }

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

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

  .analysis-grid .span-2 {
    grid-column: auto;
  }

  .area-radar,
  .area-risk,
  .area-district,
  .area-inspection,
  .area-region,
  .area-insight {
    grid-column: span 1;
  }

  .area-material {
    grid-column: 1 / -1;
  }

  .assessment-rail {
    grid-template-columns: 1fr;
  }

  .preset-rail {
    justify-content: flex-start;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(5, minmax(0, 1fr));
  }

  .map-panel,
  .score-panel,
  .rank-panel,
  .config-panel {
    grid-column: auto;
    grid-row: auto;
  }

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

}

@media (max-width: 900px) {
  .brand {
    min-width: 0;
  }

  .brand small {
    display: none;
  }

  .hero-shell {
    width: calc(100% - 36px);
  }

  .hero-copy h1 {
    font-size: 2.35rem;
  }

  .hero-readout,
  .hero-meta,
  .module-grid,
  .summary-grid,
  .step-list,
  .score-metrics,
  .chart-pair,
  .field-grid,
  .detection-group > div,
  .analysis-toolbar,
  .analysis-grid,
  .level-scale,
  .weight-summary {
    grid-template-columns: 1fr;
  }

  .analysis-toolbar {
    display: grid;
  }

  .analysis-summary {
    min-width: 0;
  }

  .analysis-grid > .panel,
  .area-radar,
  .area-risk,
  .area-district,
  .area-material,
  .area-inspection,
  .area-region,
  .area-insight {
    grid-column: 1 / -1;
  }

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

  .table-toolbar,
  .panel-heading,
  .dashboard-topbar,
  .dashboard-tools {
    align-items: flex-start;
    flex-direction: column;
  }

  .table-toolbar input {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 760px) {
  .site-header {
    padding: 12px 18px;
  }

  .nav-link {
    min-height: 36px;
    padding: 7px 10px;
  }

  .section,
  .page-hero {
    padding-inline: 18px;
  }

  .hero-cover {
    min-height: 620px;
    background-position: 62% center;
  }

  .hero-shell {
    padding-bottom: 28px;
  }

  .page-hero h1,
  .section-heading h2 {
    font-size: 1.7rem;
  }

  .score-head,
  .analysis-summary {
    grid-template-columns: 1fr;
  }

  .analysis-kpis {
    grid-template-columns: 1fr;
  }

  .analysis-rank-mini li {
    grid-template-columns: 1fr;
  }

  .analysis-rank-mini em {
    justify-self: start;
  }

  .score-ring {
    margin: 0 auto;
  }

  .preset-rail button {
    width: 100%;
  }

  .ratio-control {
    width: 100%;
    overflow-x: auto;
  }

  .ratio-control button {
    white-space: nowrap;
  }

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
