/*
Theme Name: Mosolykalauz
Theme URI: https://mosolykalauz.hu/
Author: Mosolykalauz
Description: A Mosolykalauz „Kutatási jegyzetfüzet” arculata blokktémaként: papír alapszín, grafit és teal, Schibsted Grotesk + Newsreader + IBM Plex Mono, ml- komponensek.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.0.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mosolykalauz
*/

/* ---------- Tokens (tokens.json → CSS) ---------- */
:root {
  --paper: #f4f1ea; --paper-raised: #fbfaf6; --paper-sunk: #e9e4d8;
  --rule: #d6cfc1; --rule-strong: #8c8576;
  --ink: #1b1f21; --ink-muted: #565b5c;
  --teal: #0c5f57; --on-teal: #fbfaf6; --mint: #cbe8de; --mint-soft: #e3f2ec; --signal: #31947f;
  --marker: #f3d37c; --ochre: #8a4b0c; --pro: #1d6b4c; --con: #a33a22;
  --measure: #2c4a7a; --measure-soft: #dfe6f2;
  --font-sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-serif: Newsreader, Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 72px;
  --radius-xs: 2px; --radius-sm: 4px; --radius-md: 8px; --radius-lg: 14px; --radius-pill: 999px;
  --shadow-sticky: 0 -1px 0 #d6cfc1, 0 -8px 24px rgba(27,31,33,0.08);
  --search-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23565b5c' stroke-width='1.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='M20 20l-4.5-4.5'/%3E%3C/svg%3E");
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15191a; --paper-raised: #1d2224; --paper-sunk: #0f1213;
    --rule: #2f3638; --rule-strong: #6f7a7b;
    --ink: #eceae4; --ink-muted: #a7adab;
    --teal: #6fd6c0; --on-teal: #0f1213; --mint: #1d3b36; --mint-soft: #172b28; --signal: #4fcfb3;
    --marker: #5c4716; --ochre: #e9b66a; --pro: #7fd3a6; --con: #f19a82;
    --measure: #9db8e8; --measure-soft: #1e2a40;
    --shadow-sticky: 0 -1px 0 #2f3638, 0 -8px 24px rgba(0,0,0,0.4);
    --search-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a7adab' stroke-width='1.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='M20 20l-4.5-4.5'/%3E%3C/svg%3E");
    color-scheme: dark;
  }
}

/* Mosolykalauz — component stylesheet. Loads after tokens.css. Prefix: ml- */
/* Fonts: Schibsted Grotesk, Newsreader, IBM Plex Mono — latin + latin-ext (ő, ű) woff2 files under fonts/, declared by tokens.css. */

body, body * { box-sizing: border-box; }
body { font-family: var(--font-sans); color: var(--ink); background: var(--paper); font-size: 16px; line-height: 24px; font-feature-settings: "tnum" 0; -webkit-font-smoothing: antialiased; }
body a { color: var(--teal); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
body :focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
body h1, body h2, body h3, body h4, body p, body ul, body ol, body dl, body dd, body figure { margin: 0; }
body ul { padding: 0; list-style: none; }
.ml-num { font-variant-numeric: tabular-nums; }

/* ---------- Type helpers ---------- */
.ml-kicker { font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.ml-kicker b { color: var(--teal); font-weight: 500; }
.ml-display { font-size: 56px; line-height: 58px; font-weight: 700; letter-spacing: -.025em; }
.ml-h1 { font-size: 36px; line-height: 42px; font-weight: 700; letter-spacing: -.02em; }
.ml-h2 { font-size: 26px; line-height: 32px; font-weight: 600; letter-spacing: -.01em; }
.ml-h3 { font-size: 19px; line-height: 26px; font-weight: 600; }
.ml-lede { font-family: var(--font-serif); font-size: 21px; line-height: 30px; color: var(--ink); }
.ml-long { font-family: var(--font-serif); font-size: 18px; line-height: 29px; }
.ml-small { font-size: 14px; line-height: 20px; }
.ml-muted { color: var(--ink-muted); }
.ml-data { font-family: var(--font-mono); font-size: 15px; line-height: 22px; font-variant-numeric: tabular-nums; }
.ml-mark { background: var(--marker); color: var(--ink); padding: 0 3px; border-radius: 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.ml-note { font-family: var(--font-mono); font-size: 12px; line-height: 16px; color: var(--ochre); }

/* ---------- Layout ---------- */
.ml-wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--space-6); }
.ml-section { padding: var(--space-7) 0; border-top: 1px solid var(--rule); }
.ml-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-5); }
.ml-grid { display: grid; gap: var(--space-5); }
.ml-panel { background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--radius-md); }
.ml-stack > * + * { margin-top: var(--space-3); }

