/* wireframe.css · a monochrome base kit for prototypes · v3.12.0 (05/11/2026) · MIT license
   The full manual is in index.html (English) and index.pt.html (Portuguese). Summary:
   · 4 colors per mode: pure white background (pure black in dark mode), ink, ONE text gray, ONE line gray.
   · SHAPE does the talking, never a new tone:
       state      error = solid block · warning = outline · info = dashed · ok = text with the check only
       selected   hatching · hover = ink bar at the start of the row
       category   filled square · hollow square · circle · diamond
       hierarchy  size and weight, never a lighter gray
   · Corners always square. The only circle is the category one (.shape.ring, .wf-mk.k-ring).
   · No block shadow. Box-shadow only exists as an inner stroke (3px bar).
   · Every size comes from a token: space (--sp-*), stroke (--s-*), text (--t-*), height (--h-*).
     Run tools/lint-css.mjs on the app's styles.css: it flags every value off the scale.
   · Logical properties (inline-start/end) everywhere: with dir="rtl" the layout mirrors itself.
   Each app copies this file and wireframe.js and writes only its own layout in a styles.css.
   Do not edit the app's copy: change it here, bump the version and copy it again.
   Light/dark: include wireframe.js and put data-wf-theme-toggle on a button. */

:root {
  /* color: these are the only ones */
  --paper: #ffffff; --ink: #000000; --mute: #6b6b6b; --line: #d6d6d6; --hatch: rgba(0,0,0,.09);
  --panel: var(--paper);

  /* space: base 4 */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;

  /* stroke: 1 = line and control · 2 = block frame · 3 = bar (hover, focus, highlight) */
  --s-1: 1px; --s-2: 2px; --s-3: 3px;
  --s-glyph: 1.5px; /* only for drawings under 16px (the checkbox box) */

  /* text */
  --sans: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', 'Nirmala UI', 'Noto Sans', sans-serif; /* system fonts cover Arabic, Devanagari, Bengali, CJK */
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  --t-micro: 10px;   /* mono, capitals: tag, badge, field label, table header */
  --t-caption: 11px; /* mono: eyebrow, caption, code, source of a figure */
  --t-small: 13px;   /* supporting text, button, chip */
  --t-ui: 14px;      /* control, table cell, dense list */
  --t-body: 15px;    /* running text */
  --t-lede: 17px;    /* opening paragraph */
  --t-h3: 18px; --t-h2: 24px;
  --t-stat: 28px;    /* highlighted number in a block */
  --t-display: 44px; /* the total, the number the page exists to show */
  --t-h1: clamp(32px, 4.4vw, 52px);
  --lh-body: 1.5; --lh-tight: 1.15; --lh-display: 1.02;
  --track-caps: .12em; --track-tight: -.02em; --track-display: -.035em;

  /* control height: a button, field and select on the same row share the same height */
  --h-xs: 24px;  /* .x, .vote: the minimum touch target (WCAG 2.5.8) */
  --h-sm: 28px;  /* compact: inside tables and cells */
  --h-md: 36px;  /* default: .btn, .input, fields */
  --h-lg: 44px;  /* main action, touch on mobile */

  /* shape */
  --shape: 14px;  /* category marker, legend */
  --wf-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpolyline points='2,8 6,12 14,4' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'/%3E%3C/svg%3E"); /* the check: two straight lines at 45°, a sharp corner (the font's ✓ is rounded) */
  /* v3.8: every other symbol is drawn too, on the same 16 grid, lines at 0/45/90°, sharp corners.
     A font draws × ← ▲ ▾ ◐ its own way (or not at all on some phones). A mask is the same pixels everywhere */
  --wf-x: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 2L14 14M14 2L2 14' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E");
  --wf-118: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='200 162 1600 1676' fill='%23000' fill-rule='evenodd'%3E%3Cg transform='matrix(1.158277 0 0 1.158277 336.204446 -215.303768)'%3E%3Cpath d='M704.747,1327.296C680.954,1327.296 660.571,1323.452 643.597,1315.763C626.622,1308.074 613.711,1297.555 604.861,1284.208C596.011,1270.861 591.586,1255.773 591.586,1238.944C591.586,1219.503 597.027,1203.617 607.907,1191.286C618.788,1178.954 633.224,1170.322 651.213,1165.389L651.213,1161.907C636.415,1156.394 624.301,1147.98 614.871,1136.664C605.441,1125.348 600.726,1110.84 600.726,1093.14C600.726,1069.928 609.721,1050.777 627.711,1035.689C645.7,1020.601 671.379,1013.057 704.747,1013.057C738.405,1013.057 764.157,1020.601 782.001,1035.689C799.846,1050.777 808.768,1069.928 808.768,1093.14C808.768,1110.84 804.053,1125.348 794.623,1136.664C785.193,1147.98 773.079,1156.394 758.281,1161.907L758.281,1165.389C776.271,1170.322 790.706,1178.954 801.587,1191.286C812.468,1203.617 817.908,1219.503 817.908,1238.944C817.908,1255.773 813.483,1270.861 804.633,1284.208C795.784,1297.555 782.944,1308.074 766.115,1315.763C749.286,1323.452 728.83,1327.296 704.747,1327.296ZM704.747,1277.244C719.255,1277.244 730.353,1273.763 738.043,1266.799C745.732,1259.835 749.576,1250.405 749.576,1238.509L749.576,1229.804C749.576,1217.907 745.732,1208.477 738.043,1201.514C730.353,1194.55 719.255,1191.068 704.747,1191.068C690.529,1191.068 679.503,1194.55 671.669,1201.514C663.835,1208.477 659.918,1217.907 659.918,1229.804L659.918,1238.509C659.918,1250.405 663.835,1259.835 671.669,1266.799C679.503,1273.763 690.529,1277.244 704.747,1277.244ZM704.747,1143.192C718.384,1143.192 728.903,1139.928 736.302,1133.399C743.701,1126.871 747.4,1117.949 747.4,1106.632L747.4,1099.669C747.4,1088.353 743.701,1079.43 736.302,1072.902C728.903,1066.373 718.384,1063.109 704.747,1063.109C691.11,1063.109 680.592,1066.373 673.193,1072.902C665.794,1079.43 662.094,1088.353 662.094,1099.669L662.094,1106.632C662.094,1117.949 665.794,1126.871 673.193,1133.399C680.592,1139.928 691.11,1143.192 704.747,1143.192Z'/%3E%3C/g%3E%3Cpath d='M200.591,1434.539L200.571,1434.539L200.571,162.066L1396.034,162.066L1799.429,565.461L1799.429,1837.934L603.987,1837.934L200.591,1434.539ZM1283.569,565.461L1283.569,274.531L392.561,274.531L683.491,565.461L1283.569,565.461ZM1283.569,1322.074L1283.569,677.926L716.431,677.926L716.431,1076.96L800.62,964.147L916.568,964.147L916.568,1260.026L991.178,1260.026L991.178,1322.074L1152.497,1322.074L1283.569,1322.074ZM716.431,1076.96L716.431,1322.074L746.174,1322.074L746.174,1260.026L840.949,1260.026L840.949,1020.041L836.412,1020.041L764.827,1115.42L716.431,1076.96ZM313.036,1076.96L397.224,964.147L513.173,964.147L513.173,1260.026L587.783,1260.026L587.783,1322.074L603.966,1322.074L603.966,644.986L313.036,354.056L313.036,1076.96ZM313.036,1076.96L313.036,1322.074L342.779,1322.074L342.779,1260.026L437.554,1260.026L437.554,1020.041L433.017,1020.041L361.432,1115.42L313.036,1076.96ZM603.966,1678.864L603.966,1434.539L359.641,1434.539L603.966,1678.864ZM1396.034,321.116L1396.034,565.461L1640.379,565.461L1396.034,321.116ZM716.431,1434.539L716.431,1725.469L1607.439,1725.469L1316.509,1434.539L716.431,1434.539ZM1686.964,1645.944L1686.964,677.926L1396.034,677.926L1396.034,1355.014L1686.964,1645.944Z'/%3E%3C/svg%3E"); /* the maker's mark, 118labs: a wireframe cube with 118 inside (assets/118labs.svg) */
  --wf-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 8H13.5M8.5 3L13.5 8L8.5 13' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='miter'/%3E%3C/svg%3E"); /* points right, turned for the others */
  --wf-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 4.5L8 10.5L14 4.5' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='miter'/%3E%3C/svg%3E");
  --wf-tri: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1 11.5L8 4.5L15 11.5Z'/%3E%3C/svg%3E"); /* points up, sides at 45° */
  --wf-square: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 3H13V13H3Z'/%3E%3C/svg%3E");
  --wf-bang: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6.5 1H9.5V10H6.5ZM6.5 12H9.5V15H6.5Z'/%3E%3C/svg%3E");
  --wf-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 2V14M2 8H14' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E");
  --wf-minus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 8H14' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E");
  --wf-swap: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1 4.5H13M10 1.5L13 4.5L10 7.5M15 11.5H3M6 8.5L3 11.5L6 14.5' fill='none' stroke='%23000' stroke-width='1.5' stroke-linejoin='miter'/%3E%3C/svg%3E");
  --wf-theme: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1.75 1.75H14.25V14.25H1.75Z' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3Cpath d='M1 15L15 1V15Z'/%3E%3C/svg%3E"); /* a square cut at 45°: half ink, half paper */
  --wf-play: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 1L11.5 8L4.5 15Z'/%3E%3C/svg%3E");
  --wf-pause: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 2H6.5V14H3ZM9.5 2H13V14H9.5Z'/%3E%3C/svg%3E");
  --wf-diamond: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.5L14.5 8L8 14.5L1.5 8Z' fill='none' stroke='%23000' stroke-width='1.5' stroke-linejoin='miter'/%3E%3C/svg%3E"); /* a talk, a comment: the hollow diamond */
  --wf-reload: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 10V3H14V13H5M7.5 10.5L5 13L7.5 15.5' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='miter'/%3E%3C/svg%3E"); /* load again: a square loop that comes back round to its start, at 90° and 45° */
  --bar-x: var(--s-3); /* hover bar, turns negative in RTL */

  /* motion */
  --dur-1: 120ms; --dur-2: 200ms; --dur-3: 350ms; --dur-4: 500ms; --ease: cubic-bezier(.2,.8,.2,1);
  /* motion curves (manual, Motion and performance): one per job, never the ease/linear keywords */
  --ease-out: cubic-bezier(.25, 1, .5, 1);     /* state changes and micro-interactions */
  --ease-enter: cubic-bezier(.16, 1, .3, 1);   /* something arrives: decelerates into place */
  --ease-exit: cubic-bezier(.7, 0, .84, 0);    /* something leaves: accelerates away */
  --ease-move: cubic-bezier(.65, 0, .35, 1);   /* from one resting place to another */
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1); /* a small confirmation pops (24px or less) */

  /* layers */
  --z-pop: 20; --z-map: 500; --z-sticky: 600; --z-toast: 1000; --z-screen: 2000;

  /* measures */
  --w-frame: 1240px; --w-side: 340px; --w-measure: 62ch;

  /* aliases for v1 apps */
  --ink-2: var(--ink); --line-2: var(--line);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --paper: #000000; --ink: #ffffff; --mute: #8f8f8f; --line: #333333; --hatch: rgba(255,255,255,.12);
} }
:root[data-theme="dark"] { --paper: #000000; --ink: #ffffff; --mute: #8f8f8f; --line: #333333; --hatch: rgba(255,255,255,.12); }
[dir="rtl"] { --bar-x: calc(-1 * var(--s-3)); }
/* letter spacing pulls apart scripts whose letters join or that have no capitals: Arabic, Urdu, Devanagari, Bengali, Chinese, Japanese */
:root:is(:lang(ar), :lang(ur), :lang(hi), :lang(bn), :lang(zh), :lang(ja)) { --track-caps: 0; --track-tight: 0; --track-display: 0; }
/* monospace fonts draw Arabic letters unjoined and have no Devanagari or Bengali: those labels use the sans */
:root:is(:lang(ar), :lang(ur), :lang(hi), :lang(bn)) { --mono: var(--sans); }

/* base */
* { box-sizing: border-box; }
*, *::before, *::after { border-radius: 0; }
.leaflet-tooltip, .leaflet-popup-content-wrapper, .leaflet-popup-tip, .leaflet-control-layers, .leaflet-bar a { border-radius: 0 !important; }
html { color-scheme: light dark; }
:root[data-theme="light"] { color-scheme: light; } :root[data-theme="dark"] { color-scheme: dark; }
body { margin: 0; color: var(--ink); background: var(--paper); font: var(--t-body)/var(--lh-body) var(--sans); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--ink); text-underline-offset: 3px; }
p { margin: 0 0 var(--sp-3); }
:focus-visible { outline: var(--s-2) solid var(--ink); outline-offset: var(--s-2); }
[hidden] { display: none !important; }
.muted { color: var(--mute); }
.small { font-size: var(--t-small); }
.empty { color: var(--mute); font: var(--t-caption) var(--mono); }
.num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
/* code reads left to right in every language */
pre, code, kbd, .ltr { direction: ltr; unicode-bidi: isolate; }
pre { text-align: left; } /* lint-ok: code is always LTR, even inside an RTL page */

