/* ============================================================
   FLUVIAL ENGINEERING — site stylesheet
   One system, two contexts, both theme-aware:
     • shell     (default)  → landing and full-bleed screens
     • .reading             → prose pages: services, who is, contact
   Theme pair: dark (default) / light. Every colour is a token;
   a rebrand is a change of variables, not a rewrite.
   Type: Carlito, the metric-compatible open equivalent of the
   firm's document standard, Calibri.
   ============================================================ */

@font-face{ font-family:"Carlito"; font-style:normal; font-weight:400; font-display:swap;
  src:url("fonts/carlito-latin-400-normal.woff2") format("woff2"); }
@font-face{ font-family:"Carlito"; font-style:italic; font-weight:400; font-display:swap;
  src:url("fonts/carlito-latin-400-italic.woff2") format("woff2"); }
@font-face{ font-family:"Carlito"; font-style:normal; font-weight:700; font-display:swap;
  src:url("fonts/carlito-latin-700-normal.woff2") format("woff2"); }

/* ---------- tokens: dark, the default ---------- */
:root{
  --bg:#0A1219;          /* deep hydrological near-black */
  --panel:#0F1A23;       /* raised surfaces, cards */
  --ink:#E9EFF3;
  --soft:#BCCBD5;        /* secondary text */
  --muted:#7B8D9A;       /* labels, captions */
  --rule:#1D2B35;        /* hairlines */
  --accent:#C7A579;      /* contour tan */
  --hydro:#5EAFEB;       /* glacial blue — links, marks */
  --brand:#0064C8;       /* the mark's blue, as measured from the logo file */
  --logo:url("logo-lockup-dark.png");   /* resolved against this stylesheet, so it
                                           works at any page depth, local or served */
  --dash:url("fluvios-dashboard-dark.webp");

  --sans:"Carlito","Calibri","Segoe UI",system-ui,-apple-system,"Helvetica Neue",sans-serif;
  --measure:40rem;       /* reading column */
  --page:66rem;          /* wide layout bound */
  --read-base:1.125rem;  /* "Regular" — Small/Large/Mega via the View menu */
}

html[data-theme="light"]{
  --bg:#F7F9FA;
  --panel:#FFFFFF;
  --ink:#0C1820;
  --soft:#33454F;
  --muted:#5F7280;
  --rule:#DCE3E8;
  --accent:#8A6636;
  --hydro:#0064C8;
  --logo:url("logo-lockup.png");
  --dash:url("fluvios-dashboard-light.webp");
}

*{ box-sizing:border-box; }
html,body{ margin:0; }
html{ scroll-behavior:smooth; }

body{
  background:var(--bg);
  color:var(--ink);
  font-family:var(--sans);
  font-size:1.0625rem;
  line-height:1.68;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  min-height:100vh;
  transition:background .28s ease, color .28s ease;
}

a{ color:var(--hydro); text-decoration:none; }
a:hover{ text-decoration:underline; text-underline-offset:3px; }

/* ---------- contour wash: concentric basin rings, whisper-quiet ---------- */
body.contours{
  background-image:
    repeating-radial-gradient(ellipse 130% 96% at 50% 40%,
      rgba(94,175,235,0) 0 46px, rgba(94,175,235,.055) 46px 47px),
    radial-gradient(115% 80% at 50% 32%, rgba(20,44,66,.5), rgba(0,0,0,0) 72%);
  background-repeat:repeat, no-repeat;
}
html[data-theme="light"] body.contours{
  background-image:
    repeating-radial-gradient(ellipse 130% 96% at 50% 40%,
      rgba(0,100,200,0) 0 46px, rgba(0,100,200,.055) 46px 47px),
    radial-gradient(115% 80% at 50% 32%, rgba(0,100,200,.05), rgba(0,0,0,0) 72%);
}

/* ---------- shared furniture ---------- */
.eyebrow{
  font-size:.66em; letter-spacing:.34em; text-transform:uppercase;
  color:var(--muted); margin:0 0 1.1rem; font-weight:700;
}
/* A section heading is a level of the page's structure, not a caption.
   The kicker above a page title keeps the small size; the h2 that opens
   a section is raised and brightened so it reads as a heading against
   the body rather than sinking below it. Still in em, so both size
   controls reach it. */
