/* Trident for Procurement resource site. Prism style (same tokens as dist/index.html). */

@font-face {
  font-family: 'Public Sans';
  font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/PublicSans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/PublicSans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* ── Prism palette (use only these) ── */
  --page:      #F8F6F5;   /* page background */
  --card:      #FFFFFF;   /* cards */
  --line:      #E5E2DE;   /* card borders, hairlines */
  --title:     #18110E;   /* titles */
  --body:      #4A4341;   /* body copy */
  --sub:       #655F5D;   /* subtitles */
  --label:     #817C7A;   /* small labels */
  --moss:      #2F3F21;   /* one emphasized card per section, white text */
  --chip:      #D4EACD;   /* chips + highlight panels */
  --chip-ink:  #202C1C;
  --num:       #616E57;   /* numbers */
  --bullet:    #99A292;   /* bullets + arrows */
  --icon:      #A9B2A2;   /* single-tone icons */
  --cover:     #1B2511;   /* closing bands, footer */
  --white:     #FFFFFF;
  --on-dark-body: rgba(255,255,255,.8);

  --sans: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius:    8px;
  --card-pad:  clamp(20px, 2.4vw, 28px);
  --gap:       16px;
  --step-gap:  48px;
  --head-gap:  clamp(28px, 3.6vw, 40px);

  --max-w:      1120px;
  --max-text:   72ch;
  --pad-x:      clamp(16px, 5vw, 60px);
  --pad-section: clamp(48px, 6vw, 80px);
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }
body { font-family: var(--sans); font-size: 16px; line-height: 1.55; color: var(--body); background: var(--page); }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--moss); text-decoration: underline; text-decoration-color: var(--bullet); text-underline-offset: 2px; }
a:hover { text-decoration-color: var(--moss); }
strong { font-weight: 600; color: var(--title); }
em, i { font-style: normal; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--moss); outline-offset: 2px; }
code { font-family: var(--sans); font-weight: 600; color: var(--title); }

.skip-link { position: absolute; left: 16px; top: -48px; padding: 10px 16px; background: var(--moss); color: var(--white); border-radius: var(--radius); z-index: 10; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* ── Type ── */
h1, h2, h3, h4 { font-weight: 600; line-height: 1.2; color: var(--title); }
h1 { font-size: clamp(2rem, 4.2vw, 3rem); line-height: 1.1; letter-spacing: -0.02em; max-width: 24ch; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); letter-spacing: -0.015em; }
h3 { font-size: clamp(1.0625rem, 1.5vw, 1.1875rem); font-weight: 700; letter-spacing: -0.005em; }
h4 { font-size: 1rem; font-weight: 700; }
p, li { color: var(--body); }
.prose > * + * { margin-top: .85em; }
.prose { max-width: var(--max-text); }
.prose ul, .prose ol, .list { padding-left: 1.25em; }
.prose li + li, .list li + li { margin-top: .35em; }
.prose ul li::marker, .list li::marker { color: var(--bullet); }
.prose ol li::marker { color: var(--num); font-weight: 600; }
.sub { font-size: clamp(1.0625rem, 1.6vw, 1.1875rem); color: var(--sub); max-width: 60ch; margin-top: 1rem; }

/* breadcrumb › title › subtitle */
.crumbs, .section-label {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0 .45em;
  font-size: .875rem; font-weight: 500; line-height: 1.4; color: var(--label); margin-bottom: .75rem;
}
.crumbs { margin-bottom: 1.25rem; }
.crumbs a { color: var(--label); text-decoration: none; }
.crumbs a:hover { color: var(--moss); }
.crumb-sep { color: var(--bullet); }
.crumb-current { color: var(--body); font-weight: 600; }

