/* ==========================================================================
   Vocational.uk — "Blueprint"
   The whole site is drawn as a technical drawing: every trade works from one.
   Paper sheets, blueprint sheets, dimension lines, title blocks, annotations.
   ========================================================================== */

:root {
  /* Drafting paper */
  --paper:        #f6f3ec;
  --paper-2:      #ede8dc;
  --paper-3:      #e2dccd;
  --sheet:        #fffdf8;

  /* Blueprint */
  --bp:           #0c2a4d;
  --bp-2:         #0f3561;
  --bp-3:         #164478;
  --bp-line:      rgba(172, 214, 244, .16);
  --bp-line-2:    rgba(172, 214, 244, .07);
  --draft:        #cfe7f7;     /* white-cyan drafting ink on blueprint */
  --cyan:         #7cc4ec;

  /* Ink */
  --ink:          #111e31;
  --body:         #34425a;
  --muted:        #66738a;
  --rule:         #d6d0c1;
  --rule-2:       #c4bdab;

  /* Signals */
  --amber:        #ffb703;     /* hi-vis */
  --amber-600:    #e39700;
  --amber-100:    #fff1cc;
  --red:          #d2462f;     /* redline — corrections and highlights */
  --red-100:      #fbe5e0;
  --green:        #127a56;
  --green-100:    #dff2ea;

  --radius:       6px;
  --radius-lg:    10px;
  --shadow:       0 1px 0 rgba(17,30,49,.04), 0 6px 18px rgba(17,30,49,.06);
  --shadow-lift:  0 2px 0 rgba(17,30,49,.05), 0 18px 36px rgba(17,30,49,.13);

  --sans:    'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --display: 'Barlow Condensed', 'Inter', system-ui, sans-serif;
  --mono:    'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --wrap:    1200px;

  /* Grid textures, reused everywhere */
  --paper-grid:
    linear-gradient(rgba(17,30,49,.045) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(17,30,49,.045) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(rgba(17,30,49,.07) 1px, transparent 1px) 0 0 / 120px 120px,
    linear-gradient(90deg, rgba(17,30,49,.07) 1px, transparent 1px) 0 0 / 120px 120px;
  --bp-grid:
    linear-gradient(var(--bp-line-2) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--bp-line-2) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(var(--bp-line) 1px, transparent 1px) 0 0 / 120px 120px,
    linear-gradient(90deg, var(--bp-line) 1px, transparent 1px) 0 0 / 120px 120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  color: var(--body);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
img { height: auto; }

a { color: var(--bp-3); text-decoration-color: rgba(22,68,120,.35); text-underline-offset: 3px; }
a:hover { color: var(--red); text-decoration-color: currentColor; }

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--ink);
  line-height: 1.08;
  margin: 0 0 .5em;
  font-weight: 700;
  letter-spacing: .005em;
}
h1 { font-size: clamp(2.5rem, 5.4vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.32rem; }
p  { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 22px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--amber); color: var(--ink); padding: .7rem 1.1rem; font-weight: 600; }
.skip:focus { left: 0; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 3px; }

/* ---------- Technical type ------------------------------------------- */

/* Monospace drawing annotation — used for labels, sheet numbers, measurements */
.mono, .eyebrow, .sheet-no, .tag, .card-facts dt, .fact-panel dt, .field label,
.region-count, .dim-label, .annot, .tb-label, .route-pay, .step-num {
  font-family: var(--mono);
  letter-spacing: .02em;
}

.eyebrow {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--amber-600);
  margin-bottom: .9rem;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; }
.eyebrow a { color: inherit; text-decoration: none; }

/* "SHEET 02 / HOW IT WORKS" — every section is a numbered drawing sheet */
.sheet-no {
  display: flex;
  align-items: center;
  gap: .8rem;
  font-size: .74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
  margin-bottom: 1rem;
}
.sheet-no b { color: var(--red); font-weight: 700; }
.sheet-no::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--rule); }
.blueprint .sheet-no { color: var(--cyan); }
.blueprint .sheet-no::after { background: var(--bp-line); }

/* ---------- Dimension line: |<—— 3.5 years ——>| ----------------------- */

.dim {
  position: relative;
  display: flex;
  align-items: center;
  gap: .7rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.dim::before, .dim::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background:
    linear-gradient(currentColor, currentColor) left center / 100% 1px no-repeat;
}
.dim .dim-label { flex: 0 0 auto; }
.dim-cap { width: 1px; height: 12px; background: currentColor; flex: 0 0 auto; }

/* ---------- Header ---------------------------------------------------- */

.site-header {
  background: var(--bp);
  background-image: var(--bp-grid);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 2px solid var(--amber);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 70px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
}
.brand:hover { color: #fff; }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 1.5px solid var(--amber);
  border-radius: 4px;
  color: var(--amber);
  position: relative;
}
/* registration ticks on the brand mark */
.brand-mark::before, .brand-mark::after {
  content: ""; position: absolute; width: 6px; height: 6px; border-color: var(--cyan); border-style: solid;
}
.brand-mark::before { top: -4px; left: -4px; border-width: 1.5px 0 0 1.5px; }
.brand-mark::after  { bottom: -4px; right: -4px; border-width: 0 1.5px 1.5px 0; }
.brand-text { font-family: var(--display); font-size: 1.62rem; font-weight: 700; letter-spacing: .01em; line-height: 1; }
.brand-dot { color: var(--amber); }
.brand-sub { display: block; font-family: var(--mono); font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); margin-top: .28rem; font-weight: 500; }