h2.eyebrow{
  font-size:.86em; letter-spacing:.2em; color:var(--soft); margin:0 0 1.25rem;
}
.hairline{ width:56px; height:1px; background:var(--rule); border:0; margin:2.4rem 0; }
.hairline.centred{ margin-left:auto; margin-right:auto; }
.lede{ color:var(--soft); font-size:1.12em; line-height:1.6; max-width:36rem; }
.note{ color:var(--soft); font-size:.86em; line-height:1.6; max-width:46rem; }
.tnum{ font-variant-numeric:tabular-nums; }

/* ---------- landing hero ---------- */
.hero{
  min-height:100svh;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center; padding:clamp(1.4rem,4vh,3rem) 1.4rem clamp(1.6rem,4vh,3rem);
}
.hero .lockup{
  width:min(480px,78vw); aspect-ratio:1105/218; display:block;
  margin:0 auto clamp(1.4rem,3.4vh,2.4rem);
  background-image:var(--logo); background-size:contain;
  background-repeat:no-repeat; background-position:center;
}
.hero .tagline{
  font-size:clamp(.94rem,.86rem + .4vw,1.14rem);
  letter-spacing:.12em; color:var(--soft); margin:0; font-style:italic;
}
.hero .credentials{
  margin:clamp(1.6rem,3.4vh,2.6rem) 0 0;
  font-size:.74rem; letter-spacing:.2em; text-transform:uppercase; color:var(--muted);
  line-height:2;
}

/* entry point to the Explorer */
.entry{
  margin:clamp(1.8rem,4vh,3rem) auto 0; max-width:34rem;
  border:1px solid var(--rule); border-radius:3px; background:var(--panel);
  padding:1.35rem 1.5rem 1.5rem; text-align:left;
}
.entry .eyebrow{ margin-bottom:.5rem; }
.entry h2{ font-size:1.22rem; margin:0 0 .5rem; font-weight:700; letter-spacing:.005em; }
.entry p{ margin:0 0 1rem; color:var(--soft); font-size:.98rem; line-height:1.6; }
.entry .go{
  display:inline-flex; align-items:center; gap:.5rem;
  font-size:.76rem; letter-spacing:.2em; text-transform:uppercase; font-weight:700;
  color:var(--ink); border:1px solid var(--muted); border-radius:2px; padding:.55rem 1rem;
  transition:border-color .18s ease, color .18s ease, background .18s ease;
}
.entry .go:hover{ text-decoration:none; color:var(--bg); background:var(--hydro); border-color:var(--hydro); }

/* three-column preview of the practice themes */
.preview{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(12rem,1fr)); gap:1.5rem;
  max-width:60rem; margin:clamp(1.8rem,4vh,3rem) auto 0; text-align:left;
}
.preview .p-t{ font-size:.9rem; font-weight:700; color:var(--ink); margin:0 0 .3rem; letter-spacing:.01em; }
.preview .p-t .lead{ color:var(--hydro); }
.preview .p-d{ margin:0; font-size:.86rem; line-height:1.55; color:var(--muted); }
.preview .col{ border-top:1px solid var(--rule); padding-top:.85rem; }

/* ---------- page shell for prose and data pages ---------- */
.page{ max-width:var(--page); margin:0 auto; padding:4.6rem 1.6rem 4rem; }
.page.narrow{ max-width:var(--measure); }
.page-title{
  font-size:clamp(1.7rem,3.2vw,2.3rem); line-height:1.18; font-weight:700;
  margin:0 0 .7rem; letter-spacing:-.005em; color:var(--ink);
}
.page-standfirst{ color:var(--soft); font-size:1.05em; line-height:1.6; max-width:38rem; margin:0 0 2.4rem; }

/* reading context */
html[data-size="small"]{ --read-base:1rem; }
html[data-size="large"]{ --read-base:1.3rem; }
html[data-size="mega"]{ --read-base:1.6rem; }
/* the reading-size control governs the whole reading column of a read page,
   not just .prose — everything inside .page is sized in em so it inherits.
   --read-base is in rem, so the interface scale multiplies it; the clamp keeps
   largest-interface + Mega from running away, and holds a legible floor. */
