/* ============================================================
   Amazon workspace theme — Datum design system v3.1, Forest and Gold.
   Scoped, deliberately.

   datum.css declares its tokens on :root, and every dp-* component reads
   them through var(). Redefining the same token names on .amz-theme means
   the Amazon subtree inherits new values with no component changes at all —
   and Blinkit, Swiggy, Zepto, Flipkart and Nykaa are untouched.

   Do not move any of this to :root without repainting all six platforms
   together. datum.css is a single global <link>; a token changed there
   changes every dashboard in the product.

   Rules this palette carries, from the DatumPulse style guide:
     - Forest is chrome: rails, header bands, borders. Never a data mark.
     - Gold is the story colour, spent once per board on the figure the
       page is about. Spent twice it stops meaning anything.
     - Purple lives inside the logo only. If purple is on a dashboard and
       it is not part of a mark, it is a mistake.
     - Status colours are reserved and never stand in for a series colour.
   ============================================================ */

.amz-theme {
  /* ---- Ground and paper ---- */
  --bg:      #F4F5F8;
  --card:    #FFFFFF;
  --surface: #FFFFFF;
  --hover:   #E7F2EC;   /* forest-050 — row hover reads as chrome, not status */

  /* ---- Ink ---- */
  --ink:  #0F172A;
  --ink2: #334155;
  --ink3: #64748B;
  --ink4: #94A3B8;

  /* ---- Rules ---- */
  --rule:  #E2E8F0;
  --rule2: #EEF0F4;

  /* ---- Forest: chrome only ---- */
  --accent:       #16583A;
  --accent-light: #1E7A4E;
  --accent-dark:  #0B3D28;
  --accent-bg:    #E7F2EC;

  --forest-900: #0B3D28;
  --forest-700: #16583A;
  --forest-500: #1E7A4E;
  --forest-050: #E7F2EC;

  /* ---- Gold: the story colour ---- */
  --gold:      #C9962F;
  --gold-deep: #7F6111;   /* gold as TEXT — #C9962F fails 4.5:1, this clears 5.4:1 */
  --gold-100:  #FAF3E3;
  --gold-line: #EDE3CC;
  --cream:     #FAF6EC;   /* lede boxes and total rows */

  /* ---- Status. Reserved: never a series colour. ---- */
  --green: #059669;
  --red:   #DC2626;
  --amber: #D97706;
  --pos-text: #047857;
  --neg-text: #B91C1C;

  /* ---- Type ---- */
  /* Libre Caslon Text carries no rupee sign (U+20B9) at either weight, so
     Questrial sits in the stack purely to supply that one glyph. Without it
     the browser borrows a rupee from whatever serif the OS offers — Georgia
     on a Mac, something else elsewhere — and one number renders in two faces
     depending on the machine. */
  --serif: 'Libre Caslon Text', 'Questrial', Georgia, serif;
  --sans:  'Questrial', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Panel headers and table header bands carry the forest band. */
.amz-theme .dp-tbl thead th {
  background: var(--forest-700);
  color: #EAF3EE;
  border-color: var(--forest-700);
}

/* A sorted column is marked in gold — one mark, on one column. */
.amz-theme .dp-tbl th[data-sortable="true"][aria-sort]:not([aria-sort="none"]) {
  color: var(--gold);
}

/* Total rows sit on cream, matching the lede boxes. */
.amz-theme .dp-tbl tfoot td,
.amz-theme .dp-tbl tr.dp-total td {
  background: var(--cream);
  border-top: 1px solid var(--gold-line);
}

/* Signal-card ladder: 4 / 2 / 1. The column count has to divide the card
   count or the last card orphans onto a row of its own — which auto-fit with
   a min-width floor does at almost every viewport width. */
.amz-theme .amz-ladder { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .amz-theme .amz-ladder { grid-template-columns: repeat(2, 1fr); } }
@media (max-width:  620px) { .amz-theme .amz-ladder { grid-template-columns: 1fr; } }

/* The hero carries a gold hairline at its foot: the one place gold is spent
   on this board's chrome, marking where the KPI strip ends and the board
   begins. */
.amz-theme .dp-hero { border-bottom: 2px solid var(--gold); }

/* Section headings in the display face. */
.amz-theme .dp-hero h2 { font-family: var(--serif); letter-spacing: 0; }
