html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

:root {
  --sc-charcoal: #524c40;
  --sc-charcoal-light: #665f4f;
  --sc-gold: #d4a017;
  --sc-gold-dark: #b8890f;
  --sc-paper: #e8e2d5;
  --sc-taupe: #9c9284;
  --sc-bg-alt: #f7f5f1;

  /* Retarget Bootstrap's own "primary"/link variables at the brand palette rather than its
     default blue - this is what keeps incidental Bootstrap components (btn-link, focus rings,
     .text-primary etc.) from reintroducing blue anywhere it isn't explicitly overridden below. */
  --bs-primary: var(--sc-gold-dark);
  --bs-primary-rgb: 184, 137, 15;
  --bs-link-color: var(--sc-gold-dark);
  --bs-link-color-rgb: 184, 137, 15;
  --bs-link-hover-color: var(--sc-gold);
  --bs-link-hover-color-rgb: 212, 160, 23;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus, .form-select:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--sc-gold);
}

/* Bootstrap hardcodes a blue focus border on all three independently of the box-shadow above
   (#86b7fe) - without this they'd show a blue ring underneath the gold glow. */
.form-control:focus, .form-check-input:focus, .form-select:focus {
  border-color: var(--sc-gold);
}

/* This Bootstrap build hardcodes the checked checkbox/radio colour rather than driving it from
   --bs-primary, so it needs its own override - dark charcoal fill with a bronze tick/dot, not
   Bootstrap's stock blue-on-white. */
.form-check-input:checked,
.form-check-input[type="checkbox"]:indeterminate {
  background-color: var(--sc-charcoal);
  border-color: var(--sc-charcoal);
}

