/* MeasureLab guides — measure-lab.app/guides/
   The home page's look for reading: dark ground with a still field of dust,
   gold headings in Xanh Mono, mono labels, and the chapter instrument as the
   table of contents. Motion is light: headings come into focus, blocks rise
   in, and a readout at the bottom shows how far through the guide you are. */

:root {
  --ground: #131613;
  --ground-2: #1a1e1a;
  --card: rgba(26, 30, 26, .72);
  --ink: #ece6d4;
  --ink-2: rgba(236, 230, 212, .74);
  --ink-3: rgba(236, 230, 212, .46);
  --line: rgba(236, 230, 212, .13);
  --line-2: rgba(236, 230, 212, .24);
  --gold: #efc57f;
  --gold-fill: #e5b35a;
  --gold-ink: #1d1708;
  --display: "Xanh Mono", "Courier New", ui-monospace, monospace;
  --sans: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --out: cubic-bezier(.22, 1, .36, 1);
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--ground); -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 17px/1.7 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
/* The dust: three sparse dot grids at odd sizes read as a still star field. */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 88% -8%, rgba(229, 179, 90, .09), transparent 70%),
    radial-gradient(rgba(236, 230, 212, .34) .7px, transparent 1.1px) 0 0 / 97px 89px,
    radial-gradient(rgba(239, 197, 127, .38) .7px, transparent 1.1px) 41px 67px / 173px 151px,
    radial-gradient(rgba(236, 230, 212, .16) .9px, transparent 1.3px) 19px 31px / 61px 67px; }
img, svg { max-width: 100%; }
a { color: inherit; text-decoration-color: rgba(239, 197, 127, .5); text-underline-offset: 3px; }
a:hover { color: var(--gold); text-decoration-color: var(--gold); }
:focus-visible { outline: 1.5px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--gold); color: var(--gold-ink); }
p { margin: 16px 0 0; }
strong { font-weight: 600; color: var(--ink); }
h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
.num { font: 500 .9em/1.5 var(--mono); color: var(--gold); }
.muted { color: var(--ink-3); }

