/* Shared styles for the saltishill tool pages (EV math, ATR). Sits on top of site.css (muted-mint theme). */
:root { --good: #86b79c; --bad: #cf8f82; --good-rgb: 134,183,156; --bad-rgb: 207,143,130; --mint-rgb: 159,207,182; }
body { background: radial-gradient(900px 520px at 50% -10%, rgba(var(--mint-rgb),.12), transparent 70%), var(--ink); }
.sheet { max-width: 1040px; margin: 0 auto; padding: 0 16px 80px; }
.lnum, .mono { font-variant-numeric: lining-nums tabular-nums; font-feature-settings: "lnum" 1, "tnum" 1; }
.mono { font-family: var(--mono); }

/* top bar (no LiquidRank branding) */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.topbar .who { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: var(--gold); }
.topbar nav { display: flex; gap: 6px; flex-wrap: wrap; }
.topbar nav a { font-size: 12.5px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 12px; }
.topbar nav a:hover { color: var(--ivory); border-color: rgba(var(--mint-rgb),.5); }
.topbar nav a[aria-current="page"] { color: #0f1a14; background: var(--gold); border-color: var(--gold); }

.hero { padding: clamp(40px, 7vw, 80px) 0 10px; }
.hero h1 { font-family: var(--display); font-weight: 300; font-size: clamp(42px, 7vw, 76px); line-height: .98; margin: 14px 0 0; letter-spacing: -.01em; }
.hero h1 em { font-style: italic; color: var(--gold-soft); }
.hero .deck { color: var(--muted); font-size: 17px; line-height: 1.7; max-width: 64ch; margin: 22px 0 0; }
.hero .deck b, .hero .deck strong { color: var(--ivory); }
.free-badge { display: inline-block; font-family: var(--mono); font-weight: 700; font-size: 12px; letter-spacing: .16em; color: #0f1a14; background: var(--gold); padding: 5px 11px; border-radius: 4px; }

section { margin-top: 64px; }
.sec-head { display: flex; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--line-2); padding-bottom: 12px; margin-bottom: 18px; }
.sec-head .no { font-family: var(--mono); font-size: 12px; color: var(--gold); }
.sec-head h2 { font-family: var(--display); font-weight: 400; font-size: clamp(26px, 3.4vw, 36px); line-height: 1.1; margin: 0; }
.sec-head h2 em { font-style: italic; color: var(--gold-soft); }
.note { color: var(--muted); font-size: 14.5px; line-height: 1.7; max-width: 70ch; margin: 0; }
.note + .note { margin-top: 12px; }
.note b, .note strong { color: var(--ivory); font-weight: 600; }
.mb { margin-bottom: 18px; }

.panel { border: 1px solid var(--line-2); border-radius: 8px; background: var(--ink-2); padding: clamp(18px, 3vw, 26px); }
.grid-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px 26px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field .row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.field .val { font-family: var(--mono); font-size: 14px; color: var(--gold-soft); }
.hint { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.hint em { font-style: normal; color: var(--warn); font-weight: 600; }
input[type="range"] { width: 100%; accent-color: var(--gold); cursor: pointer; }

.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--line-2); border-radius: 12px; }
.seg button { flex: 1 1 auto; background: none; border: 0; border-radius: 8px; padding: 8px 12px; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; line-height: 1.25; }
.seg button small { display: block; font-size: 11px; opacity: .75; margin-top: 2px; }
.seg button:hover { color: var(--ivory); }
.seg button[aria-pressed="true"] { background: var(--gold); color: #0f1a14; font-weight: 600; }
.seg button:disabled { opacity: .3; cursor: not-allowed; }

.verdict { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; margin-top: 30px; }
.verdict > div { padding: 22px 24px; display: flex; flex-direction: column; gap: 6px; background: var(--ink-2); }
.verdict .vs-claim { background: rgba(var(--bad-rgb),.07); border-right: 1px solid var(--line-2); }
.verdict .big { font-family: var(--mono); font-size: clamp(30px, 5vw, 44px); font-weight: 500; line-height: 1.05; letter-spacing: -.02em; }
.verdict .vs-claim .big { color: var(--bad); }
.verdict .cap { font-size: 13px; color: var(--muted); line-height: 1.5; }
@media (max-width: 640px) { .verdict { grid-template-columns: 1fr; } .verdict .vs-claim { border-right: 0; border-bottom: 1px solid var(--line-2); } }

.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.two.g2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 660px) { .two.g2 { grid-template-columns: 1fr; } }
.card { border: 1px solid var(--line-2); border-radius: 8px; background: var(--ink-2); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.card.flag { border-left: 3px solid var(--bad); }
.card.ok { border-left: 3px solid var(--good); }
.card.warn { border-left: 3px solid var(--warn); }
.card h3 { margin: 0; font-size: 16px; font-weight: 600; }
.card .cv { font-family: var(--mono); font-size: 28px; font-weight: 500; line-height: 1.1; }
.card.flag .cv { color: var(--bad); } .card.ok .cv { color: var(--good); } .card.warn .cv { color: var(--warn); }
.card .cd { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin: 0; }
.card .cd b { color: var(--ivory); }

.callout { border-left: 3px solid var(--gold); background: rgba(var(--mint-rgb),.06); border-radius: 0 8px 8px 0; padding: 16px 20px; display: flex; flex-direction: column; gap: 6px; }
.callout.alarm { border-left-color: var(--bad); background: rgba(var(--bad-rgb),.07); }
.callout .ct { font-family: var(--display); font-size: 22px; line-height: 1.2; }
.callout .cb { font-size: 14px; color: var(--muted); line-height: 1.6; }
.callout .cb b { color: var(--ivory); }

.statband { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
@media (max-width: 780px) { .statband { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 470px) { .statband { grid-template-columns: 1fr; } }
.stat { background: var(--ink-2); padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.stat .sv { font-family: var(--mono); font-size: 26px; color: var(--bad); }
.stat .sk { font-size: 14px; font-weight: 600; }
.stat .ss { font-size: 12.5px; color: var(--muted); line-height: 1.5; }

.funnel .fn { display: grid; grid-template-columns: 140px 1fr 140px; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.fn .fl { font-size: 13.5px; }
.fn .track { background: var(--ink-3); border-radius: 3px; height: 24px; overflow: hidden; }
.fn .fill { height: 100%; border-radius: 3px; transition: width .3s ease; }
.fn .fv { font-family: var(--mono); font-size: 13px; text-align: right; color: var(--muted); }
.fn .fv b { color: var(--ivory); }
@media (max-width: 640px) { .funnel .fn { grid-template-columns: 110px 1fr; } .fn .fv { grid-column: 2; text-align: left; } }

.scroll { overflow-x: auto; }
.ledger { width: 100%; border-collapse: collapse; font-size: 14px; }
.ledger th, .ledger td { padding: 10px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.ledger th { font-family: var(--mono); font-size: 10.5px; font-weight: 400; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); border-bottom: 1px solid var(--line-2); }
.ledger .n { text-align: right; font-family: var(--mono); white-space: nowrap; }
.ledger tr.total td { border-top: 1px solid var(--ivory); border-bottom: 0; font-weight: 700; }
.ledger .out { color: var(--bad); } .ledger .in { color: var(--good); }
.ledger tr.sel td { background: rgba(var(--mint-rgb),.09); }
.ledger tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.ledger tbody tr.click { cursor: pointer; }
.ledger tbody tr.click:hover td { background: rgba(var(--mint-rgb),.05); }
.rank { font-family: var(--mono); color: var(--faint); font-size: 12px; }
.tag { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; padding: 1px 6px; border-radius: 3px; background: rgba(var(--mint-rgb),.12); color: var(--gold-soft); margin-left: 6px; white-space: nowrap; }
.firm-sm { color: var(--muted); font-size: 12px; display: block; }

.sens { border-collapse: separate; border-spacing: 4px; }
.sens th, .sens td { border-bottom: 0; }
.sens td.hdr { background: var(--ink-3); border-radius: 4px; text-align: right; font-family: var(--mono); font-size: 13px; padding: 10px 12px; }
.sens td.cell { text-align: right; border-radius: 4px; padding: 10px 12px; font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.sens td.flip { box-shadow: inset 3px 0 0 var(--ivory); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 2px; vertical-align: -2px; margin-right: 5px; }

/* partner offers */
.offers { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.offer { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--ink-2); color: inherit; transition: border-color .2s ease, transform .2s ease; }
.offer:hover { border-color: rgba(var(--mint-rgb),.6); transform: translateY(-2px); }
.offer .logo { height: 44px; display: flex; align-items: center; justify-content: flex-start; padding: 6px 10px; border-radius: 6px; background: #0b1220; border: 1px solid var(--line); width: fit-content; }
.offer .logo img { max-height: 30px; max-width: 160px; object-fit: contain; display: block; }
.offer .logo.txt { font-family: var(--display); font-size: 20px; color: var(--ivory); }
.offer b { font-size: 15px; }
.offer .od { font-size: 13px; color: var(--muted); line-height: 1.5; }
.offer .cta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.offer .cta .go { font-size: 13px; font-weight: 600; color: var(--gold); }
.code-chip { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--gold-soft); border: 1px dashed rgba(var(--mint-rgb),.55); background: none; padding: 3px 8px; border-radius: 5px; cursor: pointer; }
.code-chip:hover { border-style: solid; }
[data-code]::after { content: ""; display: inline-block; vertical-align: -1px; margin-left: 6px; width: 11px; height: 11px; background: currentColor; opacity: .85;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='12' height='12' rx='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='12' height='12' rx='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E") center / contain no-repeat; }

.support { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.sup { display: block; padding: 16px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--ink-2); color: inherit; }
.sup:hover { border-color: rgba(var(--mint-rgb),.6); }
.sup b { display: block; font-size: 15px; } .sup span { font-size: 13px; color: var(--muted); }

.sources { margin-top: 60px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.sources ul { margin: 10px 0 0; padding-left: 18px; }
.sources li { margin: 4px 0; }
.sources a { color: var(--gold-soft); }
.risk { margin-top: 26px; font-size: 11.5px; line-height: 1.65; color: var(--faint); }
.risk p + p { margin-top: 8px; }
details summary { cursor: pointer; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
