:root {
  --header-height: 302px;
  --frame-margin: 18px;
  --page-gap: 18px;
  --burgundy: #700b06;
  --burgundy-dark: #5a0805;
  --bg: #fff6d8;
  --panel: #fff9e8;
  --panel-strong: #fff3cf;
  --ink: #2a130f;
  --muted: #7b5b37;
  --line: #e0c175;
  --accent: #700b06;
  --accent-dark: #4f0704;
  --accent-soft: rgba(112, 11, 6, 0.16);
  --gold: #f4c542;
  --gold-soft: #f3d071;
  --success: #3b7c28;
  --shadow: 0 18px 44px rgba(89, 43, 8, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

button {
  font: inherit;
}

.page-header {
  margin: 8px var(--frame-margin) 0;
  min-height: var(--header-height);
  padding: 8px;
  border-radius: 14px;
  background: var(--burgundy);
  overflow: hidden;
}

.image-banner {
  display: grid;
  place-items: center start;
  min-height: 286px;
  border-radius: 14px;
  background: var(--burgundy);
  overflow: hidden;
  text-decoration: none;
}

.image-banner img {
  display: block;
  width: min(1120px, 100%);
  height: auto;
  max-width: 1120px;
}

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  margin: var(--page-gap) var(--frame-margin) 24px;
  border: 1px solid #d0a54b;
  border-radius: 14px;
  background: var(--bg);
  box-shadow: 0 18px 44px rgba(89, 43, 8, 0.12);
  overflow: hidden;
}

.sidebar {
  grid-column: 1;
  grid-row: 1;
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100%;
  padding: 24px;
  background: linear-gradient(180deg, var(--burgundy), var(--burgundy-dark));
  color: #fff8dc;
  border-radius: 13px 0 0 13px;
  box-shadow: inset -1px 0 0 rgba(255, 231, 163, 0.16);
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 241, 184, 0.28);
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--gold);
  color: #3a0905;
  font-weight: 800;
}

.brand strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.2;
}

.brand span {
  display: block;
  margin-top: 5px;
  color: #f5d9a0;
  font-size: 0.86rem;
}

.menu-label {
  display: block;
  margin: 24px 0 8px;
  color: #ffe7a3;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-tabs {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}

.nav-tab {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #fff4c7;
  text-align: left;
  cursor: pointer;
}

.nav-tab:hover,
.nav-tab:focus-visible,
.nav-tab.active {
  border-color: rgba(255, 241, 184, 0.42);
  background: rgba(255, 241, 184, 0.14);
  color: #ffffff;
  outline: 0;
}

.content {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  padding: 28px;
  background:
    linear-gradient(90deg, rgba(112, 11, 6, 0.06), rgba(112, 11, 6, 0) 90px),
    var(--bg);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.article-overview {
  margin-bottom: 18px;
}

.article-overview h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 1;
}

.article-based,
.article-authors {
  margin: 4px 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.article-based span {
  color: var(--ink);
}

.article-authors strong {
  color: var(--burgundy);
  font-weight: 800;
}

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

.authors-panel {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 20px;
}

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

.author-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf4;
  padding: 12px;
  box-shadow: 0 10px 24px rgba(89, 43, 8, 0.08);
}

.author-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid #ead49a;
  border-radius: 8px;
  background: #fff0bd;
  object-fit: cover;
  object-position: center top;
}

.author-card strong,
.author-card span {
  display: block;
}

.author-card strong {
  margin-top: 10px;
  color: #700b06;
  font-size: 0.95rem;
  line-height: 1.18;
}

.author-card span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.author-card p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.snapshot-card {
  min-height: 230px;
  border: 1px solid #8f170d;
  border-radius: 8px;
  background: linear-gradient(180deg, #860f08, #6f0905);
  color: #fff8dc;
  padding: 26px;
  box-shadow: var(--shadow);
}

.snapshot-pill {
  display: inline-grid;
  min-height: 30px;
  place-items: center;
  border-radius: 999px;
  background: #fff0bd;
  color: #700b06;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0 12px;
  text-transform: uppercase;
}

.snapshot-card h2 {
  max-width: 760px;
  margin: 14px 0 12px;
  font-size: clamp(1.9rem, 3vw, 3rem);
  line-height: 1.05;
}

.snapshot-card p {
  max-width: 820px;
  margin: 0 0 22px;
  color: #fff4c7;
  line-height: 1.5;
}

.snapshot-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.snapshot-stats span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  border: 1px solid rgba(255, 240, 189, 0.34);
  border-radius: 999px;
  background: rgba(255, 240, 189, 0.12);
  color: #fff4c7;
  padding: 0 12px;
  line-height: 1;
}

.snapshot-stats strong {
  color: #f4c542;
  font-size: 1.25rem;
  line-height: 1;
}

.study-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 18px;
}

.study-details h2 {
  margin: 0 0 14px;
  color: #6f0905;
  font-size: 1.35rem;
}

.detail-item {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffdf4;
  padding: 10px 12px;
}

.detail-item + .detail-item {
  margin-top: 10px;
}

.detail-item strong {
  display: block;
  margin-bottom: 4px;
  color: #8b1209;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.detail-item span {
  color: var(--ink);
  line-height: 1.35;
}

.overview-visual-lab {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.95fr);
  gap: 18px;
  margin-bottom: 18px;
}

.bridge-card,
.frequency-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 20px;
}

.bridge-card h2,
.frequency-panel h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.45rem, 2.2vw, 2.35rem);
  line-height: 1.08;
}

.bridge-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 44px;
  position: relative;
}

