/* MAIN&FRANK client page identity, December 2026. Served to every Meno page at
   /mf/identity.css by the shared Worker (shared/identity.js).
   It follows 26 Bay Road (bayroad.mainfrank.com), the practice's current client site:
   one face at one weight and one size (15 on 18 px; 14 on 17 px on narrow screens;
   9.5 on 11.4 pt in print), sentence case, no tracking, black on white. Hierarchy comes
   from position on a 24-column grid with a one-column margin: labels in their own column
   (2 to 5), everything else hung off one content edge (column 6). The current place is
   underlined. Oxide is for hover and focus only. Codes, numbers and captions are in the
   same face at the same size, with tabular figures so numbers line up. Lines appear only
   around drawing sheets and document pages and under the rows of tables.

   Figures and data are the one exception, after the 43 Sturt Valley Road feasibility
   report and the BiRD Lab status report: budget and technical figures are colour-coded
   and drawn as bars, and a key figure is set larger than the text. The data colours
   (--d-*) never colour running text. See docs/identity.md. */


:root{
  --ink:#000;
  --paper:#fff;
  --oxide:#941d11;
  --font-text:neue-haas-grotesk-text,"Neue Haas Grotesk Text Pro","Helvetica Neue",Helvetica,Arial,sans-serif;
  --fs:15px;
  --lh:18px;
  --fig:36px;
  --fig-lh:40px;
  --bar:60px;
  --hair:1px solid var(--ink);
  --row:1px solid rgba(0,0,0,.25);
  --edge:0 0 0 1px var(--ink);
  /* data colours, sampled from the Sturt Valley and BiRD Lab reports */
  --d-oxide:#941d11;
  --d-oxide-tint:#cf9994;
  --d-blue:#1a5191;
  --d-blue-tint:#a3b9d3;
  --d-green:#196130;
  --d-green-tint:#a3c0ac;
  --d-ochre:#c89522;
  --d-ochre-tint:#e9d5a7;
  --d-ink:#000;
  --d-grey:#8c8c8c;
  --d-pale:#d9d9d9;
  color-scheme:light;
}

*,*::before,*::after{box-sizing:border-box}
html{background:var(--paper);-webkit-text-size-adjust:100%;scroll-padding-top:calc(var(--bar) + var(--lh))}
body{margin:0;background:var(--paper);color:var(--ink);font:500 var(--fs)/var(--lh) var(--font-text);letter-spacing:0;font-kerning:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;overflow-x:hidden}
:where(h1,h2,h3,h4,h5,h6,p,ul,ol,dl,dd,dt,figure,blockquote,table,th,td,caption,legend,fieldset){margin:0;padding:0;font-size:inherit;line-height:inherit;font-weight:inherit;letter-spacing:inherit}
:where(ul,ol){list-style:none}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit;color:inherit;letter-spacing:inherit}
button{background:none;border:0;padding:0;margin:0;cursor:pointer;border-radius:0;text-align:inherit}
button:disabled{opacity:.3;cursor:default}
a:hover,button:not(:disabled):hover,a:focus-visible,button:focus-visible,summary:hover{color:var(--oxide)}
:focus-visible{outline:1px solid var(--oxide);outline-offset:2px}
img,svg,canvas,video{display:block;max-width:100%;height:auto}
strong,b{font-weight:700}
i,em{font-style:italic}
input[type=checkbox],input[type=radio]{accent-color:var(--ink)}
dialog{color:var(--ink)}
.mf-link,.mf-txt a,.mf-kv a,.mf-colophon a{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}
.mf-strong{font-weight:700}
.mf-mono,.mf-code,.mf-cap,.mf-caption,.mf-n,.mf-tag,.mf-num{font-variant-numeric:tabular-nums}
[hidden]{display:none!important}

.mf-skip{position:fixed;top:-100px;left:calc(100% / 24);z-index:99;background:var(--paper);padding:4px 8px;box-shadow:var(--edge)}
.mf-skip:focus{top:12px}

