:root { color-scheme: light; --bg: #F4F9F9; --surface: #FFFFFF; --surface-2: #EAF3F4; --ink: #0D1E21; --ink-2: #42585B; --muted: #42585B; --line: #D1E0E1; --field: #62797C; --brand: #007483; --brand-strong: #005966; --brand-soft: #DDEFF1; --brand-ink: #FFFFFF; --panel: #F4F9F9; --panel-ink: #0D1E21; --panel-muted: #42585B; --accent: #B0233E; --accent-soft: #F5D3DA; --band: #005966; --band-ink: #FFFFFF; --band-muted: #DDEFF1; --good: #1E6B47; --good-soft: #E3F2EA; --warn: #8A4A00; --warn-soft: #FBF0DF; --bad: #A32A23; --bad-soft: #FBEBE8; --focus: #007483; --foot-bg: #0C1D20; --foot-ink: #FFFFFF; --foot-muted: #C0C4C5; --foot-tint: #4097A2; --code-bg: #0C1D20; --code-ink: #E6F0F1; }
/* ttestcalculator.com. Phone-first, light only. Colors come from brand/tokens.json (written above this line by the build). */
@font-face { font-family: "Red Hat Display"; src: url(/fonts/redhatdisplay-latin.woff2) format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Red Hat Display"; src: url(/fonts/redhatdisplay-italic-latin.woff2) format("woff2"); font-weight: 800; font-style: italic; font-display: swap; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.62 "Red Hat Display", system-ui, -apple-system, "Segoe UI", sans-serif; overflow-x: clip; -webkit-tap-highlight-color: rgba(0, 116, 131, .16); }
h1, h2, h3 { font-weight: 700; line-height: 1.15; letter-spacing: -.022em; margin: 0; text-wrap: pretty; }
h1 { font-size: clamp(1.8rem, 1.15rem + 2.6vw, 3rem); }
h2 { font-size: clamp(1.4rem, 1.15rem + 1vw, 1.9rem); margin: 0 0 .55em; }
h3 { font-size: 1.15rem; margin: 1.3em 0 .45em; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-strong); }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; } li { margin-bottom: .4em; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
sub { font-size: .72em; }
code, pre { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; z-index: 60; background: var(--surface); padding: 10px 14px; border-radius: 8px; }
/* Header */
.site-head { position: sticky; top: 0; z-index: 40; background: rgba(244, 249, 249, .94); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 10px; min-height: 62px; }
.brand { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; min-height: 44px; margin-left: -6px; flex: none; }
.lockup { display: block; height: 36px; width: auto; } .lk-compact { display: none; }
@media (max-width: 359px) { .brand .lk-full { display: none; } .brand .lk-compact { display: block; } }
@media (min-width: 900px) { .brand .lockup { height: 42px; } }
.foot-lockup { display: inline-block; margin-left: -6px; } .foot-lockup .lockup { height: 40px; } .foot-lockup .lk-compact { display: none; }
.nav { display: none; gap: 2px; margin-left: 18px; } .nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 9px 11px; border-radius: 10px; } .nav a:hover, .nav a[aria-current] { background: var(--surface-2); color: var(--ink); }
.menu { position: relative; margin-left: auto; }
.menu summary { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; list-style: none; color: var(--ink); }
.menu summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; right: 0; top: 52px; width: min(330px, calc(100vw - 32px)); max-height: calc(100dvh - 90px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px; box-shadow: 0 16px 40px rgba(13, 30, 33, .18); }
.menu-panel p { margin: 10px 8px 4px; font-size: .76rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.menu-panel a { display: flex; align-items: center; min-height: 44px; padding: 6px 8px; color: var(--ink); text-decoration: none; border-radius: 9px; } .menu-panel a:hover { background: var(--surface-2); }
/* Hero and page head */
.hero { padding: 18px 0 26px; background: radial-gradient(1200px 380px at 80% -10%, var(--brand-soft), transparent 70%), linear-gradient(var(--surface-2), var(--bg)); }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 8px; } .crumbs a { color: var(--muted); }
.eyebrow { display: block; color: var(--brand); font-weight: 750; font-size: .8rem; letter-spacing: .07em; text-transform: uppercase; margin-bottom: 6px; }
.lead { font-size: 1.12rem; color: var(--ink-2); margin: 12px 0 0; max-width: 68ch; }
.checked, .byline { font-size: .9rem; color: var(--muted); margin: 10px 0 0; } .byline { margin-top: 2px; }
.points { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 7px; } .points li { position: relative; padding-left: 24px; margin: 0; color: var(--ink-2); }
.points li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 12px; height: 7px; border-left: 2.5px solid var(--brand); border-bottom: 2.5px solid var(--brand); transform: rotate(-45deg); }
.tool-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
/* Calculator */
.tool { display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 14px 36px rgba(13, 30, 33, .08); overflow: hidden; min-width: 0; }
.tool-title { margin: 0; padding: 14px 16px 0; font-weight: 750; }
.calc { display: grid; gap: 12px; padding: 16px; min-width: 0; }
.field { display: block; min-width: 0; } .lab { display: block; font-size: .87rem; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; padding: 0; }
.inp { display: flex; align-items: center; min-height: 48px; background: var(--surface); border: 1.5px solid var(--field); border-radius: 12px; padding: 0 12px; } .inp:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.inp input, .inp select { flex: 1; width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 600 1.02rem "Red Hat Display", system-ui, sans-serif; font-variant-numeric: tabular-nums; min-height: 44px; padding: 0; }
.inp select { font-weight: 500; }
textarea { display: block; width: 100%; min-height: 84px; resize: vertical; border: 1.5px solid var(--field); border-radius: 12px; padding: 10px 12px; font: 500 .98rem/1.45 ui-monospace, Consolas, monospace; color: var(--ink); background: var(--surface); font-variant-numeric: tabular-nums; }
textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.help { display: block; font-size: .83rem; color: var(--muted); margin: 4px 0 0; }
.seg { border: 0; padding: 0; margin: 0; min-width: 0; } .seg-row { display: grid; gap: 6px; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.seg label { display: block; cursor: pointer; } .seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 46px; height: 100%; padding: 4px 6px; border: 1.5px solid var(--field); border-radius: 12px; font-weight: 650; font-size: .93rem; line-height: 1.15; color: var(--ink); background: var(--surface); }
.seg input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); } .seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: end; } .row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; }
.sumgrid { display: grid; gap: 10px; }
/* Result */
.result { background: var(--panel); border-top: 1px solid var(--line); padding: 16px; min-width: 0; color: var(--panel-ink); }
.r-kicker { font-weight: 750; margin: 0 0 10px; } .r-kicker span { display: block; font-weight: 500; font-size: .88rem; color: var(--panel-muted); }
.r-big { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.1fr); gap: 8px; margin-bottom: 12px; }
.r-big > div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px; min-width: 0; }
.r-big .k, .tile .k { display: block; font-size: .78rem; color: var(--panel-muted); font-weight: 600; line-height: 1.25; }
.r-big .v { display: block; font-size: clamp(1.08rem, .85rem + 1.5vw, 1.75rem); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; overflow-wrap: anywhere; }
.r-big > div:first-child .v { color: var(--accent); white-space: nowrap; font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.1rem); }
.r-big > div { padding: 10px 8px; }
.verdict { font-weight: 650; margin: 0 0 12px; padding: 10px 12px; background: var(--brand-soft); border-radius: 12px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 9px 10px; min-width: 0; } .tile .v { font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rt { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; margin: 0 0 12px; background: var(--surface); border-radius: 12px; overflow: hidden; }
.rt caption { text-align: left; font-weight: 700; padding: 4px 0 6px; }
.rt th, .rt td { padding: 7px 9px; border-bottom: 1px solid var(--line); text-align: right; } .rt th:first-child { text-align: left; } .rt thead th { background: var(--surface-2); font-size: .82rem; color: var(--ink-2); }
.r-note { font-size: .9rem; color: var(--panel-ink); } .r-sub { font-weight: 700; margin: 0 0 4px; }
.assume ul { font-size: .9rem; margin-bottom: 12px; }
.apa { font-size: .95rem; background: var(--surface); border: 1px dashed var(--field); border-radius: 12px; padding: 9px 11px; } .apa span { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .06em; color: var(--brand); margin-right: 6px; }
.r-error { color: var(--bad); background: var(--bad-soft); border-left: 4px solid var(--bad); padding: 10px 12px; border-radius: 8px; margin: 0; font-weight: 600; }
details.code { margin-top: 8px; } details.code summary { cursor: pointer; font-weight: 700; color: var(--brand); min-height: 44px; display: flex; align-items: center; }
.code-lab { font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--panel-muted); margin: 8px 0 4px; }
.code-note { font-size: .88rem; }
pre { background: var(--code-bg); color: var(--code-ink); border-radius: 12px; padding: 12px; overflow-x: auto; font-size: .82rem; line-height: 1.5; margin: 0 0 8px; white-space: pre; }
.tcurve { display: block; width: 100%; height: auto; margin: 2px 0 10px; } .tc-line { fill: none; stroke: var(--brand); stroke-width: 2.4; } .tc-fill { fill: var(--accent-soft); } .tc-axis { stroke: var(--field); stroke-width: 1; } .tc-mark { stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 4 3; } .tcurve text { font-size: 11px; fill: var(--muted); }
/* Article layout */
.article { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); padding: 26px 0 40px; }
.prose { max-width: 72ch; min-width: 0; } .prose section { margin-bottom: 30px; }
.prose table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; margin: 0 0 1.2em; font-size: .94rem; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 7px 8px; text-align: left; vertical-align: top; } .prose thead th { background: var(--surface-2); }
.tw { overflow-x: auto; margin: 0 0 1.2em; } .tw table { margin: 0; }
.callout { background: var(--brand-soft); border-left: 4px solid var(--brand); border-radius: 10px; padding: 12px 14px; margin: 0 0 1.2em; } .callout p:last-child { margin: 0; }
.formula { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-variant-numeric: tabular-nums; overflow-x: auto; margin: 0 0 1em; }
.side { min-width: 0; } .side-in { display: grid; gap: 14px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; } .panel-title { font-weight: 750; margin: 0 0 8px; } .panel ul { margin: 0; padding-left: 1.1em; } .panel li:last-child { margin: 0; }
.panel dl { margin: 0; display: grid; gap: 10px; } .panel dt { font-size: .84rem; color: var(--muted); } .panel dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.srcs li { font-size: .92rem; } .srcs small { color: var(--muted); }
.cards { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); margin: 0 0 8px; }
.card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; text-decoration: none; color: var(--ink); } .card b { display: block; } .card span { color: var(--muted); font-size: .92rem; } .card:hover { border-color: var(--brand); }
.band { padding: 34px 0; } .band.alt { background: var(--surface-2); }
.home-secs { display: grid; gap: 8px 40px; grid-template-columns: minmax(0, 1fr); } .home-secs section { max-width: 70ch; }
.trust { background: var(--band); color: var(--band-ink); padding: 30px 0; } .trust h2 { color: var(--band-ink); } .trust p { color: var(--band-muted); margin: 0; } .trust a { color: var(--band-ink); }
/* Tables page */
.ttable { font-size: .9rem; } .ttable th, .ttable td { text-align: right; padding: 6px 8px; white-space: nowrap; } .ttable th:first-child, .ttable td:first-child { text-align: left; } .ttable thead tr:first-child th { font-weight: 600; color: var(--ink-2); font-size: .8rem; }
.ttable tbody tr:nth-child(5n) td, .ttable tbody tr:nth-child(5n) th { border-bottom: 2px solid var(--line); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 8px 18px; border-radius: 12px; border: 0; background: var(--brand); color: var(--brand-ink); font: 700 1rem "Red Hat Display", system-ui, sans-serif; cursor: pointer; text-decoration: none; } .btn:hover { background: var(--brand-strong); color: var(--brand-ink); }
/* Footer */
.site-foot { background: var(--foot-bg); color: var(--foot-muted); padding: 34px 0 26px; margin-top: 10px; font-size: .93rem; }
.site-foot a { color: var(--foot-ink); } .site-foot h2 { color: var(--foot-ink); font-size: .95rem; margin: 0 0 8px; }
.foot-grid { display: grid; gap: 22px; grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot-grid ul { list-style: none; padding: 0; margin: 0; } .foot-grid li { margin: 0 0 6px; }
.foot-brand { grid-column: 1 / -1; }
.fine { border-top: 1px solid rgba(255, 255, 255, .14); margin-top: 22px; padding-top: 16px; } .fine p { margin: 0 0 6px; }
/* Embed */
body.embed { background: var(--surface); } body.embed main { padding: 12px; max-width: 560px; margin: 0 auto; } body.embed h1 { font-size: 1.3rem; margin: 0 0 10px; } .embed-credit { font-size: .85rem; text-align: center; margin: 10px 0 0; }
@media (min-width: 640px) {
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); } .foot-brand { grid-column: auto; }
}
@media (min-width: 980px) {
  .nav { display: flex; }
  .tool-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: start; gap: 40px; }
  .tool-grid.flip .tool-copy { padding-top: 6px; }
  .article { grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; }
  .side-in { position: sticky; top: 84px; }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-secs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media print {
  .site-head, .site-foot, .side, .ad-slot, .no-print, .crumbs, .tool form, details.code summary { display: none !important; }
  body { background: #fff; font-size: 10.5pt; } .hero { background: none; padding: 0; }
  .ttable { font-size: 8.4pt; } .ttable th, .ttable td { padding: 1.5px 5px; } .ttable tbody tr:nth-child(5n) td { border-bottom: 1.5px solid #888; }
  .print-only { display: block !important; }
  a { color: inherit; text-decoration: none; }
}
.print-only { display: none; }


/* AdSense units (adsense-unit.mjs): space reserved, labelled, collapsed when unfilled or off */
.ad-slot { display: block; position: relative; clear: both; min-height: 280px; margin: 40px auto 32px; padding-top: 4px; box-sizing: border-box; grid-column: 1 / -1; flex-basis: 100%; max-width: 100%; contain: layout; }
.ad-slot::before { content: "Advertisement"; position: absolute; top: -20px; left: 0; font-size: .72rem; line-height: 1.4; color: #6b6b6b; letter-spacing: .02em; }
main > .ad-slot { width: min(1100px, calc(100% - 32px)); }
@media (min-width: 900px) { .ad-slot { min-height: 250px; } }
.ads-off .ad-slot, .ad-slot:has(> ins.adsbygoogle[data-ad-status="unfilled"]) { display: none !important; }
@media print { .ad-slot { display: none !important; } }