.bridge-flow::before {
  content: "";
  position: absolute;
  top: 30px;
  left: 12%;
  right: 12%;
  height: 3px;
  background: linear-gradient(90deg, #700b06, #f4c542);
  opacity: 0.55;
}

.bridge-flow div {
  position: relative;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf4;
  padding: 14px;
}

.bridge-flow span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #700b06;
  color: #fff8dc;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.bridge-flow strong,
.bridge-flow small {
  display: block;
}

.bridge-flow strong {
  margin-bottom: 8px;
}

.bridge-flow small {
  color: var(--muted);
  line-height: 1.35;
}

.frequency-panel .panel-heading {
  margin-bottom: 16px;
}

.panel-note {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.frequency-visual {
  display: grid;
  gap: 11px;
}

.frequency-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(120px, 0.7fr) 34px;
  gap: 10px;
  align-items: center;
}

.frequency-label strong,
.frequency-label span {
  display: block;
}

.frequency-label strong {
  font-size: 0.92rem;
}

.frequency-label span {
  color: var(--muted);
  font-size: 0.78rem;
}

.frequency-track {
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: #fff0bd;
}

.frequency-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #700b06, #f4c542);
}

.frequency-row b {
  color: #700b06;
  text-align: right;
}

.insight-section {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 20px;
}

.insight-selector {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 14px;
}

.insight-tabs {
  display: grid;
  gap: 8px;
}

.insight-tab {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf4;
  color: var(--ink);
  cursor: pointer;
  padding: 8px 10px;
  text-align: left;
}

.insight-tab span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: #fff0bd;
  color: #700b06;
  font-size: 0.78rem;
  font-weight: 800;
}

.insight-tab strong {
  font-size: 0.92rem;
}

.insight-tab.active,
.insight-tab:hover {
  border-color: #8f170d;
  background: #fff0bd;
}

.insight-display {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 260px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 18%, rgba(244, 197, 66, 0.34), transparent 145px),
    linear-gradient(180deg, #850e07, #650704);
  color: #fff8dc;
  padding: 26px;
  box-shadow: var(--shadow);
}

.insight-display small {
  display: block;
  color: #ffe7a3;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.insight-display h3 {
  margin: 0 0 10px;
  font-size: clamp(1.75rem, 3vw, 3rem);
  line-height: 1;
}

.insight-display p {
  max-width: 760px;
  margin: 0;
  color: #fff4c7;
  font-size: 1.05rem;
  line-height: 1.5;
}

.insight-number {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #8a1209, #650704);
  color: #fff8dc;
  font-size: 0.86rem;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(112, 11, 6, 0.2);
}

.overview-insights strong {
  display: block;
  margin-bottom: 6px;
}

.overview-insights p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.overview-themes,
.overview-application {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 20px;
}

.section-strip {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: 18px;
  align-items: end;
  margin-bottom: 16px;
}

.section-strip h2,
.overview-application h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.5rem, 2.1vw, 2.2rem);
  line-height: 1.1;
}

.section-strip p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.theme-carousel {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  grid-template-rows: auto auto;
  gap: 12px;
  align-items: stretch;
}

.carousel-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--gold-soft);
  color: #4f0704;
  cursor: pointer;
  font-size: 1.4rem;
  font-weight: 900;
}

.theme-slide {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  min-height: 250px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at top left, rgba(244, 197, 66, 0.28), transparent 165px),
    #fffdf4;
  box-shadow: var(--shadow);
  padding: 24px;
}

.theme-slide small {
  display: block;
  color: #8b1209;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.theme-slide h3 {
  margin: 0 0 10px;
  color: #6f0905;
  font-size: clamp(1.55rem, 2.4vw, 2.45rem);
  line-height: 1.05;
}

.theme-slide p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.5;
}

.theme-slide strong {
  display: block;
  margin-bottom: 6px;
  color: #8b1209;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.theme-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 2px solid #fff0bd;
  border-radius: 50%;
  background: #700b06;
  color: #fff8dc;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 16px;
  box-shadow: 0 0 0 4px rgba(112, 11, 6, 0.08);
}

.carousel-dots {
  grid-column: 2;
  display: flex;
  justify-content: center;
  gap: 7px;
}

.carousel-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: #e0c175;
  cursor: pointer;
  padding: 0;
}

.carousel-dots button.active {
  width: 28px;
  background: #700b06;
}

.overview-application {
  display: grid;
  grid-template-columns: minmax(240px, 0.55fr) minmax(0, 1.45fr);
  gap: 18px;
  align-items: start;
}

.logic-timeline {
  display: grid;
  gap: 14px;
  position: relative;
  padding-left: 34px;
}

.logic-timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 13px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #700b06, #f4c542);
  opacity: 0.5;
}

.logic-timeline article {
  position: relative;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf4;
  padding: 16px 18px;
  box-shadow: 0 10px 24px rgba(89, 43, 8, 0.08);
}

.logic-timeline article::before {
  content: "";
  position: absolute;
  left: -41px;
  top: 18px;
  width: 18px;
  height: 18px;
  border: 4px solid #fff6d8;
  border-radius: 50%;
  background: #700b06;
  box-shadow: 0 0 0 2px #f4c542;
}

.logic-timeline span {
  display: block;
  margin-bottom: 6px;
  color: #8b1209;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.logic-timeline p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.section-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: end;
  margin-bottom: 18px;
}

.section-header.compact {
  grid-template-columns: 1fr;
  max-width: 980px;
}

.section-header h1 {
  margin: 0 0 10px;
  font-size: clamp(1.75rem, 2.6vw, 2.7rem);
  line-height: 1.05;
}