.form-check-input:checked[type="checkbox"] {
  --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23d4a017' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

.form-check-input:checked[type="radio"] {
  --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23d4a017'/%3e%3c/svg%3e");
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  color: var(--sc-charcoal);
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

/* File upload input - the plain browser default is easy to skim past, so give it a visible
   drop-zone-style border and make the "Choose files" button match the site's primary action colour. */
.form-control[type="file"] {
  border: 2px dashed var(--sc-taupe);
  background-color: var(--sc-bg-alt);
  padding: 0.75rem;
}

.form-control[type="file"]:hover {
  border-color: var(--sc-gold);
}

/* Set by site.js while a file is dragged over the input's form-group - stronger than the plain
   :hover state above so "drop it here" reads as a distinct, active state, not just a mouseover. */
.form-control[type="file"].sc-dragover {
  border-style: solid;
  border-color: var(--sc-gold);
  background-color: var(--sc-paper);
}

.form-control[type="file"]::file-selector-button,
.form-control[type="file"]::-webkit-file-upload-button {
  background-color: var(--sc-gold);
  border: none;
  border-radius: 0.375rem;
  color: var(--sc-charcoal);
  font-weight: 600;
  padding: 0.5rem 1rem;
  margin-right: 1rem;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out;
}

.form-control[type="file"]:hover::file-selector-button,
.form-control[type="file"]:hover::-webkit-file-upload-button {
  background-color: var(--sc-gold-dark);
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Brand */
.navbar-brand {
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Explicit width: auto - the height attribute alone sets the SVG's intrinsic aspect ratio, but
   without this some browsers/Bootstrap resets stretch it to the parent's full width instead of
   scaling proportionally. */
.sc-navbar-logo {
  width: auto;
  max-width: none;
}

/* This Bootstrap build hardcodes every hover/active/disabled colour for .btn-primary and
   .btn-outline-primary as local --bs-btn-* custom properties on the class itself, rather than
   deriving them from the root --bs-primary variable retargeted below - so retargeting that root
   variable alone (needed for .btn-link etc.) doesn't reach these buttons. Redefining the same
   custom properties here, in the same place Bootstrap defines them, is what makes every state
   (not just the resting one) pick up the brand colour instead of Bootstrap's stock blue -
   including while a submit button is disabled mid-review, which was still showing blue. */
.btn-primary {
  --bs-btn-color: var(--sc-charcoal);
  --bs-btn-bg: var(--sc-gold);
  --bs-btn-border-color: var(--sc-gold);
  --bs-btn-hover-color: var(--sc-charcoal);
  --bs-btn-hover-bg: var(--sc-gold-dark);
  --bs-btn-hover-border-color: var(--sc-gold-dark);
  --bs-btn-focus-shadow-rgb: 212, 160, 23;
  --bs-btn-active-color: var(--sc-charcoal);
  --bs-btn-active-bg: var(--sc-gold-dark);
  --bs-btn-active-border-color: var(--sc-gold-dark);
  --bs-btn-disabled-color: var(--sc-charcoal);
  --bs-btn-disabled-bg: var(--sc-gold);
  --bs-btn-disabled-border-color: var(--sc-gold);
  font-weight: 600;
}

.btn-outline-primary {
  --bs-btn-color: var(--sc-gold-dark);
  --bs-btn-border-color: var(--sc-gold-dark);
  --bs-btn-hover-color: var(--sc-charcoal);
  --bs-btn-hover-bg: var(--sc-gold-dark);
  --bs-btn-hover-border-color: var(--sc-gold-dark);
  --bs-btn-focus-shadow-rgb: 212, 160, 23;
  --bs-btn-active-color: var(--sc-charcoal);
  --bs-btn-active-bg: var(--sc-gold-dark);
  --bs-btn-active-border-color: var(--sc-gold-dark);
  --bs-btn-disabled-color: var(--sc-gold-dark);
  --bs-btn-disabled-border-color: var(--sc-gold-dark);
}

.btn-outline-light:hover {
  color: var(--sc-charcoal);
}

a {
  color: var(--sc-gold-dark);
}

a:hover {
  color: var(--sc-gold);
}

/* Hero */
.sc-hero {
  background: var(--sc-charcoal);
  color: #fff;
  border-radius: 0.5rem;
  border-top: 4px solid var(--sc-gold);
  position: relative;
  overflow: hidden;
}

.sc-hero p.lead {
  color: var(--sc-paper);
}

.sc-hero-logo {
  height: 7.5rem;
  width: auto;
  max-width: 100%;
}

/* Sits behind the hero's actual content (z-index below), clipped to the hero's rounded corners
   by its parent's overflow:hidden above. A constellation of connected points, not a random
   decoration - echoes the icon mark's own dot-and-line language (see scrivenza-icon.svg), reading
   as "verification points" rather than a generic background pattern. Kept low-opacity so it's
   texture, not a competing graphic. */
.sc-hero > * {
  position: relative;
}

/* Two-class selector, not source-order alone, to unambiguously outrank ".sc-hero > *" above
   despite matching the same element - relying on declaration order for a tie is fragile against
   a future reorder. */
.sc-hero .sc-hero-motif {
  position: absolute;
  top: -15%;
  right: -8%;
  width: 30rem;
  height: 30rem;
  opacity: 0.09;
  pointer-events: none;
}

/* Two-tone hero (see Home/Index.cshtml's own comment on why): light ground for the welcome half
   of the page, one dark surface reserved for the verdict card alone. Deliberately its own class
   rather than a modifier on .sc-hero - that class is shared by Insights/Trial/Portal's own (still
   fully dark) heroes, and this needed independent light/dark text-colour rules throughout, not a
   toggle on top of styling built for the opposite background.

   No horizontal padding - this section's background is white, the same as the page around it, so
   unlike a genuinely boxed/coloured panel (.sc-feature-banner and friends), giving it its own
   left/right inset just left its content sitting further indented than plain page content
   elsewhere, with nothing visible to explain why. Its content now sits flush with .container's
   own edge, same as everything else on the page. Vertical padding stays - that's just breathing
   room above/below the section, not part of this. */
.sc-hero-v2 {
  position: relative;
  overflow: hidden;
  padding: 3rem 0;
}

@media (max-width: 575.98px) {
  .sc-hero-v2 {
    padding: 2rem 0;
  }
}

.sc-hero-v2 > * {
  position: relative;
}

/* Bootstrap's .row assumes a .container/.col parent to cancel its own negative gutter margins -
   as a direct child of this padded div instead, those margins pushed the row past the hero's own
   edge, wide enough to force real horizontal page overflow on narrow viewports (text cut off
   mid-word, not wrapped). Zeroing the row's own margins and reintroducing the same visual gutter
   via padding on its columns keeps the spacing without relying on that cancellation. */
.sc-hero-v2 .row {
  margin-inline: 0;
}

.sc-hero-v2 .row > [class*="col-"] {
  padding-inline: 0;
}

.sc-hero-v2 .row.g-4 > [class*="col-"]:not(:first-child) {
  margin-top: 1.5rem;
}

@media (min-width: 992px) {
  .sc-hero-v2 .row.g-lg-5 > [class*="col-"]:not(:first-child) {
    margin-top: 0;
  }
}

/* Same "verification points" motif as the fully-dark heroes, recoloured from gold-on-charcoal to
   charcoal-on-paper directly in the SVG's own stroke/fill attributes (see the markup) - gold at
   low opacity read as washed-out yellow on this light a ground, where charcoal reads as a quiet
   texture instead. Sized down and moved from the original's corner placement, which coincided
   with a two-column layout's off-centre visual weight - not proportioned for this layout. */
.sc-hero-v2 .sc-hero-motif {
  position: absolute;
  top: -10%;
  right: -5%;
  width: 22rem;
  height: 22rem;
  opacity: 0.06;
  pointer-events: none;
}

.sc-hero-verdict-card {
  background: var(--sc-charcoal);
  border-radius: 0.5rem;
  padding: 1.75rem;
  color: #fff;
}

.sc-hero-verdict-card p {
  color: var(--sc-paper);
}

.sc-hero-verdict-card a {
  color: var(--sc-gold);
}

.sc-hero-verdict-card a:hover {
  color: var(--sc-paper);
}

.sc-hero-verdict-card .sc-eyebrow {
  color: var(--sc-gold);
  display: block;
  margin-bottom: 0.75rem;
}

/* No box-shadow/border here unlike .sc-report-crop - this image's own background is the exact
   same --sc-charcoal as the card it sits in (it's a crop of that literal colour, not a photo on a
   different surface), so it blends into the card rather than sitting on top of it. */
.sc-hero-verdict-image {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 1rem;
}

/* Modals */
.modal-content {
  border: none;
  border-top: 4px solid var(--sc-gold);
  border-radius: 0.5rem;
}

.modal-title {
  color: var(--sc-charcoal);
}

/* Feature banner */
.sc-feature-banner {
  background: var(--sc-gold);
  color: var(--sc-charcoal);
  border-radius: 0.5rem;
}

/* The site-wide bronze link colour (--sc-gold-dark) is too close to this banner's own gold
   background to read well - underlined charcoal instead, matching the banner's own text colour
   and still visually distinct as a link. */
.sc-feature-banner a:not(.btn) {
  color: var(--sc-charcoal);
  text-decoration: underline;
}

.sc-feature-banner a:not(.btn):hover {
  color: var(--sc-charcoal-light);
}

.sc-feature-banner .btn-dark {
  background-color: var(--sc-charcoal);
  border-color: var(--sc-charcoal);
}

.sc-feature-banner .btn-dark:hover, .sc-feature-banner .btn-dark:focus, .sc-feature-banner .btn-dark:active {
  background-color: var(--sc-charcoal-light) !important;
  border-color: var(--sc-charcoal-light) !important;
}

/* Same reasoning as the link-colour override above - .sc-eyebrow's default gold-dark is too
   close to this banner's own gold background to read well. Margin-bottom matches
   .sc-why-panel .sc-eyebrow's spacing - the base .sc-eyebrow rule has none of its own. */
.sc-feature-banner .sc-eyebrow {
  color: var(--sc-charcoal);
  margin-bottom: 0.35rem;
}

/* Dark variant - pairs with the hero directly above it on the homepage, breaking up what would
   otherwise be three identical gold banners in a row. Reuses .btn-primary rather than a bespoke
   button style - it's already gold-on-charcoal (see the hero's own "Get in touch" button), so
   this stays visually consistent with an existing pattern instead of inventing a new one.
   Padding matches .sc-hero-v2's own exactly, rather than the Bootstrap p-4/p-md-5 utilities the
   markup used before - those step at the 768px breakpoint while the hero's custom rule steps at
   576px, so the two sections' left/right insets diverged (40px vs 48px) at ordinary desktop
   widths even though they sit directly on top of each other. */
.sc-feature-banner--dark {
  background: var(--sc-charcoal);
  color: #fff;
  padding: 3rem 2.5rem;
}

@media (max-width: 575.98px) {
  .sc-feature-banner--dark {
    padding: 2rem 1.25rem;
  }
}

.sc-feature-banner--dark p {
  color: var(--sc-paper);
}

.sc-feature-banner--dark .sc-eyebrow {
  color: var(--sc-gold);
}

.sc-feature-banner--dark a:not(.btn) {
  color: var(--sc-gold);
}

.sc-feature-banner--dark a:not(.btn):hover {
  color: var(--sc-paper);
}

/* Real report-crop screenshots (e.g. the "AI you can actually audit" band) - a shadow rather than
   a border reads as "a photo of a real surface sitting on this one", which matters more here than
   on a normal inline image since the point is specifically that this is genuine product output,
   not decoration. */
.sc-report-crop {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

/* Used standalone (not inside a half-width column) so it doesn't stretch edge-to-edge on a wide
   viewport - the verdict/affordability crop under the hero, for example. display:block is
   required for margin-inline:auto to center an <img> - without it the browser treats the image as
   inline and left-aligns it, with any following content floating up beside it instead of below. */
.sc-report-crop--narrow {
  display: block;
  max-width: 640px;
  margin-inline: auto;
}

/* Quiet variant - deliberately lower visual weight for genuinely secondary content (the free
   Insights demo, not the paid product) - same palette, just the page's quietest note rather than
   competing with the gold banner it sits next to. */
.sc-feature-banner--quiet {
  background: var(--sc-bg-alt);
  color: var(--sc-charcoal);
}

.sc-feature-banner--quiet .sc-eyebrow {
  color: var(--sc-gold-dark);
}

/* Cards */
.sc-card {
  background: var(--sc-bg-alt);
  border-radius: 0.5rem;
  padding: 2rem 1.5rem;
  height: 100%;
  border-left: 3px solid var(--sc-gold);
}

.sc-card h3 {
  color: var(--sc-charcoal);
}

/* Admin dashboard: de-emphasises the two noise-filter tiles (bot scans, health-check pings) next
   to the two real-signal tiles (visitor requests, error responses) they sit alongside - the gold
   accent border is reserved for numbers worth acting on, not filtered-out noise shown only for
   context on why total traffic looks much higher than real visitor activity. */
.sc-metric-muted {
  border-left-color: var(--sc-paper);
}

/* Admin dashboard: a recognised-pattern explanation under an exception row (see
   AdminTelemetryQueryService.ExplainKnownException) - deliberately not text-danger like the rest
   of the row, since the point is "here's why this one might not be as alarming as it looks." */
.sc-exception-hint {
  color: var(--sc-charcoal-light);
  font-style: italic;
}

/* Info panel - like .sc-card but without height:100%, which only makes sense when every
   sibling in the row is also a card (e.g. the homepage's three-card grid). Used standalone
   (e.g. next to a form) it has no sane reference height and stretches to fill the page. */
.sc-info-panel {
  background: var(--sc-bg-alt);
  border-radius: 0.5rem;
  padding: 1.75rem;
  border-left: 3px solid var(--sc-gold);
}

.sc-info-panel h3 {
  color: var(--sc-charcoal);
  font-size: 1.15rem;
}

.sc-info-panel ul {
  margin-bottom: 0;
  padding-left: 1.25rem;
}

.sc-info-panel li {
  margin-bottom: 0.5rem;
}

.sc-info-panel li:last-child {
  margin-bottom: 0;
}

/* The literal system prompt text that governed a report section - shown verbatim (not
   summarised) behind a "Why we checked this" toggle, so it reads as an audit artefact rather
   than marketing copy. A field governed by more than one section (see PromptSectionExcerpt)
   renders one of these per section, hence the own bottom margin rather than relying on a parent
   gap. */
.sc-rule-excerpt {
  background: var(--sc-bg-alt);
  border-left: 3px solid var(--sc-taupe);
  border-radius: 0.375rem;
  padding: 1rem 1.25rem;
  font-size: 0.85rem;
  color: var(--sc-charcoal-light);
}

.sc-rule-excerpt + .sc-rule-excerpt {
  margin-top: 0.75rem;
}

.sc-rule-excerpt-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--sc-charcoal);
}

/* white-space:pre-wrap keeps the prompt's own line breaks and bullets legible without needing a
   monospace font. */
.sc-rule-excerpt-body {
  white-space: pre-wrap;
  margin-top: 0.5rem;
}

/* The Scrivenza mark used in place of a prompt section's own leading emoji (see
   PromptSectionTitleFormatter) wherever a section title is shown to a person - the checklist,
   the admin prompt editor, and this rule excerpt. */
.sc-title-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Portal sign-off checklist - each item is its own <form> (so one checkbox can post
   independently) but should read as a plain list, not a stack of visible form boxes. */
.sc-signoff-list {
  list-style: none;
  padding-left: 0;
}

.sc-signoff-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--sc-paper);
}

.sc-signoff-item:last-child {
  border-bottom: none;
}

.sc-signoff-form {
  margin: 0;
}

.sc-signoff-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0;
  cursor: pointer;
}