body.reading .page{ font-size:clamp(12px, var(--read-base), 40px); }
body.reading .prose{ line-height:1.72; max-width:var(--measure); }
body.reading .prose p{ margin:0 0 1.1rem; }
body.reading .prose h2{
  font-size:1.06em; font-weight:700; margin:2.4rem 0 .8rem; color:var(--ink); letter-spacing:.005em;
}
body.reading .prose h3{
  font-size:.72em; letter-spacing:.18em; text-transform:uppercase; font-weight:700;
  color:var(--accent); margin:1.9rem 0 .6rem;
}
body.reading .prose ul{ margin:0 0 1.2rem; padding-left:1.15rem; }
body.reading .prose li{ margin:.32rem 0; }
body.reading .prose em{ color:var(--ink); }

/* ---------- services: numbered discipline list ---------- */
.svc{ list-style:none; padding:0; margin:0; counter-reset:svc; }
.svc > li{
  counter-increment:svc; border-top:1px solid var(--rule);
  display:grid; grid-template-columns:3.2rem 1fr; gap:1.4rem; padding:1.7rem 0;
  scroll-margin-top:5.5rem;
}
.svc > li:last-child{ border-bottom:1px solid var(--rule); }
.svc > li::before{
  content:counter(svc,decimal-leading-zero);
  font-variant-numeric:tabular-nums; font-size:.74em; letter-spacing:.1em;
  color:var(--muted); padding-top:.42rem;
}
.svc h2{ font-size:1.1em; font-weight:700; margin:0 0 .45rem; letter-spacing:.005em; color:var(--ink); }
.svc p{ margin:0; color:var(--soft); font-size:1em; line-height:1.62; max-width:40rem; }
body.reading .prose.wide{ max-width:54rem; }

/* ---------- interface concept figure ---------- */
/* space below as well as above: the figure now sits between the standfirst
   and the body, so it needs to breathe on both sides */
.shot{ margin:2.2em 0 2.4em; }
.shot .frame{
  width:100%; aspect-ratio:1600/1000; background-image:var(--dash);
  background-size:cover; background-position:top center;
  border:1px solid var(--rule); border-radius:3px;
}
.shot figcaption{
  margin-top:.8rem; color:var(--muted); font-size:.8em; line-height:1.6; max-width:46rem;
}

/* ---------- service qualifiers: tools, deliverables, clients ---------- */
.qual{ margin:1.15rem 0 0; max-width:40rem; }   /* right edge aligns with .svc p */
.qual > div{
  display:grid; grid-template-columns:minmax(6.5rem,8.5rem) 1fr; gap:1.1rem;
  padding:.3rem 0; align-items:baseline;
}
.qual dt{
  font-size:.62em; letter-spacing:.2em; text-transform:uppercase;
  color:var(--muted); font-weight:700;
}
.qual dd{ margin:0; font-size:.86em; line-height:1.58; color:var(--soft); }
.qual dd a{ color:var(--soft); border-bottom:1px solid var(--rule); }
.qual dd a:hover{ color:var(--hydro); border-bottom-color:var(--hydro); text-decoration:none; }

/* ---------- themes: structured grid ---------- */
.grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1px; background:var(--rule);
  border:1px solid var(--rule); border-radius:3px; overflow:hidden; }
.grid .cell{ background:var(--bg); padding:1.9rem 1.7rem; scroll-margin-top:5.5rem; }
.grid .cell h2{ font-size:1.2rem; font-weight:700; margin:0 0 .7rem; letter-spacing:.005em; }
.grid .cell h2 .lead{ color:var(--hydro); }
.grid .cell p{ margin:0; color:var(--soft); font-size:.99rem; line-height:1.62; }
.grid .cell .n{
  display:block; font-size:.68rem; letter-spacing:.28em; color:var(--muted);
  margin:0 0 .9rem; font-variant-numeric:tabular-nums;
}

/* anything the menus can jump to clears the fixed bar */
[id]{ scroll-margin-top:5.5rem; }

/* ---------- reference lists (standards, technical references) ---------- */
.reflist{ list-style:none; padding:0; margin:0 0 2.2rem; max-width:46rem; }
.reflist li{
  padding:.55rem 0 .55rem 1.35rem; text-indent:-1.35rem;
  border-bottom:1px solid var(--rule); color:var(--soft);
  font-size:.92em; line-height:1.55;
}
.reflist li:first-child{ border-top:1px solid var(--rule); }
.reflist em{ color:var(--ink); font-style:italic; }
.reflist .y{ color:var(--muted); font-variant-numeric:tabular-nums; }

