/* Larva Intelligence website styles, v4 (2026-11-14).
   Paper, black text, one green for links. Newsreader for headlines and long reading,
   IBM Plex Sans for interface text, IBM Plex Mono only for codes. All fonts are local. */

@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader-latin-wght.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader-latin-wght-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/plex-sans-latin-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/plex-sans-latin-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/plex-mono-latin-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("../fonts/plex-sans-arabic-400.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("../fonts/plex-sans-arabic-600.woff2") format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }

:root {
  --bg: #fbfaf6;
  --tint: #f3f0e8;
  --text: #151917;
  --text-2: #3e4642;
  --text-3: #6b726e;
  --rule: #ddd8cc;
  --rule-2: #c7c0b2;
  --green: #1f5e47;
  --green-2: #164634;
  --gold: #a9701c;
  --red: #9b3a2b;
  /* chart series, validated for colour-blind separation on this background */
  --c1: #0f7f5c;
  --c2: #c27c1e;
  --c3: #2f6fc9;
  --c4: #b85a8e;

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --arabic: "IBM Plex Sans Arabic", "IBM Plex Sans", sans-serif;
  --wrap: 1120px;
  --gutter: clamp(20px, 4vw, 36px);
  --measure: 40rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100svh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
main { flex: 1 0 auto; }
img, svg { display: block; max-width: 100%; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green-2); text-decoration-thickness: 2px; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; color: var(--text); }
::selection { background: #d8e6dc; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; background: var(--text); color: #fff; padding: 8px 14px; text-decoration: none; }
.skip:focus { top: 12px; color: #fff; }
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.ar { font-family: var(--arabic); direction: rtl; unicode-bidi: isolate; }
[hidden] { display: none !important; }

/* type */
h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(2.2rem, 4.2vw, 3.5rem); line-height: 1.08; letter-spacing: -0.016em; font-variation-settings: "opsz" 60; }
h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.55rem, 2.4vw, 2rem); line-height: 1.15; letter-spacing: -0.01em; }
h3 { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; line-height: 1.3; }
.standfirst { font-family: var(--serif); font-size: clamp(1.18rem, 1.7vw, 1.38rem); line-height: 1.55; color: var(--text-2); max-width: var(--measure); }
.small { font-size: .9rem; color: var(--text-3); }
.muted { color: var(--text-3); font-size: .95rem; }
.dateline { font-size: .88rem; color: var(--text-3); margin: 0 0 14px; }
.dateline a { color: var(--text-3); }