.sc-signoff-label input[type="checkbox"] {
  margin-top: 0.3rem;
  flex-shrink: 0;
}

/* Chat with your statement (Insights Results page) */
.sc-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 22rem;
  overflow-y: auto;
}

.sc-chat-bubble {
  max-width: 80%;
  padding: 0.6rem 0.9rem;
  border-radius: 0.75rem;
  white-space: pre-wrap;
}

.sc-chat-bubble-user {
  align-self: flex-end;
  background: var(--sc-gold);
  color: var(--sc-charcoal);
}

.sc-chat-bubble-assistant {
  align-self: flex-start;
  /* .sc-info-panel (the parent) is already --sc-bg-alt, so the bubble needs its own tone to
     read as a distinct bubble rather than blending into the panel background. */
  background: var(--sc-paper);
  border-left: 3px solid var(--sc-gold);
  color: var(--sc-charcoal);
}

.sc-feedback {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.4rem;
}

.sc-feedback-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  background: none;
  border: none;
  border-radius: 4px;
  color: var(--sc-taupe);
  cursor: pointer;
}

.sc-feedback-btn-down svg {
  transform: rotate(180deg);
}

.sc-feedback-btn:hover:not(:disabled) {
  background: var(--sc-bg-alt);
  color: var(--sc-charcoal);
}