/* ---------- Header ---------- */
.ml-header { border-bottom: 1px solid var(--rule); background: var(--paper); }
.ml-header-in { display: flex; align-items: center; gap: var(--space-6); height: 64px; }
.ml-logo { display: inline-flex; align-items: baseline; text-decoration: none !important; color: var(--ink) !important; font-weight: 700; font-size: 24px; letter-spacing: -.02em; }
.ml-logo img { height: 26px; display: block; }
.ml-nav { display: flex; gap: 22px; font-size: 15px; white-space: nowrap; }
.ml-nav a { color: var(--ink); text-decoration: none; }
.ml-nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--teal); padding-bottom: 4px; }
.ml-search { margin-left: auto; display: flex; align-items: center; gap: var(--space-2); height: 40px; padding: 0 var(--space-3); border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background: var(--paper-raised); color: var(--ink-muted); font-size: 14px; min-width: 220px; flex: 1; max-width: 340px; white-space: nowrap; overflow: hidden; }

/* ---------- Buttons ---------- */
.ml-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); height: 44px; padding: 0 var(--space-5); border-radius: var(--radius-sm); font: 600 15px/1 var(--font-sans); border: 1px solid var(--rule-strong); background: var(--paper-raised); color: var(--ink); text-decoration: none !important; cursor: pointer; white-space: nowrap; }
.ml-btn:hover { background: var(--mint-soft); }
.ml-btn-primary { background: var(--teal); color: var(--on-teal) !important; border-color: var(--teal); }
.ml-btn-primary:hover { background: var(--teal); filter: brightness(1.08); }
.ml-btn-quiet { border-color: transparent; background: transparent; color: var(--teal) !important; padding: 0 var(--space-2); }
.ml-btn-sm { height: 36px; padding: 0 var(--space-4); font-size: 14px; }
.ml-btn-block { width: 100%; }

/* ---------- Chips (filters, needs) ---------- */
.ml-chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 1px solid var(--rule-strong); border-radius: var(--radius-pill); font-size: 14px; color: var(--ink); background: var(--paper-raised); white-space: nowrap; }
.ml-chip[aria-pressed="true"] { background: var(--mint); border-color: var(--teal); }
.ml-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* ---------- Editorial label (NOT a seal) ---------- */
.ml-label { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border: 1px solid var(--ink); border-radius: var(--radius-xs); font: 500 11.5px/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); background: transparent; white-space: nowrap; }
.ml-label::before { content: ""; width: 6px; height: 6px; background: currentColor; border-radius: 1px; }
.ml-label-pick { background: var(--teal); border-color: var(--teal); color: var(--on-teal); }
.ml-label-tint { background: var(--mint); border-color: var(--mint); }

/* ---------- Source tags: whose claim is this? ---------- */
.ml-src { display: inline-flex; align-items: center; gap: 6px; font: 500 11.5px/16px var(--font-mono); letter-spacing: .04em; color: var(--ink-muted); white-space: nowrap; }
.ml-src i { font-style: normal; display: inline-grid; place-items: center; width: 18px; height: 18px; border: 1px solid var(--rule-strong); border-radius: var(--radius-xs); color: var(--ink); font-size: 10.5px; font-weight: 500; letter-spacing: 0; }
.ml-src-mfr i::before { content: "G"; }
.ml-src-sci i::before { content: "K"; }
.ml-src-3p i::before { content: "H"; }
.ml-src-ed i::before { content: "M"; }
.ml-src-ed i { background: var(--mint); border-color: var(--teal); }
.ml-src-est i::before { content: "≈"; }
.ml-src-est { color: var(--ochre); }
.ml-src-est i { border-color: var(--ochre); color: var(--ochre); }
/* FUTURE (Phase 2) */
.ml-src-meas i::before { content: "T"; }
.ml-src-meas { color: var(--measure); }
.ml-src-meas i { background: var(--measure); border-color: var(--measure); color: var(--paper-raised); }