.section-header p,
.score-panel p,
.recommendation p,
.theme-card p,
.evidence-card p {
  color: var(--muted);
  line-height: 1.5;
}

.section-header p {
  max-width: 820px;
  margin: 0;
}

.scenario-note {
  margin-top: 10px;
  color: #8b1209;
  font-weight: 700;
}

.eyebrow {
  margin: 0 0 6px;
  color: #8b1209;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar .eyebrow {
  color: #ffe7a3;
}

.header-metric {
  display: grid;
  min-width: 126px;
  min-height: 80px;
  place-items: center;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.header-metric span {
  font-size: 1.55rem;
  font-weight: 800;
}

.header-metric small {
  color: var(--muted);
}

.assessment-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
  gap: 18px;
}

.question-panel,
.score-panel,
.recommendations-band {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.question-panel {
  min-height: 510px;
  padding: 22px;
}

.question-topline,
.question-actions,
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.question-topline {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 18px;
}

.question-panel h2 {
  min-height: 96px;
  margin: 0 0 22px;
  font-size: clamp(1.45rem, 2.2vw, 2.1rem);
  line-height: 1.16;
}

.question-panel h2.needs-answer {
  color: #8b1209;
}

.options-list {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.question-notice {
  min-height: 22px;
  margin: 0 0 14px;
  color: #8b1209;
  font-weight: 700;
}

.option-button {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
  min-height: 62px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffdf4;
  color: var(--ink);
  padding: 12px;
  text-align: left;
  cursor: pointer;
}

.option-button:hover {
  background: #fff0bd;
}

.option-button.selected {
  border-color: var(--burgundy);
  background: #fff0bd;
}

.option-dot {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff8dc;
  color: transparent;
}

.option-button.selected .option-dot {
  border-color: var(--burgundy);
  background: var(--burgundy);
  color: #fff8dc;
}

.primary-button,
.secondary-button {
  display: inline-grid;
  min-height: 40px;
  place-items: center;
  border-radius: 6px;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 700;
}

.primary-button {
  border: 0;
  background: var(--accent);
  color: #fff8dc;
}

.primary-button:hover {
  background: var(--accent-dark);
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--gold-soft);
  color: #4f0704;
}

.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.score-panel {
  padding: 22px;
}

.score-ring {
  display: grid;
  width: 154px;
  height: 154px;
  place-items: center;
  align-content: center;
  margin: 0 auto 18px;
  border: 12px solid #fff0bd;
  border-top-color: var(--burgundy);
  border-right-color: var(--gold);
  border-radius: 50%;
}

.score-ring span {
  font-size: 2.65rem;
  font-weight: 900;
}

.score-ring small {
  color: var(--muted);
}

.score-panel h2 {
  margin: 0 0 8px;
  text-align: center;
}

.score-panel p {
  margin: 0 0 18px;
  text-align: center;
}

.theme-score-list,
.recommendation-list {
  display: grid;
  gap: 12px;
}

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

.theme-score-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.9rem;
}

.meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #fff0bd;
}

.meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.recommendations-band {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  margin-top: 18px;
  padding: 22px;
}

.assessment-result {
  display: none;
  grid-template-columns: minmax(220px, 0.65fr) minmax(0, 1.35fr);
  gap: 18px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 20%, rgba(244, 197, 66, 0.26), transparent 160px),
    var(--panel);
  box-shadow: var(--shadow);
  padding: 22px;
}

.assessment-result.active {
  display: grid;
}

.assessment-result h2 {
  margin: 0 0 8px;
  color: #700b06;
  font-size: clamp(2.1rem, 4vw, 4rem);
  line-height: 1;
}

.assessment-result p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.result-breakdown article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf4;
  padding: 14px;
}

.result-breakdown strong,
.result-breakdown span {
  display: block;
}

.result-breakdown strong {
  margin-bottom: 8px;
  color: #8b1209;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.recommendations-band h2,
.panel-heading h2 {
  margin: 0;
}

.recommendation {
  border-left: 5px solid var(--accent);
  border-radius: 6px;
  background: #fffdf4;
  padding: 12px 14px;
}

.recommendation strong {
  display: block;
  margin-bottom: 4px;
}

.recommendation p {
  margin: 0;
}

.mail-app {
  display: grid;
  grid-template-columns: 190px 300px minmax(0, 1fr);
  min-height: 720px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf4;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.mail-folders {
  border-right: 1px solid #ead49a;
  background: #fbf2d4;
  padding: 16px;
}

.mail-account {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e5c980;
}

.mail-avatar {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: #700b06;
  color: #fff8dc;
  font-size: 0.82rem;
  font-weight: 800;
}

.mail-account strong,
.mail-account small {
  display: block;
}

.mail-account small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.mail-folder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 0 10px;
  text-align: left;
}

.mail-folder:hover,
.mail-folder.active {
  background: #fff6d8;
}

.mail-folder strong {
  color: #8b1209;
  font-size: 0.82rem;
}

.mail-tip {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff9e8;
  padding: 12px;
}

.mail-tip strong {
  display: block;
  color: #700b06;
  margin-bottom: 6px;
}

.mail-tip p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.mail-list-panel {
  min-width: 0;
  border-right: 1px solid #ead49a;
  background: #fff9e8;
}

.mail-search {
  display: grid;
  min-height: 58px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #ead49a;
}

.mail-search span {
  display: block;
  min-height: 36px;
  border: 1px solid #d9ba65;
  border-radius: 6px;
  background: #fffdf4;
  color: #9a7a4a;
  padding: 9px 12px;
}

.mail-list {
  display: grid;
  align-content: start;
  max-height: 662px;
  overflow: auto;
}

.mail-empty {
  display: grid;
  gap: 4px;
  min-height: 120px;
  align-content: center;
  padding: 20px;
  color: var(--muted);
  text-align: center;
}

.mail-empty strong {
  color: #700b06;
}

.mail-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) 54px;
  gap: 9px;
  min-height: 106px;
  border: 0;
  border-bottom: 1px solid #ead49a;
  background: #fffdf4;
  color: var(--ink);
  cursor: pointer;
  padding: 12px 10px;
  text-align: left;
}

