:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --panel: rgba(255, 255, 255, 0.86);
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #d8d8df;
  --blue: #0a84ff;
  --green: #30d158;
  --orange: #ff9f0a;
  --red: #ff453a;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
  min-width: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, #fbfbfd 0%, var(--bg) 42%, #f1f1f4 100%);
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", Arial, sans-serif;
}

.ad-rail {
  display: none;
}

.ad-rail[hidden],
.support-strip[hidden] {
  display: none !important;
}

.ad-slot {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--muted);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.ad-slot span,
.ad-slot strong {
  display: block;
  line-height: 1;
  text-align: center;
}

.ad-slot span {
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ad-slot strong {
  margin-top: 8px;
  color: color-mix(in srgb, var(--ink) 56%, transparent);
  font-size: 13px;
  font-weight: 760;
}

.ad-slot-live {
  background: #fff;
}

.ad-slot-live span {
  padding-top: 8px;
}

.ad-slot-live .adsbygoogle {
  min-width: 100%;
}

.ad-slot-vertical {
  min-height: min(620px, calc(100vh - 220px));
  display: grid;
  place-content: center;
  padding: 18px;
}

.support-strip {
  position: fixed;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 30;
  width: min(520px, calc(100vw - 32px));
  margin: 0;
  transform: translateX(-50%);
  pointer-events: none;
}

.support-strip[hidden] {
  display: none;
}

.ad-slot-horizontal {
  position: relative;
  min-height: 48px;
  display: grid;
  place-items: center;
  padding: 8px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.08);
  pointer-events: auto;
}

.cookie-consent {
  position: fixed;
  left: 50%;
  bottom: max(72px, calc(env(safe-area-inset-bottom) + 72px));
  z-index: 60;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: min(720px, calc(100vw - 32px));
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  padding: 14px 16px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
  transform: translateX(-50%);
}

.cookie-consent[hidden] {
  display: none;
}

.cookie-consent strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 14px;
}

.cookie-consent p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.cookie-actions {
  display: inline-flex;
  gap: 8px;
}

.cookie-actions button {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
  white-space: nowrap;
}

button,
select,
input {
  font: inherit;
}

.shell {
  width: min(1240px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 32px 0 132px;
}

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

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.96;
  font-weight: 750;
  letter-spacing: 0;
}

.source-pill {
  min-width: 136px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  white-space: nowrap;
}

.workspace {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 18px;
}

.controls,
.chart-panel {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  min-width: 0;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
}

label {
  display: grid;
  gap: 7px;
}

label span,
.meta-label,
.details-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

select,
input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  outline: none;
}

select:focus,
input:focus,
button:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.16);
}

select:disabled {
  color: #a1a1a6;
  background: #f2f2f4;
}

button {
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  background: #c7c7cc;
  cursor: default;
}

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

.secondary-button:disabled {
  color: #a1a1a6;
  background: #f2f2f4;
}

.compare-block {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

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

.compare-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.compare-actions button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font-size: 13px;
}

.compare-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 34px;
}

.chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  border: 1px solid color-mix(in srgb, var(--chip-color) 45%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--chip-color) 10%, #fff);
  color: var(--ink);
  padding: 8px 10px;
  text-align: left;
  white-space: normal;
}

.chip-copy {
  display: grid;
  gap: 2px;
}