/* ---------- Verdict ---------- */
.ml-verdict { background: var(--paper-raised); border: 1px solid var(--rule-strong); border-radius: var(--radius-md); overflow: hidden; }
.ml-verdict-head { display: flex; align-items: center; gap: var(--space-2); padding: 10px var(--space-5); background: var(--mint-soft); border-bottom: 1px solid var(--rule); }
.ml-verdict-head img { width: 20px; height: 20px; display: block; }
.ml-verdict-head .ml-kicker { color: var(--ink); }
.ml-verdict-head .ml-kicker span { color: var(--ink-muted); }
.ml-verdict-body { padding: var(--space-5); display: grid; gap: var(--space-4); }
.ml-verdict-for { font-family: var(--font-serif); font-size: 22px; line-height: 30px; font-weight: 500; }
.ml-verdict-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }
.ml-verdict-foot { padding: 10px var(--space-5); border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 6px var(--space-4); align-items: center; font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.ml-pc h4 { font: 500 12px/16px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; margin-bottom: var(--space-2); }
.ml-pc li { position: relative; padding-left: 22px; font-size: 15.5px; line-height: 22px; }
.ml-pc li + li { margin-top: 6px; }
.ml-pc li::before { position: absolute; left: 0; top: 0; font: 600 16px/22px var(--font-mono); }
.ml-pros h4, .ml-pros li::before { color: var(--pro); }
.ml-pros li::before { content: "+"; }
.ml-cons h4, .ml-cons li::before { color: var(--con); }
.ml-cons li::before { content: "–"; }

/* ---------- Spec table ---------- */
.ml-spec { width: 100%; border-collapse: collapse; background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--radius-md); overflow: hidden; }
.ml-spec th, .ml-spec td { text-align: left; padding: 11px var(--space-4); border-top: 1px solid var(--rule); vertical-align: top; }
.ml-spec tr:first-child th, .ml-spec tr:first-child td { border-top: 0; }
.ml-spec th { font: 500 12px/22px var(--font-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-muted); width: 42%; }
.ml-spec td { font-size: 15px; line-height: 22px; }
.ml-spec td .ml-src { float: right; margin-left: var(--space-3); }
.ml-spec-group th { background: var(--paper-sunk); color: var(--ink); }

/* ---------- Comparison: meaningful differences ---------- */
.ml-cmp { background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--radius-md); overflow: hidden; }
.ml-cmp-heads { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--rule-strong); }
.ml-cmp-heads > div { padding: var(--space-4); display: flex; gap: var(--space-3); align-items: center; }
.ml-cmp-heads > div + div { border-left: 1px solid var(--rule-strong); }
.ml-cmp-heads .ml-thumb { width: 44px; height: 56px; flex: none; }
.ml-cmp-heads b { display: block; font-size: 16px; line-height: 20px; }
.ml-cmp-heads span { font-size: 13px; color: var(--ink-muted); }
.ml-cmp-row { border-top: 1px solid var(--rule); }
.ml-cmp-row:first-of-type { border-top: 0; }
.ml-cmp-key { padding: 10px var(--space-4) 0; display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); }
.ml-cmp-vals { display: grid; grid-template-columns: 1fr 1fr; }
.ml-cmp-vals > div { padding: 6px var(--space-4) 12px; font-size: 15px; line-height: 22px; }
.ml-cmp-vals > div + div { border-left: 1px solid var(--rule-strong); }
.ml-cmp-why { padding: 0 var(--space-4) 12px; font-family: var(--font-serif); font-size: 15.5px; line-height: 22px; color: var(--ink-muted); }
.ml-cmp-same { padding: 12px var(--space-4); background: var(--paper-sunk); border-top: 1px solid var(--rule); display: flex; justify-content: space-between; align-items: center; font-size: 14px; }