.mail-item:hover,
.mail-item.active {
  background: #fff0bd;
}

.mail-item.answered .mail-unread-dot {
  background: #3b7c28;
}

.mail-unread-dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: #8b1209;
}

.mail-item-main {
  min-width: 0;
}

.mail-item-main strong,
.mail-item-main b,
.mail-item-main small,
.mail-item-side time,
.paperclip {
  display: block;
}

.mail-item-main strong {
  margin-bottom: 5px;
  color: #321610;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mail-item-main b {
  margin-bottom: 4px;
  font-size: 0.92rem;
  line-height: 1.2;
}

.mail-item-main small {
  color: var(--muted);
  line-height: 1.3;
}

.mail-item-side {
  color: var(--muted);
  font-size: 0.78rem;
  text-align: right;
}

.paperclip {
  margin-top: 8px;
  color: #8b1209;
  font-weight: 800;
}

.mail-reader {
  min-width: 0;
  background: #fffdf4;
}

.mail-ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-height: 58px;
  padding: 10px 14px;
  border-bottom: 1px solid #ead49a;
  background: #fff9e8;
}

.mail-ribbon button {
  min-height: 34px;
  border: 1px solid #d9ba65;
  border-radius: 6px;
  background: #fffdf4;
  color: #321610;
  cursor: pointer;
  padding: 0 12px;
}

.mail-ribbon button:hover {
  background: #fff0bd;
}

.mail-ribbon .report-button {
  border-color: #8b1209;
  background: #700b06;
  color: #fff8dc;
  font-weight: 800;
}

.mail-message-header {
  padding: 22px 26px 14px;
  border-bottom: 1px solid #ead49a;
}

.mail-tag {
  display: inline-grid;
  min-height: 26px;
  place-items: center;
  margin-bottom: 10px;
  border-radius: 999px;
  background: #fff0bd;
  color: #700b06;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0 10px;
}

.mail-message-header h2 {
  margin: 0 0 12px;
  color: #1f130f;
  font-size: clamp(1.25rem, 1.7vw, 1.75rem);
  line-height: 1.1;
}

.mail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.mail-meta span:first-child {
  color: #321610;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.header-toggle {
  margin-top: 12px;
  border: 0;
  background: transparent;
  color: #700b06;
  cursor: pointer;
  font-weight: 800;
  padding: 0;
}