/* The grid: 24 equal columns across the window. Columns 1 and 24 are the margins, labels
   take 2 to 5 and the content edge is column 6. Inside the content area widths are counted
   in the same columns: --bc is how many it spans, --m the text measure. */
.mf-row,.mf-bar,.mf-colophon{display:grid;grid-template-columns:repeat(24,minmax(0,1fr));--bc:18;--m:10}
.mf-key{grid-column:2/6;display:flex;gap:.5em;align-items:baseline;min-width:0;padding-right:1em}
.mf-body{grid-column:6/24;min-width:0}
.mf-wide{grid-column:2/24;min-width:0}
.mf-key .mf-n{flex:none}
div.mf-key{display:block}
div.mf-key>h2,div.mf-key>h3{display:flex;gap:.5em;align-items:baseline}

/* The bar: the wordmark on the label edge, the page's sections on the content edge, the
   tools on the right. It stays at the top. */
.mf-bar{position:sticky;top:0;z-index:30;background:var(--paper);height:var(--bar);align-items:center}
.mf-home{grid-column:2/6;display:flex;align-items:center;align-self:stretch}
.mf-wordmark{display:block;height:13px;width:auto}
.mf-nav{grid-column:6/19;min-width:0;display:flex;gap:var(--lh);overflow-x:auto;scrollbar-width:none;white-space:nowrap}
.mf-nav::-webkit-scrollbar{display:none}
.mf-nav .mf-n{margin-right:.4em}
.mf-nav [aria-current]{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}
.mf-tools{grid-column:19/24;display:flex;justify-content:flex-end;align-items:baseline;gap:var(--lh);white-space:nowrap}
.mf-tools form{margin:0;display:inline}

/* The opening: the page's name in the label column, what it is on the content edge, then
   the title block, labels in the label column. */
.mf-open{padding-top:max(calc(var(--lh) * 8),22vh)}
.mf-colophon{margin-top:calc(var(--lh) * 2)}
.mf-colophon dt{grid-column:2/6;padding-right:1em}
.mf-colophon dd{grid-column:6/24;max-width:40em}
.mf-crumbs [aria-current]{text-decoration:none}

/* Sections: a numbered label in the label column, the content on the content edge.
   Rows inside a section can carry their own labels. Spacing counts in lines of 18 px. */
.mf-sec{padding-top:calc(var(--lh) * 6)}
.mf-sec>.mf-row+.mf-row{margin-top:calc(var(--lh) * 2)}
.mf-blk{margin-top:calc(var(--lh) * 2)}
.mf-body>:first-child,.mf-blk>:first-child{margin-top:0}
.mf-txt p,.mf-measure{max-width:min(calc(100% * var(--m) / var(--bc)),40em)}
.mf-txt>*+*{margin-top:calc(var(--lh) * .75)}
.mf-txt ul li{padding-left:1em;text-indent:-1em}
.mf-txt ul li::before{content:"–";display:inline-block;width:1em;text-indent:0}
.mf-txt ul li+li{margin-top:calc(var(--lh) * .25)}
.mf-aside{margin-top:calc(var(--lh) * .75);max-width:min(calc(100% * var(--m) / var(--bc)),40em)}
.mf-hd{display:block}
.mf-blk-body{margin-top:calc(var(--lh) * .75)}
.mf-blk>.mf-cap{margin-top:0}

/* Label and value lists inside the content area: four columns of label, ten of value */
.mf-kv>div{display:grid;grid-template-columns:calc(100% * 4 / var(--bc)) minmax(0,calc(100% * 10 / var(--bc)));align-items:baseline}
.mf-kv>div+div{margin-top:calc(var(--lh) * .5)}
.mf-kv dt{padding-right:.75em}
.mf-meta{display:grid;grid-template-columns:minmax(0,calc(100% * 4 / 18)) minmax(0,1fr);row-gap:calc(var(--lh) * .25)}
.mf-meta dt{padding-right:.75em}
.mf-meta dd{margin:0;min-width:0}
.mf-rows li+li{margin-top:calc(var(--lh) * .5)}
.mf-rows li{max-width:min(calc(100% * 14 / var(--bc)),60em)}