/* ---------- client gateway ---------- */
.holding.gate .inner{ max-width:27rem; margin:0 auto; }
.gatecard{
  border:1px solid var(--rule); border-radius:3px; background:var(--panel);
  padding:2rem 1.9rem 2.1rem;
}
.gatecard .lock{
  width:170px; aspect-ratio:1105/218; background-image:var(--logo);
  background-size:contain; background-repeat:no-repeat; margin:0 0 1.5rem;
}
.gatecard h1{ font-size:1.32rem; font-weight:700; margin:0 0 .55rem; letter-spacing:.005em; }
.gatecard > p{ color:var(--soft); font-size:.96rem; line-height:1.6; margin:0 0 .3rem; }
.gate .form{ max-width:none; }
.gate-msg{
  margin-top:1.1rem; padding:.75rem .9rem; border-left:2px solid var(--accent);
  color:var(--ink); font-size:.92rem; line-height:1.55; display:none;
}
.gate-msg.on{ display:block; }

/* ---------- definition rows (credentials, contact) ---------- */
.rows{ border-top:1px solid var(--rule); margin:0; max-width:46rem; }
.rows > div{
  display:grid; grid-template-columns:minmax(8rem,11rem) 1fr; gap:1.2rem;
  padding:.85rem 0; border-bottom:1px solid var(--rule); align-items:baseline;
}
.rows dt, .rows .k{ font-size:.68em; letter-spacing:.18em; text-transform:uppercase; color:var(--muted); font-weight:700; }
.rows dd, .rows .v{ margin:0; color:var(--ink); }

/* ---------- enquiry form ---------- */
.form{ max-width:34rem; margin:0; }
.form label{
  display:block; font-size:.66em; letter-spacing:.18em; text-transform:uppercase;
  color:var(--muted); font-weight:700; margin:1.2rem 0 .35rem;
}
.form input, .form textarea{
  width:100%; background:transparent; color:var(--ink);
  border:1px solid var(--rule); border-radius:2px; padding:.6rem .7rem;
  font-family:inherit; font-size:1em; line-height:1.5;
}
.form input:focus, .form textarea:focus{ outline:none; border-color:var(--hydro); }
.form textarea{ min-height:8.5rem; resize:vertical; }
.form .submit{
  margin-top:1.5rem; font-family:inherit; font-size:.72em; letter-spacing:.2em; text-transform:uppercase;
  font-weight:700; color:var(--ink); background:transparent; border:1px solid var(--muted);
  border-radius:2px; padding:.65rem 1.3rem; cursor:pointer;
  transition:background .18s ease, color .18s ease, border-color .18s ease;
}
.form .submit:hover{ background:var(--hydro); border-color:var(--hydro); color:var(--bg); }

/* ---------- land acknowledgement ---------- */
.ack{
  border-left:2px solid var(--accent); padding:.15rem 0 .15rem 1.1rem;
  color:var(--soft); font-size:.94em; line-height:1.64; max-width:38rem; margin:0 0 1.2rem;
}

/* ---------- explorer placeholder ---------- */
.holding{
  min-height:calc(100svh - 52px * var(--ui,1));
  display:flex; align-items:center; padding:4rem 1.6rem;
}
.holding .inner{ max-width:var(--page); width:100%; margin:0 auto; }
.holding .lede, .holding .phase, .holding .note{ max-width:46rem; }
.holding .phase{ list-style:none; padding:0; margin:1.6rem 0 0; counter-reset:ph; }
.holding .phase li{
  counter-increment:ph; border-top:1px solid var(--rule); padding:1rem 0;
  display:grid; grid-template-columns:2.6rem 1fr; gap:1.1rem;
}
.holding .phase li:last-child{ border-bottom:1px solid var(--rule); }
.holding .phase li::before{
  content:counter(ph); font-variant-numeric:tabular-nums; color:var(--muted); font-size:.8rem; padding-top:.2rem;
}
.holding .phase b{ display:block; color:var(--ink); font-size:.98rem; margin-bottom:.15rem; }
.holding .phase span{ color:var(--soft); font-size:.94rem; line-height:1.55; }

/* ---------- splash: one screen, nothing below the fold ----------
   The home page is the mark, the tagline and the footer, and all three
   are meant to be visible at once on a laptop without scrolling. The
   body is the column; the hero takes up whatever slack is left, so the
   footer settles on the bottom edge rather than below it. If a short
   window cannot hold all three the page simply scrolls — better than
   clipping the land acknowledgement. */