/* scrollbar: a square ink thumb on a line-colored track, no arrows.
   Chrome 121+ IGNORES ::-webkit-scrollbar when scrollbar-width/-color exist and draws the system
   scrollbar (rounded on Windows 11): the standard properties only go to browsers without the other one. */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: var(--paper); box-shadow: inset var(--s-1) 0 0 var(--line); }
::-webkit-scrollbar-track:horizontal { box-shadow: inset 0 calc(-1 * var(--s-1)) 0 var(--line); } /* v3.9: the line runs UNDER a sideways bar, like a rail. On top it read as a divider, not as something to drag */
::-webkit-scrollbar-thumb { background: var(--ink); border: 0; min-height: 40px; }
::-webkit-scrollbar-thumb:hover { background: var(--mute); }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-corner { background: var(--paper); }
@supports not selector(::-webkit-scrollbar) { * { scrollbar-width: thin; scrollbar-color: var(--ink) var(--paper); } }

/* type */
.eyebrow { display: block; font: 500 var(--t-caption) var(--mono); text-transform: uppercase; letter-spacing: var(--track-caps); color: var(--mute); margin: 0 0 var(--sp-2); }
h1 { font: 800 var(--t-h1)/var(--lh-display) var(--sans); letter-spacing: var(--track-display); margin: 0 0 var(--sp-3); text-wrap: balance; }
h2 { font: 800 var(--t-h2)/var(--lh-tight) var(--sans); letter-spacing: var(--track-tight); margin: 0; text-wrap: balance; }
h3 { font: 700 var(--t-h3)/var(--lh-tight) var(--sans); letter-spacing: var(--track-tight); margin: 0 0 var(--sp-3); }
h4 { font: 700 var(--t-body)/var(--lh-tight) var(--sans); margin: 0 0 var(--sp-2); }
/* ── symbols, drawn (v3.8) ──
   Every symbol of the kit is a mask painted with currentColor, so it follows the text, the theme and hacker mode, and is
   the same on every phone and system (a font glyph is not). In markup: <i class="wf-i" data-i="x" aria-hidden="true"></i>
   data-i: check · x · bang · plus · minus · up · down · left · right · chev · tri-up · tri-down · square · swap ·
   theme-light · theme-dark · play · pause · diamond · reload. The old <i class="wf-check"> still works. The states use them on their own. */
.wf-i, .wf-check, h3[data-level]::before, .tag[data-level="ok"]::before, .tag.done::before, .field-msg::before, .wf-callout[data-level] > b::before,
.wf-plan li::before, .wf-menu-list > .danger::before, .wf-delta:is(.up, .down, .flat)::before, .wf-menu > summary::after {
  content: ''; display: inline-block; flex: none; width: .8em; height: .8em; vertical-align: -.05em; background: currentColor;
  -webkit-mask: var(--wf-ico, var(--wf-check)) center / contain no-repeat; mask: var(--wf-ico, var(--wf-check)) center / contain no-repeat; }
/* next to its words, the symbol keeps a little air (a lone .wf-i in a box needs none) */
.wf-check, h3[data-level]::before, .tag[data-level="ok"]::before, .tag.done::before, .field-msg::before, .wf-callout[data-level] > b::before,
.wf-plan li::before, .wf-menu-list > .danger::before, .wf-delta:is(.up, .down, .flat)::before { margin-inline-end: .3em; }
.wf-i[data-i="x"], h3[data-level="erro"]::before, .field-msg:not(.ok)::before, .wf-callout[data-level="erro"] > b::before, .wf-menu-list > .danger::before, .wf-plan li.no::before { --wf-ico: var(--wf-x); }
.wf-i[data-i="bang"], h3[data-level="aviso"]::before, .wf-callout[data-level="aviso"] > b::before { --wf-ico: var(--wf-bang); }
h3[data-level="info"]::before, .wf-callout[data-level="info"] > b::before { display: none; }
.wf-i:is([data-i="up"], [data-i="down"], [data-i="left"], [data-i="right"]) { --wf-ico: var(--wf-arrow); }
.wf-i[data-i="up"] { rotate: -90deg; } .wf-i[data-i="down"] { rotate: 90deg; } .wf-i[data-i="left"] { rotate: 180deg; }
[dir="rtl"] .wf-i:is([data-i="left"], [data-i="right"]) { scale: -1 1; } /* back and forward point the other way in RTL */
.wf-i[data-i="chev"], .wf-menu > summary::after { --wf-ico: var(--wf-chev); }
.wf-i:is([data-i="tri-up"], [data-i="tri-down"]), .wf-delta.up::before, .wf-delta.down::before { --wf-ico: var(--wf-tri); }
.wf-i[data-i="tri-down"], .wf-delta.down::before { rotate: 180deg; }
.wf-i[data-i="square"], .wf-delta.flat::before { --wf-ico: var(--wf-square); }
.wf-i[data-i="plus"] { --wf-ico: var(--wf-plus); } .wf-i[data-i="minus"] { --wf-ico: var(--wf-minus); }
.wf-i[data-i="swap"] { --wf-ico: var(--wf-swap); }
.wf-i:is([data-i="theme-light"], [data-i="theme-dark"]) { --wf-ico: var(--wf-theme); } .wf-i[data-i="theme-dark"] { rotate: 180deg; }
.wf-i[data-i="play"] { --wf-ico: var(--wf-play); } .wf-i[data-i="pause"] { --wf-ico: var(--wf-pause); }
.wf-i[data-i="diamond"] { --wf-ico: var(--wf-diamond); } .wf-i[data-i="reload"] { --wf-ico: var(--wf-reload); }
.lede { font-size: var(--t-lede); max-width: 50ch; margin: 0 0 var(--sp-5); }
.stat { font: 800 var(--t-stat)/var(--lh-tight) var(--sans); letter-spacing: var(--track-tight); font-variant-numeric: tabular-nums; }
.display { font: 800 var(--t-display)/1 var(--sans); letter-spacing: var(--track-display); font-variant-numeric: tabular-nums; }
/* a section title with its rule: <h3 class="wf-title">Weather</h3> */
.wf-title { border-bottom: var(--s-2) solid var(--ink); padding-bottom: var(--sp-2); margin: 0 0 var(--sp-3); }

/* buttons: default = outline · .solid = the main action (one per area) · .ghost = secondary */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); min-height: var(--h-md);
  border: var(--s-1) solid var(--ink); background: var(--paper); padding: 0 var(--sp-3); cursor: pointer;
  font: 500 var(--t-small) var(--mono); transition: transform var(--dur-1) var(--ease-out), background var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out); white-space: nowrap; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
:is(input, select, textarea):disabled { opacity: .55; cursor: not-allowed; }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.solid:hover { background: var(--paper); color: var(--ink); }
.btn.ghost { border-color: var(--line); color: var(--mute); }
.btn.ghost:hover { border-color: var(--ink); background: var(--paper); color: var(--ink); }
.btn.sm { min-height: var(--h-sm); padding: 0 var(--sp-2); }
.btn.wide { width: 100%; min-height: var(--h-lg); white-space: normal; }
.x { display: inline-grid; place-items: center; border: var(--s-1) solid var(--line); background: transparent; width: var(--h-xs); height: var(--h-xs); padding: 0; line-height: 1; cursor: pointer; color: var(--mute); flex: none; }
.x:hover:not(:disabled) { border-color: var(--ink); color: var(--ink); }
.x:disabled { opacity: .35; cursor: default; }
.link { border: 0; background: none; padding: 0; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: start; }

/* select: square, with the arrow drawn in ink (the native one and the rounding go away) */
select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-inline-end: var(--sp-6);
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
[dir="rtl"] select { background-position: 10px 52%, 15px 52%; }
select option { background: var(--paper); color: var(--ink); }
/* date and time fields: the kit draws its own square calendar in ink (a mask painted with currentColor),
   so the icon follows the theme. The native one was invisible in dark mode. */
input::-webkit-calendar-picker-indicator { cursor: pointer; opacity: 1; width: 14px; height: 14px; padding: 0; margin-inline-start: var(--sp-1);
  background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1 3h14v12H1zM1 6.5h14M4.5 1v3.5M11.5 1v3.5' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3Crect x='3.5' y='9' width='3' height='3'/%3E%3C/svg%3E") center / 14px 14px no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1 3h14v12H1zM1 6.5h14M4.5 1v3.5M11.5 1v3.5' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3Crect x='3.5' y='9' width='3' height='3'/%3E%3C/svg%3E") center / 14px 14px no-repeat; }
input::-webkit-calendar-picker-indicator:hover { background: var(--mute); }
/* checkbox: empty square when off. When on, only the check, no box */
input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 15px; height: 15px; margin: 0; flex: none; cursor: pointer;
  border: var(--s-glyph) solid currentColor; background: transparent; display: inline-grid; place-items: center; vertical-align: -2px; }
input[type="checkbox"]::before { content: ''; width: 12px; height: 12px; background: currentColor; -webkit-mask: var(--wf-check) center / contain no-repeat; mask: var(--wf-check) center / contain no-repeat; transform: translateY(-1px) scale(.4); opacity: 0; transition: transform var(--dur-1) var(--ease-spring), opacity var(--dur-1) var(--ease-out); }
input[type="checkbox"]:checked { border-color: transparent; }
input[type="checkbox"]:checked::before { opacity: 1; transform: translateY(-1px) scale(1); }
input[type="checkbox"]:focus-visible { outline: var(--s-2) solid currentColor; outline-offset: var(--s-2); }

/* fields. Labelled: <label class="field">Name<input></label> · standalone: <input class="input"> */
.field { display: flex; flex-direction: column; gap: var(--sp-1); font: 500 var(--t-micro) var(--mono); text-transform: uppercase; letter-spacing: var(--track-caps); color: var(--mute); min-width: 0; }
.field input, .field select, .field textarea, .input { min-height: var(--h-md); border: var(--s-1) solid var(--ink); background-color: var(--paper); padding: 0 var(--sp-3); min-width: 0;
  font: 500 var(--t-ui) var(--sans); text-transform: none; letter-spacing: 0; color: var(--ink); }
.field select, select.input { padding-inline-end: var(--sp-6); }
.field textarea, textarea.input { padding: var(--sp-2) var(--sp-3); min-height: calc(var(--h-md) * 2); resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; box-shadow: inset 0 calc(-1 * var(--s-3)) 0 var(--ink); }
/* autofill: the browser paints its own tint (blue in Chrome) that background cannot override, so paper is painted as a shadow and the focus bar stays on top */
:is(input, select, textarea):autofill { -webkit-text-fill-color: var(--ink); caret-color: var(--ink); box-shadow: inset 0 0 0 100vmax var(--paper); }
:is(input, select, textarea):autofill:focus { box-shadow: inset 0 calc(-1 * var(--s-3)) 0 var(--ink), inset 0 0 0 100vmax var(--paper); }
.field .hint { font: 400 var(--t-caption) var(--sans); text-transform: none; letter-spacing: 0; }
/* editing inside a table cell. A select grows with its text: it never cuts its own label */
.cell { min-height: var(--h-sm); border: var(--s-1) solid transparent; background-color: transparent; padding: 0 var(--sp-2); font-size: var(--t-ui); min-width: 0; }
input.cell { width: 100%; }
select.cell { width: auto; max-width: 100%; padding-inline-end: var(--sp-5); background-position: calc(100% - 11px) 52%, calc(100% - 6px) 52%; }
[dir="rtl"] select.cell { background-position: 6px 52%, 11px 52%; }
.cell:hover { border-color: var(--line); } .cell:focus { outline: none; border-color: var(--ink); }