/* Header, as on the home page */
.top { position: fixed; z-index: 20; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: calc(18px + env(safe-area-inset-top, 0px)) var(--gutter-r) 0 var(--gutter); pointer-events: none; }
.top > * { pointer-events: auto; }
.top::before { content: ""; position: absolute; left: 0; right: 0; top: 0; z-index: -1; height: calc(104px + env(safe-area-inset-top, 0px)); pointer-events: none; background: linear-gradient(rgba(19, 22, 19, .94), rgba(19, 22, 19, .62) 55%, rgba(19, 22, 19, 0)); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 13px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.links { display: flex; align-items: center; gap: 16px; }
.links > a:not(.pill) { font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; color: var(--ink-2); }
.links > a:not(.pill):hover, .links > a[aria-current="page"] { color: var(--gold); }
.pill { display: inline-flex; align-items: center; gap: 9px; min-height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(19, 22, 19, .82); font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); text-decoration: none; white-space: nowrap; transition: border-color .4s var(--out), background .4s var(--out), color .4s var(--out); }
.pill:hover { border-color: var(--gold); color: var(--gold); }
.pill-gold { background: var(--gold-fill); border-color: var(--gold-fill); color: var(--gold-ink); }
.pill-gold:hover { background: #f2c470; border-color: #f2c470; color: var(--gold-ink); }
.dots { width: 9px; height: 9px; flex: none; background: radial-gradient(circle, currentColor 1px, transparent 1.3px) 0 0 / 4.5px 4.5px; opacity: .9; }

/* Layout: the table of contents rides beside the guide on wide screens */
.wrap { max-width: 1180px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.article { counter-reset: sec; display: grid; grid-template-columns: 200px minmax(0, 700px); column-gap: 80px; justify-content: center; padding-block: 132px 40px; }
.article > * { grid-column: 2; }
.article > .toc { grid-column: 1; grid-row: 1 / span 80; align-self: start; position: sticky; top: 118px; }

/* Opening */
.crumbs { font: 500 11px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--gold); }
.kicker { margin-top: 26px; font: 500 11px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.article h1 { margin-top: 14px; font: 400 clamp(38px, 4.6vw, 62px)/1.02 var(--display); text-transform: uppercase; color: var(--gold); letter-spacing: -.005em; }
.lede { margin-top: 22px; font-size: 19.5px; line-height: 1.6; color: var(--ink-2); }

/* Sections: each gets a lettered mark, like the home page's chapters */
.article h2 { scroll-margin-top: 110px; margin-top: 84px; font: 400 clamp(28px, 3vw, 40px)/1.04 var(--display); text-transform: uppercase; color: var(--gold); }
.article h2[id], .article .faq > h2 { counter-increment: sec; position: relative; padding-left: 42px; }
.article h2[id]::before, .article .faq > h2::before { content: counter(sec, upper-alpha); position: absolute; left: 0; top: .18em; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--gold); font: 500 10.5px/1 var(--mono); color: var(--gold); }
.article h3 { font: 500 19px/1.3 var(--sans); letter-spacing: -.01em; color: var(--ink); margin-top: 36px; }
.article p, .article li { color: var(--ink-2); }
.article ul, .article ol { padding-left: 22px; margin: 16px 0 0; }
.article li + li { margin-top: 8px; }
.article ul li::marker { color: var(--gold); }

/* Table of contents: lettered circles joined by a line */
.toc { font-size: 14px; }
.toc strong { display: block; font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 16px; }
.toc ol { counter-reset: toc; list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 4px; }
.toc ol::before { content: ""; position: absolute; left: 11px; top: 12px; bottom: 12px; width: 1px; background: var(--line-2); }
.toc li { counter-increment: toc; }
.toc li + li { margin-top: 0; }
.toc a { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: center; padding: 5px 0; text-decoration: none; font: 500 11px/1.35 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); transition: color .4s var(--out); }
.toc a::before { content: counter(toc, upper-alpha); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--ground); font: 500 10px/1 var(--mono); color: var(--ink-2); transition: background .5s var(--out), color .5s var(--out), border-color .5s var(--out); }
.toc a:hover { color: var(--gold); }
.toc a[aria-current="true"] { color: var(--ink); }
.toc a[aria-current="true"]::before { background: var(--gold-fill); border-color: var(--gold-fill); color: var(--gold-ink); }

/* Ways compared */
.ways { display: grid; gap: 12px; margin-top: 26px; }
.way { padding: 20px 22px; border-radius: 18px; border: 1px dashed var(--line-2); background: var(--card); }
.way h3 { margin: 0; font-size: 18px; }
.way .verdict { margin-top: 8px; font: 500 10.5px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.way p { margin-top: 10px; font-size: 15.5px; }

/* Worked examples: the home page's calculator card */
.calc { margin-top: 26px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 14px; padding: 22px; border-radius: 20px; border: 1px solid var(--line-2); background: rgba(24, 28, 24, .95); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.calc .row { display: grid; gap: 8px; align-content: start; }
.calc label, .calc .row > span { font: 500 10.5px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.calc input:not([type="checkbox"]), .calc select { width: 100%; min-width: 0; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .22); color: var(--ink); font: 400 19px/1 var(--display); outline: none; transition: border-color .3s var(--out); }
.calc select { font: 500 14px/1 var(--mono); -webkit-appearance: none; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.calc select option { color: #1d221e; }
.calc input:focus, .calc select:focus { border-color: var(--gold); }
.calc .check { display: flex; align-items: center; gap: 10px; min-height: 46px; padding-top: 18px; font: 400 14px/1.3 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink); }
.calc .check input { width: 18px; height: 18px; accent-color: var(--gold-fill); }
.calc .out { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 18px; padding-top: 16px; border-top: 1px dashed var(--line-2); }
.calc .how { font: 500 11px/1.5 var(--mono); letter-spacing: .03em; color: var(--ink-3); }
.calc .total { font: 400 46px/1 var(--display); color: var(--gold); font-variant-numeric: tabular-nums; }
.calc-note { font-size: 14px; color: var(--ink-3) !important; margin-top: 12px; }

/* Price grid */
.bands-wrap { overflow-x: auto; margin-top: 22px; border-radius: 14px; border: 1px solid var(--line-2); }
.bands { border-collapse: collapse; width: 100%; min-width: 520px; font: 500 13px/1.2 var(--mono); }
.bands th, .bands td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); color: var(--ink-2); }
.bands th { background: var(--ground-2); color: var(--ink-3); font-weight: 500; letter-spacing: .04em; }
.bands td.on { background: var(--gold-fill); color: var(--gold-ink); }
.bands caption { caption-side: bottom; text-align: left; padding: 10px 12px; font: 400 13px/1.4 var(--sans); color: var(--ink-3); }

/* Steps */
.steps { counter-reset: step; list-style: none; padding: 0 !important; margin-top: 22px !important; display: grid; border-bottom: 1px dashed var(--line-2); }
.steps li { counter-increment: step; position: relative; margin: 0 !important; padding: 16px 0 16px 52px; border-top: 1px dashed var(--line-2); }
.steps li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 17px; font: 500 12px/1.6 var(--mono); letter-spacing: .06em; color: var(--gold); }