/* ---------- Ownership cost ---------- */
.ml-cost { background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--radius-md); padding: var(--space-5); }
.ml-cost-top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-4); }
.ml-cost-total { font-size: 36px; line-height: 40px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ml-cost-total small { font-size: 15px; font-weight: 500; color: var(--ink-muted); letter-spacing: 0; }
.ml-cost-bar { display: flex; height: 28px; margin: var(--space-4) 0 var(--space-2); gap: 2px; }
.ml-cost-bar span { display: block; height: 100%; }
.ml-cost-bar .dev { background: var(--teal); border-radius: 2px 0 0 2px; }
.ml-cost-bar .head { background: var(--signal); }
.ml-cost-bar .head:last-child { border-radius: 0 2px 2px 0; }
.ml-cost-legend { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.ml-cost-legend b { display: block; color: var(--ink); font: 400 15px/22px var(--font-mono); font-variant-numeric: tabular-nums; }
.ml-cost-rows { margin-top: var(--space-4); border-top: 1px solid var(--rule); }
.ml-cost-rows div { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.ml-cost-rows div span:last-child { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.ml-cost-assume { margin-top: var(--space-3); padding: var(--space-3); border: 1px dashed var(--ochre); border-radius: var(--radius-sm); font-size: 13.5px; line-height: 20px; }
.ml-cost-assume .ml-note { display: block; margin-bottom: 4px; }
.ml-seg { display: inline-flex; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); overflow: hidden; }
.ml-seg button { font: 500 13px/1 var(--font-sans); height: 32px; padding: 0 12px; border: 0; background: var(--paper-raised); color: var(--ink); }
.ml-seg button + button { border-left: 1px solid var(--rule-strong); }
.ml-seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper-raised); }

/* ---------- Compatibility ---------- */
.ml-compat { background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--radius-md); overflow: hidden; }
.ml-compat-head { padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--rule); }
.ml-compat-group { padding: var(--space-3) var(--space-5) var(--space-4); }
.ml-compat-group + .ml-compat-group { border-top: 1px solid var(--rule); }
.ml-compat-group > .ml-kicker { display: flex; align-items: center; gap: 8px; margin-bottom: var(--space-2); }
.ml-yes > .ml-kicker { color: var(--pro); }
.ml-no > .ml-kicker { color: var(--con); }
.ml-compat-item { display: flex; align-items: center; gap: var(--space-3); padding: 8px 0; border-top: 1px solid var(--rule); font-size: 15px; }
.ml-compat-item:first-of-type { border-top: 0; }
.ml-compat-item .ml-glyph { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: var(--radius-xs); font: 600 14px/1 var(--font-mono); }
.ml-yes .ml-glyph { background: var(--mint); color: var(--pro); }
.ml-no .ml-glyph { border: 1px solid var(--con); color: var(--con); }
.ml-compat-item .ml-data { margin-left: auto; color: var(--ink-muted); font-size: 14px; }
.ml-compat-item em { font-style: normal; font-size: 13px; color: var(--ink-muted); }

/* ---------- Merchant offers ---------- */
.ml-offers { background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--radius-md); overflow: hidden; }
.ml-offers-head { padding: var(--space-4) var(--space-5); display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); border-bottom: 1px solid var(--rule); }
.ml-offer { display: grid; grid-template-columns: 1.3fr 1.2fr auto auto; gap: var(--space-4); align-items: center; padding: 14px var(--space-5); border-top: 1px solid var(--rule); }
.ml-offer:first-of-type { border-top: 0; }
.ml-offer-m b { display: block; font-size: 15.5px; line-height: 20px; }
.ml-offer-m span, .ml-offer-d { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.ml-offer-p { text-align: right; }
.ml-offer-p b { display: block; font-size: 20px; line-height: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ml-offer-p span { font-size: 12.5px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.ml-offers-foot { padding: 12px var(--space-5); background: var(--paper-sunk); border-top: 1px solid var(--rule); font-size: 13px; line-height: 19px; color: var(--ink-muted); }
.ml-disclose { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 19px; color: var(--ink-muted); }
.ml-disclose i { font-style: normal; flex: none; font: 500 11px/18px var(--font-mono); border: 1px solid var(--rule-strong); border-radius: var(--radius-xs); padding: 0 5px; color: var(--ink); }

/* ---------- Trust / byline ---------- */
.ml-byline { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); align-items: center; padding: var(--space-3) 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-size: 13.5px; line-height: 20px; color: var(--ink-muted); }
.ml-byline b { color: var(--ink); font-weight: 600; }
.ml-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--paper-sunk); border: 1px solid var(--rule-strong); display: inline-grid; place-items: center; font: 600 11px/1 var(--font-sans); color: var(--ink); vertical-align: middle; margin-right: 6px; }
.ml-sources { counter-reset: src; }
.ml-sources li { counter-increment: src; position: relative; padding: 10px 0 10px 40px; border-top: 1px solid var(--rule); font-size: 14.5px; line-height: 21px; }
.ml-sources li::before { content: "[" counter(src) "]"; position: absolute; left: 0; top: 10px; font: 500 13px/21px var(--font-mono); color: var(--teal); }
.ml-sources li .ml-src { margin-left: 8px; }
.ml-fn { font: 500 11px/1 var(--font-mono); color: var(--teal); vertical-align: super; text-decoration: none; }

