/* Regalis Capital - Acquisition Operating Kit (multi-page hub)
   Shared stylesheet. Visual DNA mirrors the v1 single-page build. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 130px; }

body {
  font-family: 'Lato', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: #f8f9fa;
  color: #222;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ================== Password gate ================== */
#pw-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background:
    radial-gradient(ellipse 80% 60% at 50% 35%, rgba(0, 58, 110, 0.85) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 50% 90%, rgba(252, 217, 129, 0.08) 0%, transparent 65%),
    #001529;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  transition: opacity 0.5s ease;
}

#pw-gate[hidden] { display: none !important; }

#pw-gate .pw-card {
  text-align: center;
  color: #ffffff;
  max-width: 460px;
  width: 100%;
}

#pw-gate .pw-label {
  display: inline-block;
  font-family: 'Lato', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: #fcd981;
  margin-bottom: 28px;
  padding: 6px 14px;
  border: 1px solid rgba(252, 217, 129, 0.35);
  border-radius: 4px;
}

#pw-gate .pw-title {
  font-family: 'Lato', sans-serif;
  font-size: clamp(34px, 5vw, 50px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin: 0 0 16px;
}

#pw-gate .pw-title em {
  font-style: italic;
  font-weight: 400;
  color: #fcd981;
}

#pw-gate .pw-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin: 0 0 32px;
}

#pw-gate form {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 6px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

#pw-gate input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: #ffffff;
  font-size: 17px;
  font-family: inherit;
  padding: 14px 18px;
  letter-spacing: 0.08em;
}

#pw-gate input::placeholder {
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.08em;
}

#pw-gate button {
  background: #fcd981;
  color: #002950;
  border: 0;
  border-radius: 7px;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 12px 22px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

#pw-gate button:hover { background: #fff3d0; transform: translateY(-1px); }

#pw-gate .pw-error {
  color: #ff9f9f;
  font-size: 13px;
  min-height: 20px;
  margin: 16px 0 0;
  letter-spacing: 0.02em;
}

#pw-gate.shake form { animation: pw-shake 0.4s ease; }

@keyframes pw-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

#pw-gate.unlock { opacity: 0; pointer-events: none; }

/* ================== Top header bar ================== */
.top-bar {
  background: #002950;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(252, 217, 129, 0.15);
}