.mail-headers {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.mail-headers.open {
  display: grid;
}

.mail-headers div {
  border: 1px solid #ead49a;
  border-radius: 6px;
  background: #fff9e8;
  padding: 8px 10px;
}

.mail-headers span,
.mail-headers strong {
  display: block;
}

.mail-headers span {
  margin-bottom: 3px;
  color: #8b1209;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.mail-headers strong {
  color: #321610;
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.mail-body {
  max-width: 820px;
  padding: 24px 26px 12px;
}

.mail-body p {
  margin: 0 0 14px;
  color: #321610;
  line-height: 1.55;
}

.mail-attachment,
.mail-link-preview,
.decision-panel,
.mail-feedback {
  margin: 0 26px 16px;
}

.attachment-tile {
  display: inline-grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  max-width: min(420px, 100%);
  min-height: 70px;
  border: 1px solid #d9ba65;
  border-radius: 8px;
  background: #fff9e8;
  color: var(--ink);
  cursor: pointer;
  padding: 10px 12px;
  text-align: left;
}

.attachment-tile:hover {
  background: #fff0bd;
}

.file-icon {
  display: grid;
  width: 42px;
  height: 48px;
  place-items: center;
  border-radius: 5px;
  background: #700b06;
  color: #fff8dc;
  font-size: 0.7rem;
  font-weight: 900;
}

.attachment-tile strong,
.attachment-tile small {
  display: block;
}

.attachment-tile strong {
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

.attachment-tile small {
  color: var(--muted);
}

.mail-link-preview {
  display: grid;
  gap: 5px;
  max-width: 720px;
}

.mail-link-preview a {
  color: #075aaa;
  font-weight: 700;
}

.mail-link-preview span {
  display: block;
  border: 1px solid #d9ba65;
  border-radius: 6px;
  background: #fff9e8;
  color: var(--muted);
  font-size: 0.82rem;
  padding: 7px 9px;
  overflow-wrap: anywhere;
}

.decision-panel {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbf2d4;
  padding: 14px;
}

.decision-panel p {
  margin: 0;
  color: var(--muted);
}

.mail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mail-actions button {
  min-height: 36px;
  border: 1px solid #d9ba65;
  border-radius: 6px;
  background: #fffdf4;
  color: #321610;
  cursor: pointer;
  padding: 0 11px;
  font-weight: 700;
}

.mail-actions button:hover,
.mail-actions button.selected {
  border-color: #700b06;
  background: #fff0bd;
}

.mail-feedback {
  display: none;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.6fr);
  gap: 16px;
  border: 1px solid #b44d42;
  border-radius: 8px;
  background: #fff3ef;
  padding: 14px;
}

.mail-feedback.active {
  display: grid;
}

.mail-feedback.correct {
  border-color: #6ea45f;
  background: #f1faeb;
}

.mail-feedback strong {
  display: block;
  margin-bottom: 5px;
}

.mail-feedback p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.mail-feedback .mail-status-message {
  margin-bottom: 8px;
  color: #315f22;
  font-weight: 800;
}

.mail-feedback ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: #321610;
}

.wifi-lab {
  display: grid;
  grid-template-columns: minmax(300px, 0.75fr) minmax(0, 1.25fr);
  gap: 18px;
}

.wifi-device,
.wifi-decision {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.wifi-device {
  overflow: hidden;
  background:
    linear-gradient(180deg, #fffdf4 0, #fff9e8 100%);
}

.wifi-device-top {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid #ead49a;
  background:
    radial-gradient(circle at 86% 16%, rgba(244, 197, 66, 0.18), transparent 120px),
    linear-gradient(180deg, #860f08, #700b06);
  color: #fff8dc;
}

.wifi-device-top strong,
.wifi-device-top small {
  display: block;
}

.wifi-device-top small {
  margin-top: 3px;
  color: #ffe7a3;
}

.wifi-device-status {
  border: 1px solid rgba(255, 240, 189, 0.45);
  border-radius: 999px;
  background: rgba(255, 248, 220, 0.12);
  color: #fff8dc;
  font-size: 0.76rem;
  font-weight: 900;
  padding: 6px 10px;
}

.wifi-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 16px;
  background: #fff0bd;
  color: #700b06;
  font-size: 0.8rem;
  font-weight: 900;
}

.wifi-networks {
  display: grid;
  padding: 10px;
  gap: 8px;
}

.wifi-network {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255, 253, 244, 0.68);
  color: var(--ink);
  cursor: pointer;
  padding: 10px 12px;
  text-align: left;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.wifi-network:hover,
.wifi-network.active {
  border-color: #d9ba65;
  background: #fff0bd;
  transform: translateX(2px);
}

.wifi-network.high.active {
  box-shadow: inset 4px 0 0 #9c1b10, 0 10px 22px rgba(89, 43, 8, 0.09);
}

.wifi-network.medium.active {
  box-shadow: inset 4px 0 0 #b87912, 0 10px 22px rgba(89, 43, 8, 0.09);
}

.wifi-network.low.active {
  box-shadow: inset 4px 0 0 #3b7c28, 0 10px 22px rgba(89, 43, 8, 0.09);
}

.wifi-bars {
  display: flex;
  width: 38px;
  height: 38px;
  gap: 3px;
  align-items: end;
  justify-content: center;
  border-radius: 10px;
  background: #fff9e8;
  border: 1px solid #ead49a;
  padding: 7px 5px;
}

.wifi-bars i {
  display: block;
  width: 5px;
  border-radius: 999px;
  background: #ead49a;
}

.wifi-bars i.active {
  background: linear-gradient(180deg, #f4c542, #700b06);
}

.wifi-network-main {
  min-width: 0;
}

.wifi-network-main strong,
.wifi-network-main small {
  display: block;
}

.wifi-network-main strong {
  margin-bottom: 4px;
  overflow-wrap: anywhere;
  letter-spacing: 0.01em;
}

.wifi-network-main small {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  line-height: 1.35;
}

.wifi-network-main em {
  border-radius: 999px;
  background: #fff6d8;
  color: #7b5b37;
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 7px;
}

.wifi-risk {
  display: inline-grid;
  min-height: 28px;
  place-items: center;
  border-radius: 999px;
  background: #fff6d8;
  color: #700b06;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0 9px;
  white-space: nowrap;
}

.wifi-decision {
  padding: 20px;
}

.wifi-status-card {
  min-height: 188px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 16% 20%, rgba(244, 197, 66, 0.28), transparent 140px),
    linear-gradient(180deg, #850e07, #650704);
  color: #fff8dc;
  padding: 22px;
}

.wifi-status-pill {
  display: inline-grid;
  min-height: 28px;
  place-items: center;
  border-radius: 999px;
  background: #fff0bd;
  color: #700b06;
  font-size: 0.76rem;
  font-weight: 900;
  padding: 0 11px;
}

.wifi-question-step {
  display: inline-grid;
  min-height: 28px;
  place-items: center;
  margin-right: 8px;
  border-radius: 999px;
  background: #700b06;
  color: #fff8dc;
  font-size: 0.76rem;
  font-weight: 900;
  padding: 0 11px;
}

.wifi-status-pill.high {
  background: #ffd6cc;
}

.wifi-status-pill.medium {
  background: #ffe7a3;
}

.wifi-status-pill.low {
  background: #dff2d8;
}

.wifi-status-card h2 {
  margin: 14px 0 8px;
  font-size: clamp(1.7rem, 3vw, 3rem);
  line-height: 1.05;
}

.wifi-status-card p {
  max-width: 760px;
  margin: 0;
  color: #fff4c7;
  line-height: 1.5;
}

.wifi-actions-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf4;
  padding: 16px;
}

.wifi-actions-panel.locked {
  opacity: 0.62;
}

.wifi-actions-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.wifi-activities button {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 58px;
  border: 1px solid #d9ba65;
  border-radius: 8px;
  background: #fff9e8;
  color: var(--ink);
  cursor: pointer;
  padding: 10px;
  text-align: left;
}

.wifi-activities button:hover,
.wifi-activities button.selected {
  border-color: #700b06;
  background: #fff0bd;
}

.wifi-activities button:disabled {
  cursor: not-allowed;
}

.wifi-activities span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: #700b06;
  color: #fff8dc;
  font-size: 0.72rem;
  font-weight: 900;
}

.wifi-activities strong {
  font-size: 0.94rem;
  line-height: 1.2;
}

.wifi-vpn-toggle {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  border: 1px solid #d9ba65;
  border-radius: 8px;
  background: #fff9e8;
  color: var(--ink);
  cursor: pointer;
  padding: 10px 12px;
  text-align: left;
}

.wifi-vpn-toggle:hover,
.wifi-vpn-toggle.on {
  border-color: #700b06;
  background: #fff0bd;
}

.wifi-vpn-toggle:disabled {
  cursor: not-allowed;
}

.wifi-vpn-toggle span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: #700b06;
  color: #fff8dc;
  font-size: 0.72rem;
  font-weight: 900;
}

.wifi-vpn-toggle strong,
.wifi-vpn-toggle small {
  display: block;
}

.wifi-vpn-toggle small {
  min-width: 44px;
  border-radius: 999px;
  background: #f3d071;
  color: #4f0704;
  font-weight: 900;
  padding: 6px 10px;
  text-align: center;
}

.wifi-vpn-toggle.on small {
  background: #dff2d8;
  color: #315f22;
}

.wifi-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}