.label { font-size: .8125rem; font-weight: 600; line-height: 1.3; letter-spacing: .06em; text-transform: uppercase; color: var(--label); }
.step-num { font-size: .8125rem; font-weight: 600; letter-spacing: .06em; font-variant-numeric: tabular-nums; color: var(--num); }
.chip {
  display: inline-flex; align-items: center; gap: 7px; width: fit-content;
  font-size: .8125rem; font-weight: 600; line-height: 1.25;
  color: var(--chip-ink); background: var(--chip); border-radius: 999px; padding: 5px 12px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.key {
  background: var(--chip); color: var(--chip-ink); border-radius: var(--radius);
  padding: var(--card-pad); font-size: 1.1875rem; font-weight: 600; line-height: 1.4; max-width: 52ch;
}

/* ── Layout ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--pad-x); }
.section { padding: var(--pad-section) 0 0; }
.section:last-of-type { padding-bottom: var(--pad-section); }
.section-head { margin-bottom: var(--head-gap); }
.section-head p { margin-top: .75rem; color: var(--sub); max-width: 64ch; }
.grid-2, .grid-3 { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--card-pad); }
.card > * + * { margin-top: .6rem; }
.card h3 + p { margin-top: .4rem; }
.card.moss { background: var(--moss); border-color: var(--moss); }
.card.moss h2, .card.moss h3, .card.moss strong { color: var(--white); }
.card.moss p, .card.moss li { color: var(--on-dark-body); }
.card.moss .step-num, .card.moss .label { color: var(--chip); }

/* sequential steps with a drawn arrow in the gap */
.steps { display: flex; align-items: stretch; }
.steps > .card { flex: 1 1 0; min-width: 0; }
.step-arrow { display: flex; align-items: center; justify-content: center; width: var(--step-gap); flex-shrink: 0; color: var(--bullet); }
.step-arrow path { stroke-width: 1.67; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 760px) {
  .steps { flex-direction: column; }
  .step-arrow { width: auto; height: 40px; transform: rotate(90deg); }
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font-family: var(--sans); font-size: .9375rem; font-weight: 600; line-height: 1.2;
  padding: 12px 20px; border-radius: var(--radius); border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--moss); color: var(--white); border-color: var(--moss); }
.btn-primary:hover { background: var(--cover); border-color: var(--cover); }
.btn-ghost { background: var(--card); color: var(--title); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--bullet); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.75rem; }

/* ── Header ── */
.site-header { border-bottom: 1px solid var(--line); background: var(--page); }
.header-inner { display: flex; align-items: center; gap: 12px 24px; min-height: 68px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--title); font-weight: 700; font-size: 1.0625rem; letter-spacing: -.01em; }
.brand img { width: 34px; height: 34px; border-radius: 7px; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 2px; list-style: none; }
.site-nav a { display: block; padding: 8px 12px; border-radius: 6px; font-size: .9375rem; font-weight: 500; color: var(--body); text-decoration: none; }
.site-nav a:hover { background: var(--card); color: var(--title); }
.site-nav a[aria-current="page"] { color: var(--moss); font-weight: 600; }
@media (max-width: 640px) {
  .site-nav { margin-left: -12px; width: 100%; }
  .site-nav a { padding: 6px 12px; }
}

/* ── Page hero ── */
.hero { padding: clamp(40px, 6vw, 72px) 0 0; }
.hero .chips { margin-top: 1.25rem; }
.doc-meta { margin-top: 1rem; font-size: .875rem; color: var(--label); }

/* ── Tables ── */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
caption { text-align: left; padding: 14px 16px 0; font-weight: 600; color: var(--title); }
th, td { text-align: left; vertical-align: top; padding: 12px 16px; border-top: 1px solid var(--line); }
thead th { border-top: 0; font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--label); }
tbody th { font-weight: 600; color: var(--title); }
td .step-num, th .step-num { margin-right: 6px; }