/* ---------- Product image frame (manufacturer imagery, credited) ---------- */
.ml-thumb { background: var(--paper-sunk); border-radius: var(--radius-sm); display: grid; place-items: center; position: relative; overflow: hidden; }
.ml-thumb svg { width: 60%; height: 80%; }
.ml-thumb .brush-body { fill: var(--paper-raised); stroke: var(--rule-strong); stroke-width: 1.5; }
.ml-thumb .brush-btn { fill: var(--teal); }
.ml-credit { position: absolute; left: 6px; bottom: 5px; font: 500 9.5px/1 var(--font-mono); letter-spacing: .04em; color: var(--ink-muted); text-transform: uppercase; }

/* ---------- Cards for lists ---------- */
.ml-card { display: block; background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--radius-md); padding: var(--space-4); text-decoration: none !important; color: var(--ink) !important; }
.ml-card:hover { border-color: var(--rule-strong); }
.ml-row-link { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); padding: 14px 0; border-top: 1px solid var(--rule); text-decoration: none !important; color: var(--ink) !important; }
.ml-row-link:last-child { border-bottom: 1px solid var(--rule); }
.ml-arrow { font-family: var(--font-mono); color: var(--teal); }

/* ---------- Diagram helpers (inline SVG) ---------- */
.ml-dg-stroke { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.ml-dg-signal { fill: none; stroke: var(--teal); stroke-width: 2.5; stroke-linecap: round; }
.ml-dg-fill { fill: var(--mint); }
.ml-dg-hair { fill: none; stroke: var(--rule-strong); stroke-width: 1; stroke-dasharray: 3 3; }
.ml-dg-text { font: 500 11px var(--font-mono); letter-spacing: .05em; fill: var(--ink-muted); text-transform: uppercase; }
.ml-dg-ochre { font: 400 13px var(--font-serif); font-style: italic; fill: var(--ochre); }

/* ---------- Mobile sticky bars ---------- */
.ml-sticky { position: sticky; bottom: 0; background: var(--paper-raised); box-shadow: var(--shadow-sticky); padding: 10px var(--space-4); display: flex; gap: var(--space-3); align-items: center; }
.ml-tray-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--ink); color: var(--paper-raised); font: 600 12px/1 var(--font-sans); }

/* ---------- Footer ---------- */
.ml-footer { background: var(--paper-sunk); border-top: 1px solid var(--rule); padding: var(--space-6) 0; font-size: 14px; color: var(--ink-muted); }