.nav { display: flex; align-items: center; gap: 1.4rem; margin-left: auto; }
.nav > a {
  color: rgba(255,255,255,.86);
  text-decoration: none;
  font-weight: 500;
  font-size: .95rem;
  padding: .35rem 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav > a:hover, .nav > a[aria-current="page"] { color: #fff; border-bottom-color: var(--amber); }
.nav > a.nav-cta {
  border: 1.5px solid var(--amber);
  color: var(--amber);
  padding: .42rem .85rem;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 600;
}
.nav > a.nav-cta:hover { background: var(--amber); color: var(--ink); }

.nav-search { display: flex; position: relative; }
.nav-search input {
  width: 170px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--bp-line);
  color: #fff;
  border-radius: var(--radius);
  padding: .48rem 2.3rem .48rem .8rem;
  font: inherit;
  font-size: .88rem;
}
.nav-search input::placeholder { color: rgba(207,231,247,.55); }
.nav-search input:focus { background: rgba(255,255,255,.12); outline-offset: 0; }
.nav-search button {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: var(--amber); cursor: pointer; padding: .35rem .5rem; display: inline-flex;
}

.nav-toggle {
  display: none; margin-left: auto;
  background: transparent; border: 1.5px solid var(--bp-line);
  border-radius: var(--radius); width: 44px; height: 40px; cursor: pointer; padding: 0 11px;
  flex-direction: column; justify-content: center; gap: 4px;
}
.nav-toggle span { display: block; height: 2px; background: #fff; border-radius: 2px; transition: .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Buttons --------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--sans); font-weight: 600; font-size: .96rem; line-height: 1.2;
  padding: .82rem 1.35rem; border-radius: var(--radius);
  border: 1.5px solid transparent; text-decoration: none; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, color .12s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.btn-accent { background: var(--amber); color: var(--ink); border-color: var(--amber); box-shadow: 0 2px 0 var(--amber-600); }
.btn-accent:hover { background: #ffc233; color: var(--ink); box-shadow: 0 4px 0 var(--amber-600); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule-2); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); background: var(--sheet); }
.btn-plain { background: transparent; color: var(--muted); padding-inline: .6rem; }
.btn-plain:hover { color: var(--ink); }
.btn-block { display: flex; width: 100%; }
.btn-block + .btn-block { margin-top: .6rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .7rem; }
.blueprint .btn-ghost { color: #fff; border-color: var(--bp-line); }
.blueprint .btn-ghost:hover { background: rgba(255,255,255,.08); border-color: var(--draft); color: #fff; }

/* ---------- Sections: paper sheets and blueprint sheets --------------- */

.band { padding: clamp(3rem, 5vw, 4.6rem) 0; position: relative; }
.band-tint { background: var(--paper-2); }
.band-paper { background: var(--paper); background-image: var(--paper-grid); }

.blueprint, .band-dark {
  background: var(--bp);
  background-image: var(--bp-grid);
  color: rgba(207,231,247,.84);
}
.blueprint h1, .blueprint h2, .blueprint h3,
.band-dark h1, .band-dark h2, .band-dark h3 { color: #fff; }
.blueprint a:not(.btn) { color: var(--draft); }
.blueprint a:not(.btn):hover { color: var(--amber); }
.band-pad { padding: clamp(2rem, 4vw, 3.2rem) 0 clamp(2.8rem, 5vw, 4rem); }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1.5rem; margin-bottom: 2rem; flex-wrap: wrap;
}
.section-title { margin-bottom: .25em; }
.section-sub { color: var(--muted); margin: 0; max-width: 62ch; }
.blueprint .section-sub { color: rgba(207,231,247,.72); }
.group-title { margin: 2.6rem 0 1.2rem; font-size: 1.5rem; }
.group-title:first-child { margin-top: 0; }

/* ---------- Hero ------------------------------------------------------ */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 7vw, 5.2rem) 0 clamp(3rem, 6vw, 4.4rem);
  border-bottom: 1px solid var(--bp-line);
}
.hero::after {
  /* the hi-vis rule along the foot of the sheet */
  content: ""; position: absolute; inset: auto 0 0 0; height: 5px;
  background: repeating-linear-gradient(135deg, var(--amber) 0 18px, var(--bp) 18px 36px);
}
.hero-inner { display: grid; gap: 2.8rem; align-items: center; position: relative; z-index: 1; }
.hero-copy { max-width: 640px; }
.hero h1 { color: #fff; margin-bottom: .3em; }
.hero h1 em { font-style: normal; color: var(--amber); position: relative; white-space: nowrap; }
/* redline underline under the key phrase */
.hero h1 em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: .12em;
  background: var(--red); transform: skewX(-12deg); opacity: .9;
}
.hero .lede { color: rgba(207,231,247,.86); font-size: 1.16rem; max-width: 58ch; }

.hero-search {
  display: flex; gap: .5rem; margin: 1.8rem 0 1rem; max-width: 600px;
  padding: .45rem; background: rgba(255,255,255,.06);
  border: 1px solid var(--bp-line); border-radius: calc(var(--radius) + 4px);
}
.hero-search input {
  flex: 1 1 auto; min-width: 0; font: inherit; font-size: 1.02rem;
  padding: .85rem 1rem; border-radius: var(--radius); border: 0;
  background: var(--sheet); color: var(--ink);
}
.hero-search input::placeholder { color: #8b93a3; }
.hero-search button {
  font-family: var(--sans); font-weight: 700; font-size: 1rem;
  padding: .85rem 1.5rem; border: 0; border-radius: var(--radius);
  background: var(--amber); color: var(--ink); cursor: pointer;
}
.hero-search button:hover { background: #ffc233; }
.search-page-form { background: var(--paper-2); border-color: var(--rule); }
.search-page-form input { border: 1px solid var(--rule-2); }

.hero-suggest { font-size: .9rem; color: rgba(207,231,247,.66); display: flex; flex-wrap: wrap; gap: .45rem .6rem; align-items: center; }
.hero-suggest a {
  color: #fff; text-decoration: none;
  border: 1px solid var(--bp-line);
  padding: .28rem .75rem; border-radius: 999px; font-size: .86rem;
  display: inline-flex; align-items: center; gap: .4rem;
}
.hero-suggest a svg { width: 15px; height: 15px; color: var(--amber); }
.hero-suggest a:hover { border-color: var(--amber); background: rgba(255,183,3,.12); color: #fff; }

/* The hero drawing */
.hero-art { position: relative; }
.hero-art svg { width: 100%; height: auto; }

.hero-stats {
  list-style: none; margin: 2.6rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--bp-line);
}
.hero-stats li {
  padding: 1rem 1.1rem;
  border-right: 1px solid var(--bp-line);
  display: flex; flex-direction: column; gap: .2rem;
}
.hero-stats li:last-child { border-right: 0; }
.hero-stats strong { font-family: var(--display); font-size: 2.1rem; color: var(--amber); line-height: 1; }
.hero-stats span { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--draft); }

/* ---------- Title block (card corner like an engineering drawing) ------ */

.title-block {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1.5px solid var(--ink);
  background: var(--sheet);
  font-size: .86rem;
}
.title-block > div { padding: .55rem .7rem; border-right: 1px solid var(--rule-2); min-width: 0; }
.title-block > div:last-child { border-right: 0; }
.tb-label { display: block; font-size: .64rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: .15rem; }
.tb-value { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

/* ---------- Registration marks — the little corner ticks on drawings --- */

.reg { position: relative; }
.reg::before, .reg::after {
  content: ""; position: absolute; width: 10px; height: 10px;
  border-color: var(--rule-2); border-style: solid; pointer-events: none;
  transition: border-color .15s ease;
}
.reg::before { top: 6px; left: 6px; border-width: 1.5px 0 0 1.5px; }
.reg::after  { bottom: 6px; right: 6px; border-width: 0 1.5px 1.5px 0; }
.reg:hover::before, .reg:hover::after { border-color: var(--red); }

/* ---------- Steps ----------------------------------------------------- */

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1.5px solid var(--ink); background: var(--sheet); }
.steps li { padding: 1.7rem 1.6rem 1.8rem; border-right: 1px solid var(--rule-2); position: relative; }
.steps li:last-child { border-right: 0; }
.step-icon { width: 54px; height: 54px; color: var(--bp-3); margin-bottom: 1rem; }
.step-num {
  position: absolute; top: 1.1rem; right: 1.2rem;
  font-size: .72rem; font-weight: 700; color: var(--red);
  border: 1.5px solid var(--red); border-radius: 50%;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
}
.steps h3 { margin-bottom: .35em; }
.steps p { color: var(--muted); font-size: .96rem; margin: 0; }

/* ---------- Grids & cards --------------------------------------------- */

.grid { display: grid; gap: 1.1rem; }
.grid-cards   { grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }
.grid-guides  { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid-sectors { grid-template-columns: repeat(auto-fill, minmax(262px, 1fr)); }
.grid-tight   { gap: 1rem; }

.card {
  display: flex; flex-direction: column;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.3rem 1.3rem 1.1rem;
  text-decoration: none; color: inherit;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
  height: 100%;
  position: relative;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--ink); color: inherit; }
.card h3 { margin: .15rem 0 .45rem; font-size: 1.28rem; }
.card p { color: var(--muted); font-size: .93rem; margin: 0 0 1rem; }

.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; margin-bottom: .7rem; }
.card-icon {
  flex: 0 0 auto;
  width: 46px; height: 46px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--bp-3);
  background: var(--paper);
  background-image: var(--paper-grid);
  transition: background .14s ease, color .14s ease;
}
.card-icon svg { width: 26px; height: 26px; }
.card:hover .card-icon { background: var(--amber); color: var(--ink); }

.tag {
  display: inline-block;
  font-size: .66rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  padding: .25rem .5rem; border-radius: 3px;
  align-self: flex-start;
}
.tag-sector { background: var(--paper-2); color: var(--bp-3); border: 1px solid var(--rule); }
.tag-kind   { background: var(--amber-100); color: #7a5300; border: 1px solid #f1d58c; }
.tag-cat    { background: var(--green-100); color: var(--green); border: 1px solid #b8dfcf; }
.tag-rare   { background: var(--red-100); color: var(--red); border: 1px solid #f1bfb5; }

.card-facts {
  display: grid; grid-template-columns: 1.25fr .75fr 1fr; align-items: start;
  gap: 0; margin: auto 0 1rem; border: 1px solid var(--rule);
}
.card-facts div { min-width: 0; padding: .45rem .55rem; border-right: 1px solid var(--rule); }
.card-facts div:last-child { border-right: 0; }
.card-facts dt { font-size: .6rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin-bottom: .15rem; white-space: nowrap; }
.card-facts dd { margin: 0; font-size: .86rem; font-weight: 600; color: var(--ink); line-height: 1.2; white-space: nowrap; }

.card-cta {
  font-family: var(--mono); font-size: .76rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--red); margin-top: auto; display: inline-flex; align-items: center; gap: .4rem;
}
.card-cta span { transition: transform .15s ease; display: inline-block; }
.card:hover .card-cta span { transform: translateX(4px); }

.provider-where { display: flex; align-items: center; gap: .35rem; font-size: .86rem !important; color: var(--bp-3) !important; font-weight: 500; margin-bottom: .5rem !important; }
.provider-where svg { flex: 0 0 auto; color: var(--red); }
.guide-card h3 { font-size: 1.2rem; }

/* ---------- Sector tiles — each one a drawn plate --------------------- */

.sector-tile {
  display: flex; flex-direction: column;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  text-decoration: none; color: inherit; overflow: hidden;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.sector-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--ink); color: inherit; }
.sector-art {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bp); background-image: var(--bp-grid);
  color: var(--draft);
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1.5px solid var(--ink);
  overflow: hidden;
}
.sector-art svg { width: 78%; height: 78%; }
.sector-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sector-art .sector-art-label {
  position: absolute; left: .6rem; bottom: .5rem; z-index: 2;
  font-family: var(--mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--amber); background: rgba(12,42,77,.82); padding: .15rem .4rem; border-radius: 2px;
}
.sector-body { padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; flex: 1 1 auto; }
.sector-tile h3 { font-size: 1.22rem; margin-bottom: .3rem; }
.sector-tile p { color: var(--muted); font-size: .9rem; margin: 0 0 .9rem; }
.sector-count { margin-top: auto; font-family: var(--mono); font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--red); }

.sector-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: var(--radius);
  background: var(--bp); color: var(--amber); margin-bottom: .85rem;
}
.sector-icon-lg { width: 64px; height: 64px; margin-bottom: 1rem; }
.sector-icon-lg svg { width: 34px; height: 34px; }
.sector-blurb { margin-top: 1.2rem; max-width: 72ch; }