body.splash{ min-height:100svh; display:flex; flex-direction:column; }
body.splash .hero{
  flex:1 1 auto; min-height:0;
  justify-content:flex-start;
  padding-top:clamp(2rem, 15vh, 8rem);
}
body.splash .foot{ margin-top:0; padding:1.7rem 1.6rem 1.9rem; }

/* ---------- footer ---------- */
.foot{
  border-top:1px solid var(--rule); margin-top:4.5rem; padding:2.4rem 1.6rem 3.2rem;
  color:var(--muted); font-size:.82rem; line-height:1.75;
}
.foot .inner{ max-width:var(--page); margin:0 auto; }
.foot a{ color:var(--muted); }
.foot a:hover{ color:var(--ink); }
.foot .cred{ letter-spacing:.14em; text-transform:uppercase; font-size:.68rem; }

/* The footer carries the credit and the territorial acknowledgement.
   The site map lives in <noscript> only: the menus are built by script,
   so without it a page has no static outbound link at all. It never
   renders for a reader with scripts on. */
.foot .links{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(11rem,1fr));
  gap:1.6rem 2.4rem; max-width:56rem; margin:0 auto 2rem; text-align:left;
}
.foot-col ul{ list-style:none; margin:0; padding:0; }
.foot-col li{ margin:.34rem 0; }
.foot-h{
  margin:0 0 .7rem; font-size:.62rem; letter-spacing:.22em; text-transform:uppercase;
  color:var(--accent); font-weight:700;
}
.foot-col a, .foot-col span{ font-size:.82rem; line-height:1.5; }
.foot-col span{ color:var(--muted); opacity:.55; }

/* Band two: the credit and the territorial acknowledgement, beneath the
   destinations and across the same full width. */
.foot .base{ text-align:center; }
/* In the footer the acknowledgement carries no accent rule and no indent:
   it is a justified block, centred on the page at a set measure rather than
   run to the full width. The contact page keeps the ruled treatment. */
.foot .base .ack{
  border-left:0; padding:0; margin:.9rem auto 0; color:var(--muted);
  max-width:60ch; text-align:justify; text-wrap:pretty; hyphens:auto;
}

/* ---------- the Library lexicon ----------
   A reference tool inside a reading page, so every size here is in em:
   the View menu's text size governs the search field and the entries
   exactly as it governs prose. */
.lex{ margin:0; }
.lex-tabs{ display:flex; gap:.5em; border-bottom:1px solid var(--rule); margin:0 0 1.4em; }
.lex-tab{
  appearance:none; background:transparent; border:0; border-bottom:2px solid transparent;
  color:var(--muted); font:inherit; font-size:.72em; font-weight:700;
  letter-spacing:.18em; text-transform:uppercase; cursor:pointer;
  padding:.55em .2em .7em; margin-bottom:-1px;
}
.lex-tab:hover{ color:var(--ink); }
.lex-tab.on{ color:var(--hydro); border-bottom-color:var(--hydro); }

.lex-bar{ margin:0 0 1.2em; }
.lex-lab{
  display:block; font-size:.66em; letter-spacing:.18em; text-transform:uppercase;
  color:var(--muted); font-weight:700; margin:0 0 .45em;
}
.lex-in{
  width:100%; max-width:26em; font:inherit; font-size:1em;
  background:var(--panel); color:var(--ink);
  border:1px solid var(--rule); border-radius:2px; padding:.6em .75em;
}
.lex-in:focus{ outline:none; border-color:var(--hydro); }
.lex-note{ margin:.6em 0 0; font-size:.78em; color:var(--muted); min-height:1.3em; }

.lex-az{ display:flex; flex-wrap:wrap; gap:.3em; margin:0 0 1.6em; }
.lex-l{
  appearance:none; background:transparent; color:var(--soft);
  border:1px solid var(--rule); border-radius:2px; cursor:pointer;
  font:inherit; font-size:.72em; font-weight:700; letter-spacing:.06em;
  min-width:2.1em; padding:.35em 0;
}
.lex-l:hover{ border-color:var(--hydro); color:var(--hydro); }
.lex-l.off{ opacity:.32; cursor:default; }