.chip-university {
  font-size: 11px;
  font-weight: 780;
  line-height: 1.1;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.chip-program {
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.chip-remove {
  width: 30px;
  min-width: 30px;
  min-height: 30px;
  border: 1px solid color-mix(in srgb, var(--chip-color) 34%, var(--line));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: color-mix(in srgb, var(--chip-color) 82%, var(--ink));
  padding: 0;
  font-size: 20px;
  font-weight: 680;
  line-height: 1;
}

.chip-remove:hover {
  background: #fff;
  border-color: color-mix(in srgb, var(--chip-color) 62%, var(--line));
}

.meta-block {
  display: grid;
  gap: 12px;
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.meta-block > div,
.details-grid > div {
  display: grid;
  gap: 4px;
}

.meta-block strong,
.details-grid strong {
  font-size: 17px;
  font-weight: 720;
}

.chart-panel {
  padding: 20px;
  min-width: 0;
}

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

h2 {
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.1;
  font-weight: 750;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

#chartSubtitle {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

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

.legend i {
  width: 28px;
  height: 3px;
  border-radius: 999px;
  display: inline-block;
}

.legend .actual {
  background: var(--blue);
}

.legend .linear {
  background: repeating-linear-gradient(90deg, var(--green) 0 8px, transparent 8px 14px);
}

.legend .quad {
  background: repeating-linear-gradient(90deg, var(--red) 0 4px, transparent 4px 10px);
}

.legend .band {
  height: 12px;
  background: rgba(10, 132, 255, 0.12);
  border: 1px solid rgba(10, 132, 255, 0.2);
}

.chart-wrap {
  width: 100%;
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
}

#chart {
  width: 100%;
  min-height: 440px;
  display: block;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.details-grid > div {
  min-height: 62px;
  border-radius: 12px;
  background: rgba(245, 245, 247, 0.86);
  padding: 12px;
}

.risk-analysis {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
  gap: 16px;
  align-items: stretch;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  padding: 14px;
}

.risk-analysis[data-risk="low"] {
  border-color: color-mix(in srgb, var(--green) 38%, var(--line));
  background: color-mix(in srgb, var(--green) 7%, #fff);
}

.risk-analysis[data-risk="medium"] {
  border-color: color-mix(in srgb, var(--orange) 45%, var(--line));
  background: color-mix(in srgb, var(--orange) 8%, #fff);
}

.risk-analysis[data-risk="high"],
.risk-analysis[data-risk="critical"] {
  border-color: color-mix(in srgb, var(--red) 38%, var(--line));
  background: color-mix(in srgb, var(--red) 6%, #fff);
}

.risk-copy {
  display: grid;
  align-content: center;
  gap: 6px;
}

#riskTitle {
  font-size: 20px;
  font-weight: 790;
  line-height: 1.15;
}

#riskTitle[role="button"] {
  cursor: pointer;
}

#riskTitle[role="button"]:focus-visible {
  border-radius: 8px;
  outline: 3px solid rgba(10, 132, 255, 0.18);
  outline-offset: 3px;
}

.risk-analysis[data-risk="low"] #riskTitle {
  color: color-mix(in srgb, var(--green) 78%, #0b5f24);
}

.risk-analysis[data-risk="medium"] #riskTitle {
  color: color-mix(in srgb, var(--orange) 80%, #7a4b00);
}

.risk-analysis[data-risk="high"] #riskTitle,
.risk-analysis[data-risk="critical"] #riskTitle {
  color: color-mix(in srgb, var(--red) 78%, #7a0d08);
}

#riskSummary {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

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

.risk-metrics:empty {
  display: none;
}

.risk-metrics > div {
  display: grid;
  gap: 4px;
  min-height: 58px;
  border-left: 1px solid rgba(0, 0, 0, 0.1);
  padding: 8px 0 8px 12px;
}

.risk-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.risk-metrics strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 760;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.data-table {
  margin-top: 14px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.data-table:empty {
  display: none;
}

.data-table table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
  white-space: nowrap;
}

.data-table th {
  color: var(--muted);
  font-weight: 700;
}

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

.source-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.discovery-panel {
  display: grid;
  grid-template-columns: minmax(280px, 0.55fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  padding: 20px;
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.06);
}

.discovery-copy {
  display: grid;
  align-content: center;
  gap: 8px;
}

.discovery-copy h2 {
  font-size: clamp(22px, 2.8vw, 30px);
}

.discovery-copy p,
.guide-lead,
.guide-article p,
.guide-article li {
  color: var(--muted);
  line-height: 1.55;
}

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

.discovery-group {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(245, 245, 247, 0.72);
  padding: 14px;
}

.discovery-group h3 {
  margin: 0;
  font-size: 15px;
}

.discovery-links {
  display: grid;
  gap: 8px;
}

.discovery-links a,
.guide-pill,
.guide-card,
.guide-cta,
.brand-link {
  color: var(--ink);
  text-decoration: none;
}

.discovery-links a {
  display: block;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  background: #fff;
  padding: 11px 12px;
  font-size: 14px;
  font-weight: 710;
}

.discovery-links a:hover,
.guide-card:hover,
.guide-pill:hover {
  border-color: rgba(10, 132, 255, 0.28);
  color: var(--blue);
}

.guide-page {
  background: linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 48%, #f1f1f4 100%);
}

.guide-shell {
  width: min(980px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 28px 0 88px;
}

.guide-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.brand-link {
  font-size: 22px;
  font-weight: 820;
}

.guide-cta,
.guide-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 730;
}

.guide-article {
  display: grid;
  gap: 18px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  padding: 28px;
  box-shadow: var(--shadow);
}

.seo-shell {
  width: min(1080px, calc(100vw - 40px));
}

.seo-article {
  gap: 20px;
}

.seo-section {
  display: grid;
  gap: 10px;
}

.seo-section p {
  color: var(--muted);
  line-height: 1.58;
}

.seo-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.55;
}

.seo-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
}

.seo-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.seo-table th,
.seo-table td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
  line-height: 1.42;
}

.seo-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

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

.seo-note {
  border-left: 3px solid var(--blue);
  border-radius: 12px;
  background: color-mix(in srgb, var(--blue) 7%, #fff);
  padding: 13px 14px;
}

.seo-faq details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(245, 245, 247, 0.72);
  padding: 12px 14px;
}

.seo-faq details + details {
  margin-top: 8px;
}

.seo-faq summary {
  cursor: pointer;
  font-weight: 760;
}

.seo-faq p {
  margin-top: 8px;
}

.seo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.seo-muted,
.seo-empty {
  color: var(--muted);
  line-height: 1.55;
}

.guide-kicker {
  margin: 0;
  color: var(--blue);
  font-size: 13px;
  font-weight: 780;
}

.guide-article h1 {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 0.98;
}

.guide-article h2 {
  margin-top: 8px;
  font-size: clamp(22px, 3vw, 30px);
}

.guide-article h3 {
  margin: 0;
  font-size: 17px;
}

.guide-lead {
  font-size: 18px;
}

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

.guide-card {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(245, 245, 247, 0.72);
  padding: 14px;
}

.guide-card strong {
  font-size: 16px;
}

.guide-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.guide-note {
  border-left: 3px solid var(--blue);
  background: color-mix(in srgb, var(--blue) 7%, #fff);
  padding: 13px 14px;
  border-radius: 12px;
}

.guide-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  padding: 18px 4px 0;
  color: var(--muted);
}

.footer-brand {
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
}

.footer-copy {
  margin-top: 3px;
  font-size: 12px;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 14px;
}

.legal-links button {
  min-height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-size: 12px;
  font-weight: 650;
}

.legal-links button:hover {
  color: var(--ink);
}

.product-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  padding: 0 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  white-space: nowrap;
}