/* Stages: number, stage, state, note */
.mf-stages li{display:grid;grid-template-columns:calc(100% / var(--bc)) calc(100% * 5 / var(--bc)) calc(100% * 3 / var(--bc)) minmax(0,calc(100% * 9 / var(--bc)));align-items:baseline}
.mf-stages li>*{padding-right:.75em}
.mf-stages li+li{margin-top:calc(var(--lh) * .5)}

/* Figures, one at a time, at their own proportions. Drawing sheets and document pages get
   an edge; nothing else does. */
.mf-fig{margin-top:calc(var(--lh) * 2)}
.mf-fig img{width:100%;height:auto}
.mf-sheet{box-shadow:var(--edge);background:var(--paper)}
.mf-cap,.mf-caption{display:block;margin-top:calc(var(--lh) * .5);max-width:min(calc(100% * 14 / var(--bc)),60em)}
.mf-cap .mf-n{margin-right:.6em}
.mf-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--lh)}
.mf-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:calc(var(--lh) * 2) var(--lh)}
.mf-grid>*{min-width:0}

/* Controls: words, nothing boxed, except controls laid over a model or a drawing */
.mf-ctl{display:flex;flex-wrap:wrap;align-items:baseline;gap:calc(var(--lh) * .5) var(--lh);margin-top:calc(var(--lh) * .5)}
.mf-ctl [aria-pressed=true],.mf-ctl .is-on,.mf-filter [aria-pressed=true]{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}
.mf-box{display:inline-block;background:var(--paper);box-shadow:var(--edge);padding:2px 8px;white-space:nowrap}

/* Tables: a black line under the heads and each group, a light line under each row */
.mf-scroll{overflow-x:auto}
.mf-table{width:100%;border-collapse:collapse}
.mf-table th,.mf-table td{text-align:left;vertical-align:top;padding:calc(var(--lh) * .4) .75em calc(var(--lh) * .4) 0;font-weight:500}
.mf-table thead th{padding-top:0;border-bottom:var(--hair)}
.mf-table td{border-bottom:var(--row)}
.mf-table tr.mf-group th{padding-top:calc(var(--lh) * 1.5);border-bottom:var(--hair)}
.mf-table .mf-r,.mf-table .num{text-align:right;font-variant-numeric:tabular-nums}
.mf-table caption{text-align:left;caption-side:top;padding-bottom:calc(var(--lh) * .5)}
.mf-table tfoot td{border-bottom:0;border-top:var(--hair);font-weight:700}

/* ---- Figures and data ----------------------------------------------------------------
   A key figure: its label in the label column, the figure on the content edge at the one
   larger size, what it means under it, then its bar and legend. */
.mf-big{font-size:var(--fig);line-height:var(--fig-lh);font-weight:500;letter-spacing:-.01em;font-variant-numeric:tabular-nums}
.mf-big small{font-size:var(--fs);line-height:var(--lh);letter-spacing:0;margin-left:.5em}
.mf-big+p{margin-top:calc(var(--lh) * .5)}
.mf-figs{display:grid;grid-template-columns:repeat(var(--n,3),minmax(0,1fr));gap:calc(var(--lh) * 2) var(--lh)}
.mf-figs>div{min-width:0}
.mf-figs .mf-big{margin-top:calc(var(--lh) * .5)}

/* Colour per series. Each chart's legend says what its colours mean. */
.d-oxide{--c:var(--d-oxide)}.d-oxide-tint{--c:var(--d-oxide-tint)}
.d-blue{--c:var(--d-blue)}.d-blue-tint{--c:var(--d-blue-tint)}
.d-green{--c:var(--d-green)}.d-green-tint{--c:var(--d-green-tint)}
.d-ochre{--c:var(--d-ochre)}.d-ochre-tint{--c:var(--d-ochre-tint)}
.d-ink{--c:var(--d-ink)}.d-grey{--c:var(--d-grey)}.d-pale{--c:var(--d-pale)}
.d-open{--c:transparent}