.top-bar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.top-bar .brand {
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.top-bar .brand:hover { color: #fcd981; }

.top-bar .page-label {
  color: #fcd981;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

/* Breadcrumb (sub-pages) */
.breadcrumb {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.7rem 1.5rem;
}

.breadcrumb-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.breadcrumb a {
  color: #002950;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.breadcrumb a:hover { color: #1a3a5f; text-decoration: underline; text-decoration-color: #fcd981; }

/* ================== Hero ================== */
.hero {
  background: #002950;
  padding: 3rem 1.5rem 3.5rem;
  text-align: center;
}

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

.hero-eyebrow {
  color: #fcd981;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin-bottom: 0.9rem;
}

.hero-title {
  color: #fff;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 1.1rem;
}

.hero-sub {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.02rem;
  line-height: 1.6;
  max-width: 720px;
  margin: 0 auto;
}

/* ================== Hub landing: 4 bonus cards ================== */
.hub-grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.hub-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.hub-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 41, 80, 0.1);
  border-color: #fcd981;
}

.hub-card-eyebrow {
  color: #002950;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin-bottom: 0.55rem;
}

.hub-card-title {
  color: #002950;
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin-bottom: 0.85rem;
}

.hub-card-desc {
  color: #444;
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 1.4rem;
  flex-grow: 1;
}

.hub-card-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ================== Buttons ================== */
.btn {
  display: inline-block;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  padding: 0.7rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: #fcd981;
  color: #002950;
  border-color: #fcd981;
}

.btn-primary:hover {
  background: #fff3d0;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(252, 217, 129, 0.4);
}

.btn-ghost {
  background: transparent;
  color: #002950;
  border-color: #d8dde2;
}

.btn-ghost:hover {
  background: #f1f3f5;
  border-color: #002950;
}

.btn-sm {
  font-size: 0.78rem;
  padding: 0.5rem 0.95rem;
}

/* Legacy alias */
.dl-btn {
  display: inline-block;
  background: #fcd981;
  color: #002950;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  padding: 0.7rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.15s ease;
  border: 1px solid #fcd981;
}
.dl-btn:hover { background: #fff3d0; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(252, 217, 129, 0.4); }

/* ================== Sub-page content layout ================== */
.content {
  max-width: 820px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}

.content-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #002950;
}

.eyebrow {
  color: #002950;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin-bottom: 0.6rem;
}

.bonus-name {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 900;
  color: #002950;
  line-height: 1.2;
  margin-bottom: 0.9rem;
  letter-spacing: -0.01em;
}

.bonus-desc {
  color: #444;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.2rem;
}

/* ================== Markdown body styling ================== */
.bonus-body { color: #222; }

.bonus-body h1 { display: none; }

.bonus-body h2 {
  font-size: 1.5rem;
  font-weight: 900;
  color: #002950;
  margin: 2.4rem 0 0.9rem;
  letter-spacing: -0.005em;
  line-height: 1.25;
}

.bonus-body h3 {
  font-size: 1.18rem;
  font-weight: 700;
  color: #002950;
  margin: 1.8rem 0 0.7rem;
  line-height: 1.3;
}

.bonus-body h4 {
  font-size: 1.02rem;
  font-weight: 700;
  color: #1a3a5f;
  margin: 1.3rem 0 0.5rem;
}

.bonus-body h5, .bonus-body h6 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a3a5f;
  margin: 1.1rem 0 0.4rem;
}

.bonus-body p {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: #2a2a2a;
}

.bonus-body strong { color: #002950; font-weight: 700; }
.bonus-body em { font-style: italic; color: #1a3a5f; }

.bonus-body ul, .bonus-body ol {
  margin: 0 0 1.1rem 1.4rem;
  padding: 0;
}

.bonus-body li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.bonus-body li.task {
  list-style: none;
  margin-left: -1.4rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.bonus-body li.task .box {
  color: #002950;
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.bonus-body blockquote {
  border-left: 4px solid #fcd981;
  background: #fffaeb;
  padding: 1rem 1.2rem;
  margin: 1.2rem 0;
  border-radius: 0 6px 6px 0;
}

.bonus-body blockquote p {
  margin: 0;
  font-style: italic;
  color: #2a2a2a;
}

.bonus-body hr {
  border: 0;
  border-top: 1px solid #e5e7eb;
  margin: 2rem 0;
}

.bonus-body code {
  background: #f1f3f5;
  padding: 0.12rem 0.35rem;
  border-radius: 3px;
  font-family: 'SF Mono', Consolas, 'Courier New', monospace;
  font-size: 0.9em;
  color: #1a3a5f;
}

.bonus-body a {
  color: #002950;
  text-decoration: underline;
  text-decoration-color: #fcd981;
  text-underline-offset: 3px;
}

.bonus-body a:hover { text-decoration-color: #002950; }

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 1.2rem 0;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  -webkit-overflow-scrolling: touch;
}

.bonus-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}

.bonus-body thead {
  background: #002950;
  color: #fff;
}

.bonus-body th {
  padding: 0.7rem 0.85rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.bonus-body th:last-child { border-right: 0; }

.bonus-body td {
  padding: 0.7rem 0.85rem;
  border-top: 1px solid #e5e7eb;
  vertical-align: top;
  color: #2a2a2a;
}

.bonus-body tbody tr:nth-child(even) { background: #f8f9fa; }
.bonus-body tbody tr:hover { background: #fffaeb; }

/* ================== Footer ================== */
.site-footer {
  background: #002950;
  margin-top: 3rem;
  padding: 1.5rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-brand {
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.footer-meta {
  color: #fcd981;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.footer-copy {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8rem;
}

/* ================== Scorecard interactive ================== */
.mode-toggle {
  max-width: 820px;
  margin: 1.5rem auto 0;
  padding: 0 1.5rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.mode-btn {
  background: #fff;
  border: 1px solid #d8dde2;
  color: #002950;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.55rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mode-btn:hover { background: #f1f3f5; border-color: #002950; }

.mode-btn.active {
  background: #002950;
  color: #fff;
  border-color: #002950;
}

.mode-panel { display: none; }
.mode-panel.active { display: block; }

.score-banner {
  position: sticky;
  top: 56px;
  z-index: 80;
  background: #fff;
  border-bottom: 2px solid #002950;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 0.85rem 1.5rem;
  text-align: center;
}

.score-banner-inner {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.score-running {
  font-size: 0.95rem;
  color: #002950;
  font-weight: 700;
}

.score-running .num {
  font-size: 1.25rem;
  color: #002950;
}

.score-running .total {
  color: #888;
  font-weight: 400;
}

.score-progress {
  font-size: 0.8rem;
  color: #555;
  letter-spacing: 0.04em;
}

#calc-btn {
  display: none;
}

#calc-btn.ready {
  display: inline-block;
}

.category {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.category[data-answered="true"] {
  border-color: #fcd981;
  border-left: 4px solid #fcd981;
}

.cat-header {
  width: 100%;
  background: transparent;
  border: 0;
  padding: 1.1rem 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  gap: 1rem;
}

.cat-header:hover { background: #f8f9fa; }

.cat-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: #002950;
  letter-spacing: -0.005em;
}

.cat-num {
  display: inline-block;
  width: 26px;
  color: #888;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.cat-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.cat-pill {
  background: #f1f3f5;
  color: #555;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.category[data-answered="true"] .cat-pill {
  background: #002950;
  color: #fcd981;
}

.cat-caret {
  width: 14px;
  height: 14px;
  border-right: 2px solid #002950;
  border-bottom: 2px solid #002950;
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

.category.open .cat-caret { transform: rotate(-135deg); }

.cat-body {
  display: none;
  padding: 0 1.4rem 1.4rem;
}

.category.open .cat-body { display: block; }

.cat-why {
  background: #fffaeb;
  border-left: 4px solid #fcd981;
  padding: 0.9rem 1.1rem;
  border-radius: 0 6px 6px 0;
  font-size: 0.95rem;
  color: #2a2a2a;
  margin-bottom: 1.3rem;
}

.cat-why strong { color: #002950; }

.score-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.score-opt {
  display: flex;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: #fff;
}

.score-opt:hover {
  border-color: #002950;
  background: #fafbfc;
}

.score-opt input[type="radio"] {
  margin-top: 4px;
  cursor: pointer;
  accent-color: #002950;
  flex-shrink: 0;
}

.score-opt input[type="radio"]:checked ~ .opt-text { color: #002950; }

.score-opt:has(input:checked) {
  border-color: #002950;
  background: #fffaeb;
  box-shadow: inset 0 0 0 1px #002950;
}

.opt-num {
  font-weight: 900;
  color: #002950;
  font-size: 1rem;
  flex-shrink: 0;
  min-width: 1.2rem;
}

.opt-text {
  font-size: 0.93rem;
  color: #2a2a2a;
  line-height: 1.5;
}

/* Final score view */
.final-score {
  display: none;
  max-width: 820px;
  margin: 2.5rem auto 0;
  padding: 0 1.5rem;
}

.final-score.visible { display: block; }

.final-score-card {
  position: relative;
  background: #002950;
  color: #fff;
  border-radius: 10px;
  padding: 2.5rem 2rem 2.2rem;
  text-align: center;
  box-shadow: 0 12px 36px rgba(0, 41, 80, 0.22);
  overflow: hidden;
}

/* ================== Scorecard outcome: tier color cues + next-step CTA ==================
   Adds a top color stripe + tier-specific palette + dedicated CTA card so the
   user sees what they scored AND what to do about it as the dominant element.
*/
.final-score-stripe {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: #fcd981;
}

.final-score-card.tier-go .final-score-stripe { background: #2e9d6e; }
.final-score-card.tier-gold .final-score-stripe { background: #fcd981; }
.final-score-card.tier-amber .final-score-stripe { background: #e89a3b; }
.final-score-card.tier-stop .final-score-stripe { background: #c84f4f; }

.final-score-eyebrow {
  color: #fcd981;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin-bottom: 0.7rem;
}

.final-score-num {
  font-size: clamp(3.5rem, 9vw, 5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
}

.final-score-num .of {
  color: rgba(255, 255, 255, 0.4);
  font-weight: 400;
}

.final-tier {
  font-size: 1.4rem;
  font-weight: 900;
  color: #fcd981;
  margin: 0.7rem 0 1.1rem;
  letter-spacing: -0.01em;
}

/* New tier badge: stronger color cue, sits on top of the dark score card */
.final-tier-badge {
  display: inline-block;
  margin: 0.85rem 0 0.6rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: #fcd981;
  color: #002950;
  font-size: 0.92rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.final-score-card.tier-go .final-tier-badge {
  background: #2e9d6e;
  color: #ffffff;
}

.final-score-card.tier-gold .final-tier-badge {
  background: #fcd981;
  color: #002950;
}

.final-score-card.tier-amber .final-tier-badge {
  background: #e89a3b;
  color: #ffffff;
}

.final-score-card.tier-stop .final-tier-badge {
  background: #c84f4f;
  color: #ffffff;
}

.final-verdict {
  font-size: clamp(1.25rem, 2.6vw, 1.55rem);
  font-weight: 900;
  color: #ffffff;
  margin: 0.4rem auto 0.9rem;
  letter-spacing: -0.01em;
  max-width: 640px;
  line-height: 1.25;
}

.final-interp {
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
  max-width: 640px;
  margin: 0 auto;
}

.final-gap-count {
  margin-top: 1.1rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.6);
}

/* Dedicated next-step CTA card sits BELOW the score card, above the breakdown.
   This is the answer to "what do I do about this score." */
.final-cta {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-top: 4px solid #fcd981;
  border-radius: 10px;
  padding: 1.8rem 1.75rem;
  margin-top: 1.25rem;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0, 41, 80, 0.06);
}

.final-cta.tier-go { border-top-color: #2e9d6e; }
.final-cta.tier-gold { border-top-color: #fcd981; }
.final-cta.tier-amber { border-top-color: #e89a3b; }
.final-cta.tier-stop { border-top-color: #c84f4f; }

.final-cta-label {
  color: #002950;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin-bottom: 0.5rem;
}

.final-cta-headline {
  color: #002950;
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  font-weight: 900;
  letter-spacing: -0.005em;
  margin-bottom: 0.6rem;
  line-height: 1.25;
}

.final-cta-sub {
  color: #444;
  font-size: 0.96rem;
  line-height: 1.55;
  max-width: 560px;
  margin: 0 auto 1.2rem;
}

.btn-lg {
  font-size: 0.95rem;
  padding: 0.85rem 1.6rem;
}

.breakdown {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1.75rem 1.75rem;
  margin-top: 1.75rem;
}

.breakdown h3 {
  color: #002950;
  font-size: 1.15rem;
  font-weight: 900;
  margin-bottom: 1.2rem;
  letter-spacing: -0.005em;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid #f1f3f5;
  gap: 1rem;
}

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

.breakdown-cat {
  font-weight: 700;
  color: #002950;
  font-size: 0.95rem;
}

.breakdown-score {
  font-weight: 900;
  color: #002950;
  font-size: 1rem;
  min-width: 50px;
  text-align: right;
}

.breakdown-row.gap {
  background: #fffaeb;
  margin: 0 -1.75rem;
  padding-left: 1.75rem;
  padding-right: 1.75rem;
}

.breakdown-gap-note {
  display: block;
  font-size: 0.85rem;
  color: #555;
  font-weight: 400;
  font-style: italic;
  margin-top: 0.25rem;
}

.final-actions {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 1.75rem;
  flex-wrap: wrap;
}

/* ================== Responsive ================== */
@media (max-width: 760px) {
  .top-bar-inner { padding: 0.7rem 1rem; }
  .top-bar .brand { font-size: 0.88rem; }
  .top-bar .page-label { font-size: 0.65rem; }

  .hero { padding: 2.2rem 1.2rem 2.6rem; }

  .hub-grid {
    grid-template-columns: 1fr;
    padding: 2rem 1.2rem;
    gap: 1.1rem;
  }

  .content { padding: 2rem 1.1rem 2.5rem; }
  .bonus-name { font-size: 1.4rem; }
  .bonus-body h2 { font-size: 1.25rem; }
  .bonus-body h3 { font-size: 1.05rem; }
  .bonus-body table { font-size: 0.85rem; }
  .bonus-body th, .bonus-body td { padding: 0.55rem 0.6rem; }

  .footer-inner { flex-direction: column; text-align: center; gap: 0.5rem; }

  .score-banner-inner { flex-direction: column; gap: 0.5rem; }
  .cat-header { padding: 0.95rem 1.1rem; }
  .cat-body { padding: 0 1.1rem 1.1rem; }
  .cat-title { font-size: 0.98rem; }
  .final-score-card { padding: 2rem 1.4rem; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.5rem; }
  .hero-sub { font-size: 0.95rem; }
  #pw-gate form { flex-direction: column; }
  #pw-gate button { width: 100%; padding: 14px; }
  .hub-card { padding: 1.4rem 1.2rem; }
}

/* ================== Walk-Away Filter: TOC + severity chips + back-to-top ==================
   Usability layer for the long reference page. The source markdown content is untouched;
   this section adds: a sticky table of contents, severity-coded chips on each red-flag
   item, a severity filter, scrollspy highlighting, and a back-to-top button.
*/

.content.walkaway-page {
  max-width: 1100px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2.5rem;
  align-items: start;
}

.toc-block {
  position: sticky;
  top: 88px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.1rem 1.1rem 1.2rem;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  font-size: 0.88rem;
}

.toc-head {
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 0.85rem;
  margin-bottom: 0.85rem;
}

.toc-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: #002950;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 0.7rem;
}

.toc-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.toc-filter-btn {
  background: #ffffff;
  border: 1px solid #d8dde2;
  color: #1a3a5f;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: 0.02em;
}

.toc-filter-btn:hover {
  border-color: #002950;
  color: #002950;
}

.toc-filter-btn.active {
  background: #002950;
  border-color: #002950;
  color: #fcd981;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-list li {
  margin: 0;
  padding: 0;
}

.toc-list a {
  display: block;
  padding: 0.4rem 0.55rem;
  color: #1a3a5f;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.86rem;
  line-height: 1.35;
  border-left: 3px solid transparent;
  border-radius: 0 4px 4px 0;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.toc-list a:hover {
  background: #f1f3f5;
  color: #002950;
}

.toc-list a.active {
  background: #fffaeb;
  border-left-color: #fcd981;
  color: #002950;
}

.toc-list .toc-h3 a {
  padding-left: 1.4rem;
  font-weight: 400;
  font-size: 0.82rem;
  color: #4a5b70;
}

.toc-list .toc-h3 a.active {
  color: #002950;
  font-weight: 700;
}

/* The right-hand body inside a walkaway-page grid */
.walkaway-page .bonus-body {
  min-width: 0;  /* lets long lines wrap inside the grid column */
}

/* Red-flag item cards */
.rf-item {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #d8dde2;
  border-radius: 8px;
  padding: 1.05rem 1.2rem 0.4rem;
  margin: 1rem 0 1.2rem;
  transition: box-shadow 0.18s ease, transform 0.15s ease;
}

.rf-item:hover {
  box-shadow: 0 4px 14px rgba(0, 41, 80, 0.06);
}

.rf-item.rf-sev-yellow { border-left-color: #e8b73b; }
.rf-item.rf-sev-red { border-left-color: #c84f4f; }
.rf-item.rf-sev-walk-away { border-left-color: #8b1f1f; background: #fdf6f6; }

.rf-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}

.rf-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: #002950;
  letter-spacing: -0.005em;
  margin: 0;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
}

.rf-chip {
  display: inline-block;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
  flex-shrink: 0;
}

.rf-chip-yellow {
  background: #fff4d4;
  color: #8a6300;
  border: 1px solid #e8b73b;
}

.rf-chip-red {
  background: #fde0e0;
  color: #8b1f1f;
  border: 1px solid #c84f4f;
}

.rf-chip-walk-away {
  background: #8b1f1f;
  color: #ffffff;
  border: 1px solid #8b1f1f;
}

/* Tighten the inner ul so the card reads as a single block */
.rf-item > ul {
  margin: 0.5rem 0 0.6rem 1.3rem;
  padding: 0;
}

.rf-item > ul li {
  margin-bottom: 0.55rem;
  font-size: 0.95rem;
  line-height: 1.55;
}

.rf-item > ul li:last-child {
  margin-bottom: 0.2rem;
}

/* Make Severity bullet visually punchy inside the card */
.rf-item > ul li strong { color: #002950; }

/* When a filter is active, hidden items should not eat space */
.rf-item[style*="display: none"] { display: none !important; }

/* Back-to-top floating button */
.back-to-top {
  position: fixed;
  right: 1.3rem;
  bottom: 1.3rem;
  background: #002950;
  color: #fcd981;
  border: 1px solid #002950;
  border-radius: 999px;
  padding: 0.7rem 1.1rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.18s ease;
  box-shadow: 0 6px 18px rgba(0, 41, 80, 0.22);
  z-index: 90;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: #1a3a5f;
}

/* Mobile: collapse TOC into a non-sticky block above the content.
   Keep severity chips and rf-item cards visible on every width. */
@media (max-width: 920px) {
  .content.walkaway-page {
    display: block;
    padding: 1.6rem 1.1rem 2.2rem;
  }
  .toc-block {
    position: static;
    max-height: none;
    margin-bottom: 1.6rem;
  }
  .toc-list {
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid #f1f3f5;
    border-radius: 4px;
  }
  .rf-head { gap: 0.55rem; }
  .rf-title { font-size: 0.98rem; }
  .rf-chip { font-size: 0.65rem; padding: 0.18rem 0.55rem; }
  .back-to-top {
    right: 0.9rem;
    bottom: 0.9rem;
    padding: 0.55rem 0.9rem;
    font-size: 0.72rem;
  }
}

/* Print: hide gate + nav + interactive controls, render content cleanly */
@media print {
  #pw-gate, .top-bar, .breadcrumb, .mode-toggle, .score-banner,
  .dl-btn, .btn, .site-footer, .cat-header, .score-options,
  .final-actions, .cat-why, .toc-block, .back-to-top { display: none !important; }
  .content.walkaway-page { display: block !important; padding: 0 !important; }
  .rf-item { break-inside: avoid; page-break-inside: avoid; border: 1px solid #ccc !important; }
  body { background: #fff; }
  .hero { background: #fff; color: #002950; padding: 1rem 0; }
  .hero-title, .hero-eyebrow, .hero-sub { color: #002950; }
  .category, .breakdown, .final-score-card { page-break-inside: avoid; }
  .category { border: 1px solid #ccc; margin-bottom: 0.5rem; }
  .cat-body { display: block !important; padding: 0.5rem 1rem; }
  .final-score-card { background: #fff !important; color: #002950 !important; border: 2px solid #002950; }
  .final-score-card .final-tier,
  .final-score-card .final-score-eyebrow { color: #002950 !important; }
  .final-score-card .final-interp,
  .final-score-card .final-score-num,
  .final-score-card .final-verdict,
  .final-score-card .final-gap-count,
  .final-score-card .final-score-num .of { color: #002950 !important; }
  .final-score-card .final-tier-badge { background: #002950 !important; color: #fff !important; }
  .final-cta { border: 2px solid #002950 !important; box-shadow: none !important; page-break-inside: avoid; }
  .final-score { display: block !important; }
}
