:root {
  --bg: #f4f7f9;
  --panel: #ffffff;
  --panel-soft: #f0f7f3;
  --panel-blue: #f1f6ff;
  --text: #14221b;
  --ink: #07140f;
  --muted: #64746d;
  --soft: #8a9a92;
  --line: #dce6e0;
  --line-strong: #c2d3ca;
  --green: #008060;
  --green-dark: #005d46;
  --blue: #2563eb;
  --amber: #b46a18;
  --danger: #b42318;
  --shadow: 0 18px 55px rgba(16, 35, 26, 0.08);
  --shadow-soft: 0 1px 2px rgba(12, 24, 18, 0.06), 0 24px 60px rgba(31, 52, 44, 0.08);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

a,
button,
input,
summary {
  font: inherit;
}

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

button,
summary {
  cursor: pointer;
}

button,
input {
  border-radius: var(--radius);
}

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

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: 280px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #fff;
}

.sidebar-header {
  min-height: 74px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
}

.brand img {
  width: 40px;
  height: 40px;
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.sidebar-close,
.mobile-menu-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
}

.sidebar-scroll {
  min-height: 0;
  flex: 1;
  padding: 18px 10px;
  overflow-y: auto;
}

.nav-group {
  margin: 0 0 18px;
}

.nav-heading {
  margin: 0 10px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #4b5d55;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-list {
  display: grid;
  gap: 4px;
}

.nav-link,
.nav-sub-link {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: var(--radius);
  color: #263b31;
  font-size: 14px;
  font-weight: 720;
}

.nav-link {
  padding: 0 12px;
}

.nav-sub-link {
  margin-left: 32px;
  padding: 0 10px;
  color: #5d6d66;
  font-size: 13px;
}

.nav-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid #d9e5df;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, #ffffff, #f5faf7);
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 850;
}

.nav-link:hover,
.nav-sub-link:hover,
.nav-link.is-active {
  background: #eaf7ef;
  color: var(--green-dark);
}

.nav-sub-link.is-active {
  color: var(--green-dark);
  background: #f1f9f4;
}

.sidebar-card {
  margin: 12px 10px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.sidebar-card strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

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

.mini-cta {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--green);
  border-radius: var(--radius);
  color: var(--green-dark);
  background: #fff;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
}

.content-shell {
  min-height: 100vh;
  margin-left: 280px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  padding: 0 28px;
}

.topbar-title {
  color: var(--muted);
  font-size: 13px;
  font-weight: 740;
}

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

.login-link {
  color: #1d2d25;
  font-size: 14px;
  font-weight: 750;
}

.primary-button,
.secondary-button,
.detector-form button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  padding: 0 16px;
  font-size: 14px;
  font-weight: 820;
}

.primary-button,
.detector-form button {
  border: 1px solid var(--green);
  background: var(--green);
  color: #fff;
  box-shadow: 0 12px 28px rgba(0, 128, 96, 0.18);
}

.primary-button:hover,
.detector-form button:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
}

.secondary-button {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--green-dark);
}

.content-area {
  width: min(100%, 1220px);
  margin: 0 auto;
  padding: 34px 30px 72px;
}

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 76% 24%, rgba(0, 128, 96, 0.08), transparent 34%),
    linear-gradient(rgba(248, 251, 250, 0.94), rgba(244, 247, 249, 0.98)),
    linear-gradient(90deg, rgba(37, 99, 235, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(37, 99, 235, 0.04) 1px, transparent 1px);
  background-size: auto, 42px 42px, 42px 42px;
}

.hero-inner {
  width: min(100%, 1220px);
  margin: 0 auto;
  padding: 44px 30px 30px;
  text-align: left;
}

.hero h1,
.page-title h1,
.article-header h1 {
  margin: 0;
  color: var(--ink);
  font-size: 48px;
  line-height: 1.08;
  font-weight: 850;
  letter-spacing: 0;
}

.hero p,
.page-title p,
.article-header p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}

.detector-form {
  width: min(100%, 680px);
  min-height: 58px;
  margin: 20px 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.detector-form input {
  width: 100%;
  min-width: 0;
  height: 46px;
  border: 0;
  outline: 0;
  padding: 0 14px;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
  font-weight: 650;
}

.detector-form input::placeholder {
  color: #84938c;
}

.detector-form button {
  min-width: 116px;
  height: 46px;
  min-height: 46px;
}

.detector-form.is-loading button {
  background: #0b4f3f;
}

.try-row {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.try-row button {
  min-height: 30px;
  border: 1px solid #cfe1d7;
  background: #fff;
  color: var(--green-dark);
  padding: 0 10px;
  font-size: 13px;
  font-weight: 780;
}

.analysis-status {
  min-height: 22px;
  margin: 11px 0 0;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 760;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: center;
}

.hero-proof-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
  padding: 18px;
}

.proof-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

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

.proof-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: #e8f7ee;
  color: var(--green-dark);
  font-weight: 850;
}