.lex-out{ min-height:8em; }
.lex-e{ border-top:1px solid var(--rule); padding:1.1em 0 1.2em; max-width:46em; }
.lex-t{ font-size:1.05em; font-weight:700; margin:0; color:var(--ink); letter-spacing:.005em; }
.lex-g{
  margin:.3em 0 0; font-size:.64em; letter-spacing:.18em; text-transform:uppercase;
  color:var(--muted); font-weight:700;
}
.lex-q{ margin:.75em 0 0; padding:0; border:0; }
.lex-q p{ margin:0; color:var(--soft); line-height:1.66; }
.lex-s{ margin:.7em 0 0; font-size:.8em; line-height:1.6; color:var(--muted); }

.lex-senses{ margin:.65em 0 0; padding-left:1.3em; color:var(--soft); }
.lex-senses li{ margin:.4em 0; line-height:1.6; }
.lex-pos{
  font-size:.68em; letter-spacing:.14em; text-transform:uppercase;
  color:var(--accent); font-weight:700; margin-right:.5em;
}
.lex-x{ display:block; color:var(--muted); font-style:italic; margin-top:.15em; }
.lex-y{ display:block; margin-top:.25em; }
.lex-link{
  appearance:none; background:transparent; border:0; cursor:pointer;
  font:inherit; font-size:.86em; color:var(--hydro); padding:0 .5em 0 0;
}
.lex-link:hover{ text-decoration:underline; text-underline-offset:3px; }
.lex-listhead{ margin:0 0 .8em; font-size:.8em; color:var(--muted); }
.lex-list{ display:flex; flex-wrap:wrap; gap:.15em .1em; max-width:46em; }
.lex-list .lex-link{ font-size:.92em; padding:.15em .7em .15em 0; }

/* ---------- the open data portal ----------
   A dashboard that stays a page: the bar, the theme, the interface scale
   and the reading size all reach it, which is why nothing here is in rem. */
.dash{ margin:0; }

.dash-stats{
  position:relative; overflow:hidden;
  display:grid; grid-template-columns:repeat(auto-fit,minmax(8.5em,1fr)); gap:1px;
  background:var(--rule); border:1px solid var(--rule); border-radius:3px;
  margin:0 0 1.8em;
}
.dash-stat{
  position:relative; z-index:1; appearance:none; text-align:left; font:inherit;
  background:var(--panel); border:0; color:inherit; padding:1em 1.1em 1.05em;
  display:block; width:100%;
}
button.dash-stat{ cursor:pointer; }
button.dash-stat:hover .dash-n{ color:var(--hydro); }
.dash-n{ display:block; font-size:1.6em; font-weight:700; line-height:1.1; color:var(--ink);
  font-variant-numeric:tabular-nums; letter-spacing:-.01em; }
.dash-wide .dash-n{ font-size:1em; letter-spacing:.06em; padding-top:.5em; padding-bottom:.42em; }
.dash-k{ display:block; margin-top:.3em; font-size:.62em; letter-spacing:.2em;
  text-transform:uppercase; color:var(--muted); font-weight:700; }

/* the hydrograph sits behind the numbers, not over them */
.dash-hydro{ position:absolute; inset:0; z-index:0; pointer-events:none; opacity:.5; }
.dash-hydro svg{ width:100%; height:100%; display:block; }
.dash-hydro-fill{ fill:var(--hydro); opacity:.12; }
.dash-hydro-line{ fill:none; stroke:var(--hydro); stroke-width:.6; opacity:.75;
  vector-effect:non-scaling-stroke; }

.dash-controls{ display:flex; flex-wrap:wrap; gap:1.2em 2em; align-items:flex-end;
  justify-content:space-between; margin:0 0 1.2em; }
.dash-filters{ display:flex; flex-wrap:wrap; gap:.4em; }
.dash-t{
  appearance:none; cursor:pointer; font:inherit; font-size:.7em; font-weight:700;
  letter-spacing:.14em; text-transform:uppercase; color:var(--soft);
  background:transparent; border:1px solid var(--rule); border-radius:2px;
  padding:.55em .85em; display:inline-flex; align-items:center; gap:.7em;
}
.dash-t:hover{ border-color:var(--hydro); color:var(--hydro); }
.dash-t.on{ border-color:var(--hydro); color:var(--bg); background:var(--hydro); }
.dash-tn{ font-size:.86em; opacity:.75; font-variant-numeric:tabular-nums; }
.dash-t.on .dash-tn{ opacity:.85; }