/* Questions, as on the home page */
.faq { margin-top: 0; }
.faq > div { border-top: 1px dashed var(--line-2); margin-top: 22px !important; }
.faq details { border-bottom: 1px dashed var(--line-2); interpolate-size: allow-keywords; }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 18px 0; font: 400 18px/1.3 var(--display); text-transform: uppercase; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-2); font: 400 16px/1 var(--mono); color: var(--ink); transition: transform .5s var(--out), border-color .3s; }
.faq summary:hover::after { border-color: var(--gold); }
.faq details[open] summary::after { transform: rotate(45deg); border-color: var(--gold); }
.faq details p { margin: 0; padding: 0 44px 20px 0; font-size: 15.5px; }
.faq details::details-content { block-size: 0; overflow: hidden; transition: block-size .55s var(--out), content-visibility .55s allow-discrete; }
.faq details[open]::details-content { block-size: auto; }

/* The call to install */
.cta { position: relative; margin-top: 84px; padding: 30px; border-radius: 22px; border: 1px solid rgba(239, 197, 127, .45); background: #1a1d17; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; overflow: hidden; isolation: isolate; }
.cta::before { content: ""; position: absolute; z-index: -1; right: -80px; top: -120px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(closest-side, rgba(229, 179, 90, .22), transparent); pointer-events: none; }
.cta h2 { margin: 0 !important; padding-left: 0 !important; font: 400 clamp(26px, 2.8vw, 34px)/1.04 var(--display) !important; text-transform: uppercase; color: var(--gold); }
.cta h2::before { content: none !important; }
.cta p { margin: 8px 0 0; font-size: 15px; color: var(--ink-2); }
.btn { display: inline-flex; align-items: center; gap: 9px; min-height: 42px; padding: 0 18px; border-radius: 999px; background: var(--gold-fill); color: var(--gold-ink); font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; white-space: nowrap; transition: background .4s var(--out); }
.btn:hover { background: #f2c470; color: var(--gold-ink); }

/* Related guides: an index of big words */
.related { margin-top: 64px; }
.related > h2, .related .label { padding-left: 0 !important; margin: 0 !important; font: 500 10.5px/1 var(--mono) !important; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3) !important; }
.related > h2::before { content: none !important; }
.related ul { list-style: none; padding: 0 !important; margin: 16px 0 0 !important; border-bottom: 1px dashed var(--line-2); }
.related li { margin: 0 !important; }
.related a { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 16px 0; border-top: 1px dashed var(--line-2); text-decoration: none; font: 400 20px/1.2 var(--display); text-transform: uppercase; color: var(--ink); transition: color .3s var(--out), padding .45s var(--out); }
.related a span { font: 500 11px/1 var(--mono); color: var(--ink-3); }
.related a:hover { color: var(--gold); padding-left: 8px; }

/* Guides list */
.hero { padding-block: 150px 10px; max-width: 860px; }
.hero h1 { margin-top: 16px; font: 400 clamp(40px, 5.6vw, 78px)/1 var(--display); text-transform: uppercase; color: var(--gold); }
.hero h1 em { font-style: italic; text-transform: none; color: var(--ink); }
.hero .lede { max-width: 640px; }
.list-head { margin-top: 64px; font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.guides { list-style: none; margin: 16px 0 0; padding: 0; border-bottom: 1px dashed var(--line-2); }
.guide-row { display: grid; grid-template-columns: 180px minmax(0, 1.2fr) minmax(0, 1fr) 24px; gap: 24px; align-items: baseline; padding: 26px 0; border-top: 1px dashed var(--line-2); text-decoration: none; transition: padding .5s var(--out); }
.guide-row .tag { font: 500 10.5px/1.4 var(--mono); letter-spacing: .1em; color: var(--gold); }
.guide-row h3 { font: 400 clamp(24px, 2.6vw, 34px)/1.05 var(--display); text-transform: uppercase; color: var(--ink); transition: color .35s var(--out); }
.guide-row p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.guide-row i { font-style: normal; font: 500 14px/1 var(--mono); color: var(--ink-3); transition: transform .45s var(--out), color .35s; }
.guide-row:hover { padding-left: 10px; color: inherit; }
.guide-row:hover h3, .guide-row:hover i { color: var(--gold); }
.guide-row:hover i { transform: translateX(4px); }
.list .cta { margin-top: 90px; }

/* Footer, as on the home page */
.foot { max-width: 1180px; margin: 96px auto 0; display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; padding: 26px var(--gutter-r) calc(72px + env(safe-area-inset-bottom, 0px)) var(--gutter); border-top: 1px dashed var(--line); font: 500 10.5px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.foot nav { display: flex; gap: 22px; flex-wrap: wrap; }
.foot a { text-decoration: none; color: var(--ink-2); }
.foot a:hover, .foot .mail { color: var(--gold); }

/* Reading readout */
.hud { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 0 var(--gutter-r) calc(16px + env(safe-area-inset-bottom, 0px)) var(--gutter); pointer-events: none; font: 500 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.hud::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; z-index: -1; height: calc(80px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(rgba(19, 22, 19, 0), rgba(19, 22, 19, .88)); }
.hud-right { display: flex; align-items: center; gap: 12px; }
.hud-read { color: var(--ink-2); font-variant-numeric: tabular-nums; min-width: 5.5em; text-align: right; }
.hud-track { position: relative; width: 120px; height: 1px; background: repeating-linear-gradient(90deg, var(--line-2) 0 3px, transparent 3px 6px); }
.hud-track i { position: absolute; left: 0; top: -1px; height: 3px; width: 100%; background: var(--gold-fill); border-radius: 2px; transform-origin: left; transform: scaleX(var(--p, 0)); }
html:not(.js) .hud { display: none; }

/* Light motion */
.word { display: inline-block; }
html.js [data-reveal] .word { filter: blur(10px); opacity: 0; transform: translateY(.14em); transition: filter 1s var(--out), opacity 1s var(--out), transform 1s var(--out); transition-delay: calc(var(--i, 0) * 55ms); }
html.js [data-reveal].in .word { filter: blur(0); opacity: 1; transform: none; }
html.js .rise { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--out), transform .9s var(--out); transition-delay: var(--d, 0ms); }
html.js .rise.in { opacity: 1; transform: none; }

@media (max-width: 1000px) {
  .article { grid-template-columns: minmax(0, 1fr); padding-top: 112px; }
  .article > .toc { grid-column: 1; grid-row: auto; position: static; margin-top: 30px; padding: 18px 20px; border-radius: 16px; border: 1px dashed var(--line-2); background: var(--card); }
  .article > * { grid-column: 1; }
  .guide-row { grid-template-columns: minmax(0, 1fr) 24px; gap: 10px 16px; }
  .guide-row .tag, .guide-row h3, .guide-row p { grid-column: 1; }
  .guide-row i { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .brand span, .links > a:not(.pill) { display: none; }
  .calc { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .calc .total { font-size: 40px; }
  .cta { padding: 22px; }
  .hud-left { display: none; }
  .hero { padding-top: 120px; }
}
@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal] .word, html.js .rise { filter: none; opacity: 1; transform: none; transition: none; }
  .faq details::details-content { transition: none; }
}