.proof-row strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.proof-row span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.analysis-status.is-error {
  color: var(--danger);
}

.detector-result {
  width: min(100%, 1220px);
  margin: 0 auto;
  padding: 0 30px 22px;
}

.detector-result[hidden] {
  display: none;
}

.result-panel,
.panel,
.answer-box,
.data-card,
.article-card,
.rank-card,
.toc-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 34px rgba(16, 35, 26, 0.06);
}

.result-panel {
  margin-top: 6px;
  overflow: hidden;
}

.result-dashboard {
  box-shadow: var(--shadow-soft);
}

.result-header {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfdfc;
}

.dashboard-header {
  min-height: 76px;
}

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

.result-store {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.store-avatar {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: #0b1110;
  color: #fff;
  font-size: 14px;
  font-weight: 850;
}

.result-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
}

.result-meta {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.status-pill {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #bde5c7;
  border-radius: var(--radius);
  background: #eaf8ef;
  color: var(--green-dark);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
}

.status-pill.is-sample {
  border-color: #f1d29b;
  background: #fff7e8;
  color: var(--amber);
}

.sample-warning {
  padding: 11px 16px;
  border-bottom: 1px solid #f0d5a5;
  background: #fff9ec;
  color: #73440f;
  font-size: 13px;
  font-weight: 700;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.15fr 1.2fr 1.05fr;
  border-bottom: 1px solid var(--line);
}

.dashboard-card {
  min-width: 0;
  min-height: 230px;
  padding: 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.dashboard-card:nth-child(4n) {
  border-right: 0;
}

.dashboard-card h3 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 850;
}

.store-summary-card {
  grid-row: span 2;
}

.stack-map-card {
  grid-row: span 2;
}

.installed-apps-card {
  grid-row: span 2;
}

.theme-card,
.signals-card,
.store-signals-card {
  min-height: 0;
}

.summary-stack {
  display: grid;
  gap: 12px;
}

.summary-stack div {
  display: grid;
  gap: 3px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.summary-stack div:last-child {
  border-bottom: 0;
}

.summary-stack span,
.dashboard-footnote,
.contact-row span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.summary-stack strong {
  color: #1c3128;
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.stack-bars {
  display: grid;
  gap: 11px;
}

.stack-bar-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 1.4fr 28px;
  gap: 10px;
  align-items: center;
  color: #30443a;
  font-size: 12px;
  font-weight: 760;
}

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

.dashboard-list li {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #263a31;
  font-size: 13px;
}

.dashboard-list span:last-child {
  flex: 0 0 auto;
  max-width: 112px;
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.theme-surface {
  height: 84px;
  border: 1px solid #d9e4de;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(7, 20, 15, 0.7), rgba(7, 20, 15, 0.12)),
    linear-gradient(135deg, #e9efeb, #ffffff);
  padding: 12px;
}

.theme-preview-lines {
  width: 58%;
  display: grid;
  gap: 8px;
}

.theme-preview-lines span {
  display: block;
  height: 8px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
}

.theme-preview-lines span:nth-child(2) {
  width: 72%;
}

.theme-preview-lines span:nth-child(3) {
  width: 42%;
  background: #cbeed8;
}

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

.signal-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 2px;
  align-items: center;
}

.signal-item span {
  grid-row: span 2;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: #eef3f8;
  color: #43556a;
  font-size: 12px;
  font-weight: 850;
}

.signal-item strong {
  min-width: 0;
  color: #2f4439;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.signal-item em {
  color: var(--green-dark);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.contact-row {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-size: 13px;
}

.confidence-strip {
  min-height: 54px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(90deg, #eef9f2, #f8fcfa);
  color: #244339;
  font-size: 13px;
}

.confidence-strip strong {
  color: var(--green-dark);
  font-weight: 850;
}

.confidence-strip a {
  color: var(--green-dark);
  font-weight: 850;
}

.result-card {
  min-height: 190px;
  padding: 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.result-card:nth-child(5n) {
  border-right: 0;
}

.result-card h3,
.data-card h3,
.rank-card h3,
.answer-box h2,
.section-heading h2,
.article-card h2,
.article-card h3,
.article-body h2,
.article-body h3,
.toc-card h2 {
  margin: 0;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: 0;
}

.result-card h3 {
  font-size: 15px;
}

.result-list,
.compact-list,
.article-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 9px;
}

.result-list li,
.compact-list li {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #263a31;
  font-size: 13px;
  line-height: 1.35;
}

.compact-list li {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: start;
}

.result-list b,
.compact-list b {
  min-width: 0;
  overflow-wrap: anywhere;
}

.compact-list b {
  overflow-wrap: normal;
  word-break: normal;
}

.compact-list span {
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

.result-list span,
.compact-list span,
.muted {
  color: var(--muted);
}

.app-dot {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: var(--radius);
  background: var(--panel-blue);
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
}

.list-left {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.result-value {
  margin-top: 12px;
  color: #1c352a;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.result-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.section-heading {
  margin: 0 0 20px;
}

.power-section {
  padding: 38px 0;
  border-top: 1px solid rgba(220, 230, 224, 0.72);
}

.power-section:first-child {
  border-top: 0;
}

.power-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.deep-copy {
  max-width: 780px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.72;
}

.deep-copy p {
  margin: 12px 0 0;
}

.visual-matrix,
.comparison-table,
.workflow-diagram,
.teardown-panel,
.related-panel,
.glossary-grid {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 28px rgba(18, 34, 27, 0.05);
}

.visual-matrix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
}

.matrix-cell {
  min-height: 158px;
  padding: 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.matrix-cell:nth-child(3n) {
  border-right: 0;
}

.matrix-cell:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.matrix-cell h3 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
}

.matrix-cell p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.matrix-label {
  display: inline-flex;
  margin-top: 13px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 850;
}

.workflow-diagram {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
}

.workflow-step {
  position: relative;
  padding: 22px 18px;
  border-right: 1px solid var(--line);
}

.workflow-step:last-child {
  border-right: 0;
}

.workflow-step span {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: #e8f7ef;
  color: var(--green-dark);
  font-weight: 850;
}

.workflow-step h3 {
  margin: 14px 0 0;
  color: var(--ink);
  font-size: 17px;
}

.workflow-step p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.callout {
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  background: #eef9f2;
  padding: 16px 18px;
  color: #25443a;
  font-size: 15px;
  line-height: 1.6;
}

.teardown-panel {
  padding: 20px;
}

.teardown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.teardown-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #fbfdfc;
}

.teardown-item h3 {
  margin: 0;
  font-size: 16px;
}

.teardown-item p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.related-panel {
  padding: 20px;
  background: linear-gradient(135deg, #ffffff, #f2f8f5);
}

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

.related-grid a {
  display: block;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
  color: var(--ink);
  font-weight: 850;
}

.related-grid span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

.legal-title {
  max-width: 900px;
}

.legal-updated {
  color: var(--soft);
  font-size: 13px;
  font-weight: 720;
}

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

.legal-card,
.contact-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 28px rgba(18, 34, 27, 0.05);
  padding: 22px;
}

.legal-card h2,
.contact-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
}

.legal-card p,
.contact-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.legal-card a,
.contact-card a:not(.primary-button) {
  color: var(--blue);
  font-weight: 760;
  overflow-wrap: anywhere;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 14px;
  margin-top: 24px;
}

.primary-contact {
  grid-row: span 2;
  background:
    radial-gradient(circle at 92% 10%, rgba(0, 128, 96, 0.1), transparent 36%),
    #fff;
}

.primary-contact span {
  display: block;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.primary-contact h2 {
  margin-top: 12px;
  overflow-wrap: anywhere;
}

.primary-contact .primary-button {
  width: fit-content;
  margin-top: 18px;
}

.trust-strip {
  margin-top: 34px;
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
}

.glossary-grid div {
  padding: 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.glossary-grid div:nth-child(2n) {
  border-right: 0;
}

.glossary-grid div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.glossary-grid dt {
  color: var(--ink);
  font-weight: 850;
}

.glossary-grid dd {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.section-heading h2 {
  font-size: 30px;
}

.section-heading p {
  max-width: 760px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.content-section {
  padding: 26px 0;
}

.answer-box {
  padding: 22px;
}

.answer-box h2 {
  font-size: 26px;
}

.answer-box p,
.article-body p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

.discover-grid,
.use-case-grid,
.article-grid,
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.data-card,
.article-card,
.rank-card,
.toc-card {
  padding: 18px;
}

.data-card h3,
.rank-card h3 {
  font-size: 18px;
}

.data-card p,
.article-card p,
.rank-card p,
.toc-card p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.steps {
  counter-reset: step;
  display: grid;
  gap: 10px;
}

.step {
  position: relative;
  min-height: 72px;
  padding: 16px 16px 16px 54px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: #dff5e6;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 850;
}

.step h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
}

.step p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: #34453d;
  background: #f8fbf9;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.data-table td {
  color: #263a31;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.bar-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(86px, 2fr) minmax(54px, auto);
  gap: 10px;
  align-items: center;
  color: #263a31;
  font-size: 14px;
  font-weight: 700;
}

.bar-row > * {
  min-width: 0;
}

.bar-track {
  height: 10px;
  border-radius: var(--radius);
  background: #e8eef5;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: var(--radius);
  background: var(--blue);
}

.bar-fill.green {
  background: var(--green);
}

.bar-fill.amber {
  background: var(--amber);
}

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

.faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.faq-list summary {
  min-height: 54px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.faq-list p {
  margin: 0;
  padding: 0 16px 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.internal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.internal-links a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--green-dark);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
}

.page-title,
.article-header {
  padding: 10px 0 24px;
}

.page-title h1,
.article-header h1 {
  font-size: 40px;
}

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

.metric-card strong {
  display: block;
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
  font-weight: 850;
}

.metric-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.article-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
}

.article-card h2,
.article-card h3 {
  font-size: 20px;
}

.article-card a {
  margin-top: auto;
  padding-top: 14px;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 850;
}

.article-meta {
  margin-bottom: 10px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
  align-items: start;
}

.article-body {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.article-body h2 {
  margin-top: 26px;
  font-size: 24px;
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body h3 {
  margin-top: 20px;
  font-size: 18px;
}

.article-body ul,
.article-body ol {
  margin: 12px 0 0;
  padding-left: 22px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.toc-card {
  position: sticky;
  top: 76px;
}

.toc-card h2 {
  font-size: 18px;
}

.toc-card a {
  display: block;
  margin-top: 10px;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 760;
}

.site-footer {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.site-footer a {
  color: #4c5e56;
  font-weight: 720;
}

.sidebar-backdrop {
  display: none;
}

@media (max-width: 1180px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-proof-panel {
    max-width: 720px;
  }

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

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

  .dashboard-card:nth-child(2n) {
    border-right: 0;
  }

  .result-card:nth-child(5n) {
    border-right: 1px solid var(--line);
  }

  .result-card:nth-child(2n) {
    border-right: 0;
  }

  .two-column,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .toc-card {
    position: static;
  }

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

  .visual-matrix,
  .workflow-diagram,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .matrix-cell:nth-child(3n) {
    border-right: 1px solid var(--line);
  }

  .matrix-cell:nth-child(2n) {
    border-right: 0;
  }

  .matrix-cell:nth-last-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

  .matrix-cell:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .workflow-step:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-close,
  .mobile-menu-button {
    display: inline-flex;
  }

  .content-shell {
    margin-left: 0;
  }

  .topbar {
    padding: 0 16px;
  }

  .topbar-title {
    display: none;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgba(7, 20, 15, 0.28);
  }

  .sidebar-backdrop.is-open {
    display: block;
  }
}

@media (max-width: 720px) {
  .hero-inner,
  .content-area,
  .detector-result {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero h1,
  .page-title h1,
  .article-header h1 {
    font-size: 34px;
  }

  .hero p,
  .page-title p,
  .article-header p {
    font-size: 16px;
  }

  .detector-form {
    grid-template-columns: 1fr;
  }

  .detector-form button {
    width: 100%;
  }

  .result-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .result-grid,
  .dashboard-grid,
  .discover-grid,
  .use-case-grid,
  .article-grid,
  .metric-grid,
  .visual-matrix,
  .workflow-diagram,
  .teardown-grid,
  .related-grid,
  .legal-layout,
  .contact-grid,
  .glossary-grid,
  .confidence-strip {
    grid-template-columns: 1fr;
  }

  .primary-contact {
    grid-row: auto;
  }

  .dashboard-card,
  .dashboard-card:nth-child(2n),
  .dashboard-card:nth-child(4n),
  .matrix-cell,
  .matrix-cell:nth-child(2n),
  .matrix-cell:nth-child(3n),
  .workflow-step,
  .workflow-step:nth-child(2n),
  .glossary-grid div,
  .glossary-grid div:nth-child(2n) {
    border-right: 0;
  }

  .store-summary-card,
  .stack-map-card,
  .installed-apps-card {
    grid-row: auto;
  }

  .matrix-cell:nth-last-child(-n + 2),
  .glossary-grid div:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .matrix-cell:last-child,
  .workflow-step:last-child,
  .glossary-grid div:last-child {
    border-bottom: 0;
  }

  .result-card,
  .result-card:nth-child(2n),
  .result-card:nth-child(5n) {
    border-right: 0;
  }

  .bar-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  .topbar-actions {
    gap: 8px;
  }

  .primary-button,
  .secondary-button,
  .detector-form button {
    padding: 0 12px;
  }

  .login-link {
    display: none;
  }
}