.dash-find{ flex:1 1 16em; max-width:24em; }
.dash-lab{ display:block; font-size:.62em; letter-spacing:.2em; text-transform:uppercase;
  color:var(--muted); font-weight:700; margin:0 0 .4em; }
.dash-in{ width:100%; font:inherit; font-size:.92em; background:var(--panel); color:var(--ink);
  border:1px solid var(--rule); border-radius:2px; padding:.6em .75em; }
.dash-in:focus{ outline:none; border-color:var(--hydro); }
.dash-count{ margin:0 0 1.1em; font-size:.76em; color:var(--muted); }

.dash-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(19em,1fr)); gap:1px;
  background:var(--rule); border:1px solid var(--rule); border-radius:3px; }
.dash-c{ background:var(--panel); padding:1.15em 1.25em 1.3em; display:flex; flex-direction:column; }
.dash-c:hover{ background:var(--bg); }
.dash-theme{ margin:0 0 .5em; font-size:.6em; letter-spacing:.22em; text-transform:uppercase;
  color:var(--accent); font-weight:700; }
.dash-name{ margin:0 0 .5em; font-size:1em; font-weight:700; line-height:1.3; }
.dash-name a{ color:var(--ink); }
.dash-name a:hover{ color:var(--hydro); text-decoration:none; }
.dash-s{ margin:0 0 .9em; font-size:.86em; line-height:1.6; color:var(--soft); }
.dash-meta{ margin:0; border-top:1px solid var(--rule); }
.dash-m{ display:grid; grid-template-columns:5.4em 1fr; gap:.9em; padding:.42em 0;
  border-bottom:1px solid var(--rule); align-items:baseline; }
.dash-m dt{ font-size:.58em; letter-spacing:.16em; text-transform:uppercase;
  color:var(--muted); font-weight:700; }
.dash-m dd{ margin:0; font-size:.8em; line-height:1.45; color:var(--soft); }
.dash-r{ margin:.9em 0 0; font-size:.8em; line-height:1.55; color:var(--muted); font-style:italic; }
.dash-egg{ box-shadow:inset 0 0 0 1px var(--accent); }
.dash-egg .dash-theme{ color:var(--hydro); }

.dash-toast{
  position:fixed; left:50%; bottom:1.6rem; transform:translateX(-50%) translateY(.6rem);
  background:var(--panel); color:var(--ink); border:1px solid var(--rule); border-radius:3px;
  padding:.65rem 1.1rem; font-size:.78rem; letter-spacing:.02em; z-index:1400;
  opacity:0; pointer-events:none; transition:opacity .2s ease, transform .2s ease;
  box-shadow:0 8px 30px rgba(0,0,0,.35);
}
.dash-toast.on{ opacity:1; transform:translateX(-50%) translateY(0); }

/* deep field: the contour wash starts to move, slowly */
@keyframes dash-drift{ to{ background-position:0 -94px, 0 0; } }
body.dash-deep.contours{ animation:dash-drift 26s linear infinite; }
@media (prefers-reduced-motion:reduce){ body.dash-deep.contours{ animation:none; } }

/* ---------- jump list ----------
   The index a page keeps of its own entries. It replaced the fly-out
   submenus under Firm: a list on the page works the same on a phone,
   and it cannot go stale because the build reads it back from the
   entries themselves. */
.toc{
  margin:0 0 2.6em; padding:1.1em 0 0; border-top:1px solid var(--rule);
}
.toc-h{
  margin:0 0 .9em; font-size:.64em; letter-spacing:.22em; text-transform:uppercase;
  color:var(--muted); font-weight:700;
}
.toc-l{
  margin:0; padding:0; list-style:none;
  display:grid; grid-template-columns:repeat(auto-fit,minmax(15em,1fr)); gap:.45em 2em;
  counter-reset:toc;
}
.toc-l li{ counter-increment:toc; }
.toc-l a{
  display:grid; grid-template-columns:2.2em 1fr; gap:.2em; align-items:baseline;
  color:var(--soft); font-size:.9em; line-height:1.45; padding:.15em 0;
}
.toc-l a::before{
  content:counter(toc,decimal-leading-zero);
  font-size:.72em; letter-spacing:.1em; color:var(--muted); font-weight:700;
  font-variant-numeric:tabular-nums;
}
.toc-l a:hover{ color:var(--hydro); text-decoration:none; }
.toc-l a:hover::before{ color:var(--hydro); }
/* a section heading inside the index, when the page has more than one */
.toc-s{
  margin:1.15em 0 .55em; font-size:.64em; letter-spacing:.22em; text-transform:uppercase;
  font-weight:700;
}
.toc-s:first-of-type{ margin-top:0; }
.toc-s a{ color:var(--accent); }
.toc-s a:hover{ color:var(--hydro); text-decoration:none; }
.toc-l + .toc-s{ margin-top:1.5em; }

