/* ============================================================================
   report-doc.css  -  Shared BayPri sample-report ("Northwind") styles.
   Extracted verbatim from home-bureau.css (2026-07-24) so the framed report
   can render on BOTH the homepage and /apps/snapshot/. Rendered by
   src/components/ReportDoc.astro. Tokens resolve site-wide from bureau-theme.css.
   ============================================================================ */

  /* ---------- Full one-page Snapshot report (framed document) ---------- */
  .report-doc {
    margin: 0 auto clamp(1.5rem, 3vw, 2rem);
    max-width: 860px;
    background: var(--surface);
    border: 1px solid var(--hair);
    border-radius: 16px;
    box-shadow: 0 40px 80px -44px rgba(23,26,31,0.4), 0 6px 18px -10px rgba(23,26,31,0.12);
    overflow: hidden;
  }
  .report-doc-caption {
    margin: 0 auto clamp(2.5rem, 5vw, 3.5rem);
    max-width: 860px;
    text-align: center;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    color: var(--muted);
  }
  /* Hover hint: only surfaced where hovering is possible. */
  .rd-hover-hint { display: none; }
  @media (hover: hover) and (pointer: fine) {
    .rd-hover-hint { display: inline; color: var(--ink); }
  }

  /* A) dark header band */
  .rd-header {
    background: var(--navy);
    color: #fff;
    padding: clamp(1.5rem, 3.5vw, 2.4rem) clamp(1.5rem, 4vw, 2.8rem);
  }
  .rd-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.4rem;
  }
  .rd-kicker {
    font-family: var(--mono);
    font-size: 0.64rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--teal);
  }
  .rd-company {
    font-family: var(--serif);
    font-size: clamp(1.9rem, 4.5vw, 2.9rem);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: -0.02em;
    color: #fff;
  }
  .rd-company .rd-dot { color: var(--gold); }
  .rd-subtitle {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1rem, 1.9vw, 1.2rem);
    line-height: 1.45;
    color: rgba(255,255,255,0.82);
    max-width: 62ch;
    margin-top: 0.85rem;
  }
  .rd-head-divider {
    height: 1px;
    background: rgba(255,255,255,0.16);
    margin: 1.5rem 0 1.1rem;
  }
  .rd-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.75rem;
    font-size: 0.78rem;
  }
  .rd-meta-k {
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.02em;
  }
  .rd-meta-v { color: rgba(255,255,255,0.9); }

  /* B) body */
  .rd-body {
    background: var(--surface);
    padding: clamp(1.6rem, 4vw, 2.8rem);
  }
  .rd-top {
    display: grid;
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
    gap: clamp(1.5rem, 3.5vw, 2.6rem);
    align-items: start;
  }
  .rd-scorebox {
    border: 1px solid var(--hair);
    border-radius: 14px;
    background: var(--surface-2);
    padding: 1.9rem 1.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  .rd-score {
    font-family: var(--serif);
    font-size: clamp(3.6rem, 9vw, 5rem);
    font-weight: 600;
    line-height: 0.9;
    letter-spacing: -0.03em;
    color: var(--ink);
  }
  .rd-score-of {
    font-family: var(--serif);
    font-size: 1.1rem;
    color: var(--muted);
    margin-top: 0.35rem;
  }
  .rd-score-pill {
    display: inline-flex;
    align-items: center;
    align-self: center;
    margin-top: 1rem;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    background: var(--gold);
    border: none;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--ink);
    max-width: 100%;
  }
  .rd-score-label {
    margin-top: 0.9rem;
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .rd-headline {
    font-family: var(--serif);
    font-size: clamp(1.45rem, 3.2vw, 2.1rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 1rem;
  }
  .rd-para {
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
  }
  .rd-callout {
    border-radius: 12px;
    padding: 1.05rem 1.25rem;
    font-size: 0.94rem;
    line-height: 1.55;
    color: var(--ink);
  }
  .rd-callout-gold {
    background: rgba(252, 188, 50, 0.1);
    border-left: 3px solid var(--gold);
  }
  .rd-callout-teal {
    margin-top: clamp(1.6rem, 3.5vw, 2.4rem);
    background: rgba(16, 191, 204, 0.08);
    border-top: 3px solid var(--teal);
  }
  .rd-callout-k { font-weight: 700; }

  .rd-section-label {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink);
    font-weight: 500;
    display: inline-block;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gold);
    margin-bottom: 1.1rem;
  }

  /* C) gate tables */
  .rd-tables {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(1.5rem, 3.5vw, 2.6rem);
    margin-top: clamp(1.8rem, 4vw, 2.6rem);
  }
  .rd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
  }
  .rd-table th, .rd-table td {
    text-align: left;
    vertical-align: top;
    padding: 0.6rem 0.6rem 0.6rem 0;
    border-top: 1px solid var(--hair);
  }
  .rd-table thead th {
    border-top: none;
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
    padding-bottom: 0.5rem;
  }
  .rd-table tbody th[scope="row"] {
    font-weight: 500;
    color: var(--ink);
    white-space: nowrap;
    padding-right: 0.9rem;
  }
  .rd-c-score { width: 3.4rem; }
  .rd-c-read { color: var(--muted); }
  .rd-table td.rd-c-read, .rd-table tbody td:last-child { color: var(--muted); line-height: 1.4; }
  .rd-gnum {
    font-family: var(--mono);
    color: var(--gold);
    font-weight: 500;
    margin-right: 0.15rem;
  }
  .rd-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem; height: 1.6rem;
    border-radius: 7px;
    font-family: var(--mono);
    font-size: 0.82rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
  }
  .rd-chip-1 { background: var(--coral); color: #fff; }
  .rd-chip-2 { background: var(--gold); color: var(--ink); }
  .rd-chip-3 { background: var(--teal-ink); color: #fff; }
  .rd-subtotal th, .rd-subtotal td {
    border-top: 2px solid var(--hair-strong);
    font-weight: 600;
    color: var(--ink);
    padding-top: 0.7rem;
  }
  .rd-subtotal td:last-child { color: var(--muted); font-weight: 400; }
  .rd-sub-num { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }

  /* D) moves */
  .rd-moves { margin-top: clamp(1.8rem, 4vw, 2.6rem); }
  .rd-move-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  .rd-move-list li {
    display: grid;
    grid-template-columns: 2rem 1fr;
    gap: 0.9rem;
    align-items: start;
  }
  .rd-badge {
    width: 2rem; height: 2rem;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    font-family: var(--serif);
    font-size: 1rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    font-variant-numeric: tabular-nums;
  }
  .rd-move-text {
    font-size: 0.96rem;
    line-height: 1.55;
    color: var(--muted);
    padding-top: 0.15rem;
  }
  .rd-move-lead { font-weight: 700; color: var(--ink); }

  /* F) footer */
  .rd-footer {
    background: var(--surface-2);
    border-top: 1px solid var(--hair);
    padding: clamp(1.3rem, 3vw, 1.8rem) clamp(1.5rem, 4vw, 2.8rem);
  }
  .rd-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
  }
  .rd-foot-mark { width: 20px; height: 23px; flex: none; }
  .rd-foot-domain {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink);
  }
  .rd-disclosures {
    font-size: 0.64rem;
    line-height: 1.55;
    color: var(--muted);
  }
  @media (max-width: 680px) {
    .rd-top { grid-template-columns: 1fr; }
    .rd-tables { grid-template-columns: 1fr; }
    .rd-c-read, .rd-table tbody td:last-child { font-size: 0.82rem; }
  }

  /* number/mono utilities the report needs (were homepage-only in home-bureau.css) */
  .report-doc .num, .report-doc .mono { font-variant-numeric: tabular-nums; }
  .report-doc .mono { font-family: var(--mono); letter-spacing: -0.01em; }

  /* ---------- Annotation markers + hover cards (report-doc--annotated only)
     Numbered gold badges sit in each region's left padding gutter (left:
     negative), so they land inside the figure box and are not clipped by the
     figure's overflow:hidden. Each region is also the hover target for its
     description card (.rd-tip), which floats over the region's top-left on
     pointer hover. The report-legend below repeats the copy for touch / SR. */
  .report-doc--annotated .rd-subtitle,
  .report-doc--annotated .rd-scorebox,
  .report-doc--annotated .rd-callout-gold,
  .report-doc--annotated .rd-tables,
  .report-doc--annotated .rd-moves { position: relative; cursor: help; }
  .rd-anno {
    position: absolute;
    left: -2.85rem;
    top: 0.1rem;
    width: 2.6rem;
    height: 2.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gold);
    color: var(--ink);
    font-family: var(--mono);
    font-size: 1.15rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 3px 9px rgba(23,26,31,0.28);
    cursor: help;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    z-index: 3;
  }
  /* The scorebox marker aligns to the box top rather than its centered content. */
  .report-doc--annotated .rd-scorebox .rd-anno { top: 0.9rem; }

  /* Hover description card. Sans + upright so it reads consistently even inside
     the serif-italic subtitle region. Hidden by default; revealed on hover. */
  .rd-tip {
    position: absolute;
    top: 2.95rem;
    left: 0.35rem;
    z-index: 8;
    width: 19rem;
    max-width: calc(100vw - 3rem);
    padding: 0.85rem 1.05rem;
    border-radius: 12px;
    background: var(--navy);
    color: rgba(255,255,255,0.82);
    /* Border kept visible so card 1, which floats over the dark header band,
       still reads as a distinct card (navy-on-navy) and not just a shadow. */
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 24px 52px -22px rgba(23,26,31,0.6), 0 6px 16px -8px rgba(23,26,31,0.3);
    font-family: var(--sans);
    font-style: normal;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0s linear 0.16s;
    pointer-events: none;
  }
  .rd-tip strong { color: #fff; font-weight: 700; }
  /* The scorebox marker sits lower, so drop its card to clear it. */
  .report-doc--annotated .rd-scorebox .rd-tip { top: 3.75rem; }

  /* Hover reveal, pointer devices only (touch / keyboard use the legend). */
  @media (hover: hover) and (pointer: fine) {
    .report-doc--annotated .rd-subtitle:hover .rd-anno,
    .report-doc--annotated .rd-scorebox:hover .rd-anno,
    .report-doc--annotated .rd-callout-gold:hover .rd-anno,
    .report-doc--annotated .rd-tables:hover .rd-anno,
    .report-doc--annotated .rd-moves:hover .rd-anno {
      transform: scale(1.1);
      box-shadow: 0 5px 14px rgba(23,26,31,0.34), 0 0 0 4px rgba(252,188,50,0.28);
    }
    .report-doc--annotated .rd-subtitle:hover .rd-tip,
    .report-doc--annotated .rd-scorebox:hover .rd-tip,
    .report-doc--annotated .rd-callout-gold:hover .rd-tip,
    .report-doc--annotated .rd-tables:hover .rd-tip,
    .report-doc--annotated .rd-moves:hover .rd-tip {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
      transition: opacity 0.16s ease, transform 0.16s ease, visibility 0s;
    }
  }

  @media (max-width: 760px) {
    .rd-anno { left: -1.85rem; width: 2rem; height: 2rem; font-size: 0.9rem; }
    .report-doc--annotated .rd-scorebox .rd-anno { top: 0.9rem; }
  }