.sc-feedback-btn-selected {
  color: var(--sc-gold-dark);
  pointer-events: none;
}

.sc-feedback-btn-selected svg {
  fill: var(--sc-gold);
}

.sc-feedback-btn:disabled {
  opacity: 0.25;
  cursor: default;
}

.sc-feedback-caption {
  font-size: 0.7rem;
  color: var(--sc-taupe);
}

/* Print (used for the Insights Results and case review "Download PDF" buttons, via
   window.print()). Standard report margins, rather than each browser's own arbitrary default
   (which varies by browser/OS/printer and tends to run wide) - 1.5cm all round is a tighter,
   still-normal document margin. */
@page {
  margin: 1.5cm;
}

.print-header {
  display: none;
}

@media print {
  .no-print {
    display: none !important;
  }

  .print-header {
    display: block;
  }

  body {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .sc-card {
    break-inside: avoid;
    border: 1px solid #ddd;
  }

  /* Bootstrap's row/col grid is flexbox, and flexbox doesn't paginate across printed
     pages - a tall column (e.g. a long subscription list) overflows into the space
     browsers have already laid out for the next row, so cards end up visually
     interleaved. Stack everything into a single column for print so each card flows
     top-to-bottom in normal block order instead. */
  .row {
    display: block !important;
  }

  .row > [class*="col-"] {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 1rem;
  }

  .h-100 {
    height: auto !important;
  }
}

/* Case review demo - "why this exists" panel */
.sc-why-panel {
  padding: 2rem 2.25rem;
}

.sc-why-panel .sc-eyebrow {
  margin-bottom: 0.5rem;
}

.sc-why-panel h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.sc-why-panel .lead {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--sc-charcoal);
}