/* ---------- PHASE 2 — FUTURE / OPTIONAL ---------- */
.ml-future-flag { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border: 1px dashed var(--measure); border-radius: var(--radius-xs); color: var(--measure); font: 500 11px/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.ml-tested { display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 10px 0 6px; background: var(--measure); color: var(--paper-raised); border-radius: var(--radius-xs); font: 500 11.5px/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.ml-tested svg { width: 16px; height: 14px; }
.ml-tested .tick { stroke: var(--paper-raised); stroke-width: 1.5; }
.ml-measure { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--rule); border-radius: var(--radius-md); overflow: hidden; background: var(--paper-raised); }
.ml-measure > div { padding: var(--space-3) var(--space-4); }
.ml-measure > div + div { background: var(--measure-soft); border-left: 1px solid var(--rule); }
.ml-measure b { display: block; font: 600 22px/28px var(--font-sans); font-variant-numeric: tabular-nums; }
.ml-measure > div + div b { color: var(--measure); }
.ml-ruler { height: 8px; background-image: repeating-linear-gradient(90deg, var(--measure) 0 1px, transparent 1px 8px); opacity: .9; }

.ml-spec-3 th { width: 20%; }
.ml-spec-3 td { width: 40%; }

/* =====================================================================
   WordPress integration — layout, header/nav, homepage compositions,
   page templates, responsive rules (replaces the .ml-m preview modifier)
   ===================================================================== */
html { background: var(--paper); }
body { margin: 0; }
.ml-accent { color: var(--teal); }
.ml-sunk { background: var(--paper-sunk); }
.wp-site-blocks { padding: 0 !important; }
.wp-site-blocks > * { margin-block-start: 0 !important; }
/* the ml- pieces manage their own rhythm: neutralise WP flow-layout gaps inside them */
.ml-home .is-layout-flow > *, .ml-home.is-layout-flow > *, .ml-header .is-layout-flow > *, .ml-header.is-layout-flow > *,
.ml-footer .is-layout-flow > *, .ml-footer.is-layout-flow > *, .ml-main.is-layout-flow > * { margin-block-start: 0; margin-block-end: 0; }
.ml-section-head > * { margin: 0 !important; }
.ml-section-head p { white-space: nowrap; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }

/* ---------- Header ---------- */
.ml-header { position: relative; z-index: 20; }
.ml-header-in { flex-wrap: nowrap; }
.ml-logo { flex: none; line-height: 0; }
.ml-logo svg { display: block; width: 147.8px; height: 26px; }
.ml-header .wp-block-navigation { font-size: 15px; gap: 22px; flex: none; }
.ml-header .wp-block-navigation .wp-block-navigation__container { gap: 22px; }
.ml-header .wp-block-navigation a { color: var(--ink); text-decoration: none; padding-bottom: 4px; }
.ml-header .wp-block-navigation a:hover { color: var(--teal); }
.ml-header .wp-block-navigation .current-menu-item > a,
.ml-header .wp-block-navigation a[aria-current] { box-shadow: inset 0 -2px 0 var(--teal); }
.ml-header .wp-block-navigation__responsive-container.is-menu-open { background: var(--paper) !important; color: var(--ink) !important; padding: 20px 16px; }
.ml-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 0; width: 100%; }
.ml-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { width: 100%; border-top: 1px solid var(--rule); }
.ml-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a { display: block; padding: 14px 0; font-size: 19px; font-weight: 600; box-shadow: none; }
.ml-header .wp-block-navigation__responsive-container-open, .ml-header .wp-block-navigation__responsive-container-close { color: var(--ink); }
.ml-header .wp-block-search { margin-left: auto; flex: 1; min-width: 220px; max-width: 340px; }
.ml-header .wp-block-search__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }
.ml-header .wp-block-search__inside-wrapper { border: 0; padding: 0; }
.ml-header .wp-block-search__input { height: 40px; width: 100%; padding: 0 12px 0 36px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background: var(--paper-raised) var(--search-icon) no-repeat 10px 50% / 18px 18px; color: var(--ink); font: 400 14px/1 var(--font-sans); }
.ml-header .wp-block-search__input::placeholder { color: var(--ink-muted); opacity: 1; }
.ml-search-icon { display: none; color: var(--ink) !important; line-height: 0; }

/* ---------- Buttons (core/button → ml-btn) ---------- */
.wp-block-buttons.ml-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.wp-block-buttons.ml-btns > .wp-block-button { margin: 0; }
.wp-block-button__link, .wp-element-button { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); height: 44px; padding: 0 var(--space-5); border-radius: var(--radius-sm); font: 600 15px/1 var(--font-sans); border: 1px solid var(--teal); background: var(--teal); color: var(--on-teal) !important; text-decoration: none !important; cursor: pointer; white-space: nowrap; transition: filter .15s ease-out, background-color .15s ease-out; }
.wp-block-button__link:hover { filter: brightness(1.08); }
.wp-block-button.is-style-outline > .wp-block-button__link { background: var(--paper-raised); color: var(--ink) !important; border: 1px solid var(--rule-strong); padding: 0 var(--space-5); }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--mint-soft); filter: none; }
.ml-card, .ml-row-link, .ml-chip { transition: border-color .15s ease-out, background-color .15s ease-out; }
a.ml-chip { text-decoration: none !important; }
a.ml-chip:hover { background: var(--mint-soft); }
.ml-row-link:hover b { color: var(--teal); }