/* surfaces: 2px frame on the top-level block, 1px on what lives inside it */
.card { background: var(--paper); border: var(--s-2) solid var(--ink); padding: var(--sp-4); }
.card.sub { border-width: var(--s-1); padding: var(--sp-3); }
.card.dashed { border-style: dashed; }
.card.strong { box-shadow: inset var(--bar-x) 0 0 var(--ink); }
.divider { border: 0; border-top: var(--s-1) dashed var(--line); margin: var(--sp-3) 0; }
/* a note in the margin: <p class="wf-note">…</p> */
.wf-note { border-inline-start: var(--s-3) solid var(--ink); padding-inline-start: var(--sp-3); margin: 0 0 var(--sp-3); }
/* a collapsed extra: <details class="wf-more"><summary>See the table</summary>…</details> */
.wf-more > summary { cursor: pointer; font: 600 var(--t-caption) var(--mono); text-transform: uppercase; letter-spacing: var(--track-caps); padding: var(--sp-1) 0; }
.wf-more[open] > summary { margin-bottom: var(--sp-2); }

/* labels */
/* Spaced capitals put the spacing after the LAST letter too, so the word sat left of center:
   the start padding gets that spacing back (tag, badge, tab count). */
.tag { display: inline-block; font: 600 var(--t-micro)/1.4 var(--mono); text-transform: uppercase; letter-spacing: var(--track-caps); border: var(--s-1) solid var(--line); padding-block: 1px; padding-inline: calc(var(--sp-1) + var(--track-caps)) var(--sp-1); text-align: center; color: var(--mute); white-space: nowrap; vertical-align: 1px; }
.tag[data-level="erro"], .tag.solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tag[data-level="aviso"], .tag.outline { border-color: var(--ink); color: var(--ink); }
.tag[data-level="info"], .tag.dashed { border: var(--s-1) dashed var(--ink); color: var(--ink); }
.tag[data-level="ok"], .tag.done { border-color: transparent; color: var(--ink); padding-inline-start: var(--track-caps); }
.badge { display: inline-block; font: 600 var(--t-micro)/1.4 var(--mono); text-transform: uppercase; letter-spacing: var(--track-caps); border: var(--s-1) solid var(--ink); padding-block: 1px; padding-inline: calc(var(--sp-1) + var(--track-caps)) var(--sp-1); white-space: nowrap; }
/* a button with a count (votes, likes): pressed = filled */
.vote { min-height: var(--h-xs); border: var(--s-1) solid var(--ink); background: transparent; font: 600 var(--t-caption) var(--mono); padding: 0 var(--sp-2); cursor: pointer; }
.vote.on, .vote[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
/* a suggestion to add: dashed until the mouse arrives */
.chip { display: inline-flex; align-items: center; justify-content: center; min-height: var(--h-sm); border: var(--s-1) dashed var(--ink); background: var(--paper); padding: 0 var(--sp-3); cursor: pointer; font-size: var(--t-small); } /* v2.5.3: inline-flex, so a <span class="chip"> is as tall and as centered as a button */
.chip:hover { border-style: solid; }
/* a pill-shaped checkbox: checked = filled */
.tick { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: var(--h-sm); font-size: var(--t-small); cursor: pointer; border: var(--s-1) solid var(--ink); padding: 0 var(--sp-2); }
.tick input { color: inherit; }
.tick:has(input:checked) { background: var(--ink); color: var(--paper); }
.tick.sm { min-height: var(--h-xs); padding: 0 var(--sp-1); gap: var(--sp-1); font: 600 var(--t-caption) var(--mono); }

/* numbers in a block: <div class="wf-stats"><div class="wf-stat"><span class="eyebrow">Today</span><b>R$ 5,40</b><span>source</span></div></div> */
.wf-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border: var(--s-2) solid var(--ink); }
.wf-stats:empty { display: none; }
.wf-stat { display: flex; flex-direction: column; gap: var(--sp-1); padding: var(--sp-3); border-inline-end: var(--s-1) solid var(--line); min-width: 0; }
.wf-stat:last-child { border-inline-end: 0; }
.wf-stat .eyebrow { margin: 0; }
.wf-stat > b { font: 800 var(--t-stat)/var(--lh-tight) var(--sans); letter-spacing: var(--track-tight); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.wf-stat > span:not(.eyebrow) { font-size: var(--t-small); }
.wf-stats.sm .wf-stat > b { font-size: var(--t-h3); }

/* image placeholder: <div class="hatch"><span class="xh"></span><span class="ann tl">photo</span></div> */
.hatch { position: relative; min-height: 160px; border: var(--s-2) solid var(--ink);
  background: repeating-linear-gradient(-45deg, var(--hatch) 0 1px, transparent 1px 9px), var(--paper); }
.xh::before, .xh::after { content: ''; position: absolute; background: var(--line); }
.xh::before { inset-inline-start: 50%; top: 0; bottom: 0; width: var(--s-1); }
.xh::after { top: 50%; inset-inline: 0; height: var(--s-1); }
.ann { position: absolute; font: var(--t-caption) var(--mono); background: var(--paper); border: var(--s-1) solid var(--ink); padding: var(--sp-1) var(--sp-2); }
.ann.tl { top: var(--sp-3); inset-inline-start: var(--sp-3); text-transform: uppercase; letter-spacing: var(--track-caps); }
.ann.tr { top: var(--sp-3); inset-inline-end: var(--sp-3); } .ann.bl { bottom: var(--sp-3); inset-inline-start: var(--sp-3); } .ann.br { bottom: var(--sp-3); inset-inline-end: var(--sp-3); }

/* progress bar: <div class="meter"><span style="width:40%"></span></div>. Span.over = over the limit */
.meter { height: var(--sp-2); border: var(--s-1) solid var(--ink); background: repeating-linear-gradient(90deg, transparent 0 9px, var(--line) 9px 10px); }
.meter span { display: block; height: 100%; background: var(--ink); } /* the width is data, not motion: it changes in place (animating width re-lays the page every frame) */
.meter span.over { background: repeating-linear-gradient(-45deg, var(--ink) 0 3px, transparent 3px 6px); }

/* tables */
table { width: 100%; border-collapse: collapse; background: var(--paper); }
th { font: 500 var(--t-micro) var(--mono); text-transform: uppercase; letter-spacing: var(--track-caps); color: var(--mute); text-align: start;
  padding: var(--sp-2) var(--sp-3); border-bottom: var(--s-1) solid var(--ink); position: sticky; top: 0; background: var(--paper); white-space: nowrap; }
td { padding: var(--sp-3); border-bottom: var(--s-1) solid var(--line); vertical-align: middle; font-size: var(--t-ui); }
td small { display: block; font: var(--t-caption) var(--mono); color: var(--mute); margin-top: 2px; }
table.dense td { padding: var(--sp-1) var(--sp-2); }
tr:hover td:first-child, .wf-hover:hover { box-shadow: inset var(--bar-x) 0 0 var(--ink); }
table.dense tr:hover td:first-child, .sheet tr.cat:hover td:first-child { box-shadow: none; }
/* the hatch is painted on the row, not on each cell: one pattern runs across every column (per cell, it restarted at each one) */
tr.chosen { background: repeating-linear-gradient(-45deg, var(--hatch) 0 1px, transparent 1px 7px); }
tr.off td { opacity: .45; }
/* sheet: a table framed at the top and bottom. Tr.cat = group row */
.sheet { border-top: var(--s-2) solid var(--ink); border-bottom: var(--s-2) solid var(--ink); }
.sheet tr.cat td { font: 600 var(--t-caption) var(--mono); text-transform: uppercase; letter-spacing: var(--track-caps); border-bottom: var(--s-1) solid var(--ink); padding-top: var(--sp-4); }
/* v3.9: a sideways scroll says so on every screen, also where the system hides the bar (phones, a Mac): an ink bar on the
   edge where more is hidden. Each bar is a layer that stays with the box (scroll), and a paper layer that travels with the
   content (local) covers it once that end is reached, so at the start only the right bar shows, at the end only the left.
   No shade and no fade: a solid bar, the same mark as hover. Never hide the scrollbar of content (tabs are the exception) */
.wf-scroll { overflow-x: auto; max-width: 100%;
  background:
    linear-gradient(var(--paper), var(--paper)) left / var(--sp-3) 100% no-repeat local,
    linear-gradient(var(--paper), var(--paper)) right / var(--sp-3) 100% no-repeat local,
    linear-gradient(var(--ink), var(--ink)) left / var(--s-3) 100% no-repeat scroll,
    linear-gradient(var(--ink), var(--ink)) right / var(--s-3) 100% no-repeat scroll; }
/* the bars are the box's background, so what is inside lets it through: a table inside paints no paper (its sticky
   header cannot stick in a box that only scrolls sideways anyway) */
.wf-scroll > table, .wf-scroll > table th { background: transparent; }

/* dialog */
dialog { border: var(--s-2) solid var(--ink); padding: 0; width: min(880px, calc(100vw - var(--sp-6))); max-height: min(78dvh, 720px); background: var(--paper); color: var(--ink); }
dialog[open] { display: flex; flex-direction: column; will-change: transform, opacity; animation: wf-pop var(--dur-2) var(--ease-enter); }
dialog::backdrop { background: rgba(0,0,0,.4); backdrop-filter: grayscale(1) blur(2px); } /* lint-ok: the backdrop dims the page in both themes, a theme token would turn white in dark mode */
@keyframes wf-pop { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
.wf-dhead { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-bottom: var(--s-2) solid var(--ink); }
.wf-dhead h3 { margin: 0; font-family: var(--mono); font-weight: 600; }
.wf-dhead .x { width: var(--h-sm); height: var(--h-sm); font-size: var(--t-h3); }

/* passing notice: a <div class="toast" role="status"></div>, with .on to show it */
.toast { position: fixed; inset-inline: 0; margin-inline: auto; width: fit-content; bottom: var(--sp-5); transform: translate3d(0, 20px, 0); background: var(--ink); color: var(--paper);
  font: var(--t-small) var(--mono); padding: var(--sp-3) var(--sp-4); opacity: 0; pointer-events: none; will-change: transform, opacity; transition: transform var(--dur-2) var(--ease-exit), opacity var(--dur-2) var(--ease-exit); max-width: calc(100vw - var(--sp-6)); z-index: var(--z-toast); }
.toast.on { opacity: 1; transform: translate3d(0, 0, 0); transition-timing-function: var(--ease-enter); } /* centred by layout, not by translate(-50%): a half-pixel offset would blur it */

/* tabs: <nav class="wf-tabs"><button aria-selected="true">A <span class="count">3</span></button></nav> */
.wf-tabs { display: flex; flex-wrap: wrap; border-bottom: var(--s-2) solid var(--ink); } /* never scrolls: tabs that do not fit go to a second line */
@supports not selector(::-webkit-scrollbar) { .wf-tabs { scrollbar-width: none; } }
.wf-tabs::-webkit-scrollbar { display: none; }
.wf-tabs button { min-height: var(--h-md); border: var(--s-2) solid transparent; border-bottom: 0; background: transparent; padding: 0 var(--sp-3); cursor: pointer;
  font: 500 var(--t-caption) var(--mono); text-transform: uppercase; letter-spacing: var(--track-caps); color: var(--mute); white-space: nowrap; margin-bottom: calc(-1 * var(--s-2)); }
.wf-tabs:not(.is-wrapped) button { padding-bottom: var(--s-2); } /* v2.5.3: the tab has a top border and none below (it sits on the strip line): the same space below keeps the label in the middle */
.wf-tabs button:hover { color: var(--ink); }
.wf-tabs button[aria-selected="true"] { color: var(--ink); background: var(--paper); border-color: var(--ink); font-weight: 600; position: relative; z-index: 1; } /* v2.5.2: painted above the strip line, so a scaled page (a slide, browser zoom) never shows the line under the open tab */
.wf-tabs .count { margin-inline-start: var(--sp-2); border: var(--s-1) solid currentColor; padding-block: 0; padding-inline: calc(var(--sp-1) + var(--track-caps)) var(--sp-1); font-size: var(--t-micro); }
.wf-tabs .count:empty { display: none; }
/* tabs on more than one line: wireframe.js adds .is-wrapped and the strip becomes a grid of tabs.
   Nothing hides off-screen. The current tab is the inverted one */
.wf-tabs.is-wrapped { gap: var(--sp-1); padding-bottom: var(--sp-2); }
.wf-tabs.is-wrapped button { min-height: var(--h-sm); border: var(--s-1) solid var(--line); margin-bottom: 0; }
.wf-tabs.is-wrapped button:hover { border-color: var(--ink); }
.wf-tabs.is-wrapped button[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* legend and shapes: the same as the map markers */
.wf-legend { display: flex; align-items: center; gap: var(--sp-2) var(--sp-3); flex-wrap: wrap; font: var(--t-caption) var(--mono); color: var(--mute); }
.shape { display: inline-grid; place-items: center; width: var(--shape); height: var(--shape); border: var(--s-2) solid var(--ink); font: 600 var(--t-micro) var(--mono); color: var(--paper); flex: none; }
.shape.fill { background: var(--ink); } .shape.ring { border-radius: 50%; } .shape.dia { transform: rotate(45deg) scale(.8); }
.shape.pin { background: var(--ink); width: 16px; height: 16px; }
.shape.dashed { border-style: dashed; }
.shape.hatched { width: 22px; background: repeating-linear-gradient(-45deg, var(--hatch) 0 1px, transparent 1px 5px); border-width: var(--s-1); }

/* history: <ul class="feed"><li>…</li></ul> */
.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); font-size: var(--t-ui); }
.feed li { border-inline-start: var(--s-2) solid var(--ink); padding-inline-start: var(--sp-2); }
.feed li.empty { border: 0; padding: 0; }
/* numbered steps: <ol class="steps"><li><span class="num-dot">1</span><span>…</span><span>actions</span></li></ol> */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.steps li { display: grid; grid-template-columns: var(--h-xs) minmax(0, 1fr) auto; gap: var(--sp-2); align-items: start; padding: var(--sp-2) 0; border-bottom: var(--s-1) solid var(--line); font-size: var(--t-ui); }
.steps li.empty { display: block; border: 0; }
.num-dot { width: var(--h-xs); height: var(--h-xs); background: var(--ink); color: var(--paper); display: grid; place-items: center; font: 600 var(--t-caption) var(--mono); flex: none; }
.num-dot.outline { background: var(--paper); color: var(--ink); border: var(--s-2) solid var(--ink); }
/* simple list with an action at the end: <ul class="wf-list"><li>text <button class="x">×</button></li></ul> */
.wf-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); font-size: var(--t-ui); }
.wf-list li { display: flex; align-items: center; gap: var(--sp-2); } .wf-list li > .x:last-child { margin-inline-start: auto; }