.sc-why-panel table {
  margin: 1.5rem 0;
}

.sc-why-panel thead th {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sc-taupe);
  font-weight: 600;
  border-bottom: 2px solid var(--sc-gold);
  background: transparent;
}

.sc-why-panel tbody th {
  color: var(--sc-taupe);
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}

.sc-why-panel td, .sc-why-panel tbody th {
  border-color: var(--sc-paper);
  padding: 0.85rem 1rem;
  vertical-align: top;
}

.sc-why-panel blockquote {
  background: var(--sc-paper);
  border-left: 3px solid var(--sc-gold);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.sc-why-panel .sc-caveat {
  font-size: 0.82rem;
  color: var(--sc-taupe);
  border-top: 1px solid var(--sc-paper);
  padding-top: 0.9rem;
  margin-top: 1rem;
}

/* Processing-page loading mark - the brand triangle with a highlight chasing around
   its perimeter and through each node, instead of a generic spinner. */
.sc-loading-track {
  opacity: 0.3;
}

.sc-loading-comet {
  stroke-dasharray: 50 400;
  filter: drop-shadow(0 0 4px rgba(212, 160, 23, 0.7));
  animation: sc-loading-chase 1.6s linear infinite;
}

@keyframes sc-loading-chase {
  to {
    stroke-dashoffset: -450;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sc-loading-comet {
    animation: none;
    stroke-dasharray: none;
    filter: none;
  }
}

/* Case review report - the verdict masthead, severity-tinted section cards, and the
   record-card layout for arrays whose rows mix short fields with narrative text (notes,
   transaction citations). See _CaseReviewResult.cshtml and CaseReviewParser.cs.

   No width cap on the report body - it runs the full page container width, same as the page's
   own title/header above it. An earlier version capped this to a narrow centered column for
   prose measure, but that read as a blog post next to the rest of the site, not a report; full
   width, matching every other card on the page, is the intended look. */

.sc-report-masthead {
  background: var(--sc-charcoal);
  color: var(--sc-paper);
  border-radius: 0.5rem;
  padding: 1.75rem 2rem;
  border-top: 4px solid var(--sc-gold);
}

.sc-report-masthead-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.sc-report-masthead .sc-eyebrow {
  color: var(--sc-gold);
}

/* Verdict badges that link to the section explaining them (see _CaseReviewResult.cshtml's
   RenderVerdictBadge) - text-decoration:none keeps it reading as a status badge rather than a
   normal underlined link, with the hover/focus state as the only "this is clickable" signal. */
.sc-verdict-badge-link {
  text-decoration: none;
  cursor: pointer;
}

.sc-verdict-badge-link:hover,
.sc-verdict-badge-link:focus-visible {
  opacity: 0.82;
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 1px;
}

.sc-affordability-summary .sc-affordability-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--sc-taupe);
  margin-bottom: 0.25rem;
}