.product-mark span {
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  color: var(--muted);
  text-transform: uppercase;
}

.product-mark strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 820;
  line-height: 1;
  transform: translateY(-0.5px);
}

.legal-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  padding: 0;
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.24);
}

.legal-dialog::backdrop {
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
}

.legal-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 22px 14px;
  border-bottom: 1px solid var(--line);
}

.legal-dialog-head h2 {
  font-size: 24px;
}

.legal-dialog-head button {
  min-height: 36px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font-size: 13px;
}

.legal-body {
  display: grid;
  gap: 16px;
  max-height: calc(min(760px, 100vh - 32px) - 92px);
  overflow: auto;
  padding: 18px 22px 22px;
  font-size: 14px;
  line-height: 1.55;
}

.legal-body h3 {
  margin: 4px 0 0;
  font-size: 16px;
}

.legal-body p,
.legal-body ul {
  margin: 0;
}

.legal-body ul {
  padding-left: 20px;
}

.legal-body li + li {
  margin-top: 6px;
}

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

svg text {
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

.empty-state {
  fill: #8e8e93;
  font-size: 16px;
  font-weight: 600;
}

.empty-substate {
  fill: #8e8e93;
  font-size: 13px;
  font-weight: 500;
}

@media (max-width: 900px) {
  .shell {
    width: min(100vw - 24px, 720px);
    padding-top: 20px;
  }

  .topbar,
  .chart-head {
    align-items: stretch;
    flex-direction: column;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .controls > label:nth-of-type(3),
  .controls > button,
  .compare-block,
  .meta-block {
    grid-column: 1 / -1;
  }

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

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

  .discovery-panel {
    grid-template-columns: 1fr;
  }

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

  .site-footer {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .legal-links {
    justify-content: flex-start;
  }

  .guide-grid,
  .discovery-columns {
    grid-template-columns: 1fr;
  }

  .product-mark {
    justify-self: start;
  }
}

@media (min-width: 1720px) {
  .ad-rail {
    --ad-gutter: calc((100vw - 1240px) / 2);
    --ad-width: min(300px, calc(var(--ad-gutter) - 80px));
    position: fixed;
    top: 190px;
    bottom: 96px;
    z-index: 0;
    display: block;
    width: var(--ad-width);
    pointer-events: none;
  }

  .ad-rail-left {
    left: calc((var(--ad-gutter) - var(--ad-width)) / 2);
  }

  .ad-rail-right {
    right: calc((var(--ad-gutter) - var(--ad-width)) / 2);
  }

  .ad-rail .ad-slot {
    pointer-events: auto;
  }
}

@media (max-width: 560px) {
  body {
    background: #f5f5f7;
  }

  .shell {
    width: 100%;
    padding: 14px 10px 118px;
  }

  .topbar {
    gap: 12px;
    margin-bottom: 12px;
  }

  h1 {
    font-size: 38px;
  }

  .source-pill {
    align-self: flex-start;
    min-width: 0;
    padding: 7px 11px;
    font-size: 12px;
  }

  .workspace {
    gap: 12px;
  }

  .support-strip {
    bottom: max(6px, env(safe-area-inset-bottom));
    width: min(320px, calc(100vw - 18px));
  }

  .ad-slot-horizontal {
    min-height: 38px;
    border-radius: 999px;
    padding: 5px 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
  }

  .ad-slot span {
    font-size: 9px;
  }

  .ad-slot strong {
    margin-top: 3px;
    font-size: 11px;
  }

  .cookie-consent {
    bottom: max(58px, calc(env(safe-area-inset-bottom) + 58px));
    grid-template-columns: 1fr;
    gap: 12px;
    width: min(360px, calc(100vw - 20px));
    padding: 13px;
  }

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

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

  .controls,
  .chart-panel {
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.07);
  }

  .controls {
    grid-template-columns: 1fr;
    gap: 13px;
    padding: 14px;
  }

  select,
  input,
  button {
    min-height: 48px;
    border-radius: 12px;
    font-size: 16px;
  }

  label span,
  .meta-label,
  .details-grid span {
    font-size: 11px;
  }

  .compare-actions button {
    min-height: 34px;
    font-size: 13px;
  }

  .chip {
    min-height: 48px;
    padding: 9px 10px;
  }

  .chip-remove {
    width: 34px;
    min-width: 34px;
    min-height: 34px;
  }

  .meta-block {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .meta-block > div {
    min-height: 52px;
    border-radius: 12px;
    background: rgba(245, 245, 247, 0.86);
    padding: 10px;
  }

  .meta-block strong,
  .details-grid strong {
    font-size: 15px;
    overflow-wrap: anywhere;
  }

  .chart-panel {
    padding: 14px;
  }

  .chart-head {
    gap: 12px;
  }

  h2 {
    font-size: 21px;
    line-height: 1.15;
  }

  #chartSubtitle {
    font-size: 13px;
  }

  .legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
    font-size: 12px;
    white-space: normal;
  }

  .legend i {
    width: 22px;
  }

  .chart-wrap {
    overflow: hidden;
    padding-bottom: 0;
  }

  #chart {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
  }

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

  .details-grid > div {
    min-height: 58px;
    padding: 10px;
  }

  .risk-analysis {
    gap: 12px;
    padding: 12px;
  }

  #riskTitle {
    font-size: 18px;
  }

  #riskSummary {
    font-size: 13px;
  }

  .risk-metrics {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .risk-metrics > div {
    min-height: 48px;
    border-left: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 9px 0;
  }

  .data-table {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
    overflow-x: auto;
  }

  .data-table table {
    display: table;
    width: 100%;
    min-width: 520px;
    table-layout: fixed;
  }

  .data-table th,
  .data-table td {
    padding: 8px 7px;
    font-size: 11px;
    line-height: 1.25;
    white-space: normal;
    vertical-align: top;
  }

  .data-table th:nth-child(1),
  .data-table td:nth-child(1) {
    width: 34%;
    overflow-wrap: anywhere;
  }

  .data-table th:nth-child(2),
  .data-table td:nth-child(2) {
    width: 12%;
  }

  .data-table th:nth-child(3),
  .data-table td:nth-child(3),
  .data-table th:nth-child(4),
  .data-table td:nth-child(4) {
    width: 19%;
  }

  .data-table th:nth-child(5),
  .data-table td:nth-child(5) {
    width: 16%;
  }

  .source-note {
    font-size: 12px;
  }

  .site-footer {
    gap: 14px;
    padding: 14px 4px 0;
    justify-items: center;
    text-align: center;
  }

  .legal-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 10px;
  }

  .legal-links button {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.66);
  }

  .product-mark {
    min-height: 36px;
    justify-self: center;
  }

  .legal-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    border-radius: 16px;
  }

  .legal-dialog-head {
    padding: 16px 16px 12px;
  }

  .legal-dialog-head h2 {
    font-size: 20px;
  }

  .legal-dialog-head button {
    min-height: 34px;
  }

  .legal-body {
    max-height: calc(100vh - 110px);
    padding: 14px 16px 18px;
    font-size: 13px;
  }

  .discovery-panel,
  .guide-article {
    border-radius: 14px;
    padding: 16px;
  }

  .guide-shell {
    width: 100%;
    padding: 14px 10px 68px;
  }

  .guide-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .guide-lead {
    font-size: 16px;
  }

}

@media (max-width: 380px) {
  .meta-block {
    grid-template-columns: 1fr;
  }

  .data-table table {
    min-width: 460px;
  }

  .data-table th,
  .data-table td {
    padding: 7px 5px;
    font-size: 10px;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }

  .legend {
    grid-template-columns: 1fr;
  }
}