/* a jumped-to entry has to clear the fixed bar, which grows with the
   interface scale — hence the calc rather than a fixed offset */
.page [id]{ scroll-margin-top:calc(52px * var(--ui) + 1.4rem); }

/* ---------- responsive ---------- */
@media (max-width:52rem){
  .preview{ grid-template-columns:1fr; gap:1.1rem; }
  .grid{ grid-template-columns:1fr; }
  .rows > div{ grid-template-columns:1fr; gap:.2rem; }
  .dash-grid{ grid-template-columns:1fr; }
  .dash-controls{ gap:1em; }
  .dash-find{ max-width:none; }
  .svc > li{ grid-template-columns:2.4rem 1fr; gap:1rem; }
  .qual > div{ grid-template-columns:1fr; gap:.1rem; padding:.45rem 0; }
}
@media (max-width:34rem){
  .page{ padding:4rem 1.15rem 3rem; }
  .hero .lockup{ width:min(340px,86vw); }
}

/* ---------- an explicit page break, honoured only on paper ---------- */
.pagebreak{ display:none; }

/* ---------- print ----------
   A printed page is a fixed measure, so the two on-screen size controls
   are set aside here: type is stated in points and the reading clamp is
   overridden, or a reader printing at Mega gets ten pages instead of two.
   Everything that only makes sense on screen — the bar, the drawer, the
   footer navigation, the enquiry form's button — is removed. */
@media print{
  @page{ margin:14mm 15mm; }
  .os-bar,.os-dd,.os-fly,.os-rfoot,.os-reveal,.os-toast,
  .os-scrim,.os-drawer,.os-burger,
  .entry .go,.form .submit,.foot{ display:none !important; }

  html,body{ background:#fff !important; color:#000 !important; }
  body{ padding-top:0 !important; }

  /* Paper is not a screen. os.css scales the root font size by the
     interface setting, which reaches every rem-sized margin inside the
     page — so the same statement printed to two pages at one setting and
     three at another. The reader's screen preference has no business on
     paper: the scale is neutralised here, and the page is sized in pt. */
  html{ font-size:100% !important; }

  .page, body.reading .page{
    max-width:none; margin:0; padding:0;
    font-size:9pt !important; line-height:1.34;
  }
  .page a{ color:#000; text-decoration:none; }
  .prose p, .note, .rows dd{ color:#000 !important; }
  .eyebrow, .rows dt{ color:#444 !important; }
  .page-title{ font-size:17pt; margin:0 0 .3rem; color:#000 !important; }
  .page-standfirst{ font-size:1em; max-width:none; margin:0 0 .8rem; color:#222 !important; }
  .prose{ margin:0; }
  .prose p{ margin:0 0 .4em; }
  .hairline{ background:#000; margin:.65em 0 .35em; }
  h2.eyebrow{ margin:0 0 .38em; font-size:.88em; letter-spacing:.2em; }
  .note{ font-size:.86em; color:#333 !important; margin-top:.6em; }

  /* Definition rows set in two columns on paper. The label sits above
     its definition rather than beside it, which is what makes the pair
     narrow enough for a column to hold. */
  .rows{
    border-top:1px solid #999; max-width:none; padding-top:.25em;
    column-count:2; column-gap:7mm;
  }
  .rows > div{
    display:block; padding:.2em 0 .28em; border-bottom:1px solid #d8d8d8;
    break-inside:avoid; page-break-inside:avoid;
  }
  .rows dt{ display:block; font-size:.72em; letter-spacing:.1em; margin:0 0 .1em; }
  .rows dd{ display:block; margin:0; }

  figure, .svc > li{ break-inside:avoid; page-break-inside:avoid; }
  h1,h2,h3{ break-after:avoid; page-break-after:avoid; }

  .pagebreak{ display:block; break-before:page; page-break-before:always; height:0; }
}