.sc-affordability-summary .sc-affordability-figure {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--sc-charcoal);
  font-variant-numeric: tabular-nums;
}

/* Negative disposable/discretionary income is a real, meaningful finding (spending exceeds
   income), not an error state - see AffordabilitySummary's own comment - so it's coloured to
   stand out rather than clamped or hidden. */
.sc-affordability-summary .sc-affordability-figure.sc-affordability-negative {
  color: #dc3545;
}

/* Jump-to-findings strip in _CaseReviewResult.cshtml - lets a broker skip past the raw case-data
   sections (Income, Financial Commitments, Budget Planner) straight to the AI findings sections. */
.sc-findings-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.sc-findings-nav-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--sc-taupe);
}

.sc-findings-nav-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--sc-charcoal);
  background-color: var(--sc-bg-alt);
  border: 1px solid var(--sc-paper);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  text-decoration: none;
}

.sc-findings-nav-link:hover {
  border-color: var(--sc-gold);
  color: var(--sc-gold-dark);
}

/* Base styling so .sc-eyebrow works standalone (e.g. inside a plain .sc-info-panel), not just
   nested under .sc-why-panel/.sc-report-masthead - those two keep their own colour/spacing
   tweaks above, applied on top of this. */
.sc-eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sc-gold-dark);
}