/* ---------- Homepage ---------- */
.ml-hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; padding-top: 56px; padding-bottom: 56px; align-items: center; }
.ml-hero-copy { display: grid; gap: 22px; align-content: start; }
.ml-hero-copy .ml-lede, .ml-hero-copy .ml-small { max-width: 520px; }
.ml-note-card { padding: 20px; display: grid; gap: 12px; }
.ml-note-card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ml-diagram { background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: 8px; }
.ml-diagram svg { display: block; width: 100%; height: auto; }
.ml-cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.ml-cat { display: grid !important; gap: 10px; padding: 20px !important; align-content: start; }
.ml-cat-icon { color: var(--teal); line-height: 0; }
.ml-cat-icon svg { width: 28px; height: 28px; }
.ml-cat b { font-size: 18px; line-height: 24px; }
.ml-needs { margin-top: 20px; }
.ml-needs .ml-kicker { align-self: center; margin-right: 6px; }
.ml-prod-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.ml-prod { display: grid !important; grid-template-columns: minmax(0,1fr); gap: 10px; align-content: start; }
.ml-prod .ml-thumb { width: 100%; height: 130px; }
.ml-prod-name { font-size: 17px; line-height: 22px; }
.ml-prod-for { font-family: var(--font-serif); font-size: 15.5px; line-height: 21px; color: var(--ink); }
.ml-prod-price { border-top: 1px solid var(--rule); padding-top: 8px; display: grid; gap: 2px; font-size: 14px; line-height: 20px; }
.ml-prod-price b { font-size: 16px; }
.ml-prod-price .ml-data { font-size: 13px; color: var(--ink); }
.ml-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.ml-tech-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ml-tech { padding: 20px !important; display: grid !important; gap: 8px; align-content: start; }
.ml-tech .ml-long { font-size: 16px; line-height: 24px; color: var(--ink-muted); }
.ml-brand-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0 24px; border-top: 1px solid var(--rule); }
.ml-brand-grid .ml-row-link { padding-right: 12px; }
.ml-brand-grid .ml-row-link:first-child, .ml-brand-grid .ml-row-link { border-top: 0; border-bottom: 1px solid var(--rule); }

/* ---------- Footer ---------- */
.ml-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; margin-bottom: 20px; }
.ml-footer-grid p { margin-top: 10px; max-width: 340px; }
.ml-footer-grid b { color: var(--ink); display: block; }
.ml-footer-grid ul { display: grid; gap: 2px; }
.ml-footer a { color: var(--ink-muted); text-decoration: none; }
.ml-footer a:hover { color: var(--teal); text-decoration: underline; }
.ml-footer .ml-wm { display: block; width: 125.1px; height: 22px; }
.ml-footer .ml-sample { color: var(--ink-muted); margin-top: 12px; }