/* maps (Leaflet): <div class="wf-map"><div id="m" style="height:400px"></div><div class="wf-map-card">…</div></div>
   Tiles with no key and already gray: Esri Canvas World_Light_Gray_Base / World_Dark_Gray_Base. */
.wf-map { position: relative; border: var(--s-2) solid var(--ink); }
.wf-map-card { position: absolute; z-index: var(--z-map); inset-inline-start: var(--sp-3); bottom: var(--sp-3); background: var(--paper); border: var(--s-2) solid var(--ink); padding: var(--sp-3); font-size: var(--t-ui); max-width: min(340px, calc(100% - var(--sp-5))); }
.leaflet-container { font-family: var(--sans); background: var(--paper); isolation: isolate; } /* v2.5.1: Leaflet puts its panes at 400 and controls at 1000. They stay inside the map, under the sticky bars (--z-sticky) */
.leaflet-bar { border: var(--s-2) solid var(--ink) !important; border-radius: 0 !important; box-shadow: none !important; }
.leaflet-bar a, .leaflet-bar a:hover { background: var(--paper); color: var(--ink); border-color: var(--ink); border-radius: 0 !important; }
.leaflet-control-attribution { background: var(--paper) !important; color: var(--mute) !important; font: var(--t-micro) var(--mono); }
.leaflet-control-attribution a { color: var(--ink) !important; }
.leaflet-attribution-flag { display: none !important; } /* the only colour on the page: Leaflet adds it by default */
.wf-tip { background: var(--paper); color: var(--ink); border: var(--s-glyph) solid var(--ink); border-radius: 0; box-shadow: none; font: 600 var(--t-caption) var(--mono); padding: 2px var(--sp-2); }
.wf-tip::before { display: none; }
/* numbered pin (L.divIcon className 'wf-pin', html <span>1</span>) */
.wf-pin span { height: var(--h-xs); min-width: var(--h-xs); padding: 0 var(--sp-2); background: var(--ink); color: var(--paper); border: var(--s-2) solid var(--paper);
  display: grid; place-items: center; font: 600 var(--t-caption) var(--mono); box-shadow: 0 0 0 var(--s-2) var(--ink); white-space: nowrap; }
/* category marker (className 'wf-mk k-fill|k-sq|k-ring|k-dia', html <span></span>) */
.wf-mk span { display: block; width: var(--shape); height: var(--shape); border: var(--s-2) solid var(--ink); background: var(--paper); }
.wf-mk.k-fill span { background: var(--ink); }
.wf-mk.k-ring span { border-radius: 50%; }
.wf-mk.k-dia span { transform: rotate(45deg); width: 12px; height: 12px; }

/* layout */
.wf-frame { max-width: var(--w-frame); margin: 0 auto; padding: var(--sp-5) var(--sp-5) var(--sp-7); }
.wf-stack { display: flex; flex-direction: column; gap: var(--sp-3); }
.wf-stack.lg { gap: var(--sp-5); }
.wf-row { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }
.wf-row.end { align-items: end; } .wf-row.lg { gap: var(--sp-3); }
.wf-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--sp-4); }
.wf-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--sp-3); }
.wf-split { display: grid; grid-template-columns: minmax(0, 1fr) var(--w-side); gap: var(--sp-6); align-items: start; }
.grow { flex: 1; min-width: 0; }
@media (max-width: 900px) { .wf-split:not(.wf-slide *) { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .wf-frame { padding: var(--sp-4) var(--sp-4) var(--sp-6); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* number fields: no native arrows. wireframe.js adds square − / + buttons */
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }
.wf-num { display: inline-flex; align-items: stretch; max-width: 100%; min-width: 0; }
.field .wf-num { display: flex; min-width: 120px; } /* below this the value is cut: steppers take 56px */
.wf-num input { flex: 1 1 0; width: 0; min-width: 3ch; text-align: center; padding-inline: var(--sp-1); font-variant-numeric: tabular-nums; }
.wf-step { flex: none; width: var(--h-sm); border: var(--s-1) solid var(--ink); background: var(--paper); color: var(--ink); padding: 0; cursor: pointer; font: 600 var(--t-ui)/1 var(--mono); }
.wf-step:first-child { margin-inline-end: calc(-1 * var(--s-1)); } .wf-step:last-child { margin-inline-start: calc(-1 * var(--s-1)); }
.wf-step:hover { background: var(--ink); color: var(--paper); }
.wf-step:active { transform: translateY(1px); }
/* compact: in a table cell the buttons use the thin line, like the cell */
.wf-num:has(.cell) .wf-step { border-color: var(--line); width: var(--h-xs); font-size: var(--t-small); }
.wf-num:has(.cell):hover .wf-step, .wf-num:has(.cell):focus-within .wf-step { border-color: var(--ink); }

/* ═══ v2.1 · universal pieces (forms, navigation, states, overlays, content, charts) ═══════════════════════════════ */

/* ── form ── */
/* radio: empty square, and when checked it gets a filled square inside (a checked checkbox is only the check) */
input[type="radio"] { appearance: none; -webkit-appearance: none; width: 15px; height: 15px; margin: 0; flex: none; cursor: pointer; vertical-align: -2px;
  border: var(--s-glyph) solid currentColor; background: transparent; }
input[type="radio"]:checked { background: currentColor; box-shadow: inset 0 0 0 3px var(--paper); }
input[type="radio"]:focus-visible { outline: var(--s-2) solid currentColor; outline-offset: var(--s-2); }
/* on/off switch: <input type="checkbox" class="wf-switch" role="switch">. The knob is a square, off at the start, on at the end on a filled box.
   v3.8: the knob drops the checkbox's check mask, which it inherited in v3.7.0 and showed as a check instead of the square */
input[type="checkbox"].wf-switch { width: 34px; height: 20px; border: var(--s-1) solid currentColor; display: inline-flex; align-items: center; padding: 2px; vertical-align: -5px; }
input[type="checkbox"].wf-switch::before { content: ''; width: 14px; height: 14px; background: currentColor; opacity: 1; transform: none; -webkit-mask: none; mask: none; transition: transform var(--dur-1) var(--ease-out); }
input[type="checkbox"].wf-switch:checked { background: currentColor; border-color: currentColor; }
input[type="checkbox"].wf-switch:checked::before { background: var(--paper); transform: translateX(14px); }
[dir="rtl"] input[type="checkbox"].wf-switch:checked::before { transform: translateX(-14px); }
/* pick one among a few: <div class="wf-seg" role="radiogroup"><label><input type="radio" name="v" checked><span>Day</span></label>…</div> */
.wf-seg { display: inline-flex; border: var(--s-1) solid var(--ink); }
.wf-seg label { display: contents; }
.wf-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.wf-seg span { display: inline-flex; align-items: center; min-height: var(--h-sm); padding: 0 var(--sp-3); font: 500 var(--t-small) var(--mono); cursor: pointer; border-inline-start: var(--s-1) solid var(--ink); }
.wf-seg label:first-child span { border-inline-start: 0; }
.wf-seg input:checked + span { background: var(--ink); color: var(--paper); }
.wf-seg input:focus-visible + span { outline: var(--s-2) solid var(--ink); outline-offset: var(--s-2); }
/* slider: <input type="range"> */
/* a range inside a .field drops the text-field frame */
.field input[type="range"] { border: 0; padding: 0; min-height: var(--h-sm); box-shadow: none; background-color: transparent; }
input[type="range"] { appearance: none; -webkit-appearance: none; width: 100%; height: var(--h-sm); background: transparent; cursor: pointer; margin: 0; }
input[type="range"]::-webkit-slider-runnable-track { height: var(--s-2); background: var(--ink); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -7px; background: var(--ink); border: var(--s-2) solid var(--paper); box-shadow: 0 0 0 var(--s-1) var(--ink); } /* lint-ok: centres the 16px thumb on the 2px track */
input[type="range"]::-moz-range-track { height: var(--s-2); background: var(--ink); }
input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; background: var(--ink); border: var(--s-2) solid var(--paper); box-shadow: 0 0 0 var(--s-1) var(--ink); }
/* search: <label class="wf-search"><input type="search" placeholder="search"><button type="button" class="x" data-wf-clear aria-label="Clear">×</button></label> */
.wf-search { display: flex; align-items: center; gap: var(--sp-2); min-height: var(--h-md); border: var(--s-1) solid var(--ink); padding-block: 0; padding-inline: var(--sp-3) var(--sp-2); background: var(--paper); }
.wf-search::before { content: ''; width: 14px; height: 14px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 1.5h9v9h-9zM10 10l4.5 4.5' fill='none' stroke='%23000' stroke-width='1.8'/%3E%3C/svg%3E") center / 14px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 1.5h9v9h-9zM10 10l4.5 4.5' fill='none' stroke='%23000' stroke-width='1.8'/%3E%3C/svg%3E") center / 14px no-repeat; }
.wf-search input { flex: 1; min-width: 0; min-height: var(--h-sm); border: 0; background: transparent; padding: 0; font: 500 var(--t-ui) var(--sans); color: var(--ink); }
.wf-search input:focus { outline: none; } /* lint-ok: the box shows focus, .wf-search:focus-within below */
.wf-search:focus-within { box-shadow: inset 0 calc(-1 * var(--s-3)) 0 var(--ink); }
.wf-search input::-webkit-search-cancel-button { display: none; }
.wf-search input:placeholder-shown + [data-wf-clear] { visibility: hidden; }
/* file: <label class="wf-drop"><input type="file" multiple><b>Drop the files here</b><span>or click</span><span data-wf-files></span></label> */
.wf-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-1); min-height: 140px; padding: var(--sp-4); text-align: center;
  border: var(--s-2) dashed var(--ink); cursor: pointer; font-size: var(--t-small); }