.sc-report-masthead-date {
  font-size: 0.82rem;
  color: var(--sc-taupe);
}

.sc-report-verdict {
  font-size: 1.1rem;
}

.sc-report-masthead .badge {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5em 0.85em;
}

/* A section's left border defaults to the brand gold (.sc-card) - these override it once the
   section's worst finding is medium/high, so scanning down the left edge of the page is the
   actual triage motion, not a decorative accent. Low stays gold; a "low" finding isn't the signal
   a broker needs to catch at a glance. */
.sc-report-section.sc-section-high {
  border-left-color: var(--bs-danger);
}

.sc-report-section.sc-section-medium {
  border-left-color: var(--bs-warning);
}

.sc-report-section h3 {
  border-bottom: 1px solid var(--sc-paper);
  padding-bottom: 0.6rem;
  margin-bottom: 1rem;
}

.sc-report-clear-line {
  font-size: 0.9rem;
  padding-top: 0.25rem;
}

.sc-report-excluded-line {
  font-size: 0.9rem;
  padding-top: 0.5rem;
  margin-top: 0.5rem;
  border-top: 1px dashed var(--sc-paper);
}

.sc-section-selector {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.6rem;
}

.sc-section-selector-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--sc-paper);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.sc-section-selector-item:hover {
  border-color: var(--sc-gold);
}

.sc-section-selector-item:has(.form-check-input:checked) {
  border-color: var(--sc-gold);
  background: var(--sc-bg-alt);
}

.sc-section-selector-item .form-check-input {
  margin: 0;
  flex-shrink: 0;
}

.sc-section-selector-item span {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.sc-section-selector-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

/* One "record" per array item once any of its fields is narrative (see
   CaseReviewParser.RenderRecordList) - a compact header line of short fields, then the narrative
   fields underneath with room to breathe, instead of forcing both into one table row. */
.sc-record-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sc-record {
  border-top: 1px solid var(--sc-paper);
  padding-top: 1rem;
}

.sc-record:first-child {
  border-top: none;
  padding-top: 0;
}

.sc-record-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin-bottom: 0.6rem;
}

.sc-record-field-label {
  color: var(--sc-taupe);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-right: 0.3rem;
}

.sc-record-narrative {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.sc-record-narrative-label {
  display: block;
  color: var(--sc-taupe);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.15rem;
}

.sc-record-narrative-text {
  font-size: 0.92rem;
  line-height: 1.5;
}