/* ---------- Generic pages, posts, archives ---------- */
.ml-page { padding-top: 40px; padding-bottom: 56px; }
.ml-page-head { max-width: 760px; margin-bottom: 20px; }
.ml-page-head .ml-kicker { display: block; margin-bottom: 8px; }
.ml-page-head .wp-block-post-title { font-size: 36px; line-height: 42px; font-weight: 700; letter-spacing: -.02em; }
.ml-prose { max-width: 760px; }
.ml-prose > * + * { margin-top: 20px !important; }
.ml-prose > h2 { margin-top: 44px !important; font-size: 26px; line-height: 32px; font-weight: 600; letter-spacing: -.01em; }
.ml-prose > h3 { margin-top: 32px !important; font-size: 19px; line-height: 26px; font-weight: 600; }
.ml-prose > p:not([class]), .ml-prose > ul:not([class]), .ml-prose > ol:not([class]) { font-family: var(--font-serif); font-size: 18px; line-height: 29px; }
.ml-prose > ul:not([class]) { list-style: disc; padding-left: 1.3em; }
.ml-prose > ol:not([class]) { list-style: decimal; padding-left: 1.3em; }
.ml-prose img { max-width: 100%; height: auto; border-radius: var(--radius-md); }
.ml-prose blockquote { border-left: 0; margin: 0; padding: 16px 20px; background: var(--mint-soft); border-radius: var(--radius-md); font-family: var(--font-serif); font-size: 18px; line-height: 28px; }
.ml-panel-pad { padding: 20px; }
.ml-panel-pad > * + * { margin-top: 8px; }
.ml-two-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ml-two-panels ul { display: grid; gap: 6px; margin-top: 8px; }
.ml-steps > div { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 16px 0; border-top: 1px solid var(--rule); }
.ml-steps .ml-data { color: var(--teal); font-size: 20px; }
.ml-steps .ml-long { font-size: 16.5px; line-height: 25px; margin-top: 4px; }
.ml-legend > div { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--rule); }
.ml-legend .ml-src { min-width: 190px; }
.ml-soon { border-style: dashed; border-color: var(--rule-strong); }
.ml-links { border-bottom: 1px solid var(--rule); }
.ml-byline-wrap { margin: 16px 0 24px; }
.ml-byline .wp-block-post-date, .ml-byline .wp-block-post-author-name { display: inline; }
.ml-list .wp-block-post { border-top: 1px solid var(--rule); padding: 18px 0; }
.ml-list .wp-block-post:last-child { border-bottom: 1px solid var(--rule); }
.ml-list .wp-block-post-title { font-size: 19px; line-height: 26px; font-weight: 600; }
.ml-list .wp-block-post-title a { color: var(--ink); text-decoration: none; }
.ml-list .wp-block-post-title a:hover { color: var(--teal); }
.ml-list .wp-block-post-date { font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 4px; }
.ml-list .wp-block-post-excerpt { font-family: var(--font-serif); font-size: 16px; line-height: 24px; color: var(--ink-muted); margin-top: 4px; }
.ml-list .wp-block-post-excerpt__more-text { display: none; }
.wp-block-query-pagination { margin-top: 24px; gap: 16px; font-family: var(--font-mono); font-size: 13px; }
.ml-page .wp-block-search { max-width: 520px; }
.ml-page .wp-block-search__input { height: 44px; padding: 0 12px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background: var(--paper-raised); color: var(--ink); font: 400 16px var(--font-sans); }
.ml-page .wp-block-search__button { margin-left: 8px; }
.wp-block-search__inside-wrapper { border: 0 !important; padding: 0 !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .ml-header .wp-block-search { display: none; }
  .ml-search-icon { display: inline-block; margin-left: auto; }
  .ml-prod-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ml-brand-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .ml-hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .ml-cat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ml-tech-grid { grid-template-columns: 1fr; }
  .ml-footer-grid { grid-template-columns: 1fr 1fr; }
  .ml-footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 781px) {
  .ml-display { font-size: 36px; line-height: 40px; }
  .ml-h1, .ml-page-head .wp-block-post-title { font-size: 28px; line-height: 34px; }
  .ml-h2, .ml-prose > h2 { font-size: 22px; line-height: 28px; }
  .ml-lede { font-size: 18px; line-height: 26px; }
  .ml-wrap { padding: 0 var(--space-4); }
  .ml-section { padding: var(--space-6) 0; }
  .ml-header-in { height: 56px; gap: 12px; }
  .ml-logo svg { width: 125.1px; height: 22px; }
  .ml-header .wp-block-navigation { order: 3; margin-left: 4px; }
  .ml-search-icon { order: 2; }
  .ml-hero-grid { padding-top: 28px; padding-bottom: 28px; gap: 0; }
  .ml-hero-copy { gap: 16px; }
  .ml-hero-note { display: none; }
  .ml-btns, .ml-btns > .wp-block-button { width: 100%; }
  .ml-btns { flex-direction: column; gap: 16px !important; }
  .ml-btns .wp-block-button__link { width: 100%; }
  .ml-sunk.ml-section { padding: 24px 0; }
  .ml-section-head { margin-bottom: 12px; flex-wrap: wrap; }
  .ml-cat-grid, .ml-prod-grid { gap: 10px; }
  .ml-cat { padding: 14px !important; gap: 6px; }
  .ml-cat-icon svg { width: 24px; height: 24px; }
  .ml-cat b { font-size: 15.5px; line-height: 20px; }
  .ml-cat .ml-small { display: none; }
  .ml-needs { margin-top: 14px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .ml-needs::-webkit-scrollbar { display: none; }
  .ml-needs .ml-kicker { display: none; }
  .ml-chip { min-height: 44px; }
  .ml-two-col { grid-template-columns: 1fr; gap: 32px; }
  .ml-tech { padding: 16px !important; }
  .ml-brand-grid { grid-template-columns: 1fr 1fr; }
  .ml-footer-grid { grid-template-columns: 1fr; }
  .ml-page { padding-top: 24px; padding-bottom: 40px; }
  .ml-two-panels { grid-template-columns: 1fr; }
  .ml-legend > div { flex-direction: column; gap: 4px; }
  .ml-legend .ml-src { min-width: 0; }
  .ml-verdict-cols { grid-template-columns: 1fr; gap: var(--space-4); }
}
@media (max-width: 420px) {
  .ml-prod .ml-thumb { height: 110px; }
  .ml-prod-name { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
/* Navigation collapses to the overlay menu below 1000px (core's own breakpoint is 600px) */
@media (max-width: 1000px) {
  .ml-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex !important; }
  .ml-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none !important; }
  .ml-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close { display: flex; }
  .ml-header .wp-block-navigation { margin-left: 8px; }
}
/* rhythm fixes after live check */
.ml-home .ml-section-head { margin-bottom: var(--space-5); }
@media (max-width: 781px) {
  .ml-home .ml-section-head { margin-bottom: 12px; }
  .ml-label { white-space: normal; height: auto; min-height: 24px; padding: 4px 8px; line-height: 1.25; }
  .ml-prod.ml-card { padding: 12px; }
}