.wf-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wf-drop.on, .wf-drop:focus-within { border-style: solid; background: repeating-linear-gradient(-45deg, var(--hatch) 0 1px, transparent 1px 7px); }
.wf-drop [data-wf-files] { font: var(--t-caption) var(--mono); color: var(--mute); }
/* field with an error: <label class="field">Email<input aria-invalid="true"><span class="field-msg">The @ is missing.</span></label> */
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"], .input[aria-invalid="true"] { border-width: var(--s-2); box-shadow: inset 0 calc(-1 * var(--s-3)) 0 var(--ink); }
.field-msg { font: 600 var(--t-small) var(--sans); text-transform: none; letter-spacing: 0; color: var(--ink); }
.field-msg.ok { font-weight: 400; color: var(--mute); }
/* key: <kbd>Ctrl</kbd> */
kbd { display: inline-block; font: 500 var(--t-caption) var(--mono); border: var(--s-1) solid var(--ink); border-bottom-width: var(--s-2); padding: 0 var(--sp-1); }

/* ── navigation ── */
/* app bar: <header class="wf-topbar"><b class="wf-logo">App</b><nav>…links…</nav><div class="wf-row">…</div></header> */
.wf-topbar { display: flex; align-items: center; gap: var(--sp-2) var(--sp-5); min-height: var(--sp-8); padding: var(--sp-2) var(--sp-5); border-bottom: var(--s-2) solid var(--ink); flex-wrap: wrap; }
.wf-topbar nav { display: flex; gap: var(--sp-4); flex: 1; flex-wrap: wrap; }
.wf-topbar nav a, .wf-sidenav a { text-decoration: none; color: var(--mute); font: 500 var(--t-small) var(--mono); }
.wf-topbar nav a:hover, .wf-sidenav a:hover { color: var(--ink); }
.wf-topbar nav a[aria-current="page"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 calc(-1 * var(--s-3)) 0 var(--ink); padding-bottom: var(--sp-1); }
@media (max-width: 640px) { .wf-topbar:not(.wf-slide *) { padding: var(--sp-3) var(--sp-4); } .wf-topbar:not(.wf-slide *) nav { order: 3; flex-basis: 100%; } } /* a slide is always a 960px stage, even on a phone: it keeps the wide layout */
.wf-logo { font: 700 var(--t-body) var(--mono); display: inline-flex; align-items: center; gap: var(--sp-2); }
.wf-logo::before { content: ''; width: 14px; height: 14px; background: var(--ink); }
/* the maker's mark: <a class="wf-maker" href="…"><i class="wf-118" aria-hidden="true"></i>118labs</a>, or the cube alone
   with role="img" aria-label="118labs". Drawn in the text color, so it follows light, dark and hacker without a second file.
   Never under 32px (--sp-6): below that the 118 closes up. Clear space around it: a quarter of its width */
.wf-118 { display: inline-block; flex: none; width: var(--sp-7); aspect-ratio: 1600 / 1676; background: currentColor; -webkit-mask: var(--wf-118) center / contain no-repeat; mask: var(--wf-118) center / contain no-repeat; }
.wf-118.sm { width: var(--sp-6); } .wf-118.lg { width: var(--sp-8); }
.wf-maker { display: inline-flex; align-items: center; gap: var(--sp-3); font: 600 var(--t-small) var(--mono); color: inherit; text-decoration: none; }
/* app with a side menu: <div class="wf-shell"><nav class="wf-sidenav">…</nav><main>…</main></div> */
.wf-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100dvh; }
.wf-sidenav { display: flex; flex-direction: column; gap: 2px; padding: var(--sp-4) 0; border-inline-end: var(--s-2) solid var(--ink); }
.wf-sidenav .eyebrow { padding: var(--sp-4) var(--sp-4) var(--sp-1); margin: 0; }
.wf-sidenav a { padding: var(--sp-2) var(--sp-4); white-space: nowrap; }
.wf-sidenav a[aria-current="page"] { color: var(--ink); font-weight: 600; box-shadow: inset var(--bar-x) 0 0 var(--ink); }
.wf-shell > main { padding: var(--sp-5); min-width: 0; }
@media (max-width: 760px) { .wf-shell:not(.wf-slide *) { grid-template-columns: minmax(0, 1fr); } .wf-sidenav:not(.wf-slide *) { flex-direction: row; overflow-x: auto; border-inline-end: 0; border-bottom: var(--s-2) solid var(--ink); padding: 0; } .wf-sidenav:not(.wf-slide *) .eyebrow { display: none; } }
/* breadcrumbs: <ol class="wf-crumbs"><li><a href="#">Home</a></li><li aria-current="page">Here</li></ol> */
.wf-crumbs { list-style: none; margin: 0 0 var(--sp-3); padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-1); font: var(--t-caption) var(--mono); color: var(--mute); }
.wf-crumbs li + li::before { content: '/'; margin-inline-end: var(--sp-1); }
.wf-crumbs a { color: var(--mute); }
.wf-crumbs [aria-current] { color: var(--ink); }
/* pagination: <nav class="wf-pages"><button class="prev">←</button><button aria-current="page">1</button>…<button class="next">→</button></nav> */
.wf-pages { display: flex; gap: var(--sp-1); flex-wrap: wrap; }
.wf-pages :is(button, a) { min-width: var(--h-sm); min-height: var(--h-sm); display: inline-grid; place-items: center; padding: 0 var(--sp-2); border: var(--s-1) solid var(--line); background: var(--paper); color: var(--ink); font: 500 var(--t-small) var(--mono); text-decoration: none; cursor: pointer; }
.wf-pages :is(button, a):hover { border-color: var(--ink); }
.wf-pages [aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.wf-pages .gap { border-color: transparent; cursor: default; }
/* wizard steps: <ol class="wf-wizard"><li class="done">Details</li><li aria-current="step">Payment</li><li>Done</li></ol> */
.wf-wizard { list-style: none; margin: 0; padding: 0; display: flex; counter-reset: wz; }
.wf-wizard li { counter-increment: wz; flex: 1 1 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--sp-2); font: 500 var(--t-caption) var(--mono); color: var(--mute); position: relative; min-width: 0; padding-inline: var(--sp-1); overflow-wrap: anywhere; }
.wf-wizard li::before { content: counter(wz); width: var(--h-xs); height: var(--h-xs); display: grid; place-items: center; border: var(--s-2) solid var(--line); background: var(--paper); color: var(--mute); position: relative; z-index: 1; }
/* v3.8: every column is the same width and its box sits in the middle, so the line runs from this box to the next:
   from half a column plus half a box, to half a column past the end minus half a box. Before, the boxes sat at the
   start of their columns and the bar ended a column short of the frame */
.wf-wizard li:not(:last-child)::after { content: ''; position: absolute; top: calc((var(--h-xs) - var(--s-2)) / 2); height: var(--s-2); background: var(--line);
  inset-inline-start: calc(50% + var(--h-xs) / 2); inset-inline-end: calc(-50% + var(--h-xs) / 2); }
.wf-wizard li.done { color: var(--ink); }
.wf-wizard li.done::before { content: ''; border-color: var(--ink); color: var(--ink); background: var(--ink);
  -webkit-mask: var(--wf-check) center / 12px no-repeat content-box, linear-gradient(var(--ink) 0 0) padding-box, linear-gradient(var(--ink) 0 0) border-box; -webkit-mask-composite: source-over, xor;
  mask: var(--wf-check) center / 12px no-repeat content-box, linear-gradient(var(--ink) 0 0) padding-box, linear-gradient(var(--ink) 0 0) border-box; mask-composite: add, exclude; } /* the frame and the check, nothing inside */
.wf-wizard li.done::after { background: var(--ink); }
.wf-wizard li[aria-current="step"] { color: var(--ink); font-weight: 600; }
.wf-wizard li[aria-current="step"]::before { background: var(--ink); color: var(--paper); border-color: var(--ink); }
@media (max-width: 640px) { .wf-wizard:not(.wf-slide *) li:not([aria-current]) { color: transparent; } .wf-wizard:not(.wf-slide *) li[aria-current] { white-space: nowrap; } } /* a phone has no room for five names: only the current one shows, the boxes tell the rest */

/* ── notices and states ── */
/* <div class="wf-callout" data-level="aviso"><b>Title</b><p>Text</p></div> (data-level values stay in Portuguese: erro = error, aviso = warning, info, ok) */
.wf-callout { display: flex; flex-direction: column; gap: var(--sp-1); padding: var(--sp-3) var(--sp-4); border: var(--s-1) solid var(--ink); font-size: var(--t-ui); }
.wf-callout p { margin: 0; }
.wf-callout[data-level="erro"] { background: var(--ink); color: var(--paper); }
.wf-callout[data-level="erro"] a { color: var(--paper); }
.wf-callout[data-level="aviso"] { border-width: var(--s-2); box-shadow: inset var(--bar-x) 0 0 var(--ink); }
.wf-callout[data-level="info"] { border-style: dashed; }
.wf-callout[data-level="ok"] { border-color: var(--line); }
/* nothing yet: <div class="wf-empty"><b>No flights</b><span>Add the first flight of the trip.</span><button class="btn">+ Flight</button></div> */
.wf-empty { display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); padding: var(--sp-6) var(--sp-4); text-align: center; border: var(--s-1) dashed var(--line); }
.wf-empty > b { font-size: var(--t-h3); }
.wf-empty > span { color: var(--mute); font-size: var(--t-small); max-width: 40ch; }
.wf-empty .btn { margin-top: var(--sp-2); }
/* loading a block: <div class="wf-skel line"></div> · loading without knowing how long: <div class="wf-busy"></div> */
.wf-skel { position: relative; overflow: hidden; min-height: var(--sp-4); }
.wf-skel::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; width: calc(100% + 40px); background: repeating-linear-gradient(-45deg, var(--hatch) 0 1px, transparent 1px 7.0711px); will-change: transform; animation: wf-skel 1.4s linear infinite; } /* lint-ok: constant motion, so linear. The stripes repeat every 7.0711px across the 45-degree line, exactly 10px across the screen, so the loop moves 4 repeats in whole pixels (40px) and never cuts */
.wf-skel.line { min-height: var(--sp-3); height: var(--sp-3); margin-bottom: var(--sp-2); }
.wf-skel.short { width: 60%; }
@keyframes wf-skel { to { transform: translate3d(-40px, 0, 0); } }
.wf-busy { height: var(--sp-2); border: var(--s-1) solid var(--ink); position: relative; overflow: hidden; }
.wf-busy::after { content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; width: 30%; background: var(--ink); will-change: transform; animation: wf-busy 1.1s var(--ease-move) infinite; }
[dir="rtl"] .wf-busy::after { animation-name: wf-busy-rtl; }
@keyframes wf-busy { from { transform: translate3d(-100%, 0, 0); } to { transform: translate3d(333.333%, 0, 0); } } /* 333% of its own 30% width = the whole bar */
@keyframes wf-busy-rtl { from { transform: translate3d(100%, 0, 0); } to { transform: translate3d(-333.333%, 0, 0); } }

/* ── overlays ── */
/* tooltip: <button data-tip="Copies the link">…</button> (shows on hover and on focus) */
[data-tip] { position: relative; }
[data-tip]:is(:hover, :focus-visible)::after { content: attr(data-tip); position: absolute; bottom: calc(100% + var(--sp-2)); inset-inline-start: 0; z-index: var(--z-pop);
  background: var(--ink); color: var(--paper); font: 500 var(--t-caption)/1.3 var(--mono); padding: var(--sp-1) var(--sp-2); white-space: nowrap; pointer-events: none; text-transform: none; letter-spacing: 0; }