.wifi-feedback {
  display: none;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 0.6fr);
  gap: 16px;
  margin-top: 16px;
  border: 1px solid #b44d42;
  border-radius: 8px;
  background: #fff3ef;
  padding: 16px;
}

.wifi-feedback.active {
  display: grid;
}

.wifi-feedback.correct {
  border-color: #6ea45f;
  background: #f1faeb;
}

.wifi-feedback strong {
  display: block;
  margin-bottom: 6px;
}

.wifi-breakdown {
  display: grid;
  gap: 6px;
  margin: 0 0 10px;
}

.wifi-breakdown span {
  display: block;
  border: 1px solid #d9ba65;
  border-radius: 6px;
  background: #fffdf4;
  padding: 7px 9px;
  line-height: 1.35;
}

.wifi-breakdown .ok {
  border-color: #6ea45f;
  color: #315f22;
}

.wifi-breakdown .warn {
  border-color: #b44d42;
  color: #8b1209;
}

.wifi-feedback p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.45;
}

.wifi-feedback ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

.wifi-support-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(300px, 0.72fr);
  gap: 18px;
  margin-top: 18px;
}

.wifi-trust-card,
.wifi-rule-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 20px;
}

.wifi-trust-card h2,
.wifi-rule-card h2 {
  margin: 6px 0 16px;
  font-size: clamp(1.45rem, 2vw, 2.15rem);
  line-height: 1.08;
}

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

.wifi-trust-scale div,
.wifi-rule-list div {
  border: 1px solid #d9ba65;
  border-radius: 8px;
  background: #fffdf4;
  padding: 13px;
}

.wifi-trust-scale div:first-child {
  box-shadow: inset 0 4px 0 #3b7c28;
}

.wifi-trust-scale div:nth-child(2),
.wifi-trust-scale div:nth-child(3) {
  box-shadow: inset 0 4px 0 #b87912;
}

.wifi-trust-scale div:nth-child(4),
.wifi-trust-scale div:nth-child(5) {
  box-shadow: inset 0 4px 0 #9c1b10;
}

.wifi-trust-scale span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.wifi-trust-scale strong,
.wifi-rule-list strong {
  display: block;
  margin-bottom: 7px;
  color: #700b06;
  overflow-wrap: anywhere;
}

.wifi-trust-scale p,
.wifi-rule-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
}

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

.usb-lab {
  display: grid;
  grid-template-columns: minmax(300px, 0.58fr) minmax(0, 1.42fr);
  gap: 18px;
}

.usb-case-queue,
.usb-decision-panel,
.usb-selected-card,
.usb-actions-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.usb-case-queue {
  display: grid;
  align-content: start;
  overflow: hidden;
}

.usb-queue-top {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid #ead49a;
  background: linear-gradient(180deg, #860f08, #700b06);
  color: #fff8dc;
}

.usb-queue-top strong,
.usb-queue-top small {
  display: block;
}

.usb-queue-top small {
  margin-top: 3px;
  color: #ffe7a3;
}

.usb-desk-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 12px;
  background: #fff0bd;
  color: #700b06;
  font-size: 0.8rem;
  font-weight: 900;
}

.usb-decision-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.usb-device-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.usb-case-queue .usb-device-list {
  grid-template-columns: 1fr;
  gap: 0;
}

.usb-device {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 66px;
  border: 1px solid #d9ba65;
  border-radius: 8px;
  background: #fffdf4;
  color: var(--ink);
  cursor: pointer;
  padding: 10px;
  text-align: left;
}

.usb-case-queue .usb-device {
  min-height: 82px;
  border-width: 0 0 1px;
  border-radius: 0;
}

.usb-device:hover,
.usb-device.active {
  border-color: #700b06;
  background: #fff0bd;
}

.usb-device.high.active {
  box-shadow: inset 4px 0 0 #9c1b10;
}

.usb-device.medium.active {
  box-shadow: inset 4px 0 0 #b87912;
}

.usb-device.low.active {
  box-shadow: inset 4px 0 0 #3b7c28;
}