/* A stacked bar: segments sized by --w. d-open draws an allowance or an unpriced item as a
   dashed outline. A threshold sits above the bar at --at. */
.mf-stack{position:relative;display:flex;height:12px;margin-top:calc(var(--lh) * .75);background:var(--paper)}
.mf-stack>*{flex:0 0 var(--w);background:var(--c,var(--d-pale));min-width:0}
.mf-stack>.d-open,.mf-swatch.d-open,.mf-mini.d-open>i,.mf-legend .d-open{background:var(--paper);outline:1px dashed var(--d-oxide);outline-offset:-1px}
.mf-stack>*+*{box-shadow:inset 1px 0 0 var(--paper)}
.mf-mark{position:absolute;left:var(--at);top:-4px;bottom:-4px;width:1px;background:var(--ink)}
.mf-scale{display:flex;justify-content:space-between;gap:var(--lh);margin-top:calc(var(--lh) * .25)}
.mf-scale.above{margin-top:calc(var(--lh) * .75)}
.mf-scale.above+.mf-stack{margin-top:calc(var(--lh) * .25)}
.mf-legend{display:grid;grid-template-columns:repeat(var(--cols,2),minmax(0,max-content));gap:calc(var(--lh) * .25) calc(var(--lh) * 2);margin-top:calc(var(--lh) * .5)}
.mf-legend li{display:flex;align-items:baseline;gap:.5em}
.mf-legend li>i,.mf-swatch{flex:none;display:inline-block;width:9px;height:9px;background:var(--c);transform:translateY(-1px)}

/* A single bar on a shared scale, for rows of a table: --w of its track */
.mf-mini{display:block;height:6px;margin-top:4px;background:transparent}
.mf-mini>i{display:block;height:100%;width:var(--w);min-width:2px;background:var(--c,var(--ink))}
.mf-mini+.mf-mini{margin-top:2px}

/* A meter: how far along, --w filled on a pale track */
.mf-meter{display:block;height:6px;margin-top:4px;background:var(--d-pale)}
.mf-meter>i{display:block;height:100%;width:var(--w);background:var(--c,var(--ink))}

/* A range on a shared axis, from --from to --to */
.mf-range{position:relative;display:block;height:12px;background:repeating-linear-gradient(90deg,var(--d-pale) 0 1px,transparent 1px var(--tick,10%))}
.mf-range>i{position:absolute;top:0;bottom:0;left:var(--from);width:calc(var(--to) - var(--from));min-width:2px;background:var(--c,var(--ink))}

/* A state word after a coloured square: complete, under way, next, needs a decision, later */
.mf-state{white-space:nowrap}
.mf-state::before{content:"";display:inline-block;width:9px;height:9px;margin-right:.5em;background:var(--c,var(--d-pale));transform:translateY(-1px)}
.mf-state.d-open::before{background:var(--paper);outline:1px dashed var(--d-oxide);outline-offset:-1px}
/* A figure, date or item that needs a decision */
.mf-flag{color:var(--d-oxide)}

/* A colour-coded row: a thin coloured line at the left of a table row or a list item */
.mf-coded{box-shadow:inset 3px 0 0 var(--c);padding-left:calc(.75em + 3px)!important}

/* The footer */
.mf-foot{padding-top:calc(var(--lh) * 8);padding-bottom:calc(var(--lh) * 3)}
.mf-foot p+p{margin-top:calc(var(--lh) * .75)}