/* menu: <details class="wf-menu"><summary class="btn">Actions</summary><div class="wf-menu-list"><button>Edit</button>…</div></details> */
.wf-menu { position: relative; display: inline-block; }
.wf-menu > summary { list-style: none; }
.wf-menu > summary::-webkit-details-marker { display: none; }
.wf-menu > summary::after { margin-inline-start: var(--sp-1); }
.wf-menu-list { position: absolute; top: calc(100% + var(--sp-1)); inset-inline-start: 0; z-index: var(--z-pop); min-width: 200px; display: flex; flex-direction: column; background: var(--paper); border: var(--s-2) solid var(--ink); padding: var(--sp-1) 0; }
.wf-menu.end .wf-menu-list { inset-inline: auto 0; }
.wf-menu-list > :is(button, a) { text-align: start; border: 0; background: none; padding: var(--sp-2) var(--sp-3); font: 500 var(--t-ui) var(--sans); color: var(--ink); text-decoration: none; cursor: pointer; }
.wf-menu-list > :is(button, a):is(:hover, :focus-visible) { box-shadow: inset var(--bar-x) 0 0 var(--ink); outline: none; }
.wf-menu-list > hr { border: 0; border-top: var(--s-1) solid var(--line); margin: var(--sp-1) 0; }
.wf-menu-list > .danger { font-weight: 700; }
/* drawer: <dialog class="wf-drawer" id="d">…</dialog> + <button data-wf-open="d"> and, inside, <button data-wf-close> */
dialog.wf-drawer { margin-block: 0; margin-inline: auto 0; height: 100dvh; max-height: 100dvh; width: min(420px, 100vw); /* dvh: the phone's address bar never covers the bottom (v3.8) */ border-width: 0; border-inline-start: var(--s-2) solid var(--ink); }
dialog.wf-drawer[open] { animation: wf-slide var(--dur-3) var(--ease-enter); }
@keyframes wf-slide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
[dir="rtl"] dialog.wf-drawer[open] { animation-name: wf-slide-rtl; }
@keyframes wf-slide-rtl { from { transform: translateX(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
.wf-dbody { padding: var(--sp-4); overflow: auto; display: flex; flex-direction: column; gap: var(--sp-3); }
.wf-dfoot { margin-top: auto; padding: var(--sp-3) var(--sp-4); border-top: var(--s-1) solid var(--line); display: flex; gap: var(--sp-2); justify-content: flex-end; }

/* ── content ── */
/* person: <span class="wf-avatar">FN</span> · several: <span class="wf-avatars">…</span> */
.wf-avatar { display: inline-grid; place-items: center; width: var(--sp-6); height: var(--sp-6); flex: none; border: var(--s-1) solid var(--ink); background: var(--paper); font: 600 var(--t-caption) var(--mono); text-transform: uppercase; }
.wf-avatar.solid { background: var(--ink); color: var(--paper); }
.wf-avatar.sm { width: var(--h-xs); height: var(--h-xs); font-size: var(--t-micro); }
.wf-avatars { display: inline-flex; }
.wf-avatars .wf-avatar + .wf-avatar { margin-inline-start: calc(-1 * var(--sp-1)); box-shadow: 0 0 0 var(--s-2) var(--paper); }
/* data in pairs: <dl class="wf-dl"><dt>Departure</dt><dd>15/11 · 23:10</dd>…</dl> */
.wf-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); margin: 0; font-size: var(--t-ui); }
.wf-dl dt { font: 500 var(--t-micro) var(--mono); text-transform: uppercase; letter-spacing: var(--track-caps); color: var(--mute); padding-block: var(--sp-2); padding-inline: 0 var(--sp-4); border-bottom: var(--s-1) solid var(--line); display: flex; align-items: center; }
.wf-dl dd { margin: 0; padding: var(--sp-2) 0; border-bottom: var(--s-1) solid var(--line); }
/* timeline: <ol class="wf-timeline"><li class="done"><b>Check-in</b><span>14:00</span></li>…</ol> */
/* v3.8: the line is drawn by each step, from its square's center to the next one's, on the same axis as the square and
   on whole pixels. Before, it was the list's border and the square was placed against it at 0.5lh (10.5px): the two
   snapped to different pixels, and the line ran on past the last square */
.wf-timeline { list-style: none; margin: 0; padding: 0; }
.wf-timeline li { position: relative; padding-block: 0 var(--sp-4); padding-inline: calc(var(--sp-3) + var(--sp-2)) 0; display: flex; flex-direction: column; gap: 2px; font-size: var(--t-ui); }
.wf-timeline li::before { content: ''; position: absolute; z-index: 1; box-sizing: border-box; width: var(--sp-3); height: var(--sp-3); inset-inline-start: 0;
  top: calc(0.5lh - var(--sp-3) / 2); top: round(down, 0.5lh - var(--sp-3) / 2, 1px); background: var(--paper); border: var(--s-2) solid var(--ink); }
.wf-timeline li:not(:last-child)::after { content: ''; position: absolute; inset-inline-start: calc((var(--sp-3) - var(--s-2)) / 2); width: var(--s-2);
  top: calc(0.5lh); top: round(down, 0.5lh, 1px); height: 100%; background: var(--ink); }
.wf-timeline li.done::before { background: var(--ink); }
.wf-timeline li[aria-current]::before { box-shadow: inset 0 0 0 var(--s-2) var(--paper), inset 0 0 0 var(--sp-3) var(--ink); }
.wf-timeline li > span { color: var(--mute); font: var(--t-caption) var(--mono); }
.wf-timeline li:last-child { padding-bottom: 0; }
/* conversation: <div class="wf-chat"><span class="who">Sol</span><div class="msg">Hi</div><div class="msg me">Hello</div></div> */
.wf-chat { display: flex; flex-direction: column; gap: var(--sp-2); }
.wf-chat .msg { max-width: min(75%, 52ch); padding: var(--sp-2) var(--sp-3); border: var(--s-1) solid var(--ink); font-size: var(--t-ui); align-self: flex-start; }
.wf-chat .msg.me { align-self: flex-end; background: var(--ink); color: var(--paper); }
.wf-chat .msg small { display: block; font: var(--t-micro) var(--mono); opacity: .7; margin-top: var(--sp-1); }
.wf-chat .who { font: 500 var(--t-micro) var(--mono); text-transform: uppercase; letter-spacing: var(--track-caps); color: var(--mute); margin-top: var(--sp-2); }
.wf-chat .who.me { align-self: flex-end; }
/* plans side by side: <div class="wf-plans"><article class="wf-plan best">…</article></div> */
.wf-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: var(--sp-3); align-items: stretch; }
.wf-plan { border: var(--s-1) solid var(--ink); padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-3); }
.wf-plan.best { border-width: var(--s-2); box-shadow: inset 0 var(--sp-1) 0 var(--ink); }
.wf-plan .price { font: 800 var(--t-stat)/1 var(--sans); letter-spacing: var(--track-tight); font-variant-numeric: tabular-nums; }
.wf-plan .price small { font: 400 var(--t-small) var(--sans); color: var(--mute); letter-spacing: 0; }
.wf-plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-1); font-size: var(--t-ui); flex: 1; }
.wf-plan li.no { color: var(--mute); }

