/* sr-calc.css — extracted from all-articles/xcode/hub.html <style>
   blocks. Playground authoritative copy; keep in sync.
   Snapshot: 2026-07-08T02:17:44.507Z. Ran /tmp/extract-sr-calc.mjs.
   All selectors are .srcalc-* prefixed (plus .ref-chip helpers). */

/* Empty-cell pulse — draws the eye to input tiles the user hasn't
   touched yet. Injected here because the extractor's selector regex
   only matches .srcalc-* class rules and misses @keyframes at-rules. */
@keyframes srcalc-cell-pulse {
  0%, 100% { background: #ffffff;              border-color: #cbd5e1; }
  50%      { background: rgba(37,99,235,0.08); border-color: #94a3b8; }
}

/* ── sr-calc — scoped FINAL-UI styles. Light, brand-matched (mirrors
     all-articles/safetyratios/css/site-bundle.css aesthetic without
     pulling that stylesheet in). All selectors prefixed .srcalc- to
     prevent collision with hub's admin styles. ───────────────────────── */
  .srcalc-page {
    background: #f8fafc;           /* canvas (light) */
    color: #0f172a;                /* ink */
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 14px;
  }

  .srcalc-wrap { max-width: 880px; margin: 0 auto; padding: 32px 24px 40px; }

  .srcalc-hero { margin-bottom: 22px; }

  .srcalc-h1 {
    font-size: clamp(24px, 3vw, 32px); font-weight: 700; letter-spacing: -0.02em;
    line-height: 1.2; color: #0f172a; margin: 0 0 6px;
  }

  .srcalc-byline {
    font-size: 14px; color: #2563eb; font-weight: 500; font-style: italic;
    margin: 0 0 14px; max-width: 720px;
  }

  .srcalc-sub {
    font-size: 14px; color: #475569; line-height: 1.6; margin: 0; max-width: 620px;
  }

  /* Monthly input grid — fits viewport, no horizontal scroll. */
  .srcalc-grid-scroll {
    margin-top: 14px;
    border: 1px solid #e2e8f0; border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
  }

  .srcalc-period-strip {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 10px 14px; background: #f8fafc; border-bottom: 1px solid #e2e8f0;
    font-size: 12px; color: #475569;
  }

  .srcalc-period-strip .lbl {
    font-weight: 600; color: #64748b; text-transform: uppercase;
    letter-spacing: 0.05em; font-size: 10px;
  }

  .srcalc-period-strip .arrow { color: #cbd5e1; font-weight: 600; }

  .srcalc-period-strip select {
    border: 1px solid #e2e8f0; border-radius: 6px;
    padding: 5px 10px; font: inherit; font-size: 12px;
    color: #0f172a; background: #ffffff; cursor: pointer;
    min-width: 110px;
  }

  .srcalc-period-strip select:focus {
    outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
  }

  .srcalc-period-strip .preset-row {
    display: flex; gap: 4px; flex-wrap: wrap; margin-left: 6px;
  }

  .srcalc-period-strip .preset {
    appearance: none; background: #ffffff; border: 1px solid #e2e8f0;
    color: #475569; border-radius: 999px; padding: 3px 10px;
    font-size: 11px; cursor: pointer; font: inherit;
  }

  .srcalc-period-strip .preset:hover { background: #f1f5f9; color: #0f172a; }

  .srcalc-period-strip .meta {
    margin-left: auto; color: #64748b; font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
  }

  /* Two-column controls layout — Standard + Sector stacked on the left,
     Frequency + Start stacked on the right. Basis toggle no longer lives
     here; it's mounted inside the grid header where 'Metric' used to sit. */
  .srcalc-controls {
    display: flex; flex-wrap: wrap; align-items: flex-start;
    justify-content: space-between; gap: 12px 20px;
    padding: 10px 14px; background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 12px; color: #475569;
  }

  .srcalc-controls .ctrl-col {
    display: flex; flex-direction: column; gap: 6px;
    min-width: 220px;
  }

  .srcalc-controls .ctrl-col.right { align-items: flex-end; }

  .srcalc-controls .ctrl-row {
    display: flex; align-items: center; gap: 8px;
  }

  .srcalc-controls .lbl {
    font-weight: 600; color: #64748b; text-transform: uppercase;
    letter-spacing: 0.05em; font-size: 10px;
    width: 70px; text-align: right; flex-shrink: 0;
  }

  .srcalc-controls select,
  .srcalc-controls input[type="date"] {
    border: 1px solid #e2e8f0; border-radius: 6px;
    padding: 5px 10px; font: inherit; font-size: 12px;
    color: #0f172a; background: #ffffff; cursor: pointer;
    min-width: 170px;
  }

  .srcalc-controls select:focus,
  .srcalc-controls input[type="date"]:focus {
    outline: none; border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
  }

  .srcalc-controls .meta {
    flex-basis: 100%; text-align: right;
    color: #64748b; font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
  }

  /* Basis toggle mounted in the grid header cell where 'Metric' used to sit. */
  .srcalc-grid thead th.basis-header {
    background: #e2e8f0; padding: 4px 6px; vertical-align: middle;
  }

  .srcalc-grid thead th.basis-header .mode-toggle {
    display: inline-flex; border: 1px solid #cbd5e1; border-radius: 6px;
    overflow: hidden;
  }

  .srcalc-grid thead th.basis-header .mode-btn {
    appearance: none; background: #ffffff; border: 0;
    padding: 4px 10px; font-size: 10px; font-weight: 700;
    cursor: pointer; color: #475569; font: inherit;
    text-transform: uppercase; letter-spacing: 0.04em;
  }

  .srcalc-grid thead th.basis-header .mode-btn + .mode-btn {
    border-left: 1px solid #cbd5e1;
  }

  .srcalc-grid thead th.basis-header .mode-btn.active {
    background: #2563eb; color: #fff;
  }

  /* Per-mode blue for the active toggle button, matching the hint colour
     above. Data-mode attribute is set on each button. */
  .srcalc-grid thead th.basis-header .mode-btn.active[data-mode="workforce"] {
    background: #2563eb;
  }

  .srcalc-grid thead th.basis-header .mode-btn.active[data-mode="hours"] {
    background: #0284c7;
  }

  /* FTE + Rate-style chips shown in the left controls column when
     Basis=Hours. The rounded pill matches the ref-chip visual so extra
     conversion info is clearly ambient, not primary UI. */
  .srcalc-fte-note {
    display: inline-flex; align-items: center; gap: 4px;
    background: rgba(14,165,233,0.10);
    border: 1px solid rgba(14,165,233,0.35);
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 10px; font-weight: 700;
    color: #0369a1;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
  }

  .srcalc-fte-note em {
    font-style: normal; color: #0c4a6e; font-weight: 600;
  }

  /* Sub-line derivation note beneath the FTE picker — shows the calc
     (e.g. '38 h/wk × 48 wks = 1,824') plus a compact reference to the
     underlying law or convention. Kept tiny + muted so it's visible
     without competing with the control it explains. */
  .srcalc-fte-note-inline {
    margin: 2px 0 0 4px;
    font-size: 10px; color: #64748b; line-height: 1.35;
    font-style: italic;
    max-width: 340px;
  }

  /* Modal shown when the FTE picker's 'Other (specify)…' option is
     chosen. Sits above everything at z-index 9999 with a semi-opaque
     backdrop so the calc UI recedes. Centered, small, keyboard-driven
     (Enter = save, Escape = cancel). */
  .srcalc-modal-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(15,23,42,0.55);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
  }

  .srcalc-modal {
    background: #ffffff; border-radius: 8px;
    padding: 20px 22px;
    box-shadow: 0 20px 40px -8px rgba(15,23,42,0.35);
    width: 320px; max-width: 100%;
    font-family: 'Inter', system-ui, sans-serif;
  }

  .srcalc-modal-title {
    font-size: 14px; font-weight: 700; color: #0f172a;
    margin: 0 0 6px;
  }

  .srcalc-modal-help {
    font-size: 11px; color: #64748b; line-height: 1.45;
    margin: 0 0 12px;
  }

  .srcalc-modal-input {
    width: 100%; box-sizing: border-box;
    padding: 8px 10px;
    font-size: 13px; font-family: 'JetBrains Mono', ui-monospace, monospace;
    border: 1px solid #cbd5e1; border-radius: 6px;
    color: #0f172a; background: #f8fafc;
  }

  .srcalc-modal-input:focus {
    outline: none; border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.18);
  }

  .srcalc-modal-actions {
    display: flex; gap: 8px; justify-content: flex-end;
    margin-top: 14px;
  }

  /* Basis hint line — sits below the strip so the strip stays tidy.
     Fixed min-height so switching between workforce/hours modes doesn't
     jump the layout between one and two lines. Colour left-border tint
     signals the active mode without changing the text length. */
  .srcalc-strip-hint {
    padding: 6px 14px 8px 12px;
    background: #f8fafc; border-bottom: 1px solid #e2e8f0;
    border-left: 3px solid transparent;
    font-size: 11px; color: #64748b;
    min-height: 34px;
    display: flex; align-items: center; gap: 10px;
    line-height: 1.35;
    transition: border-left-color 0.2s ease, color 0.2s ease;
  }

  /* Two shades of blue — no longer amber for Hours. Both are blue-family
     so the two modes read as related, but distinct enough to signal a
     mode change at a glance. */
  .srcalc-strip-hint.workforce { border-left-color: #2563eb; }
  /* blue-600  */
  .srcalc-strip-hint.hours     { border-left-color: #0284c7; }
  /* sky-600  */

  /* Hours / Workforce mode toggle — thin band under the period strip. */
  .srcalc-mode-strip {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 14px; background: #fbfcfe; border-bottom: 1px solid #e2e8f0;
    font-size: 12px; color: #475569;
  }

  .srcalc-mode-strip .lbl {
    font-weight: 600; color: #64748b; text-transform: uppercase;
    letter-spacing: 0.05em; font-size: 10px;
  }

  .srcalc-mode-strip .mode-toggle {
    display: inline-flex; border: 1px solid #e2e8f0; border-radius: 6px;
    overflow: hidden;
  }

  .srcalc-mode-strip .mode-btn {
    appearance: none; background: #ffffff; border: 0;
    padding: 5px 14px; font-size: 11px; font-weight: 600;
    cursor: pointer; color: #475569; font: inherit;
  }

  .srcalc-mode-strip .mode-btn + .mode-btn { border-left: 1px solid #e2e8f0; }

  .srcalc-mode-strip .mode-btn.active { background: #2563eb; color: #fff; }

  .srcalc-mode-strip .mode-hint { color: #94a3b8; font-size: 11px; }


  .srcalc-grid {
    border-collapse: collapse;
    width: 100%;
    table-layout: fixed;
  }

  /* Row-label column is fixed; remaining columns split evenly. */
  .srcalc-grid col.label-col  { width: 170px; }

  .srcalc-grid col.month-col  { width: auto; }

  .srcalc-grid th, .srcalc-grid td {
    padding: 5px 4px; text-align: center; font-size: 11px;
  }

  .srcalc-grid thead th {
    background: #e2e8f0; color: #475569; font-weight: 700; font-size: 10px;
    text-transform: uppercase; letter-spacing: 0.04em;
    border-bottom: 1px solid #cbd5e1;
  }

  /* Metric labels: full text, wrap if needed, smaller font. */
  .srcalc-grid tbody th, .srcalc-grid tfoot th {
    text-align: left; padding: 5px 10px;
    font-weight: 600; color: #0f172a;
    font-size: 11px;
    white-space: normal; line-height: 1.25;
  }

  /* Row sublabel — muted secondary line under the metric name. Used to
     annotate rows that have regulator-specific nuance (e.g. o3d = "recorded,
     non-reportable" under RIDDOR 2013). */
  .srcalc-grid tbody th .sublabel {
    display: block;
    font-size: 9px; font-weight: 500;
    color: #64748b; text-transform: none; letter-spacing: 0;
    margin-top: 1px; line-height: 1.15;
  }

  .srcalc-grid tbody td { padding: 3px 3px; }

  /* Tile inputs — dashed border + pulsing background when empty, solid
     border + filled background once a value is entered. Placeholder "0"
     keeps :placeholder-shown reliable across browsers. */
  .srcalc-grid tbody td input {
    border: 1.5px dashed #cbd5e1;
    background: #ffffff;
    padding: 6px 8px; font: inherit; font-size: 11px;
    width: 100%; min-width: 0;
    text-align: right;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    color: #0f172a;
    box-sizing: border-box;
    -moz-appearance: textfield;
    border-radius: 6px;
    transition: border-color 0.15s ease, background 0.15s ease;
    caret-color: #2563eb;
  }

  .srcalc-grid tbody td input::-webkit-outer-spin-button,
  .srcalc-grid tbody td input::-webkit-inner-spin-button {
    -webkit-appearance: none; margin: 0;
  }

  .srcalc-grid tbody td input::placeholder {
    color: #cbd5e1; font-style: italic;
  }

  /* Empty + unfocused → soft blink to signal "fill me in". Five cycles
     only — long enough to catch the eye, short enough not to nag once the
     user has acknowledged the grid. The animation settles on its final
     keyframe (white bg + light dashed border), preserving the empty look. */
  .srcalc-grid tbody td input:placeholder-shown:not(:focus) {
    animation: srcalc-cell-pulse 1.6s ease-in-out 5;
  }

  /* Filled → solid border + filled tile */
  .srcalc-grid tbody td input:not(:placeholder-shown) {
    border-style: solid; border-color: #94a3b8;
    background: #f1f5f9;
  }

  /* Focus wins over both — primary border + brighter tile */
  .srcalc-grid tbody td input:focus {
    outline: none;
    border-style: solid; border-color: #2563eb;
    background: #eff6ff;
    animation: none;  /* stop the empty-cell pulse while focused */
  }

  .srcalc-grid tbody td input:invalid { box-shadow: none; }

  /* Classification cell locked because its bucket's denominator (hours or
     workforce) is empty. The user must fill the denominator first — that
     value is the divisor for every rate this row feeds. */
  .srcalc-grid tbody td input:disabled {
    opacity: 0.35;
    background: repeating-linear-gradient(
      -45deg, #f8fafc 0 6px, #eef2f7 6px 12px
    );
    border-style: dotted;
    border-color: #cbd5e1;
    cursor: not-allowed;
    animation: none;
  }

  /* Suspect value — 20× jump vs the previous filled bucket. Warning only,
     never blocks. Amber border + pale amber fill; tooltip explains. */
  .srcalc-grid tbody td input.srcalc-suspect {
    border-color: #f59e0b;
    border-style: solid;
    background: rgba(245,158,11,0.14);
  }

  .srcalc-grid tbody td input.srcalc-suspect:focus {
    border-color: #d97706;
    background: rgba(245,158,11,0.20);
  }

  /* Muted 'ref' chip inside a rate-row label — shows the industry-standard
     annualised benchmark for the current country · sector so users have a
     comparison anchor without leaving the grid. */
  .srcalc-grid tfoot th .ref-chip {
    display: inline-block; margin-left: 6px;
    font-size: 10px; font-weight: 600; font-style: italic;
    color: #64748b;
  }

  .srcalc-grid tfoot th .ref-chip strong {
    font-weight: 700; color: #334155; font-style: normal;
  }

  .srcalc-grid tfoot th .ref-chip .ref-chip-native {
    font-weight: 500; color: #94a3b8; font-style: normal;
  }

  /* Data-entry band: alternating cool grey-blue rows. */
  .srcalc-grid tbody tr:nth-child(odd)  th,
  .srcalc-grid tbody tr:nth-child(odd)  td { background: #eef2f7; }

  .srcalc-grid tbody tr:nth-child(even) th,
  .srcalc-grid tbody tr:nth-child(even) td { background: #f8faff; }

  .srcalc-grid tbody tr:nth-child(odd)  th { background: #e2e8f0; }

  .srcalc-grid tbody tr:nth-child(even) th { background: #eef2f7; }

  /* Display band: alternating warm grey rows. */
  .srcalc-grid tfoot tr:nth-child(odd)  th,
  .srcalc-grid tfoot tr:nth-child(odd)  td { background: #f1f5f9; }

  .srcalc-grid tfoot tr:nth-child(even) th,
  .srcalc-grid tfoot tr:nth-child(even) td { background: #e2e8f0; }

  .srcalc-grid tfoot tr:first-child th,
  .srcalc-grid tfoot tr:first-child td { border-top: 1px solid #cbd5e1; }

  .srcalc-grid tfoot td, .srcalc-grid tfoot th {
    color: #0f172a; font-weight: 600;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
  }

  .srcalc-grid tfoot th {
    font-family: inherit;
  }

  .srcalc-grid tfoot td.empty { color: #94a3b8; font-weight: 400; }

  .srcalc-grid tfoot tr.total th { background: #cbd5e1; color: #0f172a; }

  .srcalc-grid tfoot tr.total td { background: #cbd5e1; color: #0f172a; }

  .srcalc-card {
    background: #ffffff; border: 1px solid #e2e8f0; border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 4px 14px rgba(15,23,42,0.04);
    overflow: hidden;
  }

  .srcalc-card-head {
    padding: 14px 18px; border-bottom: 1px solid #e2e8f0;
    position: relative;   /* anchor for the superUpdate shell */
  }

  .srcalc-card-head h2 {
    margin: 0; font-size: 13px; font-weight: 700; color: #0f172a;
    text-transform: uppercase; letter-spacing: 0.04em;
  }

  .srcalc-supdate-log {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px; color: #475569;
    background-color: #f8fafc; border: 1px solid #eef2f7;
    border-radius: 6px; padding: 8px 10px;
    min-height: 60px; max-height: 120px; overflow: auto;
    white-space: pre-wrap;
    flex-shrink: 0;
  }

  .srcalc-supdate-diff {
    flex: 1 1 auto; overflow-y: auto;
    background-color: #ffffff;
    border: 1px solid #eef2f7; border-radius: 6px; padding: 6px;
    font-size: 11px;
  }

  .srcalc-supdate-diff table { width: 100%; border-collapse: collapse; }

  .srcalc-supdate-diff th, .srcalc-supdate-diff td {
    padding: 3px 6px; border-bottom: 1px solid #f1f5f9; text-align: left;
  }

  .srcalc-supdate-diff th {
    font-size: 9px; text-transform: uppercase; letter-spacing: 0.05em;
    color: #64748b; font-weight: 700;
  }

  .srcalc-supdate-diff td.val {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    text-align: right;
  }

  .srcalc-supdate-diff td.val.old { color: #dc2626; }

  .srcalc-supdate-diff td.val.new { color: #16a34a; font-weight: 700; }

  .srcalc-supdate-diff td.val.new-row { color: #2563eb; font-weight: 700; }

  /* Actions row — pinned at the TOP of the panel, well away from the
     sr-calc grid's pulsing empty-tile animation below. Solid white
     background so nothing shows through the button hit-zones. */
  .srcalc-supdate-actions {
    display: flex; gap: 8px; justify-content: flex-end;
    background-color: #ffffff;
    padding-bottom: 10px; border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
  }

  .srcalc-supdate-actions button {
    background-color: #ffffff; border: 1px solid #cbd5e1; color: #0f172a;
    padding: 6px 14px; border-radius: 6px; font-size: 12px; font-weight: 600;
    cursor: pointer; font-family: inherit;
    position: relative; z-index: 1;    /* click-through never */
    opacity: 1;
  }

  .srcalc-supdate-actions button:hover:not(:disabled)  { background-color: #f1f5f9; }

  .srcalc-supdate-actions button:disabled              { opacity: 0.55; cursor: default; }

  .srcalc-card-body { padding: 18px; }

  .srcalc-row {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin-bottom: 14px;
  }

  .srcalc-field { display: flex; flex-direction: column; gap: 5px; }

  .srcalc-field span {
    font-size: 11px; font-weight: 600; color: #64748b;
  }

  .srcalc-input, .srcalc-select {
    background: #ffffff; color: #0f172a;
    border: 1px solid #e2e8f0; border-radius: 8px;
    padding: 9px 11px; font: inherit; font-size: 13px;
    width: 100%; transition: border-color 0.15s, box-shadow 0.15s;
  }

  .srcalc-input:focus, .srcalc-select:focus {
    outline: none; border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
  }

  .srcalc-actions { display: flex; gap: 10px; margin-top: 12px; }

  .srcalc-btn-primary {
    background: #2563eb; color: #fff; border: 0; border-radius: 8px;
    padding: 10px 20px; font-size: 13px; font-weight: 600; cursor: pointer;
    transition: background 0.15s;
  }

  .srcalc-btn-primary:hover { background: #1d4ed8; }

  .srcalc-btn-secondary {
    background: transparent; color: #475569; border: 1px solid #e2e8f0;
    border-radius: 8px; padding: 10px 20px; font-size: 13px; font-weight: 600; cursor: pointer;
  }

  .srcalc-btn-secondary:hover { background: #f1f5f9; }

  .srcalc-error {
    margin: 12px 0 0; padding: 10px 14px; border-radius: 8px;
    background: #fef2f2; color: #b91c1c; font-size: 13px; border: 1px solid #fecaca;
  }

  .srcalc-results { display: flex; flex-direction: column; gap: 18px; margin-top: 22px; }

  .srcalc-result {
    position: relative;
    border: 1px solid #e2e8f0; border-radius: 12px; background: #ffffff;
    box-shadow: 0 1px 2px rgba(15,23,42,0.04);
    padding: 18px 18px 14px;
  }

  .srcalc-result h3 {
    margin: 0 0 2px; font-size: 14px; font-weight: 700; color: #0f172a;
  }

  .srcalc-result .sub { margin: 0 0 14px; font-size: 12px; color: #64748b; }

  .srcalc-toolbar {
    display: flex; gap: 6px; justify-content: flex-end;
    margin-bottom: 8px;
  }

  .srcalc-toolbar button {
    border: 1px solid #cbd5e1; background: #ffffff; color: #0f172a;
    padding: 4px 10px; border-radius: 6px; font-size: 11px;
    font-weight: 600; cursor: pointer;
    font-family: inherit;
  }

  .srcalc-toolbar button:hover { background: #f1f5f9; }

  .srcalc-toolbar button:active { background: #e2e8f0; }

  .srcalc-toolbar button:disabled { opacity: 0.55; cursor: default; }

  .srcalc-chart { height: 400px; width: 100%; position: relative; z-index: 1; }

  /* Split-scale note — sits below the chart baseline near the secondary
     (industry) benchmark axis. Amber-styled so the mismatch is visible
     at a glance without needing to justify anything; the terse copy just
     names the fact and stops. */
  .srcalc-split-caption {
    margin: 10px 0 0; padding: 8px 12px;
    background: #fef3c7; border: 1px solid #fcd34d;
    color: #78350f; font-size: 12px; line-height: 1.4;
    border-radius: 6px;
    text-align: right;
  }

  .srcalc-split-caption strong { color: #451a03; font-weight: 700; }

  /* Compact stat tiles along the chart base — 1-2 rows, chart dominates. */
  .srcalc-tiles {
    margin-top: 12px;
    display: flex; flex-wrap: wrap; gap: 8px;
  }

  .srcalc-tile {
    flex: 1 1 130px;
    min-width: 120px;
    border: 1px solid #e2e8f0; border-radius: 8px;
    background: #ffffff;
    padding: 6px 10px;
    display: flex; flex-direction: column; gap: 1px;
    position: relative;
  }

  .srcalc-tile.has-swatch { padding-left: 22px; }

  .srcalc-tile-swatch {
    position: absolute; left: 8px; top: 50%;
    transform: translateY(-50%);
    width: 8px; height: 8px; border-radius: 2px;
  }

  .srcalc-tile .lbl {
    font-size: 9px; font-weight: 600; color: #64748b;
    text-transform: uppercase; letter-spacing: 0.04em;
    line-height: 1.1; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
  }

  .srcalc-tile .val {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 15px; font-weight: 700; color: #0f172a;
    line-height: 1.15;
  }

  .srcalc-tile .val.over  { color: #dc2626; }

  .srcalc-tile .val.under { color: #16a34a; }

  .srcalc-export-footer {
    margin-top: 10px; padding-top: 6px;
    border-top: 1px solid #e2e8f0;
    display: flex; align-items: center; justify-content: space-between;
    font-size: 11px; color: #64748b;
  }

  .srcalc-export-footer .src   { color: #475569; }

  .srcalc-export-footer .chart-attr { display: inline-flex; align-items: baseline; gap: 6px; }

  /* Watermark — only present while a block is being captured for export.
     Three positioned SRDS marks, low opacity, rotated. Chart dominates. */
  .srcalc-watermark {
    position: absolute; inset: 0;
    pointer-events: none;
    z-index: 2;
  }

  .srcalc-watermark-logo {
    position: absolute;
    opacity: 0.10;
    transform-origin: center center;
  }

  .srcalc-footnote {
    margin: 18px 0 0; padding: 0 4px;
    font-size: 11px; color: #94a3b8;
  }