.usb-mini-icon {
  display: block;
  width: 20px;
  height: 34px;
  margin: auto;
  border: 1px solid #d9ba65;
  border-radius: 5px 5px 3px 3px;
  background:
    linear-gradient(180deg, #f4c542 0 22%, #9c1b10 23% 100%);
}

.usb-device strong,
.usb-device small {
  display: block;
}

.usb-device strong {
  margin-bottom: 3px;
  overflow-wrap: anywhere;
}

.usb-device small {
  color: var(--muted);
}

.usb-device em {
  border-radius: 999px;
  background: #fff6d8;
  color: #700b06;
  font-style: normal;
  font-size: 0.74rem;
  font-weight: 900;
  padding: 6px 9px;
  white-space: nowrap;
}

.usb-selected-card {
  min-height: 178px;
  background:
    radial-gradient(circle at 12% 18%, rgba(244, 197, 66, 0.26), transparent 160px),
    linear-gradient(180deg, #850e07, #650704);
  color: #fff8dc;
  padding: 22px;
}

.usb-risk-pill {
  display: inline-grid;
  min-height: 28px;
  place-items: center;
  border-radius: 999px;
  background: #fff0bd;
  color: #700b06;
  font-size: 0.76rem;
  font-weight: 900;
  padding: 0 11px;
}

.usb-risk-pill.high {
  background: #ffd6cc;
}

.usb-risk-pill.medium {
  background: #ffe7a3;
}

.usb-risk-pill.low {
  background: #dff2d8;
}

.usb-selected-card h2 {
  margin: 14px 0 8px;
  font-size: clamp(1.6rem, 3vw, 2.7rem);
  line-height: 1.05;
}

.usb-selected-card p {
  max-width: 780px;
  margin: 0;
  color: #fff4c7;
  line-height: 1.5;
}

.usb-clues {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.usb-clues span {
  border: 1px solid rgba(255, 240, 189, 0.55);
  border-radius: 999px;
  background: rgba(255, 248, 220, 0.12);
  color: #fff8dc;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 7px 10px;
}

.usb-actions-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.usb-protocol-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 14px;
  align-items: start;
}

.usb-actions-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.usb-actions button {
  min-height: 76px;
  border: 1px solid #d9ba65;
  border-radius: 8px;
  background: #fff9e8;
  color: var(--ink);
  cursor: pointer;
  padding: 12px;
  text-align: left;
}

.usb-actions button:hover,
.usb-actions button.selected {
  border-color: #700b06;
  background: #fff0bd;
}

.usb-actions span,
.usb-actions small {
  display: block;
}

.usb-actions span {
  margin-bottom: 5px;
  font-weight: 900;
}

.usb-actions small {
  color: var(--muted);
  line-height: 1.35;
}

.usb-feedback {
  display: none;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  min-height: 100%;
  border: 1px solid #b44d42;
  border-radius: 8px;
  background: #fff3ef;
  padding: 16px;
}

.usb-feedback.active {
  display: grid;
}

.usb-feedback.correct {
  border-color: #6ea45f;
  background: #f1faeb;
}

.usb-feedback.pending {
  border-color: var(--line);
  background: #fffdf4;
}

.usb-feedback strong {
  display: block;
  margin-bottom: 6px;
}

.usb-feedback p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.45;
}

.usb-feedback ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

.usb-support-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(300px, 0.72fr);
  gap: 18px;
  margin-top: 18px;
}

.usb-protocol-card,
.usb-rule-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 20px;
}

.usb-protocol-card h2,
.usb-rule-card h2 {
  margin: 6px 0 16px;
  font-size: clamp(1.45rem, 2vw, 2.15rem);
  line-height: 1.08;
}

.usb-protocol-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.usb-protocol-steps div,
.usb-rule-flow div {
  border: 1px solid #d9ba65;
  border-radius: 8px;
  background: #fffdf4;
  padding: 14px;
}

.usb-protocol-steps span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 50%;
  background: #700b06;
  color: #fff8dc;
  font-size: 0.78rem;
  font-weight: 900;
}

.usb-protocol-steps strong,
.usb-rule-flow strong {
  display: block;
  margin-bottom: 7px;
  color: #700b06;
}

.usb-protocol-steps p,
.usb-rule-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.usb-rule-flow {
  display: grid;
  gap: 10px;
}

.usb-rule-flow span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.usb-rule-flow strong {
  margin-bottom: 0;
  font-size: 1.02rem;
}

.usb-rule-note {
  margin-top: 14px;
  border-left: 4px solid #700b06;
  padding-left: 12px;
}

.panel-heading span {
  color: var(--muted);
}

.theme-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf4;
  padding: 14px;
}

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

.theme-card p {
  margin: 0;
}

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

.evidence-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.evidence-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: #fff0bd;
}

.evidence-card div {
  padding: 16px;
}

.evidence-card h2 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.evidence-card p {
  margin: 0;
}

.detective-header {
  margin-bottom: 18px;
}

.detective-console {
  display: grid;
  grid-template-columns: minmax(300px, 0.92fr) minmax(0, 1.08fr);
  gap: 18px;
}

.case-file,
.detective-tools,
.detective-result {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.case-file {
  min-height: 560px;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(112, 11, 6, 0.06), rgba(112, 11, 6, 0)),
    #fffdf4;
}

.case-topline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 22px;
}

.case-topline span,
.result-top span {
  display: inline-grid;
  min-height: 30px;
  place-items: center;
  border-radius: 999px;
  background: #700b06;
  color: #fff8dc;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 0 12px;
}

.case-topline strong {
  color: #700b06;
  text-transform: uppercase;
}