/* Dialogs and the lightbox: the page again, white, the bar across the top */
.mf-dialog{border:0;padding:0;background:var(--paper);box-shadow:var(--edge);max-width:calc(100vw - 2 * var(--lh));max-height:calc(100dvh - 2 * var(--lh))}
.mf-dialog::backdrop{background:rgba(255,255,255,.92)}
.mf-dialog-bar{display:flex;align-items:center;gap:var(--lh);min-height:var(--bar);padding:0 var(--lh)}
.mf-dialog-bar>:first-child{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mf-dialog-body{padding:0 var(--lh) var(--lh)}

@media (max-width:1199px){
  .mf-row,.mf-bar,.mf-colophon{--m:12}
}
@media (max-width:999px){
  :root{--fs:14px;--lh:17px;--bar:52px;--fig:26px;--fig-lh:30px}
  .mf-row,.mf-bar,.mf-colophon{--m:18}
  .mf-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .mf-figs{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:639px){
  .mf-row{--bc:22;--m:22;row-gap:var(--lh)}
  .mf-key,.mf-body{grid-column:2/24}
  .mf-home{display:none}
  .mf-nav{grid-column:2/18}
  .mf-tools{grid-column:18/24}
  .mf-tools [data-print]{display:none}
  .mf-colophon dt{grid-column:2/9}
  .mf-colophon dd{grid-column:9/24}
  .mf-open{padding-top:calc(var(--lh) * 5)}
  .mf-sec{padding-top:calc(var(--lh) * 5)}
  .mf-kv>div,.mf-meta{grid-template-columns:calc(100% * 8 / 22) minmax(0,1fr)}
  .mf-stages li{grid-template-columns:calc(100% * 2 / 22) minmax(0,1fr)}
  .mf-stages li>:nth-child(3),.mf-stages li>:nth-child(4){grid-column:2}
  .mf-grid,.mf-pair,.mf-figs{grid-template-columns:1fr}
  .mf-legend{grid-template-columns:1fr}
  .mf-table.mf-stack-sm thead{display:none}
  .mf-table.mf-stack-sm,.mf-table.mf-stack-sm tbody,.mf-table.mf-stack-sm tr,.mf-table.mf-stack-sm td,.mf-table.mf-stack-sm th{display:block;width:auto!important}
  .mf-table.mf-stack-sm tr{padding:calc(var(--lh) * .4) 0;border-bottom:var(--row)}
  .mf-table.mf-stack-sm td{padding:0;border:0;display:grid;grid-template-columns:calc(100% * 8 / 22) minmax(0,1fr);text-align:left}
  .mf-table.mf-stack-sm td[data-h]::before{content:attr(data-h)}
  .mf-table.mf-stack-sm td:empty{display:none}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

/* Print: A4 portrait, 12 mm margins, no navigation. The running footer sits in the page
   margin on every page: the page's own line from --mf-running (set on <html>) on the left,
   the page count on the right. */
@page{
  size:A4 portrait;margin:12mm 12mm 18mm 12mm;
  @bottom-left{content:var(--mf-running,"MAIN&FRANK");font-family:neue-haas-grotesk-text,"Helvetica Neue",Arial,sans-serif;font-size:7pt;color:#000}
  @bottom-right{content:"Page " counter(page) " of " counter(pages);font-family:neue-haas-grotesk-text,"Helvetica Neue",Arial,sans-serif;font-size:7pt;color:#000}
}
@media print{
  :root{--fs:9.5pt;--lh:11.4pt;--fig:20pt;--fig-lh:22pt}
  *{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .mf-bar,.mf-skip,.mf-noprint,.mf-ctl,[data-finance],dialog{display:none!important}
  .mf-row,.mf-colophon{--bc:19;--m:14}
  .mf-key,.mf-colophon dt{grid-column:1/6}
  .mf-body,.mf-colophon dd{grid-column:6/25}
  .mf-wide{grid-column:1/25}
  .mf-open{padding-top:0}
  .mf-sec{padding-top:12mm}
  .mf-blk,.mf-fig{margin-top:6mm}
  .mf-fig,.mf-figs>div,.mf-table tr,.mf-kv>div,.mf-stages li{break-inside:avoid}
  .mf-key{break-after:avoid}
  .mf-scroll{overflow:visible}
  .mf-foot{padding-top:12mm}
  a{color:inherit}
}