/* ── Figures ── */
figure { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
figure img { width: 100%; border-bottom: 1px solid var(--line); }
figcaption { padding: 12px 16px; font-size: .875rem; color: var(--sub); }
figcaption .chip { margin-right: 8px; }
.figure-wide { margin-top: var(--gap); }

/* ── Definition rows ── */
.facts { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.facts dt, .facts dd { padding: 14px 18px; border-top: 1px solid var(--line); }
.facts dt { font-weight: 600; color: var(--title); }
.facts dt:first-of-type, .facts dt:first-of-type + dd { border-top: 0; }
@media (max-width: 640px) {
  .facts { grid-template-columns: 1fr; }
  .facts dd { border-top: 0; padding-top: 0; }
}

/* ── Guide: table of contents and tasks ── */
.toc { columns: 2; column-gap: 32px; list-style: none; }
.toc li { break-inside: avoid; padding: 4px 0; }
@media (max-width: 640px) { .toc { columns: 1; } }
.task { margin-top: var(--gap); }
.task ol { padding-left: 1.4em; }
.task ol li + li { margin-top: .35em; }
.task ol li::marker { color: var(--num); font-weight: 600; }
.role-tag { margin-left: 4px; vertical-align: 2px; }

/* ── Architecture diagram ── */
.diagram { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(12px, 2vw, 24px); }
.diagram svg { width: 100%; height: auto; }
.diagram-note { margin-top: 10px; font-size: .875rem; color: var(--sub); }
.scroll-hint { display: none; }
@media (max-width: 760px) {
  /* keep the diagram legible on phones: scroll it sideways inside its card */
  .diagram { overflow-x: auto; }
  .diagram svg { width: 760px; max-width: none; }
  .scroll-hint { display: inline; }
}

/* ── Footer ── */
.site-footer { background: var(--cover); color: var(--on-dark-body); padding: clamp(40px, 5vw, 56px) 0 32px; margin-top: var(--pad-section); }
.site-footer a { color: var(--white); text-decoration-color: rgba(255,255,255,.4); }
.footer-top { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; }
.footer-brand { display: flex; align-items: center; gap: 12px; color: var(--white); font-weight: 700; }
.footer-brand img { width: 32px; height: 32px; border-radius: 7px; }
.footer-brand span { display: block; font-weight: 400; color: var(--on-dark-body); font-size: .9375rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; font-size: .9375rem; align-items: center; }
.footer-legal { margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); font-size: .8125rem; color: var(--icon); }
.footer-legal p { color: var(--icon); }
.footer-legal p + p { margin-top: 4px; }

.print-only { display: none; }

/* ═════════════ Print / PDF ═════════════ */
@page {
  size: letter;
  margin: 15mm 14mm 16mm;
  @bottom-left { content: "tridentforprocurement.woodsidesolutions.com"; font-family: 'Public Sans', sans-serif; font-size: 7.5pt; color: #817C7A; }
  @bottom-right { content: "Page " counter(page) " of " counter(pages); font-family: 'Public Sans', sans-serif; font-size: 7.5pt; color: #817C7A; }
}
@media print {
  :root { --pad-x: 0px; --pad-section: 12px; --head-gap: 6px; --card-pad: 10px; --gap: 8px; --step-gap: 22px; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  html, body { background: var(--white); }
  body { font-size: 9pt; line-height: 1.4; }
  .site-header, .site-nav, .skip-link, .actions, .no-print, .crumbs, .section-head .section-label { display: none !important; }
  .print-only { display: block; }
  .container { max-width: none; padding: 0 1px; }
  h1 { font-size: 20pt; max-width: none; }
  h2 { font-size: 12.5pt; break-after: avoid; }
  .section-head { break-after: avoid; }
  h3 { font-size: 10.5pt; break-after: avoid; }
  h4 { font-size: 9.5pt; }
  .sub { font-size: 10pt; margin-top: 6px; max-width: none; }
  .hero { padding-top: 0; }
  .hero .chips { margin-top: 8px; }
  .chip { font-size: 7.5pt; padding: 2px 8px; }
  .label, .step-num, thead th { font-size: 7pt; }
  .section-head p { margin-top: 4px; max-width: none; }
  .prose { max-width: none; }
  .key { font-size: 10pt; padding: 8px 12px; max-width: none; }
  .card, figure, tr, .facts dt, .facts dd, .task, .keep { break-inside: avoid; }
  table { font-size: 8.25pt; line-height: 1.35; }
  th, td { padding: 4px 8px; }
  .table-wrap { overflow: visible; }
  .facts dt, .facts dd { padding: 4px 10px; }
  .steps { flex-direction: row; }
  .step-arrow { width: var(--step-gap); height: auto; transform: none; }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: 8rem minmax(0, 1fr); }
  .facts dd { border-top: 1px solid var(--line); padding-top: 6px; }
  .toc { columns: 2; }
  figure img { max-height: 76mm; object-fit: contain; object-position: top left; background: var(--white); }
  figcaption { padding: 5px 10px; font-size: 7.5pt; }
  .print-break { break-before: page; }
  .site-footer { margin-top: 12px; padding: 6px 0 0; background: none; color: var(--label); border-top: 1px solid var(--line); break-inside: avoid; }
  .site-footer a { color: var(--body); text-decoration: none; }
  .footer-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .footer-brand, .footer-brand span { color: var(--title); font-size: 8pt; }
  .footer-brand span { display: inline; color: var(--sub); margin-left: 4px; }
  .footer-brand img { width: 18px; height: 18px; border-radius: 4px; }
  .footer-links { font-size: 7.5pt; gap: 2px 14px; }
  .footer-legal { margin-top: 4px; padding-top: 0; border: 0; font-size: 6.5pt; line-height: 1.35; }
  .footer-legal p + p { margin-top: 0; }
  .footer-legal p { color: var(--label); }
  .print-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 8px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
  .print-head .brand { font-size: 10pt; }
  .print-head .brand img { width: 22px; height: 22px; border-radius: 5px; }
  .print-head .print-url { font-size: 8pt; color: var(--label); }
}