/* ---------- Photo frames (drawn like a mounted plate) ------------------ */

.plate {
  position: relative; margin: 0;
  border: 1.5px solid var(--ink); background: var(--sheet);
  padding: .5rem;
}
.plate img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.plate figcaption {
  display: flex; justify-content: space-between; gap: 1rem;
  font-family: var(--mono); font-size: .66rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); padding: .5rem .15rem .1rem;
}
.plate figcaption a { color: var(--muted); }

/* ---------- Money band ------------------------------------------------ */

.money-band { display: grid; grid-template-columns: 1.15fr .85fr; gap: 2.8rem; align-items: center; }
.money-band p { color: rgba(207,231,247,.8); max-width: 58ch; }
.money-band strong { color: #fff; }
.money-band .btn { margin-top: .6rem; }
.wage-table { list-style: none; margin: 0; padding: 0; border: 1.5px solid var(--draft); }
.wage-table li {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .9rem 1.1rem; border-bottom: 1px solid var(--bp-line); font-size: .95rem;
}
.wage-table li:last-child { border-bottom: 0; }
.wage-table strong { font-family: var(--display); font-size: 1.4rem; color: var(--amber); white-space: nowrap; }

/* ---------- Page heads, breadcrumbs ----------------------------------- */

.breadcrumb { background: var(--paper-2); border-bottom: 1px solid var(--rule); font-family: var(--mono); font-size: .76rem; letter-spacing: .02em; }
.breadcrumb ol { list-style: none; margin: 0 auto; padding: .65rem 22px; max-width: var(--wrap); display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.breadcrumb li + li::before { content: "/"; color: var(--rule-2); margin-right: .45rem; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb span { color: var(--ink); font-weight: 600; }

.page-head { padding: clamp(2.4rem, 4vw, 3.6rem) 0 1.8rem; background: var(--paper); background-image: var(--paper-grid); border-bottom: 1px solid var(--rule); }
.page-head .lede { font-size: 1.12rem; color: var(--muted); max-width: 66ch; margin-bottom: 0; }
.narrow-center { max-width: 640px; text-align: center; }
.narrow-center .btn-row { justify-content: center; margin-top: 1.6rem; }
.page-head .tag { margin-bottom: .9rem; }

/* ---------- Trade / provider detail ----------------------------------- */

.trade-hero { padding: clamp(2.4rem, 5vw, 3.6rem) 0; border-bottom: 1px solid var(--bp-line); }
.trade-hero h1 { color: #fff; }
.trade-hero .lede { color: rgba(207,231,247,.86); font-size: 1.1rem; max-width: 58ch; }
.trade-hero-inner { display: grid; grid-template-columns: 1.35fr .65fr; gap: 2.6rem; align-items: start; }
.trade-hero-title { display: flex; align-items: center; gap: 1.1rem; margin-bottom: .5rem; }
.trade-hero-icon {
  flex: 0 0 auto; width: 68px; height: 68px;
  border: 1.5px solid var(--amber); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; color: var(--amber);
}
.trade-hero-icon svg { width: 38px; height: 38px; }
.trade-hero-title h1 { margin: 0; }

.badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.4rem; }
.badge {
  font-family: var(--mono); font-size: .72rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  padding: .32rem .7rem; border-radius: 3px;
  border: 1px solid var(--bp-line); color: var(--draft);
}
.badge-high   { border-color: var(--amber); color: var(--amber); background: rgba(255,183,3,.1); }
.badge-strong { border-color: rgba(255,183,3,.5); color: #ffd98a; }
.badge-rare   { border-color: var(--red); color: #ff9c8a; background: rgba(210,70,47,.14); }

.fact-panel {
  border: 1.5px solid var(--draft);
  margin: 0; display: grid; gap: 0;
}
.fact-panel > div { display: grid; gap: .15rem; padding: .85rem 1.1rem; border-bottom: 1px solid var(--bp-line); }
.fact-panel > div:last-child { border-bottom: 0; }
.fact-panel dt { font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; color: var(--cyan); font-weight: 600; }
.fact-panel dd { margin: 0; color: #fff; font-weight: 600; font-size: 1rem; }
.fact-panel dd.big { font-family: var(--display); font-size: 1.9rem; color: var(--amber); font-weight: 700; }
.fact-panel-links { display: block; padding: 1.2rem; }
.fact-panel-links .phone { margin: .9rem 0 0; font-size: .95rem; color: var(--draft); }
.fact-panel-links .muted { color: rgba(207,231,247,.6); margin-top: .9rem; }
.fact-panel-links .btn-ghost { color: #fff; border-color: var(--bp-line); background: rgba(255,255,255,.05); }
.fact-panel-links .btn-ghost:hover { color: var(--ink); background: #fff; border-color: #fff; }

.trade-body {
  display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 3rem;
  padding-top: clamp(2.2rem, 4vw, 3.2rem); padding-bottom: clamp(3rem, 6vw, 4.5rem); align-items: start;
}
.trade-main { min-width: 0; }
.trade-main > h2 { margin-top: 2.6rem; }
.trade-main > h2:first-child { margin-top: 0; }

.prose p, .prose li { color: var(--body); }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.7rem; font-size: 1.18rem; }
.prose-list { padding-left: 1.2rem; margin: 0 0 1.2rem; }
.prose-list li { margin-bottom: .5rem; }
.article-prose { font-size: 1.04rem; max-width: 72ch; }
.updated { margin-top: 2.4rem; font-family: var(--mono); font-size: .76rem; color: var(--muted); letter-spacing: .04em; }

ul.ticks, ul.arrows, ul.numbered { list-style: none; margin: 0 0 1.4rem; padding: 0; }
ul.ticks li, ul.arrows li, ul.numbered li { position: relative; padding-left: 2rem; margin-bottom: .7rem; color: var(--body); }
ul.ticks li::before {
  content: ""; position: absolute; left: 2px; top: .42em;
  width: 13px; height: 7px; border-left: 2.5px solid var(--green); border-bottom: 2.5px solid var(--green); transform: rotate(-45deg);
}
ul.arrows li::before { content: "→"; position: absolute; left: 0; top: 0; color: var(--red); font-weight: 700; font-family: var(--mono); }
ul.numbered { counter-reset: n; }
ul.numbered li::before {
  counter-increment: n; content: counter(n);
  position: absolute; left: 0; top: .1em; width: 22px; height: 22px;
  border: 1.5px solid var(--ink); border-radius: 50%;
  font-family: var(--mono); font-size: .7rem; font-weight: 700; color: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.small-ticks li { font-size: .92rem; margin-bottom: .55rem; }

/* ---------- THE ROUTE — the signature drawing on every trade page ------ */

.route {
  margin: 1.6rem 0 2.4rem;
  border: 1.5px solid var(--ink);
  background: var(--bp); background-image: var(--bp-grid);
  color: var(--draft);
  padding: 1.6rem 1.4rem 1.3rem;
  position: relative;
}
.route-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.route-head h2 { color: #fff; margin: 0; font-size: 1.6rem; }
.route-head .mono { font-size: .7rem; color: var(--cyan); letter-spacing: .12em; text-transform: uppercase; }
.route-track {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, 1fr);
  position: relative;
}
/* the drawn line running through every stop */
.route-track::before {
  content: ""; position: absolute; left: 10%; right: 10%; top: 22px; height: 0;
  border-top: 2px dashed var(--cyan);
}
.route-stop { position: relative; text-align: center; padding: 0 .4rem; }
.route-node {
  width: 44px; height: 44px; margin: 0 auto .8rem;
  border-radius: 50%; border: 2px solid var(--draft);
  background: var(--bp);
  display: flex; align-items: center; justify-content: center;
  color: var(--draft); position: relative; z-index: 1;
}
.route-node svg { width: 22px; height: 22px; }
.route-stop.is-now .route-node { border-color: var(--amber); color: var(--amber); }
.route-stop.is-goal .route-node { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.route-when { display: block; font-family: var(--mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); margin-bottom: .25rem; }
.route-what { display: block; color: #fff; font-weight: 600; font-size: .92rem; line-height: 1.25; margin-bottom: .35rem; }
.route-pay { display: inline-block; font-size: .78rem; font-weight: 600; color: var(--amber); border: 1px solid rgba(255,183,3,.4); padding: .1rem .4rem; border-radius: 2px; }
.route-foot { margin-top: 1.3rem; padding-top: .9rem; border-top: 1px solid var(--bp-line); font-family: var(--mono); font-size: .7rem; color: rgba(207,231,247,.62); letter-spacing: .03em; }

.providers-block { margin-top: 2.8rem; padding-top: 2rem; border-top: 1.5px solid var(--ink); }
.provider-list { list-style: none; margin: 1.2rem 0 0; padding: 0; border-top: 1px solid var(--rule); }
.provider-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .95rem .4rem; border-bottom: 1px solid var(--rule); text-decoration: none; color: inherit; }
.provider-row:hover { background: var(--sheet); color: inherit; }
.provider-row-main { display: grid; gap: .1rem; min-width: 0; }
.provider-row strong { color: var(--ink); font-weight: 600; font-size: 1.02rem; }
.provider-row-meta { font-size: .84rem; color: var(--muted); }
.provider-row-go { color: var(--red); font-weight: 700; flex: 0 0 auto; }

/* ---------- Aside panels ---------------------------------------------- */

.trade-aside { display: grid; gap: 1.2rem; position: sticky; top: 90px; }
.panel { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.3rem 1.35rem; }
.panel h2 { font-size: 1.22rem; margin-bottom: .6rem; }
.panel p { font-size: .93rem; color: var(--body); }
.panel-accent { background: var(--amber-100); border-color: #f0d68f; }
.panel-blueprint { background: var(--bp); background-image: var(--bp-grid); border-color: var(--bp); color: var(--draft); }
.panel-blueprint h2 { color: #fff; }
.panel-blueprint p { color: rgba(207,231,247,.84); }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { border-bottom: 1px solid rgba(17,30,49,.08); }
.link-list li:last-child { border-bottom: 0; }
.link-list a { display: block; padding: .55rem 0; font-size: .94rem; font-weight: 500; text-decoration: none; color: var(--bp-3); }
.link-list a:hover { color: var(--red); }
.panel .btn-block:first-of-type { margin-top: .4rem; }

/* Verified stamp — powered by the monthly link check */
.verified {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--mono); font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--green); border: 1.5px solid var(--green); border-radius: 3px; padding: .35rem .6rem;
  transform: rotate(-1.5deg);
}
.verified svg { width: 16px; height: 16px; }
.blueprint .verified { color: #7fe0b8; border-color: #7fe0b8; }

/* ---------- Filters --------------------------------------------------- */

.layout-filters { padding-bottom: clamp(3rem, 6vw, 4.5rem); padding-top: 1.6rem; }
.filters { background: var(--sheet); border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 1.2rem 1.25rem; margin-bottom: 1.5rem; }
.filter-row { display: flex; flex-wrap: wrap; gap: .9rem; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: .32rem; min-width: 165px; }
.field-grow { flex: 1 1 260px; }
.field label { font-size: .68rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.field input, .field select, .field textarea {
  font: inherit; font-size: .95rem; padding: .64rem .8rem;
  border: 1px solid var(--rule-2); border-radius: var(--radius); background: #fff; color: var(--ink); width: 100%;
}
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5l5-5' fill='none' stroke='%2366738a' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .75rem center; background-size: 11px; padding-right: 2.1rem;
}
.field textarea { resize: vertical; min-height: 130px; }
.field-actions { flex-direction: row; gap: .4rem; align-items: center; min-width: auto; }
.optional { font-weight: 400; text-transform: none; letter-spacing: 0; color: #9aa3b3; }

.result-count { color: var(--muted); font-family: var(--mono); font-size: .8rem; letter-spacing: .03em; margin-bottom: 1.2rem; }
.result-count strong { color: var(--ink); }
.empty { text-align: center; padding: 3rem 1.5rem; background: var(--sheet); border: 1.5px dashed var(--rule-2); border-radius: var(--radius); }
.empty h2 { font-size: 1.4rem; }
.empty p { color: var(--muted); margin: 0; }

/* ---------- Forms ----------------------------------------------------- */

.form-stack { display: grid; gap: 1.1rem; max-width: 640px; }
.form-stack .field { min-width: 0; }
.form-stack .btn { justify-self: start; }
.field-row { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.field-row .field { flex: 1 1 200px; }
.hp { position: absolute; left: -9999px; }
.notice { border-radius: var(--radius); padding: 1.2rem 1.35rem; margin-bottom: 1.8rem; }
.notice-good { background: var(--green-100); border: 1px solid #b8dfcf; }
.notice-good h2 { font-size: 1.25rem; color: var(--green); }
.notice-good p { margin: 0; color: #1d5744; }

/* ---------- Region groups & pagination -------------------------------- */

.region-groups { margin-top: 1.4rem; border-top: 1px solid var(--rule); }
.region-group { border-bottom: 1px solid var(--rule); }
.region-group summary { display: flex; align-items: center; gap: .7rem; padding: .95rem .4rem; cursor: pointer; list-style: none; font-weight: 600; color: var(--ink); }
.region-group summary::-webkit-details-marker { display: none; }
.region-group summary::before {
  content: ""; flex: 0 0 auto; width: 8px; height: 8px; margin: 0 .3rem 0 .25rem;
  border-right: 2px solid var(--red); border-bottom: 2px solid var(--red);
  transform: rotate(-45deg); transition: transform .15s ease;
}
.region-group[open] summary::before { transform: rotate(45deg); }
.region-group summary:hover { background: var(--sheet); }
.region-name { flex: 1 1 auto; }
.region-count { flex: 0 0 auto; border: 1px solid var(--rule-2); color: var(--ink); font-size: .72rem; font-weight: 600; padding: .12rem .5rem; border-radius: 2px; }
.region-group .provider-list { margin: 0 0 .8rem; border-top: 0; padding-left: 1.55rem; }
.region-group .provider-row { padding: .7rem .4rem; }
.region-group .provider-list li:last-child .provider-row { border-bottom: 0; }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 2.4rem; padding-top: 1.6rem; border-top: 1px solid var(--rule); }
.page-link { font-weight: 600; font-size: .93rem; text-decoration: none; color: var(--ink); border: 1.5px solid var(--rule-2); border-radius: var(--radius); padding: .58rem 1rem; white-space: nowrap; }
.page-link:hover { border-color: var(--ink); background: var(--sheet); color: var(--ink); }
.page-link.is-disabled { color: #aab1be; border-color: var(--paper-3); pointer-events: none; }
.page-numbers { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.page-num { min-width: 38px; text-align: center; padding: .5rem .55rem; border-radius: var(--radius); text-decoration: none; font-family: var(--mono); font-size: .88rem; font-weight: 600; color: var(--muted); }
.page-num:hover { background: var(--sheet); color: var(--ink); }
.page-num.is-current { background: var(--ink); color: #fff; }
.page-gap { color: var(--rule-2); padding: 0 .2rem; }

/* ---------- Misc ------------------------------------------------------ */

.muted { color: var(--muted); }
.small { font-size: .88rem; }
.back-link { margin-top: 2.2rem; }
.back-link a { font-weight: 600; text-decoration: none; }

/* ---------- Footer ---------------------------------------------------- */

.site-footer { background: var(--bp); background-image: var(--bp-grid); color: rgba(207,231,247,.72); border-top: 2px solid var(--amber); }
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1.2fr 1fr; gap: 2.4rem; padding-top: 3.2rem; padding-bottom: 2.4rem; }
.footer-about p { font-size: .92rem; max-width: 40ch; margin-top: .9rem; }
.footer-brand { font-family: var(--display); font-size: 1.5rem; font-weight: 700; color: #fff; }
.site-footer h2 { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--amber); margin-bottom: .9rem; font-family: var(--mono); font-weight: 600; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .55rem; }
.site-footer a { color: rgba(207,231,247,.8); text-decoration: none; font-size: .92rem; }
.site-footer a:hover { color: var(--amber); text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid var(--bp-line); padding-top: 1.3rem; padding-bottom: 1.8rem;
  display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; align-items: center;
}
.footer-bottom p { font-size: .8rem; color: rgba(207,231,247,.5); margin: 0; }

/* The drawing title block, bottom-right of every sheet */
.footer-titleblock {
  display: grid; grid-template-columns: auto auto auto; border: 1px solid var(--bp-line);
  font-family: var(--mono); font-size: .64rem; letter-spacing: .06em; text-transform: uppercase;
}
.footer-titleblock > div { padding: .4rem .7rem; border-right: 1px solid var(--bp-line); color: rgba(207,231,247,.55); }
.footer-titleblock > div:last-child { border-right: 0; }
.footer-titleblock b { display: block; color: var(--draft); font-weight: 600; }

/* ==========================================================================
   USP features
   ========================================================================== */

/* ---------- Feature strip on the home page ---------------------------- */

.usp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1.5px solid var(--draft); }
.usp {
  padding: 1.5rem 1.4rem 1.6rem; border-right: 1px solid var(--bp-line);
  text-decoration: none; color: var(--draft); display: flex; flex-direction: column;
  transition: background .15s ease;
}
.usp:last-child { border-right: 0; }
.usp:hover { background: rgba(255,255,255,.05); color: var(--draft); }
.usp-icon { width: 46px; height: 46px; color: var(--amber); margin-bottom: 1rem; }
.usp h3 { color: #fff; font-size: 1.28rem; margin-bottom: .4rem; }
.usp p { font-size: .9rem; color: rgba(207,231,247,.74); margin: 0 0 1rem; }
.usp .card-cta { color: var(--amber); }
.usp:hover .card-cta span { transform: translateX(4px); }

/* ---------- Trade Finder ---------------------------------------------- */

.finder { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2.6rem; align-items: start; }
.finder-form { display: grid; gap: 1.4rem; }
.q {
  border: 1.5px solid var(--ink); background: var(--sheet); border-radius: var(--radius);
  padding: 1.25rem 1.3rem 1.3rem; margin: 0;
}
.q legend {
  font-family: var(--display); font-size: 1.3rem; font-weight: 700; color: var(--ink);
  padding: 0 .4rem; margin-left: -.4rem; display: flex; align-items: center; gap: .6rem;
}
.q legend .mono { font-size: .68rem; color: var(--red); letter-spacing: .1em; }
.q-hint { color: var(--muted); font-size: .9rem; margin: .1rem 0 .9rem; }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .6rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label {
  display: flex; align-items: center; gap: .65rem; cursor: pointer;
  border: 1.5px solid var(--rule-2); border-radius: var(--radius);
  padding: .7rem .8rem; background: #fff; font-weight: 500; color: var(--ink); font-size: .94rem;
  transition: border-color .12s ease, background .12s ease;
  height: 100%;
}
.choice label svg { width: 24px; height: 24px; flex: 0 0 auto; color: var(--bp-3); }
.choice label:hover { border-color: var(--ink); }
.choice input:checked + label { border-color: var(--ink); background: var(--amber-100); box-shadow: inset 0 0 0 1px var(--ink); }
.choice input:checked + label svg { color: var(--ink); }
.choice input:focus-visible + label { outline: 3px solid var(--amber); outline-offset: 2px; }

.finder-results { display: grid; gap: .9rem; }
.match {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem; align-items: center;
  border: 1.5px solid var(--ink); background: var(--sheet); border-radius: var(--radius);
  padding: 1rem 1.1rem; text-decoration: none; color: inherit;
  transition: transform .12s ease, box-shadow .12s ease;
}
.match:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); color: inherit; }
.match-rank { font-family: var(--mono); font-weight: 700; font-size: .78rem; color: var(--red); width: 28px; }
.match h3 { font-size: 1.2rem; margin: 0 0 .2rem; }
.match p { margin: 0; color: var(--muted); font-size: .88rem; }
.match-why { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .5rem; }
.match-why span { font-family: var(--mono); font-size: .64rem; letter-spacing: .05em; text-transform: uppercase; color: var(--green); border: 1px solid #b8dfcf; background: var(--green-100); padding: .1rem .35rem; border-radius: 2px; }
.match-score { text-align: right; }
.match-score strong { display: block; font-family: var(--display); font-size: 1.9rem; color: var(--ink); line-height: 1; }
.match-score span { font-family: var(--mono); font-size: .6rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.meter { height: 6px; background: var(--paper-3); margin-top: .35rem; width: 70px; margin-left: auto; }
.meter i { display: block; height: 100%; background: var(--amber); }

/* ---------- The Money Gap -------------------------------------------- */

.gap-controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.6rem; }
.gap-chart {
  border: 1.5px solid var(--draft); padding: 1.3rem 1.3rem .8rem; position: relative;
}
.gap-chart svg { width: 100%; height: auto; overflow: visible; }
.gap-legend { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: .8rem; font-family: var(--mono); font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; }
.gap-legend span { display: inline-flex; align-items: center; gap: .45rem; }
.gap-legend i { width: 18px; height: 3px; display: inline-block; }
.gap-summary { display: grid; grid-template-columns: repeat(3, 1fr); border: 1.5px solid var(--draft); margin-top: 1.4rem; }
.gap-summary > div { padding: 1.1rem 1.2rem; border-right: 1px solid var(--bp-line); }
.gap-summary > div:last-child { border-right: 0; }
.gap-summary .mono { font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); display: block; margin-bottom: .3rem; }
.gap-summary strong { font-family: var(--display); font-size: 2rem; color: #fff; line-height: 1; }
.gap-summary .good { color: var(--amber); }
.gap-note { font-size: .82rem; color: rgba(207,231,247,.6); margin-top: 1.1rem; max-width: 80ch; }
.blueprint .field label { color: var(--cyan); }
.blueprint .field select, .blueprint .field input { background: var(--sheet); border-color: var(--bp-line); }

/* ---------- Rare trades ---------------------------------------------- */

.rare-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 1.3rem; }
.rare-card {
  display: grid; grid-template-rows: auto 1fr; border: 1.5px solid var(--ink); background: var(--sheet);
  border-radius: var(--radius); text-decoration: none; color: inherit; overflow: hidden;
  transition: transform .14s ease, box-shadow .14s ease;
}
.rare-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); color: inherit; }
.rare-art { aspect-ratio: 16 / 8; background: var(--bp); background-image: var(--bp-grid); display: flex; align-items: center; justify-content: center; color: var(--draft); border-bottom: 1.5px solid var(--ink); position: relative; }
.rare-art svg { width: 38%; height: auto; }
.rare-art .tag { position: absolute; top: .8rem; left: .8rem; }
.rare-body { padding: 1.2rem 1.3rem 1.3rem; display: flex; flex-direction: column; }
.rare-body h3 { font-size: 1.45rem; margin-bottom: .35rem; }
.rare-body p { color: var(--muted); font-size: .93rem; margin-bottom: 1rem; }
.rare-stat { display: flex; gap: 1.2rem; margin: auto 0 1rem; font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.rare-stat b { display: block; font-family: var(--display); font-size: 1.25rem; letter-spacing: 0; text-transform: none; color: var(--ink); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (min-width: 1000px) {
  .hero-inner { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
}

@media (max-width: 1040px) {
  .trade-body { grid-template-columns: minmax(0, 1fr) 300px; gap: 2.2rem; }
  .nav { gap: 1rem; }
  .nav-search input { width: 140px; }
  .usp-grid { grid-template-columns: 1fr 1fr; }
  .usp:nth-child(2) { border-right: 0; }
  .usp:nth-child(-n+2) { border-bottom: 1px solid var(--bp-line); }
  .finder { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bp); background-image: var(--bp-grid);
    border-bottom: 2px solid var(--amber);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: .6rem 22px 1.2rem; margin-left: 0;
    box-shadow: 0 18px 30px rgba(0,0,0,.25);
  }
  .nav.open { display: flex; }
  .nav > a { padding: .85rem 0; border-bottom: 1px solid var(--bp-line); }
  .nav > a.nav-cta { margin-top: .8rem; text-align: center; border-bottom: 1.5px solid var(--amber); }
  .nav-search { margin-top: 1rem; }
  .nav-search input { width: 100%; }
  .site-header { position: relative; }

  .trade-body { grid-template-columns: 1fr; gap: 2.4rem; }
  .trade-aside { position: static; }
  .trade-hero-inner { grid-template-columns: 1fr; gap: 1.8rem; }
  .money-band { grid-template-columns: 1fr; gap: 1.8rem; }
  .steps { grid-template-columns: 1fr; }
  .steps li { border-right: 0; border-bottom: 1px solid var(--rule-2); }
  .steps li:last-child { border-bottom: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.8rem 2rem; }
  .gap-controls { grid-template-columns: 1fr; }
  .gap-summary { grid-template-columns: 1fr; }
  .gap-summary > div { border-right: 0; border-bottom: 1px solid var(--bp-line); }
  .gap-summary > div:last-child { border-bottom: 0; }

  /* The route turns vertical: a drawn line down the page */
  .route-track { grid-template-columns: 1fr; gap: 1.1rem; }
  .route-track::before { left: 21px; right: auto; top: 22px; bottom: 22px; height: auto; border-top: 0; border-left: 2px dashed var(--cyan); }
  .route-stop { display: grid; grid-template-columns: 44px 1fr; gap: 1rem; text-align: left; padding: 0; align-items: start; }
  .route-node { margin: 0; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-stats li:nth-child(2) { border-right: 0; }
  .hero-stats li:nth-child(-n+2) { border-bottom: 1px solid var(--bp-line); }
  .hero-search { flex-direction: column; }
  .hero-search button { width: 100%; }
  .field-actions { width: 100%; }
  .field-actions .btn-accent { flex: 1; }
  .grid-cards, .grid-guides, .grid-sectors, .rare-grid { grid-template-columns: 1fr; }
  .card-facts { grid-template-columns: 1fr 1fr; }
  .card-facts div:nth-child(2) { border-right: 0; }
  .card-facts div:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .footer-grid { grid-template-columns: 1fr; }
  .section-head { align-items: flex-start; }
  .usp-grid { grid-template-columns: 1fr; }
  .usp { border-right: 0 !important; border-bottom: 1px solid var(--bp-line); }
  .usp:last-child { border-bottom: 0; }
  .pagination { justify-content: center; }
  .page-numbers { order: 3; width: 100%; justify-content: center; }
  .match { grid-template-columns: minmax(0, 1fr) auto; }
  .match-rank { display: none; }
  .title-block { grid-template-columns: 1fr 1fr; }
  .footer-titleblock { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- Icon sizing ------------------------------------------------
   icon() emits an unsized <svg>. Inside an inline wrapper that SVG fills
   its whole column, so every wrapper that holds one sizes it explicitly. */
.step-icon, .usp-icon { display: block; }
.step-icon > svg, .usp-icon > svg,
.sector-icon > svg, .route-node > svg { width: 100%; height: 100%; }
.sector-icon > svg { width: 26px; height: 26px; }
.sector-icon-lg > svg { width: 34px; height: 34px; }
.brand-mark > svg { width: 24px; height: 24px; }
.provider-where > svg { width: 14px; height: 14px; }
.nav-search button > svg { width: 17px; height: 17px; }
.site-footer .verified > svg, .verified > svg { width: 16px; height: 16px; }
/* Belt and braces: any icon SVG that escapes a sized wrapper stays icon-sized */
svg[viewBox="0 0 24 24"]:not([width]) { max-width: 64px; max-height: 64px; }
.card-top .tag { max-width: 64%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The rare-trade plates draw their icon large, deliberately */
.rare-art svg[viewBox="0 0 24 24"] { width: 110px; height: 110px; max-width: 110px; max-height: 110px; stroke-width: 1.1; }
.blueprint .grid-cards .card { background: var(--sheet); }

/* ---------- Responsive fixes found by the 360px / 390px iframe test ---------- */

/* Grid and flex children default to min-width:auto, so one nowrap tag or button
   sets the minimum width of the whole column. Let them shrink. */
.grid > *, .trade-hero-inner > *, .trade-body > *, .money-band > *,
.card-top, .card-top > *, .finder > *, .split-head > *, .sector-intro > * { min-width: 0; }
.btn-block { white-space: normal; text-align: center; }

.route-track { grid-template-columns: repeat(var(--stops, 5), 1fr); }

.split-head  { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 2.6rem; align-items: center; }
.sector-intro { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 3rem; align-items: start; }

@media (max-width: 900px) {
  .route-track { grid-template-columns: 1fr; }
  .split-head, .sector-intro { grid-template-columns: 1fr; gap: 1.6rem; }
}
