/* ==========================================================================
   report-harbor.css — the Harbor report's own layer over report.css
   --------------------------------------------------------------------------
   Loaded ONLY by app/views/company/harbor.php, after report.css, the same way
   report-squid.css is for Squid. It brings Harbor's colours in line with the
   Squid report; rules here may use shared selectors because no other page
   loads this file, so InstaAgent and Squid are untouched.
   ========================================================================== */

/* --- table row labels: black, as in Squid (report.css's Harbor block greys them) --- */
.rp-cell-label { color: var(--lp-black); }

/* --- claim ledger ---
   "Sourced from company material" is yellow in Squid's key; report.css's token
   is orange. Redefined on .landing so the ledger dots and the legend key both
   follow. */
.landing { --rp-evidence-self: #EAB308; }
/* Unknown-type verdicts ("Not publicly checkable", "Not confirmed publicly"):
   Squid's grey. */
.rp-verify-badge--unknown { color: #646870; }

/* --- jobs tree: Harbor's own box ---
   Squid fills its own company's box pale lime and keeps full lime for small
   accents; on the paler fill the second line goes back to the figure grey. */
.rp-tree-box--self { background: #D7FE7C; }
.rp-tree-box--self .rp-tree-meta { color: #525252; }

/* --- trade-mark note under the company summary (same rule as report-squid.css) --- */
.rp-overview-note {
  /* a clear gap under the logo square / summary, centred under the section */
  margin: calc(var(--spacing-padding-inline) * 8) 0 0;
  text-align: center;
  /* Ends where the paragraph above ends: full row less the logo square and the gap. */
  max-width: calc(100% - clamp(180px, 22vw, 323px) - var(--spacing-padding-inline) * 20);
  font-size: var(--alpha-body-xs);
  line-height: 1.45;
  color: #525252;
}

/* --- a caption that runs the full width of its card ("After costs") --- */
.rp-chart-note--full { max-width: none; }

/* --- "Which way they moved": three columns ---
   Every dot sits on one of the three stops, directly under its heading. The plot
   is inset 8% each side and all three headings are centred on their stop (the
   end ones were left/right-aligned to the edges), so 0%, 50% and 100% land under
   the middle of "Sells software", "Both" and "Runs trials". Positions in the
   markup stay 0-100. */
.rp-moves-stop,
.rp-moves-stop:first-child,
.rp-moves-stop:last-child { left: calc(var(--x) * 0.84 + 8%); transform: translateX(-50%); }
.rp-moves-mark { left: calc(var(--x) * 0.84 + 8%); }
.rp-moves-seg { left: calc(var(--a) * 0.84 + 8%); width: calc((var(--b) - var(--a)) * 0.84); }
/* Harbor's end dot in the same orange as everyone else's. */
.rp-moves-row--self .rp-moves-mark--now { background: var(--lp-orange); }

/* --- claim ledger verdicts: Squid's four chips (values from report-squid.css) --- */
.rp-verify-badge--confirmed { color: #15803D; }
.rp-verify-badge--company   { color: #8A6200; }
.rp-verify-badge--inference { color: #2D63BB; }
/* --unknown (#646870) is set above. The reason line under each chip, as in Squid. */
.rp-verify-settle { color: #525252; }

/* Ledger verdicts: Confirmed, Sourced from company material and Unknown a touch
   heavier, since the lighter colours are hard to read at regular weight. */
.rp-verify-badge--confirmed,
.rp-verify-badge--company,
.rp-verify-badge--inference,
.rp-verify-badge--unknown { font-weight: var(--font-weight-medium); }

@media (max-width: 1024px) { .rp-overview-note { max-width: none; } }

/* --- claim ledger as tinted pills (Chapter 6, .rp-ledger) ---
   Each verdict is a small rounded chip, its colour on a pale tint of the same
   hue; company material is orange here to match the ledger's dot and key. */
.rp-ledger .rp-verify-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: var(--font-weight-regular);
  line-height: 1.4;
}
.rp-ledger .rp-verify-badge--confirmed { background: #DCFCE7; color: #15803D; }
.rp-ledger .rp-verify-badge--company   { background: #DBEAFE; color: #1D4ED8; }
.rp-ledger .rp-verify-badge--inference { background: #FEF9C3; color: #854D0E; }
.rp-ledger .rp-verify-badge--unknown   { background: #F3F4F6; color: #4B5563; }
.rp-ledger .rp-verify-badge--corroborated { background: #CCFBF1; color: #0F766E; }
.rp-ledger .rp-verify-table td { vertical-align: middle; }
.rp-ledger .rp-verify-claim { align-items: center; }
.rp-ledger .rp-verify-dot { margin-top: 0; }

/* --- overview laid out as the report build (.rp-overview--split) ---
   Above 1024px the logo square runs the full height of the name + description
   column: its top on the top of "Harbor", its bottom on the description's last
   line. The trade-mark note sits under the column. At 1024px and below the
   report.css stack applies, with the gap the flex column no longer provides. */
@media (min-width: 1025px) {
  .rp-overview--split > .lp-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: calc(var(--spacing-padding-inline) * 20);
    row-gap: calc(var(--spacing-padding-inline) * 6);
  }
  .rp-overview--split .rp-overview-head { grid-area: 1 / 1; align-self: start; }
  .rp-overview--split .rp-overview-body { grid-area: 2 / 1; align-self: end; }
  .rp-overview--split .rp-overview-mark { grid-area: 1 / 2 / 3 / 3; align-self: stretch; }
  .rp-overview--split .rp-overview-mark-logo { height: auto; }
  /* the trade-mark note runs the full width, under the logo square too */
  .rp-overview--split .rp-overview-note { grid-area: 3 / 1 / 4 / 3; max-width: none; }
}
@media (max-width: 1024px) {
  .rp-overview--split .rp-overview-mark { margin-top: calc(var(--spacing-padding-inline) * 14); }
}

/* --- no orphans (design check) ---
   Lets the browser rebalance a paragraph's last lines so none ends on a single
   word. Harbor-only: no other page loads this file. */
.landing .rp-prose,
.landing .rp-insight-text,
.landing .rp-chart-note,
.landing .rp-overview-text,
.landing .rp-overview-note,
.landing .rp-pullquote p,
.landing .rp-verify-table td,
.landing .rp-ref-text,
.landing .rp-refs-note p,
.landing .ax-card-note,
.landing .rp-timeline-event { text-wrap: pretty; }

/* --- "Who else does Harbor's jobs" on phones (13 Nov) ---
   report.css's stacked layout hides every connector, which left the Harbor box
   floating above the first job and the rivals' grey rules joined to nothing.
   Here the stack reads as a connected outline instead: a spine runs down from
   the Harbor box, each job box hangs off it with a short tick, and each job's
   rivals hang off that job. The flat grid (display: contents) means no element
   can hold one continuous line, so every job and rival group draws its own
   segment of the spine, covering the gap above it as well. */
@container (max-width: 640px) {
  .rp-tree { --sp: 18px; --gap: 14px; }
  .rp-tree-box--self { margin-bottom: 0; }
  .rp-tree-branch > .rp-tree-box--job,
  .rp-tree-branch > .rp-tree-leaf { position: relative; margin-left: calc(var(--sp) + 10px); }
  .rp-tree-branch > .rp-tree-box--job { margin-top: var(--gap); }
  /* spine segment, from the bottom of whatever sits above down to this item */
  .rp-tree-branch > .rp-tree-box--job::before,
  .rp-tree-branch > .rp-tree-leaf::before {
    content: '';
    position: absolute;
    left: calc(-1 * var(--sp) - 10px + 8px);
    top: calc(-1 * var(--gap));
    bottom: 0;
    border-left: var(--rp-tree-line) solid var(--rp-tree-ink);
  }
  .rp-tree-branch > .rp-tree-leaf::before { top: 0; }
  /* tick from the spine into each job box */
  .rp-tree-branch > .rp-tree-box--job::after {
    content: '';
    position: absolute;
    left: calc(-1 * var(--sp) - 10px + 8px);
    top: 50%;
    width: calc(var(--sp) + 2px);
    border-top: var(--rp-tree-line) solid var(--rp-tree-ink);
  }
  /* the spine stops at the last job's tick */
  .rp-tree-branch:last-child > .rp-tree-box--job::before { bottom: 50%; }
  .rp-tree-branch:last-child > .rp-tree-leaf::before { display: none; }
  /* rivals: one continuous rule from the job box above down to the last
     rival's tick. Each rival box draws its own piece, covering the 10px gap
     above it, so consecutive pieces join; the last rival's piece stops at its
     middle. A tick runs from the rule into every rival. */
  .rp-tree-leaf { margin-top: 0; padding: 10px 0 0 30px; border-left: 0; background: none; }
  .rp-tree-leaf > .rp-tree-box { position: relative; }
  .rp-tree-leaf > .rp-tree-box::before {
    content: '';
    position: absolute;
    left: -18px;
    top: 50%;
    width: 18px;
    border-top: var(--rp-tree-line) solid var(--rp-tree-ink);
  }
  .rp-tree-leaf > .rp-tree-box::after {
    content: '';
    position: absolute;
    left: -18px;
    top: -10px;
    bottom: -10px;
    border-left: var(--rp-tree-line) solid var(--rp-tree-ink);
  }
  .rp-tree-leaf:last-child > .rp-tree-box::after { bottom: 50%; }
}

/* 17 Nov: the outcome card's "Most valuable if it happens" chip, grey on the grey card
   (user's reference): site border grey fill, the card note's grey text, no orange. */
.ax-card .ax-card-tag {
  border-color: var(--lp-border, #E0E0E0);
  background: var(--lp-border, #E0E0E0);
  color: #525252;
}