.case-file blockquote {
  min-height: 240px;
  margin: 0;
  border: 1px solid #d9ba65;
  border-radius: 8px;
  background:
    radial-gradient(circle at 15% 18%, rgba(244, 197, 66, 0.22), transparent 150px),
    #fff9e8;
  color: var(--ink);
  font-size: clamp(1.45rem, 2.6vw, 2.5rem);
  font-weight: 900;
  line-height: 1.15;
  padding: 24px;
}

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

.case-status-grid div {
  min-height: 82px;
  border: 1px solid #d9ba65;
  border-radius: 8px;
  background: #fff6d8;
  padding: 12px;
}

.case-status-grid span,
.case-status-grid strong {
  display: block;
}

.case-status-grid span {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.case-status-grid strong {
  color: #700b06;
  overflow-wrap: anywhere;
}

.detective-tools {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.tool-panel {
  border: 1px solid #d9ba65;
  border-radius: 8px;
  background: #fffdf4;
  padding: 14px;
}

.tool-heading {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.tool-heading > span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: #700b06;
  color: #fff8dc;
  font-size: 0.78rem;
  font-weight: 900;
}

.tool-heading strong,
.tool-heading small {
  display: block;
}

.tool-heading strong {
  color: #700b06;
}

.tool-heading small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

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

.detective-choice,
.concept-chip {
  border: 1px solid #d9ba65;
  border-radius: 8px;
  background: #fff9e8;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  text-align: left;
}

.detective-choice {
  min-height: 58px;
  padding: 12px;
}

.detective-choice:hover,
.detective-choice.active,
.concept-chip:hover,
.concept-chip.active {
  border-color: #700b06;
  background: #fff0bd;
}

.detective-choice.active,
.concept-chip.active {
  box-shadow: inset 4px 0 0 #700b06;
}

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

.concept-locks span {
  display: grid;
  min-height: 42px;
  align-items: center;
  border: 1px solid #d9ba65;
  border-radius: 8px;
  background: #fff0bd;
  color: #700b06;
  font-weight: 900;
  padding: 9px 11px;
  overflow-wrap: anywhere;
}

.concept-helper {
  margin: -2px 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
}

.concept-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.concept-chip {
  flex: 1 1 170px;
  max-width: 260px;
  min-height: 54px;
  padding: 10px 12px;
  line-height: 1.25;
}

.detective-warning {
  min-height: 24px;
  margin: 0;
  color: #8b1209;
  font-weight: 800;
}

.detective-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.detective-result {
  display: none;
  margin-top: 18px;
  padding: 20px;
}

.detective-result.active {
  display: block;
}

.result-top {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 16px;
}

.result-top h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2.4vw, 2.35rem);
  line-height: 1.08;
}

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

.verdict-grid article,
.model-card {
  border: 1px solid #d9ba65;
  border-radius: 8px;
  background: #fffdf4;
  padding: 14px;
}

.verdict-grid article.wide {
  grid-column: 1 / -1;
}

.verdict-grid strong,
.model-card strong,
.model-card span {
  display: block;
}

.verdict-grid strong,
.model-card strong {
  margin-bottom: 8px;
  color: #700b06;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.verdict-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.model-card span {
  color: var(--muted);
  line-height: 1.35;
}

.result-actions {
  margin-top: 16px;
}

.site-footer {
  margin: 0 var(--frame-margin) 18px;
  border-radius: 14px;
  background: linear-gradient(90deg, var(--burgundy), var(--burgundy-dark));
  color: #fff8dc;
  text-align: center;
  padding: 14px 18px;
}

.site-footer p {
  margin: 0;
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 520ms ease,
    transform 520ms ease;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  :root {
    --header-height: auto;
    --frame-margin: 10px;
  }

  .page-header {
    min-height: 0;
    border-radius: 12px;
  }

  .image-banner {
    min-height: 0;
  }

  .app-shell,
  .assessment-grid,
  .recommendations-band,
  .assessment-result,
  .result-breakdown,
  .evidence-grid,
  .mail-app,
  .wifi-lab,
  .wifi-support-grid,
  .wifi-trust-scale,
  .usb-lab,
  .usb-protocol-grid,
  .usb-support-grid,
  .usb-protocol-steps,
  .usb-feedback,
  .wifi-actions-panel,
  .wifi-feedback,
  .decision-panel,
  .mail-feedback,
  .mail-headers,
  .overview-layout,
  .overview-visual-lab,
  .bridge-flow,
  .insight-selector,
  .theme-carousel,
  .theme-slide,
  .section-strip,
  .overview-application,
  .detective-console,
  .case-status-grid,
  .detective-switches,
  .concept-locks,
  .concept-grid,
  .verdict-grid,
  .model-grid {
    grid-template-columns: 1fr;
    grid-template-areas: none;
  }

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

  .author-card {
    padding: 10px;
  }

  .author-card strong {
    font-size: 0.84rem;
  }

  .author-card span,
  .author-card p {
    font-size: 0.72rem;
  }

  .mail-app {
    min-height: 0;
  }

  .mail-folders,
  .mail-list-panel {
    border-right: 0;
    border-bottom: 1px solid #ead49a;
  }

  .mail-list {
    max-height: none;
  }

  .mail-attachment,
  .mail-link-preview,
  .decision-panel,
  .mail-feedback {
    margin-left: 18px;
    margin-right: 18px;
  }

  .mail-message-header,
  .mail-body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .carousel-dots {
    grid-column: 1;
  }

  .sidebar {
    position: static;
    border-radius: 13px 13px 0 0;
  }

  .content {
    grid-column: 1;
    grid-row: 2;
    padding: 20px;
  }

  .section-header {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .authors-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .author-card img {
    aspect-ratio: 4 / 3;
  }
}
