/* webtemplatesbox.com/tools/ — shared styles for every tools page.
   Type: Archivo only; the condensed width (wdth 72) echoes the logo and is used for headings and result numbers.
   Colour: charcoal + logo orange. --orange-ink is the AA-contrast orange for text on white. */

:root {
    --ink: #262b31;
    --ink-2: #3a4048;
    --slate: #5e6773;
    --mute: #8a929c;
    --line: #dce0e5;
    --line-2: #eceef1;
    --paper: #f4f5f7;
    --surface: #ffffff;
    --orange: #f26a1b;
    --orange-ink: #b84a0b;
    --orange-wash: #fff1e8;
    --lime: #c2ef50;
    --ok: #1d7a52;
    --bad: #b42318;

    --cond: 72;
    --r-sm: 4px;
    --r: 6px;
    --wrap: 1140px;
    --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 17px;
    line-height: 1.6;
    font-variation-settings: 'wdth' 100;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange-ink); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
button, input, select { font: inherit; color: inherit; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Site header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; }
.logo img { width: 240px; height: auto; }
.site-nav { display: flex; gap: 26px; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.site-nav a:hover { color: var(--orange-ink); }

/* ---------- CTA ---------- */
.cta { background: var(--ink); color: #e9ebee; border-bottom: 6px solid var(--lime); }
.cta-in { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; padding-top: 38px; padding-bottom: 40px; align-items: start; }
.cta-in > * { min-width: 0; }
.cta-flag { display: flex; align-items: center; gap: 9px; margin: 0 0 10px; color: #c7ccd3; font-size: 0.9rem; font-weight: 600; }
.cta-dot { width: 8px; height: 8px; border-radius: 50%; background: #3ccf7f; box-shadow: 0 0 0 4px rgba(60, 207, 127, 0.18); }
.cta-title {
    margin: 0 0 16px;
    color: #fff;
    font-size: clamp(2rem, 4.4vw, 3.1rem);
    line-height: 1.05;
    font-weight: 800;
    font-variation-settings: 'wdth' var(--cond);
    letter-spacing: -0.005em;
}
.cta-text { margin: 0 0 18px; color: #b9bfc7; font-size: 1rem; max-width: 60ch; }
.cta-points { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.cta-points li { border: 1px solid #4a525c; color: #d6dade; font-size: 0.82rem; font-weight: 600; padding: 4px 11px; border-radius: 20px; }

.cta-box { background: #31373e; border: 1px solid rgba(194, 239, 80, 0.45); border-radius: var(--r); padding: 22px 22px 20px; }
.cta-box-title { margin: 0 0 14px; color: #fff; font-weight: 700; font-size: 1.05rem; }
.cta-q { border: 0; margin: 0 0 14px; padding: 0; }
.cta-q legend { padding: 0; margin-bottom: 7px; color: #c7ccd3; font-size: 0.88rem; font-weight: 600; }
.cta-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.cta-opts button {
    padding: 9px 10px; border: 1px solid #555d67; border-radius: var(--r-sm); background: transparent;
    color: #c7ccd3; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s, color .15s;
}
.cta-opts button:hover { border-color: #8a929c; color: #fff; }
.cta-opts button[aria-pressed="true"] { background: var(--lime); border-color: var(--lime); color: #1d1f22; }
.cta-submit, .cta-go {
    display: block; width: 100%; margin-top: 4px; padding: 13px; border: 0; border-radius: var(--r-sm);
    background: var(--lime); color: #1d1f22; font-weight: 800; font-size: 1rem; text-align: center;
    text-decoration: none; cursor: pointer; transition: background .15s;
}
.cta-submit, .cta-go { font-size: 1.08rem; padding: 15px; box-shadow: 0 0 0 4px rgba(194, 239, 80, 0.18), 0 10px 28px rgba(194, 239, 80, 0.22); }
.cta-submit:hover, .cta-go:hover { background: #d4f77a; color: #1d1f22; }

/* Highlighted phrase in the CTA title: lime text with an underline that draws itself in, then repeats every few seconds */
.cta-hl { position: relative; color: var(--lime); white-space: nowrap; }
.cta-hl::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -0.08em; height: 0.12em; border-radius: 0.06em;
    background: var(--lime); transform-origin: left center; animation: cta-underline 4s cubic-bezier(.65, 0, .35, 1) infinite;
}
@keyframes cta-underline {
    0% { transform: scaleX(0); }
    25%, 80% { transform: scaleX(1); transform-origin: left center; }
    81% { transform-origin: right center; }
    100% { transform: scaleX(0); transform-origin: right center; }
}
.cta-err { margin: 9px 0 0; color: #ffb4a8; font-size: 0.85rem; }
.cta-result p { margin: 0 0 14px; color: #c7ccd3; font-size: 0.95rem; }
.cta-result .cta-ok-head { color: #6ee7a6; font-weight: 800; font-size: 1.15rem; }
.cta-result .cta-no-head { color: #ffb4a8; font-weight: 800; font-size: 1.15rem; }
.cta-redo { background: none; border: 0; padding: 0; color: #c7ccd3; text-decoration: underline; cursor: pointer; font-size: 0.9rem; }

/* ---------- Page head ---------- */
main.wrap { padding-top: 26px; padding-bottom: 20px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.88rem; color: var(--mute); margin-bottom: 18px; }
.crumbs a { color: var(--slate); text-decoration: none; }
.crumbs a:hover { color: var(--orange-ink); text-decoration: underline; }
.h1 {
    margin: 0 0 14px;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    line-height: 1;
    font-weight: 800;
    font-variation-settings: 'wdth' var(--cond);
    letter-spacing: -0.01em;
    max-width: 22ch;
}
.lede { margin: 0 0 30px; font-size: 1.12rem; color: var(--ink-2); max-width: 68ch; }
.h2 {
    margin: 0 0 16px;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    line-height: 1.1;
    font-weight: 800;
    font-variation-settings: 'wdth' var(--cond);
}
.h3 { margin: 0 0 6px; font-size: 1.05rem; font-weight: 700; }

/* ---------- Calculator ---------- */
.calc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.calc-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
.calc-form { padding: 26px 28px 28px; border-right: 1px solid var(--line); }

.presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-bottom: 20px; margin-bottom: 6px; border-bottom: 1px solid var(--line-2); }
.presets-label { font-size: 0.9rem; font-weight: 600; color: var(--slate); margin-right: 4px; }
.preset {
    padding: 7px 14px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface);
    font-size: 0.88rem; font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s;
}
.preset:hover { border-color: var(--ink); }
.preset[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.group { border: 0; margin: 0; padding: 20px 0 4px; border-bottom: 1px solid var(--line-2); }
.group:last-of-type { border-bottom: 0; }
.group legend { float: left; width: 100%; padding: 0; margin: 0 0 12px; font-weight: 700; font-size: 1.02rem; display: flex; align-items: center; gap: 10px; }
.group legend + * { clear: both; }
.group-tag { font-weight: 500; font-size: 0.84rem; color: var(--mute); }
.switch { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 0.84rem; font-weight: 600; color: var(--slate); cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--orange); margin: 0; }
.group.is-off .fields { opacity: 0.4; pointer-events: none; }

.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px 16px; padding-bottom: 16px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 0.88rem; font-weight: 600; color: var(--ink-2); line-height: 1.3; }
.field small { font-size: 0.8rem; color: var(--mute); line-height: 1.35; }
.field input, .field select {
    width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm);
    background: var(--surface); font-size: 1rem; font-variant-numeric: tabular-nums;
}
.field input:hover, .field select:hover { border-color: #b8bec6; }
.field input:focus, .field select:focus { border-color: var(--orange); outline: 2px solid rgba(242, 106, 27, 0.25); outline-offset: 0; }
.field .unit { position: relative; }
.field .unit input { padding-right: 46px; }
.field .unit em { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 0.85rem; color: var(--mute); pointer-events: none; }
.range-row { display: flex; align-items: center; gap: 12px; height: 42px; }
.range-row input[type=range] { flex: 1; height: auto; padding: 0; border: 0; accent-color: var(--orange); }
.range-row output { min-width: 3.4em; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

.assump { margin-top: 18px; border: 1px dashed var(--line); border-radius: var(--r); background: #fafbfc; }
.assump summary { padding: 13px 16px; cursor: pointer; font-weight: 700; font-size: 0.95rem; list-style-position: inside; }
.assump summary span { font-weight: 500; color: var(--mute); font-size: 0.86rem; margin-left: 6px; }
.assump-body { padding: 4px 16px 16px; }
.assump-body .fields { padding-bottom: 6px; }
.assump-reset { background: none; border: 0; padding: 0; color: var(--orange-ink); text-decoration: underline; font-size: 0.88rem; cursor: pointer; }

/* Readout: the one dark element in the calculator */
.readout { background: var(--ink); color: #e9ebee; padding: 28px 26px; border-radius: 0 var(--r) var(--r) 0; }
.readout-in { position: sticky; top: 20px; }
.ro-label { margin: 0 0 4px; font-size: 0.92rem; color: #b9bfc7; font-weight: 600; }
.ro-big {
    margin: 0;
    font-size: clamp(2.9rem, 5.6vw, 4.4rem);
    line-height: 0.95;
    font-weight: 800;
    font-variation-settings: 'wdth' 68;
    color: var(--orange);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
    word-break: break-word;
}
.ro-sub { margin: 8px 0 22px; font-size: 0.95rem; color: #c7ccd3; }
.ro-sub strong { color: #fff; }

.ro-bar { display: flex; height: 14px; border-radius: 3px; overflow: hidden; background: #3a4048; gap: 2px; }
.ro-bar span { display: block; height: 100%; min-width: 2px; transition: flex-grow .35s ease; }
.ro-legend { list-style: none; margin: 12px 0 22px; padding: 0; display: grid; gap: 6px; font-size: 0.88rem; }
.ro-legend li { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; color: #c7ccd3; }
.ro-legend i { width: 12px; height: 12px; border-radius: 2px; }
.ro-legend b { color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }

.ro-stats { margin: 0 0 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: #3f464e; border: 1px solid #3f464e; border-radius: var(--r-sm); overflow: hidden; }
.ro-stats div { background: #2d3238; padding: 11px 13px; }
.ro-stats dt { font-size: 0.78rem; color: #a3aab3; line-height: 1.3; }
.ro-stats dd { margin: 2px 0 0; font-size: 1.15rem; font-weight: 800; font-variation-settings: 'wdth' 80; color: #fff; font-variant-numeric: tabular-nums; }

.ro-note { margin: 0 0 18px; padding: 12px 14px; border-left: 3px solid var(--orange); background: #31373e; font-size: 0.9rem; color: #d6dade; border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.ro-note strong { color: #fff; }
.ro-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ro-btn {
    flex: 1 1 auto; padding: 10px 14px; border: 1px solid #555d67; border-radius: var(--r-sm); background: transparent;
    color: #e9ebee; font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: border-color .15s, background .15s;
}
.ro-btn:hover { border-color: #c7ccd3; background: #31373e; }
.ro-btn.done { border-color: #3ccf7f; color: #6ee7a6; }

/* Breakdown table + extra panels under the calculator */
.calc-foot { border-top: 1px solid var(--line); padding: 24px 28px 28px; }
.calc-foot .h3 { margin-bottom: 4px; }
.calc-foot > p { margin: 0 0 14px; color: var(--slate); font-size: 0.95rem; }
.table-scroll { overflow-x: auto; }
.bd { width: 100%; border-collapse: collapse; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.bd th, .bd td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.bd th:first-child, .bd td:first-child { text-align: left; white-space: normal; }
.bd thead th { font-size: 0.82rem; font-weight: 700; color: var(--slate); border-bottom: 2px solid var(--ink); }
.bd tfoot td { font-weight: 800; border-bottom: 0; border-top: 2px solid var(--ink); }
.bd .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 8px; vertical-align: 0; }
.bd .share { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; }
.bd .share i { display: inline-block; height: 6px; background: var(--orange); border-radius: 3px; }
.bd tr.is-off td { color: var(--mute); }

.levers { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.levers li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: baseline; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.levers .lv-name { font-weight: 700; }
.levers .lv-gain { font-weight: 800; color: var(--ok); font-variant-numeric: tabular-nums; }
.levers .lv-how { grid-column: 1 / -1; font-size: 0.88rem; color: var(--slate); }
.levers .lv-done .lv-gain { color: var(--mute); font-weight: 600; }

.funnel { display: grid; gap: 8px; }
.funnel-row { display: grid; grid-template-columns: 210px minmax(0, 1fr) 110px; gap: 14px; align-items: center; font-size: 0.93rem; }
.funnel-row .f-label { color: var(--ink-2); font-weight: 600; line-height: 1.3; }
.funnel-row .f-track { display: block; height: 26px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.funnel-row .f-fill { display: block; height: 100%; background: var(--ink); border-radius: 3px; transition: width .35s ease; }
.funnel-row:last-child .f-fill { background: var(--orange); }
.funnel-row .f-num { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- How it works ---------- */
.how { margin-top: 56px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 48px; }
.how-intro p { color: var(--ink-2); max-width: 46ch; }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 22px 54px; }
.steps li::before {
    content: counter(s);
    position: absolute; left: 0; top: -2px;
    width: 36px; height: 36px; display: grid; place-items: center;
    border: 2px solid var(--ink); border-radius: 50%;
    font-weight: 800; font-variation-settings: 'wdth' var(--cond); font-size: 1.05rem;
}
.steps li:not(:last-child)::after { content: ''; position: absolute; left: 17px; top: 38px; bottom: 2px; width: 2px; background: var(--line); }
.steps p { margin: 0; color: var(--ink-2); font-size: 0.97rem; }
.formula {
    margin: 10px 0 0; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
    font-size: 0.9rem; color: var(--ink); overflow-x: auto;
}
.formula b { color: var(--orange-ink); }

.rates { margin-top: 40px; }
.rates .bd { background: var(--surface); border: 1px solid var(--line); }

/* ---------- FAQ ---------- */
.faq { margin-top: 56px; max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
    display: flex; justify-content: space-between; gap: 20px; padding: 18px 0;
    cursor: pointer; list-style: none; font-weight: 700; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.5rem; line-height: 1; color: var(--orange-ink); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 20px; color: var(--ink-2); max-width: 72ch; }

/* ---------- Tool lists (related + /tools/) ---------- */
.related { margin-top: 64px; padding-top: 34px; border-top: 4px solid var(--ink); }
.tool-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.tool-list a {
    display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px 20px 20px;
    background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--orange); border-radius: var(--r-sm);
    text-decoration: none; color: var(--ink); transition: border-color .15s;
}
.tool-list a:hover { border-color: var(--ink); border-top-color: var(--orange); }
.tl-title { font-weight: 800; font-size: 1.12rem; font-variation-settings: 'wdth' 85; line-height: 1.2; }
.tl-desc { font-size: 0.92rem; color: var(--slate); line-height: 1.5; }
.page-404 .tool-list { margin-top: 10px; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 72px; background: var(--surface); border-top: 1px solid var(--line); }
.site-footer-in { display: grid; grid-template-columns: 1.4fr 1fr 0.7fr; gap: 40px; padding-top: 40px; padding-bottom: 28px; }
.ft-brand img { width: 200px; margin-bottom: 12px; }
.ft-brand p { margin: 0; font-size: 0.92rem; color: var(--slate); max-width: 42ch; }
.ft-col { display: flex; flex-direction: column; gap: 8px; }
.ft-head { margin: 0 0 4px; font-weight: 800; font-size: 0.95rem; }
.ft-col a { color: var(--slate); text-decoration: none; font-size: 0.92rem; }
.ft-col a:hover { color: var(--orange-ink); text-decoration: underline; }
.ft-legal { border-top: 1px solid var(--line-2); padding-top: 16px; padding-bottom: 22px; }
.ft-legal p { margin: 0; font-size: 0.82rem; color: var(--mute); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .cta-in { grid-template-columns: 1fr; gap: 26px; }
    .calc-grid { grid-template-columns: 1fr; }
    .calc-form { border-right: 0; border-bottom: 1px solid var(--line); }
    .readout { border-radius: 0; }
    .readout-in { position: static; }
    .how { grid-template-columns: 1fr; gap: 10px; }
    .site-footer-in { grid-template-columns: 1fr 1fr; }
    .ft-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    :root { --gutter: 16px; }
    body { font-size: 16px; }
    .site-header-in { min-height: 64px; }
    .logo img { width: 180px; }
    .site-nav { gap: 16px; }
    .site-nav a:last-child { display: none; }
    .cta-in { padding-top: 28px; padding-bottom: 28px; }
    .cta-box { padding: 18px 16px; }
    .calc-form, .readout, .calc-foot { padding-left: 16px; padding-right: 16px; }
    .funnel-row { grid-template-columns: 1fr 90px; }
    .funnel-row .f-label { grid-column: 1 / -1; }
    .site-footer-in { grid-template-columns: 1fr; gap: 26px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
    .site-header, .cta, .related, .site-footer, .presets, .ro-actions, .assump { display: none !important; }
    .readout { background: #fff; color: #000; }
}

/* ---------- Quiz / checklist rows (segmented radios) ---------- */
.qlist { display: grid; gap: 0; padding-bottom: 8px; }
.q-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 20px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.q-row:last-child { border-bottom: 0; }
.q-text { font-weight: 600; font-size: 0.97rem; line-height: 1.4; }
.q-text small { display: block; font-weight: 400; color: var(--mute); font-size: 0.84rem; margin-top: 3px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: var(--surface); }
.seg label { position: relative; cursor: pointer; }
.seg label + label { border-left: 1px solid var(--line); }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: block; padding: 8px 14px; font-size: 0.88rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; transition: background .15s, color .15s; }
.seg label:hover span { background: var(--paper); }
.seg input:checked + span { background: var(--ink); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: -3px; }
.field .seg { display: flex; }
.field .seg label { flex: 1; text-align: center; }

/* ---------- Score meter in the readout ---------- */
.meter { position: relative; height: 12px; background: #3a4048; border-radius: 6px; overflow: hidden; margin: 4px 0 8px; }
.meter span { display: block; height: 100%; background: var(--orange); border-radius: 6px; transition: width .35s ease; }
.meter-scale { display: flex; justify-content: space-between; font-size: 0.78rem; color: #a3aab3; margin-bottom: 20px; }

/* ---------- Status lists (analyzer findings, blockers, gaps) ---------- */
.flags { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.flags li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 4px 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.flags .st { grid-row: span 2; align-self: start; text-align: center; font-size: 0.78rem; font-weight: 800; padding: 3px 6px; border-radius: 3px; }
.flags .st-ok { background: #e3f4ec; color: var(--ok); }
.flags .st-warn { background: var(--orange-wash); color: var(--orange-ink); }
.flags .st-bad { background: #fdecea; color: var(--bad); }
.flags .st-miss { background: var(--line-2); color: var(--slate); }
.flags .fl-name { font-weight: 700; }
.flags .fl-text { font-size: 0.9rem; color: var(--slate); }
.flags .fl-text q { color: var(--ink); font-style: italic; }

/* ---------- Textarea ---------- */
.field textarea {
    width: 100%; min-height: 280px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-sm);
    background: var(--surface); font: inherit; font-size: 0.92rem; line-height: 1.5; resize: vertical;
}
.field textarea:focus { border-color: var(--orange); outline: 2px solid rgba(242, 106, 27, 0.25); outline-offset: 0; }
.text-btn { background: none; border: 0; padding: 0; color: var(--orange-ink); text-decoration: underline; font-size: 0.9rem; cursor: pointer; }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; }

/* ---------- Input tables (offers, datasets, terms) ---------- */
.in-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.in-table th, .in-table td { padding: 7px 6px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: middle; }
.in-table thead th { font-size: 0.82rem; color: var(--slate); font-weight: 700; border-bottom: 2px solid var(--ink); }
.in-table tbody th { font-weight: 600; color: var(--ink-2); white-space: nowrap; padding-right: 14px; }
.in-table input[type=number], .in-table input[type=text], .in-table select {
    width: 100%; min-width: 90px; height: 38px; padding: 0 9px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font-size: 0.93rem;
}
.in-table input:focus, .in-table select:focus { border-color: var(--orange); outline: 2px solid rgba(242, 106, 27, 0.25); outline-offset: 0; }
.in-table input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--orange); }
.in-table td.c, .in-table th.c { text-align: center; }
.in-table .best td, .bd tr.best td { background: var(--orange-wash); }
.win { display: inline-block; margin-left: 6px; font-size: 0.75rem; font-weight: 800; color: var(--orange-ink); }

/* ---------- Compare bars (two or more totals side by side) ---------- */
.cmp { display: grid; gap: 10px; }
.cmp-row { display: grid; grid-template-columns: 200px minmax(0, 1fr) 120px; gap: 14px; align-items: center; font-size: 0.93rem; }
.cmp-row .c-label { font-weight: 600; color: var(--ink-2); line-height: 1.3; }
.cmp-row .c-track { display: block; height: 22px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.cmp-row .c-fill { display: block; height: 100%; background: var(--ink); border-radius: 3px; transition: width .35s ease; }
.cmp-row.is-top .c-fill { background: var(--orange); }
.cmp-row .c-num { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
    .q-row { grid-template-columns: 1fr; }
    .flags li { grid-template-columns: 1fr; }
    .flags .st { grid-row: auto; justify-self: start; }
    .cmp-row { grid-template-columns: 1fr 100px; }
    .cmp-row .c-label { grid-column: 1 / -1; }
}
[hidden] { display: none !important; }
.in-table td:first-child input[type=text] { min-width: 150px; }

/* ---------- Posts (migrated articles) and homepage ---------- */
.post article { max-width: 760px; }
.post .h1 { max-width: none; font-size: clamp(2rem, 4.4vw, 3rem); }
.byline { margin: 0 0 28px; color: var(--slate); font-size: 0.95rem; }
.prose { font-size: 1.08rem; line-height: 1.75; color: var(--ink-2); }
.prose > * { margin: 0 0 1.1em; }
.prose h2 { margin: 1.8em 0 0.5em; font-size: 1.6rem; line-height: 1.2; color: var(--ink); font-weight: 800; font-variation-settings: 'wdth' 80; }
.prose h3 { margin: 1.5em 0 0.4em; font-size: 1.22rem; line-height: 1.3; color: var(--ink); font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: 0.4em; }
.prose a { color: var(--orange-ink); word-break: break-word; }
.key-takeaways { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--orange); border-radius: var(--r-sm); padding: 18px 22px 8px; margin-bottom: 1.6em; }
.key-takeaways p { margin: 0 0 8px; }
.key-takeaways ul { margin: 0 0 10px; }
.video { position: relative; aspect-ratio: 16 / 9; margin: 1.4em 0; background: var(--ink); border-radius: var(--r-sm); overflow: hidden; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.more-posts { margin-top: 56px; max-width: 760px; }
.post-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.post-list li { border-bottom: 1px solid var(--line); }
.post-list a { display: block; padding: 14px 0; color: var(--ink); font-weight: 700; text-decoration: none; }
.post-list a:hover { color: var(--orange-ink); }
.post-cards { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.post-cards a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); text-decoration: none; color: var(--ink); }
.post-cards a:hover { border-color: var(--ink); }
.all-link { margin-top: 18px; font-weight: 700; }

/* ---------- Post widgets (.pw): interactive blocks inside articles ---------- */
.prose .pw { margin: 2em 0; font-size: 0.98rem; line-height: 1.55; color: var(--ink); }
.pw { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.pw-head { padding: 16px 20px 14px; border-bottom: 1px solid var(--line); background: #fafbfc; }
.pw-head h3 { margin: 0 0 2px !important; font-size: 1.15rem !important; }
.pw-head p { margin: 0; color: var(--slate); font-size: 0.92rem; }
.pw-body { padding: 18px 20px 20px; }
.pw-body > * + * { margin-top: 14px; }
.pw-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pw select, .pw input[type=number], .pw textarea {
    height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font: inherit; font-size: 0.95rem;
}
.pw textarea { height: auto; min-height: 120px; width: 100%; padding: 10px; font-family: Consolas, 'Cascadia Mono', monospace; font-size: 0.85rem; resize: vertical; }
.pw label.pw-check { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; cursor: pointer; }
.pw label.pw-check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--orange); flex: none; }
.pw-btn { padding: 9px 16px; border: 1px solid var(--ink); border-radius: var(--r-sm); background: var(--ink); color: #fff; font: inherit; font-weight: 700; font-size: 0.92rem; cursor: pointer; }
.pw-btn:hover { background: var(--ink-2); }
.pw-btn.ghost { background: var(--surface); color: var(--ink); }
.pw-btn.ghost:hover { background: var(--paper); }
.pw-out { background: var(--ink); color: #e9ebee; border-radius: var(--r-sm); padding: 16px 18px; }
.pw-out strong { color: #fff; }
.pw-out .big { display: block; font-size: 1.9rem; line-height: 1.1; font-weight: 800; font-variation-settings: 'wdth' 72; color: var(--orange); margin-bottom: 4px; }
.pw-out p { margin: 6px 0 0; color: #c7ccd3; }
.pw-out ol, .pw-out ul { margin: 8px 0 0; padding-left: 1.3em; color: #d6dade; }
.pw-note { font-size: 0.85rem; color: var(--mute); }
.pw table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.pw th, .pw td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
.pw thead th { font-size: 0.8rem; color: var(--slate); border-bottom: 2px solid var(--ink); }
.pw .yes { color: var(--ok); font-weight: 700; }
.pw .no { color: var(--bad); font-weight: 700; }
.pw .tag-row td { background: var(--orange-wash); }

/* Code block with copy button */
.code { margin: 1.4em 0; border-radius: var(--r-sm); overflow: hidden; border: 1px solid #3a4048; }
.prose .code { font-size: 0.86rem; line-height: 1.5; }
.code-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 12px; background: #31373e; color: #c7ccd3; font-size: 0.8rem; font-weight: 600; }
.code-copy { border: 1px solid #555d67; background: transparent; color: #e9ebee; border-radius: 3px; padding: 3px 10px; font: inherit; font-size: 0.78rem; cursor: pointer; }
.code-copy:hover { border-color: #c7ccd3; }
.code-copy.done { border-color: #3ccf7f; color: #6ee7a6; }
.code pre { margin: 0; padding: 14px 16px; background: var(--ink); color: #e9ebee; overflow-x: auto; font-family: Consolas, 'Cascadia Mono', monospace; white-space: pre; }

/* Horizontal bars used by the post widgets */
.hbars { display: grid; gap: 7px; }
.hbar { display: grid; grid-template-columns: 150px minmax(0, 1fr) 70px; gap: 12px; align-items: center; font-size: 0.86rem; }
.hbar .hb-track { display: flex; height: 18px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.hbar .hb-a { background: var(--ink); }
.hbar .hb-b { background: var(--orange); }
.hbar .hb-num { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.legend-inline { display: flex; gap: 16px; font-size: 0.82rem; color: var(--slate); }
.legend-inline i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

kbd { display: inline-block; min-width: 1.6em; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: var(--surface); font: inherit; font-size: 0.85em; font-weight: 700; text-align: center; }

@media (max-width: 600px) {
    .hbar { grid-template-columns: 1fr 60px; }
    .hbar .hb-label { grid-column: 1 / -1; }
}