/* column board: <div class="wf-board"><section><h4>To do <span>2</span></h4><div class="card sub">…</div></section>…</div> */
.wf-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: var(--sp-3); overflow-x: auto; padding-bottom: var(--sp-2); }
.wf-board > section { display: flex; flex-direction: column; gap: var(--sp-2); border-top: var(--s-2) solid var(--ink); padding-top: var(--sp-2); min-width: 0; }
.wf-board > section > h4 { font: 600 var(--t-caption) var(--mono); text-transform: uppercase; letter-spacing: var(--track-caps); margin: 0; display: flex; justify-content: space-between; }
.wf-board .card.sub { font-size: var(--t-ui); }
/* month calendar, drawn by wireframe.js: <div class="wf-cal" data-wf-cal="2026-11" data-marks="2026-11-15" data-range="2026-11-15,2026-11-22"></div> */
.wf-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: var(--s-2) solid var(--ink); max-width: 420px; }
.wf-cal .head { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding: var(--sp-2) 0; font-weight: 700; }
.wf-cal .head span::first-letter { text-transform: uppercase; }
.wf-cal .head button { border: var(--s-1) solid var(--line); background: var(--paper); color: var(--ink); width: var(--h-sm); height: var(--h-sm); cursor: pointer; }
.wf-cal .head button:hover { border-color: var(--ink); }
.wf-cal .wd { font: 500 var(--t-micro) var(--mono); text-transform: uppercase; letter-spacing: var(--track-caps); color: var(--mute); text-align: center; padding: var(--sp-1) 0; border-bottom: var(--s-1) solid var(--ink); }
.wf-cal button.d { aspect-ratio: 1; border: 0; border-bottom: var(--s-1) solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; position: relative; font: 500 var(--t-ui) var(--sans); font-variant-numeric: tabular-nums; }
.wf-cal button.d:hover { box-shadow: inset 0 0 0 var(--s-1) var(--ink); }
.wf-cal button.d.out { color: var(--mute); }
/* the range is one hatch across the days: the grid carries it and every cell outside the range covers it with paper */
.wf-cal { background: repeating-linear-gradient(-45deg, var(--hatch) 0 1px, transparent 1px 6px), var(--paper); }
.wf-cal > :is(.head, .wd) { background-color: var(--paper); }
.wf-cal button.d.in { background: transparent; }
.wf-cal button.d[aria-current="date"] { box-shadow: inset 0 0 0 var(--s-2) var(--ink); font-weight: 700; }
.wf-cal button.d[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.wf-cal button.d.mark::after { content: ''; position: absolute; bottom: var(--sp-1); inset-inline-start: calc(50% - 2px); width: var(--sp-1); height: var(--sp-1); background: currentColor; }

/* ── CSS-only charts ── */
/* bars: <div class="wf-bars"><div><span>Hotel</span><i style="--v:62%"></i><b>R$ 2.100</b></div>…</div> · second series: <i class="b"> */
.wf-bars { display: grid; grid-template-columns: fit-content(40%) minmax(0, 1fr) fit-content(40%); /* long labels and values wrap at 40% of the width */ gap: var(--sp-2) var(--sp-3); align-items: center; font-size: var(--t-small); }
.wf-bars > div { display: contents; }
.wf-bars > div > span { overflow-wrap: anywhere; }
.wf-bars i { display: block; height: var(--sp-3); width: var(--v, 0%); min-width: 2px; background: var(--ink); } /* a bar that grows on entry uses transform: scaleX, never width */
.wf-bars i.b { background: repeating-linear-gradient(-45deg, var(--ink) 0 1px, transparent 1px 4px); box-shadow: inset 0 0 0 var(--s-1) var(--ink); }
.wf-bars b { font: 600 var(--t-caption) var(--mono); font-variant-numeric: tabular-nums; text-align: end; overflow-wrap: anywhere; }
/* columns: <div class="wf-cols"><div><i style="--v:40%"></i><span>mon</span></div>…</div> */
.wf-cols { display: flex; align-items: stretch; gap: var(--sp-2); height: 180px; }
.wf-cols > div { flex: 1; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: var(--sp-1); min-width: 0; justify-items: center; }
.wf-cols > div > :first-child { align-self: end; }
.wf-cols i { display: block; width: 100%; max-width: var(--sp-7); height: var(--v, 0%); background: var(--ink); border-bottom: var(--s-1) solid var(--ink); }
.wf-cols i.b { background: repeating-linear-gradient(-45deg, var(--ink) 0 1px, transparent 1px 4px); box-shadow: inset 0 0 0 var(--s-1) var(--ink); }
.wf-cols > div > span { font: var(--t-micro) var(--mono); color: var(--mute); border-top: var(--s-1) solid var(--ink); width: 100%; text-align: center; padding-top: var(--sp-1); }
/* changing number: <span class="wf-delta up">+2,1%</span> · .down · .flat */
.wf-delta { font: 600 var(--t-caption) var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ═══ v2.3 · a letter in a box is centered by its ink, not by its line ═══════════════════════════════════════════════
   place-items: center centers the LINE of text, and the font puts the letter where its metrics say: capitals sat
   low. text-box trims the line to the letter itself (capitals and digits: cap height), and align-content centers it.
   A browser without text-box keeps the grid. Since v3.8 the symbols are drawn, so this is only for letters and digits. */
@supports (text-box: trim-both cap alphabetic) {
  .x.arrow:not(:has(.wf-i)), .wf-avatar, .wf-pages :is(button, a):not(.prev, .next) { display: inline-block; align-content: center; text-align: center; line-height: 1; text-box: trim-both cap alphabetic; }
  .vote { line-height: 1; text-box: trim-both cap alphabetic; } /* the digit of a vote centered by its ink, so the drawn triangle beside it lines up */
  .num-dot, .wf-pin span, .wf-wizard li::before { display: block; align-content: center; text-align: center; line-height: 1; text-box: trim-both cap alphabetic; }
}

/* ═══ v3.8 · the symbol of a control is drawn from its class ════════════════════════════════════════════════════════
   The × of <button class="x">, the arrows of .prev and .next (page bar, deck, calendar) and the − + of a number field
   are masks, centered by the box itself. The character in the markup stays only as the fallback without CSS:
   <button class="x" aria-label="Close">×</button> still works, and so does every app written before v3.8.
   Another symbol in a box: <button class="x arrow" aria-label="Move up"><i class="wf-i" data-i="up"></i></button> ·
   <button class="btn glyph" aria-label="Swap"><i class="wf-i" data-i="swap"></i></button> */
.x:not(.arrow), .wf-pages :is(.prev, .next), :is(.btn, .vote):is(.prev, .next), .wf-step, .wf-cal .head button { font-size: 0; position: relative; }
:is(.btn, .vote):is(.prev, .next) { min-width: var(--h-sm); padding: 0; }
.btn.glyph { padding: 0; min-width: var(--h-md); } .btn.sm.glyph { min-width: var(--h-sm); }
.vote { display: inline-flex; align-items: center; gap: var(--sp-1); }
.x:not(.arrow)::before, .wf-pages :is(.prev, .next)::before, :is(.btn, .vote):is(.prev, .next)::before, .wf-step::before, .wf-cal .head button::before {
  content: ''; position: absolute; inset: 0; margin: auto; width: 10px; height: 10px; background: currentColor; -webkit-mask: var(--wf-ico) center / contain no-repeat; mask: var(--wf-ico) center / contain no-repeat; }
/* centered on the box itself: the leftover character (font-size 0) still takes a line, so it cannot share the flow with the drawing */
.x:not(.arrow)::before { --wf-ico: var(--wf-x); }
.wf-dhead .x::before { width: 12px; height: 12px; }
.wf-pages :is(.prev, .next)::before, :is(.btn, .vote):is(.prev, .next)::before, .wf-cal .head button::before { --wf-ico: var(--wf-arrow); width: 12px; height: 12px; }
.wf-pages .prev::before, :is(.btn, .vote).prev::before, .wf-cal .head [data-cal-step="-1"]::before { rotate: 180deg; }
[dir="rtl"] :is(.wf-pages :is(.prev, .next), :is(.btn, .vote):is(.prev, .next), .wf-cal .head button)::before { scale: -1 1; }
.wf-step::before { --wf-ico: var(--wf-plus); }
.wf-step[data-step="-1"]::before { --wf-ico: var(--wf-minus); }
.wf-num:has(.cell) .wf-step::before { width: 8px; height: 8px; }
/* a symbol inside a box: the box centers it, no air beside it */
.x > .wf-i, .btn.glyph > .wf-i { width: 12px; height: 12px; vertical-align: 0; }

/* ═══ v2.5 · phone pieces: the bottom bar and the sheet ══════════════════════════════════════════════════════════════ */
/* bottom bar, the phone's main tabs, always under the thumb:
   <nav class="wf-bottombar"><button aria-current="page">List<span class="count">3</span></button>…</nav>
   The page leaves room for it at the bottom (padding-bottom: var(--h-bar)). */
:root { --h-bar: calc(var(--h-lg) + var(--sp-3)); }
.wf-bottombar { position: fixed; inset-inline: 0; bottom: 0; z-index: var(--z-sticky); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  background: var(--paper); border-top: var(--s-2) solid var(--ink); padding-bottom: env(safe-area-inset-bottom); }
.wf-bottombar > :is(button, a) { position: relative; min-height: var(--h-bar); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0;
  border: 0; background: transparent; color: var(--mute); font: 600 var(--t-micro) var(--mono); text-transform: uppercase; letter-spacing: var(--track-caps); text-decoration: none; cursor: pointer; padding: var(--sp-1); }
.wf-bottombar > :is(button, a):hover { color: var(--ink); }
/* the open tab: ink and a bar on top, like the hover bar of the kit, turned to face the content */
.wf-bottombar > [aria-current="page"] { color: var(--ink); box-shadow: inset 0 var(--s-3) 0 var(--ink); }
.wf-bottombar .count { font-size: var(--t-micro); border: var(--s-1) solid currentColor; padding-block: 0; padding-inline: calc(var(--sp-1) + var(--track-caps)) var(--sp-1); line-height: 1.4; }
/* an empty count keeps its place, invisible, so every label of the bar sits at the same height */
.wf-bottombar .count:empty { visibility: hidden; }
.wf-bottombar .count:empty::before { content: '0'; }
/* sheet, the phone's dialog: it rises from the bottom, full width, and a tap above it closes it:
   <dialog class="wf-sheet" id="s"><div class="wf-dhead"><h3>Title</h3><button class="x" data-wf-close aria-label="Close">×</button></div><div class="wf-dbody">…</div></dialog> */
dialog.wf-sheet { margin: auto 0 0; width: 100vw; max-width: 100vw; max-height: 88dvh; border-width: 0; border-top: var(--s-2) solid var(--ink); padding-bottom: env(safe-area-inset-bottom); }
dialog.wf-sheet[open] { animation: wf-rise var(--dur-3) var(--ease-enter); }
@keyframes wf-rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ═══ v2.7 · someone is writing ═══════════════════════════════════════════════════════════════════════════════════════ */
/* three square dots that take turns, in the color of the text around them (paper inside a .msg.me):
   <span class="wf-typing" role="status" aria-label="Sol is typing"><i></i><i></i><i></i></span>
   In a conversation, as the other person's next message: <div class="msg typing"><span class="wf-typing" …>…</span></div>.
   .still = the same three dots without the motion: a mark that stays (an unsent draft on a tab). Reduced motion stops them all. */
.wf-typing { display: inline-flex; align-items: center; gap: var(--sp-1); vertical-align: middle; min-height: 1lh; }
.wf-typing i { display: block; width: var(--sp-1); height: var(--sp-1); background: currentColor; will-change: transform, opacity; animation: wf-typing 1.2s var(--ease-move) infinite; } /* lint-ok: a loop, not a response: slower than the interaction durations */
.wf-typing i:nth-child(2) { animation-delay: .15s; } /* lint-ok: the second dot follows the first */
.wf-typing i:nth-child(3) { animation-delay: .3s; } /* lint-ok: and the third follows the second */
.wf-typing.still i { animation: none; }
@keyframes wf-typing { 0%, 60%, 100% { opacity: .25; transform: none; } 30% { opacity: 1; transform: translateY(calc(-1 * var(--s-2))); } }
.wf-chat .msg.typing { padding-block: var(--sp-2); }

/* ═══ v2.8 · hacker mode: dark mode with the green of an old terminal ═════════════════════════════════════════════════ */
/* Still four colors: black paper, pure green ink (15,3:1), a dimmer green for supporting text (8,5:1), a dark green for lines.
   Only in dark mode. The switch: <label class="tick"><input type="checkbox" data-wf-hacker-toggle> hacker</label>
   (wireframe.js remembers it per browser, and ticking it in light mode also turns dark on). */
@media (prefers-color-scheme: dark) { :root[data-hacker="on"]:not([data-theme="light"]) {
  --paper: #000000; --ink: #00ff00; --mute: #00c000; --line: #005f00; --hatch: rgba(0,255,0,.14);
} }
:root[data-hacker="on"][data-theme="dark"] { --paper: #000000; --ink: #00ff00; --mute: #00c000; --line: #005f00; --hatch: rgba(0,255,0,.14); }
/* v2.8.1: the hacker switch sits among buttons, so it takes their height (it stretches to the row) and their font */
.tick:has(> input[data-wf-hacker-toggle]) { align-self: stretch; font: 500 var(--t-small) var(--mono); }

/* ═══ v2.9 · placeholders in the palette ═══════════════════════════════════════════════════════════════════════════════════ */
/* the hint inside an empty field: the supporting color of the palette, never the browser's own gray */
::placeholder { color: var(--mute); opacity: 1; }

/* ═══ v3.1 · the deck: slides for a presentation ════════════════════════════════════════════════════════════════════ */
/* <div class="wf-deck"><main class="wf-deck-view"><section class="wf-slide" data-title="…">…<footer><span>…</span><span data-wf-n></span></footer><aside>notes</aside></section>…</main>
   <nav class="wf-deck-bar"><button class="btn sm prev" data-wf-deck-prev>←</button><nav class="wf-pages" data-wf-deck-pages></nav><button class="btn sm next" data-wf-deck-next>→</button>
   <span data-wf-deck-title></span><span class="grow"></span><button class="btn sm ghost" data-wf-deck-full>tela cheia</button></nav></div>
   Each slide is a 960 × 540 stage drawn at the kit's own sizes and scaled to the screen (wireframe.js sets --wf-k), so
   every token stays exact. Fullscreen (the button, or the key f) is clean: no bar, no slide number, no cursor. */
.wf-deck { position: fixed; inset: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; background: var(--paper); }
.wf-deck-view { position: relative; overflow: hidden; }
.wf-slide { position: absolute; top: 50%; inset-inline-start: 50%; width: 960px; height: 540px; /* lint-ok: the stage, scaled as one piece */
  transform: translate(-50%, -50%) scale(var(--wf-k, 1)); transform-origin: center;
  display: none; flex-direction: column; gap: var(--sp-4); padding: var(--sp-7) var(--sp-7) var(--sp-5);
  background: var(--paper); border: var(--s-2) solid var(--ink); }
.wf-slide.on { display: flex; }
.wf-slide > aside { display: none; }
.wf-slide > footer { margin-top: auto; display: flex; justify-content: space-between; gap: var(--sp-4); font: var(--t-caption) var(--mono); color: var(--mute); border-top: var(--s-1) solid var(--line); padding-top: var(--sp-2); }
.wf-slide [data-wf-n] { white-space: nowrap; }
/* a slide reads from further away than a page: its titles take the kit's larger steps */
.wf-slide h1 { font-size: var(--t-display); max-width: 22ch; }
.wf-slide h2 { font-size: var(--t-stat); max-width: 34ch; }
.wf-slide .lede { margin: 0; max-width: 56ch; }
.wf-slide .eyebrow { margin: 0; }
.wf-deck-bar { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; padding: var(--sp-2) var(--sp-4); border-top: var(--s-2) solid var(--ink); background: var(--paper); }
.wf-deck-bar .grow { flex: 1; }
.wf-deck-bar [data-wf-deck-title] { font: var(--t-caption) var(--mono); color: var(--mute); }
/* fullscreen: only the slide. No bar, no number, no border, no cursor (a presenter's clicker still turns the page) */
.wf-deck.is-full { grid-template-rows: minmax(0, 1fr); }
.wf-deck.is-full .wf-deck-bar, .wf-deck.is-full [data-wf-n] { display: none; }
.wf-deck.is-full .wf-slide { border-color: transparent; }
.wf-deck.is-full, .wf-deck.is-full * { cursor: none; }
/* v3.9: on a phone the deck is always horizontal, like a video. A slide is a 16:9 stage and stays one: held upright,
   the whole deck turns 90° and fills the screen sideways, so the person turns the phone (even with rotation locked) and
   reads the same slide the computer shows. Held sideways, nothing turns and the stage simply scales. wireframe.js reads
   the turned width and height (the long side is the width) and turns the swipe with it. v3.8 reflowed every slide into
   an upright page instead, which broke any slide built as a stage (columns, charts, a chat beside a process).
   So a phone rule (max-width: 640px) never reaches inside a slide: write it as .piece:not(.wf-slide *) */
@media (orientation: portrait) and (max-width: 640px) {
  .wf-deck { inset: auto; top: 0; inset-inline-start: 100vw; width: 100vh; width: 100dvh; height: 100vw; /* lint-ok: the screen's own sides, swapped */
    transform: rotate(90deg); transform-origin: top left; }
}
/* a phone on its side is short: the bar keeps only back, forward, the theme and fullscreen, under the thumb's size */
@media (max-width: 640px) and (orientation: portrait), (max-height: 500px) and (orientation: landscape) {
  .wf-deck-bar { flex-wrap: nowrap; padding: var(--sp-1) var(--sp-4); padding-bottom: max(var(--sp-1), env(safe-area-inset-bottom)); }
  .wf-deck-bar > :is([data-wf-deck-pages], [data-wf-deck-title], [data-wf-deck-print], [data-wf-open], .tick) { display: none; }
  .wf-deck-bar > .grow { order: 1; } .wf-deck-bar > [data-wf-theme-toggle] { order: 2; } .wf-deck-bar > [data-wf-deck-full] { order: 3; } .wf-deck-bar > .next { order: 4; }
}
/* print and PDF: one slide per page, at the stage size */
@media print {
  /* paper is white: the dark and hacker themes print in the light colors, because the browser drops
     backgrounds by default and white or green text on white paper prints as empty pages */
  /* :is() takes its most specific argument, so this beats every theme rule above, set by attribute or by the system */
  :root:is(*, [data-theme][data-hacker]) {
    --paper: #ffffff; --ink: #000000; --mute: #6b6b6b; --line: #d6d6d6; --hatch: rgba(0,0,0,.09); color-scheme: light;
  }
  /* and the black fills (bars, number dots, the sent message) print even with background graphics off */
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  /* the hatched second series prints as an outline: stripes turn into odd colors in some PDF viewers */
  .wf-bars i.b, .wf-cols i.b { background: var(--paper); }
  .wf-deck { position: static; display: block; }
  .wf-deck-view { overflow: visible; }
  .wf-slide { position: relative; top: auto; inset-inline-start: auto; display: flex; transform: none; break-after: page; border: 0; }
  .wf-deck-bar { display: none; }
}

/* ── deck motion (wireframe-deck.js, optional) ──
   The module puts .wf-moves on the deck, so nothing here touches a deck without it. Only transform and opacity move,
   everything that moves keeps will-change in its resting style (the last-frame jump, manual rule 2), and the last
   keyframe is the resting state. Phone, print and reduced motion: the final state, still. */
:root { --wf-move: 420ms; --wf-gap: 90ms; --wf-grow: 650ms; }
/* the slide change: the content of the slide that leaves fades, then the new one comes in. The frame stays */
.wf-moves .wf-slide > :not(aside) { will-change: opacity; }
/* the new slide waits for the old one to be completely gone (both use --dur-2), so the two never show at once */
.wf-moves .wf-slide.wf-in > :not(aside) { animation: wf-deck-in var(--dur-3) var(--ease-out) backwards; animation-delay: var(--dur-2); } /* backwards: once in, the style of the piece rules again (a hidden part stays hidden) */
.wf-moves .wf-slide.wf-out { display: flex; background: transparent; border-color: transparent; pointer-events: none; }
.wf-moves .wf-slide.wf-out > :not(aside) { animation: wf-deck-out var(--dur-2) var(--ease-move) both; }
@keyframes wf-deck-in { from { opacity: 0; } }
@keyframes wf-deck-out { to { opacity: 0; } }
/* [data-wf-in]: the children rise one after another (--i from the module, 0 to 10) */
.wf-moves [data-wf-in] > * { will-change: transform, opacity; }
/* a scrolling page (v3.12): wireframe-deck.js puts .wf-page on <html>, and a [data-wf-view] plays like a slide coming in
   when it scrolls into view, once. Its rising children wait hidden until then. No module, reduced motion or print: at rest */
.wf-page [data-wf-view] [data-wf-in] > * { will-change: transform, opacity; }
.wf-page [data-wf-view]:not(.wf-in) [data-wf-in] > * { opacity: 0; }
.wf-page [data-wf-view].wf-in [data-wf-in] > * { animation: wf-deck-rise var(--wf-move) var(--ease-out) both; animation-delay: calc(60ms + var(--i, 0) * var(--wf-gap)); }
.wf-moves .wf-slide.wf-in [data-wf-in] > * { animation: wf-deck-rise var(--wf-move) var(--ease-out) both; animation-delay: calc(150ms + var(--i, 0) * var(--wf-gap)); }
@keyframes wf-deck-rise { from { opacity: 0; transform: translate3d(0, 8px, 0); } to { opacity: 1; transform: none; } }
/* bars and columns grow from zero, with scale (never width or height) */
.wf-moves .wf-bars i { transform-origin: left center; will-change: transform; }
[dir="rtl"] .wf-moves .wf-bars i { transform-origin: right center; }
.wf-moves .wf-cols i { transform-origin: center bottom; will-change: transform; }
.wf-moves .wf-slide.wf-in .wf-bars i { animation: wf-deck-grow-x var(--wf-grow) var(--ease-out) both; animation-delay: calc(var(--i, 0) * var(--wf-gap)); }
.wf-moves .wf-slide.wf-in .wf-cols i { animation: wf-deck-grow-y var(--wf-grow) var(--ease-out) both; animation-delay: calc(var(--i, 0) * var(--wf-gap)); }
@keyframes wf-deck-grow-x { from { transform: scaleX(0); } }
@keyframes wf-deck-grow-y { from { transform: scaleY(0); } }
/* parts ([data-wf-step]): a part not shown yet keeps its place, invisible, and what moves inside it waits for it.
   Leaving, it goes down and fades on a curve that starts gently: the entry curve, fast at the start, looked like a cut */
.wf-moves .wf-slide.wf-stepping [data-wf-step] { will-change: transform, opacity; animation: none; transition: opacity var(--wf-move) var(--ease-out), transform var(--wf-move) var(--ease-out); }
.wf-moves .wf-slide.wf-stepping [data-wf-step]:not(.wf-seen) { opacity: 0; transform: translate3d(0, 8px, 0); pointer-events: none; transition-duration: var(--dur-3); transition-timing-function: var(--ease-move); }
/* a part placed right on the slide still waits for the old slide to go, like everything else on it (the entry fade holds
   nothing once it ends, so it never fights the part's own transition): without it, going back showed it at once */
.wf-moves .wf-slide.wf-in.wf-stepping > [data-wf-step] { animation: wf-deck-in var(--dur-3) var(--ease-out) backwards; animation-delay: var(--dur-2); }
/* and leaving, it goes with the slide: without this, a part right on the slide stayed while the rest faded */
.wf-moves .wf-slide.wf-out.wf-stepping > [data-wf-step] { animation: wf-deck-out var(--dur-2) var(--ease-move) both; }
.wf-moves .wf-slide.wf-stepping [data-wf-step]:not(.wf-seen) [data-wf-in] > *, .wf-moves .wf-slide.wf-stepping [data-wf-step]:not(.wf-seen)[data-wf-in] > *,
.wf-moves .wf-slide.wf-stepping [data-wf-step]:not(.wf-seen) .wf-bars i, .wf-moves .wf-slide.wf-stepping [data-wf-step]:not(.wf-seen) .wf-cols i { animation: none; }
/* the conversation ([data-wf-talk]): one message per step. While it plays, the lights of the slide dim but the lit one */
.wf-moves .wf-talking .msg { will-change: transform, opacity; transition: opacity var(--wf-move) var(--ease-out), transform var(--wf-move) var(--ease-out); }
.wf-moves .wf-talking .msg:not(.wf-shown) { opacity: 0; transform: translate3d(0, 6px, 0); transition-duration: var(--dur-3); transition-timing-function: var(--ease-move); }
.wf-moves [data-wf-light] { will-change: opacity; transition: opacity var(--dur-3) var(--ease-out); }
.wf-moves .wf-slide.wf-talking [data-wf-light]:not(.wf-lit) { opacity: .35; }
/* a message that arrives on its own rises with its dots */
.wf-moves .wf-slide.wf-in .wf-arrive.wf-sent { animation: wf-deck-rise var(--wf-move) var(--ease-out) both; }
.wf-arrive { will-change: transform, opacity; }

/* the typing bubble (wireframe-deck.js): the frame is ONE rectangle, an SVG rect whose line keeps its width when the
   rect scales (vector-effect: non-scaling-stroke). The box of the dots IS that rectangle, at the size of the dots: it
   grows from there to the size of the message, so the line is the same from the first dot to the delivered message,
   on every frame it is one closed rectangle, and at rest it is the same rectangle, nothing swapped. The message is never
   smaller than the dots (the module gives it their size as a minimum). The text never scales. Numbers from the module: --sx/--sy (the dots over the message), --fx (where the dots are). */
.wf-bubble { position: relative; --b: var(--s-1); }
.wf-bubble.wf-bubble { border-color: transparent; box-shadow: none; } /* twice: beats .wf-chat .msg and the warning callout */
.wf-bubble > .wf-outline { position: absolute; top: calc(var(--b) / -2); inset-inline-start: calc(var(--b) / -2); width: calc(100% + var(--b)); height: calc(100% + var(--b)); overflow: visible; pointer-events: none; will-change: opacity; } /* the frame is there from the first dot: it is the box of the dots */
.wf-bubble > .wf-outline rect { fill: none; stroke: var(--ink); stroke-width: var(--b); vector-effect: non-scaling-stroke;
  transform-box: view-box; transform-origin: 0 0; transition: transform 360ms var(--ease-out); } /* lint-ok: the growth of the frame, timed with the module (GROW_MS) */
[dir="rtl"] .wf-bubble > .wf-outline rect { transform-origin: 100% 0; }
.wf-bubble:is(.is-typing, .is-holding) > .wf-outline rect { transform: translate(calc(var(--fx, 0) * var(--wf-sign, 1) * 1px), 0) scale(var(--sx, .2), var(--sy, .5)); }
/* the bar of a warning callout: part of the frame from the first dot. It starts where the rectangle starts and grows
   with it, in height only (its width stays). Faded while the frame moved, it popped in late, after the growth */
.wf-bubble > .wf-bar { display: none; }
.wf-callout[data-level="aviso"].wf-bubble > .wf-bar { display: block; position: absolute; top: calc(var(--b) / -2); height: calc(100% + var(--b)); inset-inline-start: calc(var(--b) / -2); width: calc(var(--s-3) + var(--b) / 2); background: var(--ink); pointer-events: none;
  transform-origin: center top; will-change: transform; transition: transform 360ms var(--ease-out); } /* lint-ok: the growth of the frame, timed with the module (GROW_MS) */
.wf-bubble:is(.is-typing, .is-holding) > .wf-bar { transform: translate3d(calc(var(--fx, 0) * var(--wf-sign, 1) * 1px), 0, 0) scaleY(var(--sy, .5)); }
.wf-bubble > :not(.wf-dots):not(.wf-outline):not(.wf-bar) { will-change: transform, opacity; transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out); } /* lint-ok: the text rises after the frame, timed with the module (TEXT_MS) */
.wf-bubble > .wf-body { display: block; }
.wf-bubble.is-typing > :not(.wf-dots):not(.wf-outline):not(.wf-bar), .wf-bubble.is-waiting > :not(.wf-dots):not(.wf-outline):not(.wf-bar) { opacity: 0; transform: translate3d(0, 6px, 0); }
.wf-bubble > .wf-dots { position: absolute; top: calc(-1 * var(--b)); inset-inline-start: calc(-1 * var(--b)); display: flex; align-items: center;
  padding: var(--sp-2) var(--sp-3); border: var(--b) solid transparent; opacity: 0; will-change: opacity; transition: opacity var(--dur-2) var(--ease-out); }
.wf-bubble.is-typing > .wf-dots { opacity: 1; }
.wf-bubble > .wf-dots { transform: translate3d(calc(var(--dots-x, 0) * var(--wf-sign, 1) * 1px), 0, 0); } /* growing from the middle (--wf-grow-from: center), the dots wait in the middle */
[dir="rtl"] .wf-bubble { --wf-sign: -1; }
.wf-still, .wf-still > *, .wf-still > .wf-outline rect { transition: none !important; } /* a change of state with no transition (the module) */

/* lists that change by themselves (WF.swap) and things that come and go (WF.reveal) */
[data-wf-key] { will-change: transform, opacity; transition: transform var(--wf-move) var(--ease-out); }
.wf-new { animation: wf-deck-rise var(--wf-move) var(--ease-out) both; animation-delay: calc(var(--i, 0) * var(--wf-gap)); }
.wf-leave { position: absolute; inset-inline: 0; margin: 0; pointer-events: none; animation: wf-deck-leave var(--dur-3) var(--ease-move) both; }
@keyframes wf-deck-leave { to { opacity: 0; transform: translate3d(0, -6px, 0); } }
.wf-reveal { will-change: transform, opacity; transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out); }
.wf-reveal.wf-gone { opacity: 0; transform: translate3d(0, 6px, 0); transition-timing-function: var(--ease-move); }

@media (prefers-reduced-motion: reduce) {
  .wf-moves .wf-slide *, .wf-moves .wf-slide > *, .wf-new, .wf-leave, [data-wf-key], .wf-reveal { animation: none; transition: none; }
}
@media print {
  /* everything in its final state, at once: the entry and step rules above are more specific than any plain reset here,
     so a plain "animation: none" lost and the slide on screen printed mid-fade, and the steps revealed for print were
     caught halfway through their transition (rows at 67%, shifted). Print has no time: nothing animates, nothing transitions */
  .wf-moves *, .wf-moves *::before, .wf-moves *::after, .wf-new { animation: none !important; transition: none !important; }
  .wf-moves .wf-slide.wf-out { display: none; }
  .wf-moves [data-wf-step], .wf-moves .wf-talking .msg { opacity: 1; transform: none; }
  .wf-moves .wf-slide.wf-talking [data-wf-light] { opacity: 1; }
}
