/*
 * CTR Opportunity Checker layout only.
 * Palette, type, buttons and cards come from assets/design-system.css;
 * this page intentionally does NOT introduce a new colour/theme system.
 */
.ctr-shell {
  box-sizing: border-box;
  width: min(1120px, calc(100% - 48px));
  margin: 36px auto 72px;
  padding: 0;
  color: var(--ra-text);
  background: transparent;
  font-family: var(--ra-font-body);
  line-height: 1.55;
}
.ctr-shell *, .ctr-shell *::before, .ctr-shell *::after { box-sizing: border-box; }
.ctr-shell [hidden] { display: none !important; }
.ctr-shell :is(h1, h2, h3, h4) {
  color: var(--ra-text);
  font-family: var(--ra-font-display);
  letter-spacing: -.025em;
  font-weight: 600;
  line-height: 1.16;
}
.ctr-shell p { color: var(--ra-muted); line-height: 1.6; }
.ctr-shell .ctr-kicker {
  display: block;
  margin-bottom: 18px;
  color: var(--ra-lavender);
  font: 600 13px/1.3 var(--ra-font-body);
}
.ctr-shell .ctr-heading { max-width: 800px; margin: 0 0 36px; }
.ctr-shell .ctr-heading h1 { max-width: 760px; font-size: clamp(35px, 4.5vw, 54px); margin: 0 0 16px; }
.ctr-shell .ctr-heading > p { max-width: 750px; font-size: clamp(16px, 1.6vw, 19px); margin: 0; }
.ctr-shell .ctr-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 25px;
  margin-top: 20px;
  color: var(--ra-muted);
  font-size: 13px;
}
.ctr-shell .ctr-entry { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(275px, .92fr); gap: 20px; align-items: stretch; }
.ctr-shell .ctr-entry > .card {
  min-width: 0;
  margin: 0;
  padding: clamp(22px, 3vw, 33px);
  border: 1px solid var(--ra-line);
  border-radius: var(--ra-radius);
  background: var(--ra-panel);
  box-shadow: none;
}
.ctr-shell .ctr-entry-copy h2 { font-size: clamp(22px, 2.3vw, 30px); margin: 0 0 12px; border: 0; padding: 0; }
.ctr-shell .ctr-entry-copy > p { margin: 0 0 22px; }
.ctr-shell .ctr-button { 
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  max-width: 100%;
  padding: 12px 18px;
  text-align: center;
  text-decoration: none;
  font: 600 15px/1.4 var(--ra-font-body);
  border-radius: var(--ra-radius);
}
.ctr-shell .ctr-text-button {
  min-height: 40px;
  padding: 8px 12px;
  font: 500 14px/1.4 var(--ra-font-body);
  text-align: center;
  text-decoration: none;
}
.ctr-shell .ctr-small { color: var(--ra-muted); font-size: 13px; margin: 18px 0 6px; }
.ctr-shell .ctr-status { min-height: 0; margin: 16px 0 0; color: var(--ra-muted); font-size: 14px; }
.ctr-shell .ctr-status:empty { display: none; }
.ctr-shell .ctr-status[data-kind="error"] { color: var(--ra-peach); font-weight: 600; }
.ctr-shell .ctr-status[data-kind="success"] { color: var(--ra-lavender-light); }
.ctr-shell .ctr-loading { padding: 18px 0; color: var(--ra-muted); font-size: 14px; }
.ctr-shell .ctr-form { display: grid; gap: 10px; max-width: 600px; }
.ctr-shell .ctr-form label { color: var(--ra-text); font-weight: 600; font-size: 14px; }
.ctr-shell .ctr-form select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--ra-line);
  border-radius: var(--ra-radius);
  background: var(--ra-input);
  color: var(--ra-text);
  font: 15px var(--ra-font-body);
}
.ctr-shell .ctr-form .ctr-button { width: 100%; margin-top: 12px; }
.ctr-shell .ctr-no-site {
  padding: 20px;
  margin: 0;
  background: var(--ra-raised);
  border: 1px solid var(--ra-line);
  box-shadow: none;
}
.ctr-shell .ctr-no-site h3 { font-size: 21px; margin: 0 0 8px; padding: 0; border: 0; }
.ctr-shell .ctr-no-site p { margin: 0 0 16px; }
.ctr-shell .ctr-no-site .ctr-text-button { margin: 10px 0 0 10px; }
.ctr-shell .ctr-demo-card {
  background: var(--ra-raised) !important;
  border-color: var(--ra-line) !important;
}
.ctr-shell .ctr-demo-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 25px;
  color: var(--ra-lavender);
  font: 600 12px/1.4 var(--ra-font-body);
}
.ctr-shell .ctr-demo-sample { font-weight: 400; color: var(--ra-muted); }
.ctr-shell .ctr-demo-query { display: block; color: var(--ra-muted); font: 13px/1.5 var(--ra-font-mono); overflow-wrap: anywhere; }
.ctr-shell .ctr-demo-value {
  display: block;
  margin: 6px 0 2px;
  color: var(--ra-peach);
  font: 600 clamp(35px, 4vw, 50px)/1.2 var(--ra-font-display);
}
.ctr-shell .ctr-demo-card > p { margin: 10px 0 0; font-size: 14px; }
.ctr-shell .ctr-pair { display: grid; gap: 12px; margin: 24px 0; }
.ctr-shell .ctr-pair > div { display: grid; grid-template-columns: 120px minmax(0, 1fr) 42px; gap: 9px; align-items: center; font-size: 12px; }
.ctr-shell .ctr-pair > div b { text-align: right; color: var(--ra-text); }
.ctr-shell .ctr-track { display: block; height: 10px; background: var(--ra-panel); border: 1px solid var(--ra-line); overflow: hidden; }
.ctr-shell .ctr-track i { display: block; height: 100%; background: var(--ra-lavender); }
.ctr-shell .ctr-pair > div:first-child .ctr-track i { background: var(--ra-peach); }
.ctr-shell .ctr-demo-card .ctr-demo-note { border-top: 1px solid var(--ra-line); padding-top: 16px; margin-bottom: 14px; }
.ctr-shell .ctr-report {
  margin: 28px 0 0;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--ra-line);
  border-radius: var(--ra-radius);
  background: var(--ra-panel);
  scroll-margin-top: 20px;
}
.ctr-shell .ctr-report-top { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.ctr-shell .ctr-report-top h2 { margin: 0 0 8px; font-size: clamp(23px, 2.6vw, 34px); }
.ctr-shell .ctr-report-top p { font-size: 14px; margin: 0; }
.ctr-shell .ctr-pill {
  color: var(--ra-lavender-light);
  border: 1px solid var(--ra-line);
  border-radius: var(--ra-radius);
  padding: 7px 10px;
  font-size: 13px;
  white-space: nowrap;
}
.ctr-shell .ctr-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--ra-line); margin: 24px 0 16px; }
.ctr-shell .ctr-stat-grid > div { min-width: 0; padding: 17px 20px; border-right: 1px solid var(--ra-line); }
.ctr-shell .ctr-stat-grid > div:last-child { border: 0; }
.ctr-shell .ctr-stat-grid strong { display: block; color: var(--ra-text); font: 600 clamp(27px, 3vw, 37px)/1.2 var(--ra-font-display); }
.ctr-shell .ctr-stat-grid span { display: block; color: var(--ra-muted); font-size: 13px; }
.ctr-shell .ctr-guidance { font-size: 13px; margin: 12px 0 25px; }
.ctr-shell .ctr-list-head { margin: 20px 0; }
.ctr-shell .ctr-list-head h3 { margin: 0 0 7px; font-size: 20px; }
.ctr-shell .ctr-list-head p { font-size: 14px; margin: 0; }
.ctr-shell .ctr-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ctr-shell .ctr-result.card {
  min-width: 0;
  padding: 20px;
  margin: 0;
  background: var(--ra-raised);
  border: 1px solid var(--ra-line);
  box-shadow: none;
}
.ctr-shell .ctr-result-query { margin: 0 0 6px; font-size: 17px; overflow-wrap: anywhere; }
.ctr-shell .ctr-result-page { color: var(--ra-muted); font: 12px/1.5 var(--ra-font-mono); overflow-wrap: anywhere; }
.ctr-shell .ctr-result-ctr { display: block; margin: 13px 0 6px; color: var(--ra-peach); font: 600 27px var(--ra-font-display); }
.ctr-shell .ctr-result-note, .ctr-shell .ctr-result-stats { color: var(--ra-muted); font-size: 13px; margin: 7px 0; }
.ctr-shell .ctr-result-advice { border-top: 1px solid var(--ra-line); margin-top: 15px; padding-top: 12px; font-size: 13px; }
.ctr-shell .ctr-empty { margin: 18px 0; color: var(--ra-muted); }
.ctr-shell .ctr-method { margin: 24px 0; color: var(--ra-muted); font-size: 14px; }
.ctr-shell .ctr-method summary { color: var(--ra-text); cursor: pointer; font-weight: 600; }
.ctr-shell .ctr-method p { font-size: 14px; }
.ctr-shell .ctr-next { color: var(--ra-lavender-light); font: 600 14px var(--ra-font-body); }
.ctr-shell .ctr-explanation { margin-top: 56px; padding-top: 35px; border-top: 1px solid var(--ra-line); }
.ctr-shell .ctr-explanation h2 { font-size: clamp(26px, 3vw, 36px); margin: 0 0 15px; }
.ctr-shell .ctr-explanation > p { max-width: 760px; }
.ctr-shell .ctr-explain-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 25px; margin-top: 28px; }
.ctr-shell .ctr-explain-grid article { border-top: 2px solid var(--ra-line); padding-top: 13px; }
.ctr-shell .ctr-explain-grid article > span { color: var(--ra-lavender); font: 13px var(--ra-font-mono); }
.ctr-shell .ctr-explain-grid h3 { margin: 10px 0; font-size: 19px; }
.ctr-shell .ctr-explain-grid p { font-size: 14px; }
.ctr-shell :is(button, a, select):focus-visible { outline: 2px solid var(--ra-lavender-light); outline-offset: 4px; }
@media (max-width: 900px) { .ctr-shell .ctr-entry { grid-template-columns: 1fr; } .ctr-shell .ctr-demo-card { max-width: 700px; } }
@media (max-width: 680px) {
  .ctr-shell { width: calc(100% - 32px); margin: 25px auto 45px; }
  .ctr-shell .ctr-results, .ctr-shell .ctr-explain-grid { grid-template-columns: 1fr; }
  .ctr-shell .ctr-stat-grid > div { padding: 12px; }
  .ctr-shell .ctr-stat-grid strong { font-size: 26px; }
  .ctr-shell .ctr-button { width: 100%; }
  .ctr-shell .ctr-report-top { flex-wrap: wrap; }
}
@media (max-width: 420px) {
  .ctr-shell .ctr-stat-grid span { font-size: 11px; }
  .ctr-shell .ctr-pair > div { grid-template-columns: 105px minmax(0, 1fr) 40px; gap: 5px; }
}
@media (prefers-reduced-motion: reduce) { .ctr-shell * { scroll-behavior: auto !important; } }