/* header */
.site-header { border-bottom: 1px solid var(--rule); background: var(--bg); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand svg { width: 40px; height: 22px; }
.brand span { font-family: var(--serif); font-weight: 600; font-size: 1.22rem; letter-spacing: -0.005em; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { color: var(--text-2); text-decoration: none; font-size: .95rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--green); }
.nav-toggle { display: none; background: none; border: 1px solid var(--rule-2); padding: 8px 12px; font: inherit; font-size: .9rem; color: var(--text); cursor: pointer; border-radius: 4px; }

/* buttons */
.button {
  display: inline-block; padding: 12px 20px; border-radius: 4px; border: 1px solid var(--green);
  background: var(--green); color: #fff; font-weight: 600; font-size: .98rem; line-height: 1.2; text-decoration: none; cursor: pointer;
}
.button:hover { background: var(--green-2); border-color: var(--green-2); color: #fff; text-decoration: none; }
.button:disabled { opacity: .6; cursor: default; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 26px; }

/* page structure */
.block { padding: clamp(48px, 6vw, 80px) 0; border-top: 1px solid var(--rule); }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.block-head a { font-size: .95rem; white-space: nowrap; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.cols h2 { margin-bottom: 14px; }
.cols p { color: var(--text-2); }

/* home: opening */
.opening { padding: clamp(44px, 6vw, 80px) 0 clamp(48px, 6vw, 80px); display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.opening h1 { max-width: 13em; }
.opening .standfirst { margin-top: 22px; }
.signature { margin: 18px 0 0; font-size: .95rem; color: var(--text-3); }
.signature a { color: var(--text-2); }
.clients-line { margin: 30px 0 0; padding-top: 16px; border-top: 1px solid var(--rule); font-size: .92rem; color: var(--text-3); max-width: var(--measure); }

/* name test */
.namebox { border: 1px solid var(--rule-2); background: #fff; padding: clamp(20px, 2.6vw, 28px); border-radius: 6px; }
.namebox h2 { font-size: 1.35rem; }
.namebox > p { margin: 8px 0 16px; font-size: .95rem; color: var(--text-2); }
.namebox label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.namebox input {
  width: 100%; font-family: var(--serif); font-size: 1.35rem; color: var(--text); background: var(--bg);
  border: 1px solid var(--rule-2); border-radius: 4px; padding: 10px 12px;
}
.namebox input:focus { outline: 2px solid var(--green); outline-offset: 0; border-color: var(--green); }
.try { margin: 10px 0 0; font-size: .86rem; color: var(--text-3); }
.try button { background: none; border: 0; padding: 7px 1px; line-height: 1.4; margin: 0 2px; font: inherit; color: var(--green); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.result { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--rule); }
.result-line { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.count { font-family: var(--serif); font-size: 3rem; line-height: 1; font-weight: 500; font-variant-numeric: lining-nums tabular-nums; }
.count-k { font-size: .98rem; color: var(--text-2); }
.arabic-line { margin-top: 10px; font-size: .9rem; color: var(--text-3); }
.arabic-line .ar { font-size: 1.3rem; color: var(--text); margin-left: 6px; }
.spellings { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; max-height: 158px; overflow: hidden; }
.spellings li { font-size: .88rem; padding: 3px 8px; border: 1px solid var(--rule); border-radius: 3px; background: var(--bg); color: var(--text-2); }
.spellings li.typed { border-color: var(--green); color: var(--green); background: #eef4f0; }
.coverage { margin: 14px 0 0; font-size: .92rem; color: var(--text-2); }
.coverage b { color: var(--text); }
.namebox .note { margin: 12px 0 0; font-size: .82rem; color: var(--text-3); line-height: 1.5; }

/* research list */
.feature { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(24px, 4vw, 48px); align-items: center; padding-bottom: 28px; border-bottom: 1px solid var(--rule); }
.feature h3 { font-size: clamp(1.4rem, 2.2vw, 1.75rem); font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; }
.feature h3 a { color: var(--text); text-decoration: none; }
.feature h3 a:hover { text-decoration: underline; }
.feature p { margin-top: 12px; color: var(--text-2); }
.mini { border-left: 1px solid var(--rule); padding-left: clamp(16px, 2vw, 28px); }
.mini .chart { max-width: 440px; }
.mini .chart text { font-size: 12px; }
.mini .chart .val { font-size: 13px; }
.notes-list { list-style: none; margin: 0; padding: 0; }
.notes-list li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.notes-list .kind { font-size: .88rem; color: var(--text-3); }
.notes-list a { font-family: var(--serif); font-size: 1.2rem; font-weight: 500; color: var(--text); text-decoration: none; }
.notes-list a:hover { text-decoration: underline; }
.notes-list p { margin: 4px 0 0; font-size: .95rem; color: var(--text-2); }

/* tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--rule); }
thead th { font-size: .82rem; font-weight: 600; color: var(--text-3); border-bottom: 1px solid var(--rule-2); }
td { color: var(--text-2); }
td strong, td b { color: var(--text); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rates td:first-child { font-family: var(--serif); font-size: 1.12rem; font-weight: 600; color: var(--text); white-space: nowrap; padding-right: 24px; }
.rates td:first-child a { color: var(--text); text-decoration: none; }
.rates td:first-child a:hover { text-decoration: underline; }
.rates td.price { font-family: var(--serif); font-size: 1.15rem; color: var(--text); white-space: nowrap; }
.rates td.time { white-space: nowrap; }
table.spec { min-width: 720px; }
table.spec thead th { font-family: var(--serif); font-size: 1.1rem; font-weight: 600; color: var(--text); }
table.spec td:first-child { width: 130px; font-size: .86rem; color: var(--text-3); }
table.spec td:first-child strong { color: var(--text-3); font-weight: 600; }
table.spec tr:last-child td { font-weight: 600; color: var(--text); }
.table-note { margin-top: 12px; font-size: .9rem; color: var(--text-3); max-width: 48rem; }

/* inner pages */
.page-head { padding: clamp(40px, 6vw, 72px) 0 clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--rule); }
.page-head h1 { max-width: 18em; }
.page-head .standfirst { margin-top: 16px; }
.page-body { padding: clamp(36px, 5vw, 64px) 0 clamp(56px, 7vw, 96px); }
.prose { max-width: var(--measure); font-family: var(--serif); font-size: 1.16rem; line-height: 1.62; color: var(--text); }
.prose > * + * { margin-top: 1em; }
.wrap.prose { max-width: calc(var(--wrap) + var(--gutter) * 2); }
.wrap.prose > * { max-width: var(--measure); }
.wrap.prose > .table-wrap, .wrap.prose > .variants { max-width: 56rem; }
.prose p { margin-bottom: 0; }
.prose h2 { font-size: 1.6rem; margin-top: 1.9em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.22rem; margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3em; margin-bottom: 0; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--text-3); }
.prose strong { font-weight: 600; }
.prose .table-wrap, .prose table { font-family: var(--sans); font-size: .95rem; }
.prose .table-wrap { margin-top: 1.4em; }
.prose figure { margin: 1.8em 0; }
.callout { border-left: 3px solid var(--rule-2); padding: 2px 0 2px 18px; color: var(--text-2); }
.callout p { margin: 0; }
.callout strong { color: var(--text); }
.variants { font-family: var(--sans); font-size: .95rem; line-height: 2; padding: 14px 18px; background: var(--tint); border-radius: 4px; }
.variants .ar { font-size: 1.2rem; color: var(--text); margin-right: 4px; }
.wide { max-width: 56rem; }
.section-title { margin: clamp(48px, 6vw, 72px) 0 18px; padding-top: clamp(32px, 4vw, 48px); border-top: 1px solid var(--rule); }
.section-title:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.service-intro { max-width: var(--measure); color: var(--text-2); margin-bottom: 20px; }
.client-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px 48px; }
.client-grid h3 { margin-bottom: 8px; }
.client-grid p, .client-grid li { font-size: .98rem; color: var(--text-2); }
.client-grid ul { padding-left: 1.2em; margin: 8px 0 0; }

/* figures and charts */
figure { margin: 0; }
.fig-title { font-family: var(--sans); font-size: .95rem; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.fig-sub { font-family: var(--sans); font-size: .88rem; color: var(--text-3); margin-bottom: 12px; }
figcaption, .source { font-family: var(--sans); font-size: .84rem; color: var(--text-3); line-height: 1.5; margin-top: 10px; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--sans); font-size: 11px; fill: var(--text-3); }
.chart .yr { font-size: 13px; font-weight: 600; fill: var(--text); }
.chart .val { font-size: 12px; font-weight: 600; fill: var(--text); }
.chart .val-in { font-size: 12px; font-weight: 600; fill: #fff; pointer-events: none; }
.chart .grid line { stroke: var(--rule); }
.chart .base { stroke: var(--rule-2); }
.chart .bar-m { fill: var(--c1); }
.chart rect { stroke: var(--bg); stroke-width: 2px; paint-order: stroke; }
.chart .note-line { stroke: var(--gold); stroke-dasharray: 3 3; }
.chart .note { font-size: 11.5px; fill: var(--gold); font-weight: 600; }
.chart [data-tip]:hover { opacity: .8; }
.c-uae { fill: var(--c1); background: var(--c1); }
.c-egypt { fill: var(--c2); background: var(--c2); }
.c-oman { fill: var(--c3); background: var(--c3); }
.c-other { fill: var(--c4); background: var(--c4); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0 0 12px; padding: 0; list-style: none; font-family: var(--sans); font-size: .86rem; color: var(--text-2); }
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 11px; height: 11px; display: inline-block; border-radius: 2px; }
.data-table { margin-top: 8px; font-family: var(--sans); }
.data-table summary { cursor: pointer; font-size: .88rem; color: var(--green); }
.fig-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 44px; margin: 2.4em 0; max-width: 46rem; font-family: var(--sans); }
figure.map { margin: 2.4em 0; }
.fig-pair figure:first-child { max-width: 36rem; }
.tip { position: fixed; z-index: 20; transform: translate(-50%, calc(-100% - 12px)); pointer-events: none; background: var(--text); color: #fff; padding: 7px 10px; font-size: .82rem; line-height: 1.4; border-radius: 3px; max-width: 240px; }
.tip b { display: block; }

/* map (static, printed style) */
.map svg { width: 100%; height: auto; background: #f4f1e9; border: 1px solid var(--rule); }
.map .grat { fill: none; stroke: #e4dfd3; stroke-width: .8; }
.map .land { fill: #ebe7dc; stroke: #cfc8b8; stroke-width: .7; }
.map .land.scope { fill: #e5e0d2; }
.map .land.focus { fill: #d5e5da; stroke: var(--green); stroke-width: 1.2; }
.map .cname { font-family: var(--sans); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; fill: #8c8a80; }
.map .cname.focus { font-family: var(--serif); font-size: 22px; letter-spacing: .2em; fill: var(--green-2); font-weight: 600; }
.map .route { fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; }
.map .route.air { stroke-dasharray: 5 5; stroke-width: 1.5; }
.map .city circle { fill: var(--text); stroke: #fff; stroke-width: 1.5; }
.map .city text { font-family: var(--sans); font-size: 12.5px; fill: var(--text); paint-order: stroke; stroke: #f4f1e9; stroke-width: 4px; stroke-linejoin: round; }
.map .city.hub text { font-weight: 600; font-size: 13.5px; }
.map-key { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 10px; font-family: var(--sans); font-size: .86rem; color: var(--text-2); }
.map-key span { display: inline-flex; align-items: center; gap: 8px; }
.map-key i { width: 22px; border-top: 2px solid var(--gold); display: inline-block; }
.map-key i.air { border-top-style: dashed; }

/* notes index */
.brief { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.brief:first-child { border-top: 1px solid var(--rule); }
.brief .tag { font-size: .88rem; color: var(--text-3); }
.brief h3 { font-size: 1.35rem; font-weight: 500; }
.brief h3 a { color: var(--text); text-decoration: none; }
.brief h3 a:hover { text-decoration: underline; }
.brief p { margin: 6px 0 0; color: var(--text-2); }

/* forms */
.two-col { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
.form .row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.form > div, .form .row > div { margin-bottom: 18px; }
.form .row { margin-bottom: 0; }
.form label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: 6px; }
.form input, .form select, .form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--rule-2); border-radius: 4px; background: #fff; font: inherit; font-size: 1rem; color: var(--text); }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--green); outline-offset: 0; border-color: var(--green); }
.form textarea { min-height: 150px; resize: vertical; }
.form .hint { display: block; font-weight: 400; font-size: .85rem; color: var(--text-3); margin-top: 2px; }
.hp { position: absolute !important; left: -9999px; }
.form-status { padding: 10px 12px; border-radius: 4px; font-size: .95rem; }
.form-status:empty { display: none; }
.form-status.ok { background: #eef4f0; color: var(--green-2); }
.form-status.err { background: #f7ece9; color: var(--red); }
.contact-side h2 { font-size: 1.3rem; margin-top: 28px; }
.contact-side h2:first-child { margin-top: 0; }
.contact-side p, .contact-side li { color: var(--text-2); }
.contact-side ol { padding-left: 1.2em; }

/* footer */
.site-footer { border-top: 1px solid var(--rule); padding: 32px 0 40px; font-size: .9rem; color: var(--text-3); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot a { color: var(--text-2); text-decoration: none; }
.foot a:hover { color: var(--text); text-decoration: underline; }
.foot p { margin: 0; }

/* responsive */
@media (max-width: 900px) {
  .opening, .cols, .feature, .fig-pair, .two-col { grid-template-columns: 1fr; }
  .mini { border-left: 0; padding-left: 0; }
  .client-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .site-header { position: relative; }
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 68px; z-index: 5; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--rule); padding: 4px var(--gutter) 12px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 1.05rem; }
  .nav a[aria-current="page"] { border-bottom-color: var(--rule); color: var(--green); }
  .notes-list li, .brief { grid-template-columns: 1fr; gap: 4px; }
  .form .row { grid-template-columns: 1fr; gap: 0; }
  .rates thead { display: none; }
  .rates tr { display: block; padding: 14px 0; border-bottom: 1px solid var(--rule); }
  .rates td { display: block; border: 0; padding: 2px 0; }
  .rates td.price, .rates td.time { display: inline-block; margin-right: 14px; }
  .chart text { font-size: 19px; }
  .chart .yr { font-size: 21px; }
  .chart .val, .chart .val-in { font-size: 19px; }
  .chart.wide text, .chart.wide .val { font-size: 24px; }
  .chart.wide .note { font-size: 22px; }
  .map .city text { font-size: 20px; }
  .map .city.hub text { font-size: 22px; }
  .map .cname { font-size: 16px; }
  .map .cname.focus { font-size: 30px; }
  table.spec td:first-child { position: sticky; left: 0; background: var(--bg); }
}
@media print {
  .site-header nav, .nav-toggle, .site-footer nav { display: none; }
  body { font-size: 11pt; }
}

/* Home: the featured method note's three cases (2026-11-15). */
.mini-head { font-size: .95rem; color: var(--text-2); margin: 0 0 10px; }
dl.results { margin: 0; }
dl.results dt { font-weight: 600; margin-top: 12px; }
dl.results dt:first-child { margin-top: 0; }
dl.results dd { margin: 2px 0 0; color: var(--text-2); font-size: .95rem; }
