/* t223u finish layer, loaded last on every preview page. One system: type scale, spacing, cards, buttons, footer, tap targets.
   Class based only (the site CSP blocks inline styles). */

/* ---- brand icons next to the text names (t226u: keep the words, add the mark at cap height) */
.brand-ic { display: inline-block; flex: none; width: auto; vertical-align: middle; }
.ob__logo { display: inline-flex; align-items: center; gap: .5em; min-height: 44px; }
.ob__logo .brand-ic--fit { height: 1.3cap; height: 1.05em; }
.of__top { max-width: var(--wrap, 1180px); margin: 0 auto 28px; padding: 0 24px; }
.of .of__brand { display: inline-flex; align-items: center; gap: .5em; min-height: 44px; color: var(--ink, #111114); font-weight: 700; font-size: 17px; letter-spacing: -.01em; text-decoration: none; }
.of .of__brand .brand-ic--fit { height: 1.05em; }
.ol__name--tfh, .fl-subnav__name--tfh { display: inline-flex; align-items: center; gap: .45em; }
.ol__name--tfh .brand-ic--tfh, .fl-subnav__name--tfh .brand-ic--tfh { height: 1.05em; }
.ox__mark { display: block; width: clamp(64px, 9vw, 96px); height: auto; margin: 0 auto 14px; }

/* ---- one Hope: the legacy mesh orb never draws, even if a cached page still includes it */
.hope-orb { display: none !important; }
/* Ask Hope position lives in hope-guide.css (one bottom bar rule, --hg-lift) */

/* ---- footer: room for the Ask Hope pill, real tap targets, long hashes wrap */
.of { font-size: 14px; }
.of ul { gap: 2px; }
.of ul a { display: inline-flex; align-items: center; min-height: 40px; }
.of__extra { display: grid; gap: 14px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line, #e4e4e7); }
.of__extra .of__pill { display: inline-flex; align-items: center; justify-self: start; max-width: 100%; min-height: 40px; padding: 8px 16px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--line, #e4e4e7); color: var(--ink, #111114); font-size: 13px; line-height: 1.4; }
.of__extra .fx-footer-sha { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted, #5c5f66); }
.of__extra code, .of code { overflow-wrap: anywhere; word-break: break-all; font-size: 12px; background: transparent; padding: 0; }
@media (max-width: 760px) {
  .of { padding-bottom: 104px; }
  .of__in { gap: 28px 20px; }
}

/* ---- tap targets in the bars */
.ob__menu summary { min-height: 44px; display: inline-flex; align-items: center; }
.ol a, .fl-subnav a, .fl-subnav summary { min-height: 44px; display: inline-flex; align-items: center; }

/* ---- reading rhythm on supporting pages */
html.osd main { overflow-x: clip; }
html.osd main :is(p, li):not([class]) { line-height: 1.6; }
html.osd main section > .wrap > :is(p, ul, ol):not([class]), html.osd .method :is(p, ul, ol):not([class]) { max-width: 68ch; }
html.osd main h2:not([class]) { font-size: clamp(28px, 4vw, 44px); line-height: 1.1; letter-spacing: -.03em; margin: 0 0 16px; }
html.osd main h3:not([class]), html.osd main h3.spaced { font-size: clamp(20px, 2.2vw, 24px); line-height: 1.25; letter-spacing: -.015em; }
html.osd main h3.spaced { margin-top: 36px; }
html.osd .small, html.osd p.small { font-size: 15px; line-height: 1.55; }
html.osd main :not(pre) > code { overflow-wrap: anywhere; font-size: .92em; padding: .1em .35em; border-radius: 6px; background: var(--alt, #f4f4f6); }
@media (max-width: 760px) {
  html.osd main :is(p, li):not([class]) { font-size: 17px; }
}

/* ---- Trimline tool pages (Free audit, Methodology, Security, Kit, Trust, Portal, calculators): Apple style hero and cards */
html.osd .hero { background: linear-gradient(180deg, var(--alt, #f4f4f6) 0%, #fff 100%); }
html.osd .hero .eyebrow { color: var(--pt); }
html.osd .hero h1 { font-weight: 700; letter-spacing: -.035em; line-height: 1.04; text-wrap: balance; }
html.osd .hero p.lead { text-wrap: pretty; }
html.osd .hero .spend-qualifier { font-size: 16px; max-width: 60ch; margin-top: 18px; }
html.osd .privacy { position: relative; margin-top: 28px; padding: 20px 22px 20px 58px; max-width: 760px; border: 0; border-radius: 20px; background: #fff; box-shadow: inset 0 0 0 1px var(--line, #e4e4e7), 0 8px 28px -18px rgba(17,17,20,.25); color: var(--ink, #111114); font-size: 16px; line-height: 1.55; }
html.osd .privacy::before { content: ""; position: absolute; left: 18px; top: 19px; width: 28px; height: 28px; border-radius: 50%; background: var(--p) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='9' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / 16px no-repeat; }
html.osd .privacy strong { color: var(--pt); }
html.osd #upload-section, html.osd section.method { padding: clamp(48px, 7vw, 88px) 0; }
html.osd #upload-section .grid-2 { gap: 20px; align-items: start; }
html.osd #upload-section .grid-2 > div { background: var(--alt, #f4f4f6); border-radius: 28px; padding: clamp(24px, 4vw, 40px); min-width: 0; }
html.osd #upload-section h2 { font-size: clamp(26px, 3.2vw, 36px); }
html.osd .drop { display: grid; place-items: center; gap: 6px; min-height: 200px; padding: 28px 20px; text-align: center; border-radius: 22px; border: 2px dashed color-mix(in srgb, var(--p) 55%, transparent); background: #fff; cursor: pointer; transition: border-color .2s, background .2s; }
html.osd .drop:hover, html.osd .drop.drag, html.osd .drop:focus-within { border-color: var(--p); background: color-mix(in srgb, var(--p) 6%, #fff); }
html.osd .drop .drop-line { font-size: 17px; line-height: 1.45; }
html.osd .drop .drop-line.small { font-size: 14px; color: var(--muted); }
html.osd .drop input[type=file] { max-width: 100%; }
html.osd pre.cmd { background: #0b0b0d; color: #f5f5f7; padding: 18px 20px; font-size: 14px; line-height: 1.6; border-radius: 18px; }
html.osd pre.cmd code { color: inherit; background: none; padding: 0; }
html.osd .cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
html.osd :is(.btn, .ap-pill, .fx-btn) { min-height: 48px; padding: 0 22px; border-radius: 999px; font-size: 16px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; text-align: center; line-height: 1.2; }
@media (max-width: 560px) { html.osd .cta-row .btn { width: 100%; } }
html.osd .card, html.osd .kpi, html.osd .portal-card { border: 0; border-radius: 22px; background: #fff; box-shadow: inset 0 0 0 1px var(--line, #e4e4e7); }
html.osd .kpi { padding: 20px; }
html.osd .kpi .value { font-size: clamp(26px, 3vw, 34px); letter-spacing: -.02em; font-weight: 700; }
html.osd .table-wrap { border-radius: 18px; box-shadow: inset 0 0 0 1px var(--line, #e4e4e7); -webkit-overflow-scrolling: touch; }
html.osd .table-wrap table { border-collapse: collapse; width: 100%; font-size: 15px; }
html.osd .table-wrap :is(th, td) { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line, #e4e4e7); vertical-align: top; }
html.osd .table-wrap th { background: var(--alt, #f4f4f6); font-weight: 600; }
/* calculators */
html.osd .calc-form { display: grid; gap: 16px; max-width: 560px; padding: clamp(22px, 4vw, 32px); border-radius: 28px; background: var(--alt, #f4f4f6); }
html.osd .calc-form label { font-weight: 600; font-size: 15px; }
html.osd :is(.calc-form, main form) :is(input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea) { min-height: 48px; border-radius: 14px; border: 1px solid #d4d4d8; padding: 10px 14px; font-size: 17px; background: #fff; width: 100%; box-sizing: border-box; }
html.osd .calc-result { margin-top: 16px; padding: 22px; border-radius: 22px; background: #fff; box-shadow: inset 0 0 0 1px var(--line, #e4e4e7); font-size: 17px; line-height: 1.55; max-width: 560px; }
html.osd .rate-note { font-size: 15px; color: var(--muted); max-width: 60ch; }
@media (max-width: 560px) { html.osd :is(.btn, .ap-pill, .fx-btn) { font-size: 15px; padding: 10px 18px; } }
.os-kick--tfh { display: inline-flex; align-items: center; gap: .5em; }
.os-kick--tfh .brand-ic--tfh { height: 1.25em; }
/* TFH mission pages: the engine's long description reads as body text, not a giant lead */
html.osd .h25-mhero .ap-lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.6; font-weight: 400; letter-spacing: 0; color: #3f4147; max-width: 64ch; }
/* tap targets: checkboxes and radios, store row names, hero "see it in use" link */
main :is(input[type=checkbox], input[type=radio]) { width: 22px; height: 22px; accent-color: var(--p, #111114); flex: none; }
main label:has(> input[type=checkbox]), main label:has(> input[type=radio]) { min-height: 44px; }
.oct th a, .os-store th a { display: inline-flex; align-items: center; min-height: 44px; }
.ox__more { display: inline-flex; align-items: center; min-height: 44px; }
/* the apply bar is sticky and in the flow, so the old fixed bar gutter only left a white strip under the footer */
html.osd body.has-apply-bar { padding-bottom: 0; }
.ol__name--tfh { white-space: nowrap; }
@media (max-width: 420px) { .ol__name--tfh { font-size: 16px; } .ol__in .ob-btn--s { padding: 0 14px; } }
/* the founder bio card: keep the LinkedIn link clear of the Ask Hope pill */
html.osd .fx-accountable { position: relative; padding: 20px 22px 24px; border-radius: 22px; background: #fff; box-shadow: inset 0 0 0 1px var(--line, #e4e4e7); }
html.osd .fx-accountable a { display: inline-flex; align-items: center; min-height: 44px; }

/* t234u: finding checkboxes are 44px labels; the sticky bar and Ask Hope must not cover findings or Unlock */
html.osd .finding-card .fc-check, html.osd .bundle-row .fc-check {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  flex: none; width: 44px; height: 44px; margin: -10px 0 0 -10px; cursor: pointer;
}
html.osd .finding-card .fc-check input, html.osd .bundle-row .fc-check input,
html.osd .finding-card .fc-top input[type=checkbox], html.osd .bundle-row input[type=checkbox] {
  width: 22px; height: 22px; margin: 0; accent-color: #0a64d8; pointer-events: auto; position: relative; z-index: 1;
}
html.osd body:has(#apply-bar:not(.hidden)) { scroll-padding-bottom: calc(var(--apply-bar-h, 88px) + 16px); }
html.osd body:has(#apply-bar:not(.hidden)) main { padding-bottom: calc(var(--apply-bar-h, 88px) + 16px); }
html.osd .apply-bar { z-index: 40; padding-bottom: max(12px, env(safe-area-inset-bottom, 0px)); }
/* t235u: Ask Hope clears the Unlock bar through the shared --hg-lift rule in hope-guide.css, measured live, so no bar height is guessed here */
@media (max-width: 640px) {
  html.osd .apply-bar .wrap { flex-direction: column; align-items: stretch; gap: 10px; }
  html.osd .apply-bar .btn { width: 100%; min-height: 48px; position: relative; z-index: 41; }
}

/* ---- t237u Products menu: one light, readable panel on every page (it used to inherit dark link colors on some pages) */
.ob .ob__menu > summary { gap: 8px; padding: 0 6px 0 10px; margin-right: -6px; border-radius: 12px; color: #f2f2f4; font-size: 15px; font-weight: 600; -webkit-tap-highlight-color: transparent; }
.ob .ob__menu > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s ease; }
.ob .ob__menu[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.ob .ob__menu > summary:focus-visible { outline: 3px solid #7cb7ff; outline-offset: 2px; }
.ob .ob__menu > ul { position: absolute; left: 12px; right: 12px; top: calc(var(--bar, 52px) + 8px); margin: 0; padding: 8px; list-style: none;
  background: #fff; color: #111114; border-radius: 20px; box-shadow: 0 0 0 1px rgba(17, 17, 20, .08), 0 28px 60px -18px rgba(17, 17, 20, .45);
  max-height: calc(100vh - var(--bar, 52px) - 24px); max-height: calc(100dvh - var(--bar, 52px) - 24px); overflow-y: auto; overscroll-behavior: contain; z-index: 60; }
.ob .ob__menu[open] > ul { animation: ob-menu-in .18s ease-out; }
@keyframes ob-menu-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.ob .ob__menu > ul > li { margin: 0; padding: 0; border: 0; }
.ob .ob__menu > ul > li > a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border: 0; border-radius: 12px;
  color: #111114; background: transparent; font-size: 17px; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; text-decoration: none; }
.ob .ob__menu > ul > li > a:hover { background: #f4f4f6; }
.ob .ob__menu > ul > li > a:active { background: #ececf0; }
.ob .ob__menu > ul > li > a[aria-current] { background: #f4f4f6; }
.ob .ob__menu > ul > li > a[aria-current]::after { content: "You are here"; margin-left: auto; font-size: 13px; font-weight: 500; color: #5c5f66; }
.ob .ob__menu > ul > li > a:focus-visible { outline: 3px solid #0a64d8; outline-offset: -3px; }
.ob .ob__menu .ob__dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--p, #111114); box-shadow: 0 0 0 3px rgba(17, 17, 20, .06); }
@media (prefers-reduced-motion: reduce) { .ob .ob__menu[open] > ul { animation: none; } .ob .ob__menu > summary::after { transition: none; } }

/* ---- t237u founder card: name line, then the bio, at a readable measure */
.fx-accountable__t { min-width: 0; max-width: 60ch; }
.fx-accountable__t p + p { margin-top: 8px; }
.fx-accountable__t strong { display: block; }

/* ---- t238u Products menu: Tasks For Humanity's sections nested under its row, and a scrim so nothing on the page peeks around the open panel */
.ob .ob__menu[open]::before { content: ""; position: fixed; left: 0; right: 0; top: var(--bar, 52px); height: 100vh; height: 100dvh; background: rgba(17, 17, 20, .32); z-index: 59; }
.ob .ob__menu > ul > li.ob__has-sub { position: relative; }
.ob .ob__menu > ul > li.ob__has-sub > a { padding-right: 56px; }
.ob .ob__menu > ul > li.ob__has-sub > a[aria-current]::after { margin-right: 4px; }
.ob .ob__sub { margin: 0; padding: 0; border: 0; background: none; }
.ob .ob__sub > summary { position: absolute; top: 0; right: 0; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; list-style: none; cursor: pointer; border-radius: 12px; color: #111114; -webkit-tap-highlight-color: transparent; }
.ob .ob__sub > summary::-webkit-details-marker { display: none; }
.ob .ob__sub > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s ease; }
.ob .ob__sub[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.ob .ob__sub > summary:hover { background: #ececf0; }
.ob .ob__sub > summary:focus-visible { outline: 3px solid #0a64d8; outline-offset: -3px; }
.ob .ob__sub > ul { position: static; display: block; margin: 2px 0 6px 36px; padding: 0 0 0 10px; list-style: none; border-left: 2px solid rgba(194, 73, 47, .28); background: none; box-shadow: none; max-height: none; animation: none; }
.ob .ob__sub > ul > li { margin: 0; padding: 0; border: 0; }
.ob .ob__sub > ul > li > a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; color: #26262b; font-size: 16px; font-weight: 500; text-decoration: none; }
.ob .ob__sub > ul > li > a:hover, .ob .ob__sub > ul > li > a[aria-current] { background: #f4f4f6; color: #111114; }
.ob .ob__sub > ul > li > a[aria-current]::after { content: "You are here"; margin-left: auto; font-size: 13px; font-weight: 500; color: #5c5f66; }
.ob .ob__sub > ul > li > a:focus-visible { outline: 3px solid #0a64d8; outline-offset: -3px; }
@media (prefers-reduced-motion: reduce) { .ob .ob__sub > summary::after { transition: none; } }

/* ---- t238u audit fixes: 44px targets, links that read as links, readable labels */
.ob .ob__list a { min-height: 44px; display: inline-flex; align-items: center; }
.fx-footer-sha a, p a[href$="scan.sh"], li a[href$="scan.sh"] { text-decoration: underline; text-underline-offset: 2px; }
.fl-replay { min-height: 44px; padding: 0 1rem; }
.ag-sub__brand { min-height: 44px; display: inline-flex; align-items: center; }
.glass-icon-btn { width: 44px; height: 44px; }
.gh-game--soon .gh-k { color: #4f525a; }
.tools-strip li a { min-height: 44px; display: inline-flex; align-items: center; }
/* t243u: stuck bars are solid, so text that scrolls under them never reads through (WebKit without backdrop blur showed it) */
.ob { background: #0c0c0e; }
.ol { background: #fff; }
.ol.tb, .tb { background: #FAF6EF; }
/* t243u: in-page jumps and focus land below both stuck bars (header 52 + product bar 53 + breathing room) */
html.os, html.osd { scroll-padding-top: calc(var(--bar, 52px) + 72px); }
/* t243u: while the Products menu is open, Ask Hope and its nudge step away so no menu row sits under them */
html.ob-menu-open .hg-open, html.ob-menu-open .hg-nudge, html:has(details.ob__menu[open]) .hg-open, html:has(details.ob__menu[open]) .hg-nudge { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }
.ob .ob__menu > ul { padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
.fl-subnav, html[class*="t-"] .fl-subnav { background: #FAF9F6 !important; }  /* t243u: opaque when stuck */
.ag-sub { background: #fff !important; }  /* t243u: AEGIS sub bar opaque when stuck */
@media (max-width: 700px) { html.os:has(.ag-sub), html.osd:has(.ag-sub) { scroll-padding-top: calc(var(--bar, 52px) + 116px); } }  /* t243u: the AEGIS sub bar wraps to two rows on phones (95px) */
/* t243u: the Tasks For Humanity sub-list sits in two columns so the whole open menu, Games and AEGIS included, fits an iPhone screen without scrolling */
.ob .ob__sub > ul { display: grid; grid-template-columns: 1fr 1fr; column-gap: 4px; margin: 2px 0 6px 30px; padding-left: 8px; }
.ob .ob__sub > ul > li > a { min-height: 44px; padding: 0 10px; font-size: 15px; white-space: nowrap; }
.ob .ob__sub > ul > li > a[aria-current]::after { content: none; }
.ob .ob__sub > ul > li > a[aria-current] { box-shadow: inset 3px 0 0 #C2492F; font-weight: 600; }
.ol + section[id] { scroll-margin-top: -19px; }  /* t243u: a jump to the first section after the hero lands with the product bar stuck, not with a sliver of hero above it */
/* t246u: on phones the Tasks For Humanity hero ends a little higher so "See how it works" sits fully above Ask Hope */
@media (max-width: 480px) { html .tfh-hero .ox__copy, html .gh-hero .ox__copy { padding-bottom: calc(clamp(40px, 8vh, 88px) + 24px); } }
/* t248u: on phones the Games hero sits a little tighter so the full cure line is above Ask Hope at the top of the page (wording unchanged) */
@media (max-width: 480px) {
  html .gh-hero .ox__copy { padding-top: 28px; }
  html .gh-hero .os-kick { margin-bottom: 10px; }
  html .gh-hero .ox__desc { margin-top: 12px; margin-bottom: 20px; }
  html .gh-hero .os-btns { gap: 8px; }
  html .gh-hero .os-btns .ob-btn { min-height: 46px; padding-top: 0; padding-bottom: 0; }
  html .gh-hero .gh-hero__note { margin-top: 16px; }
}
