/* Revelations Consulting free tools: the shared look.
 * Tokens and components follow tools/bill-checker/styles.css (which follows
 * revelations.consulting/styles.css). Fonts come from /fonts/fonts.css (self-hosted
 * Fraunces and Inter, font-src 'self'); without it the stacks fall back to Georgia and
 * the system sans. Nothing here loads from another origin. */
:root {
  --forest: #0E2B0D;
  --forest-2: #163D15;
  --cream: #F4EFE6;
  --cream-2: #EAE3D6;
  --gold: #C9A227;
  --gold-2: #B08C1C;
  --ink: #1B2A1A;
  --muted: #4E5B4C;
  --line: rgba(14, 43, 13, 0.14);
  --found: #9B2C1F;
  --found-bg: #F7E3DC;
  --clear: #2F6B2C;
  --clear-bg: #DFEBD9;
  --unknown: #6B5A12;
  --unknown-bg: #F2E8C4;
  --radius: 14px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3, h4, h5 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); max-width: 26ch; }
h3, .h3 { font-size: 1.25rem; }
h4 { font-size: 1.02rem; margin-top: 1.1em; }
h5 { font: 600 .82rem var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 1em 0 .4em; }
p { margin: 0 0 1em; }
code { font: .88em var(--mono); background: rgba(14, 43, 13, .07); padding: 1px 5px; border-radius: 5px; overflow-wrap: anywhere; }
[hidden] { display: none !important; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--gold); padding: 8px 12px; z-index: 100; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* Buttons */
.btn { display: inline-block; padding: 14px 24px; border-radius: 999px; font: 600 1rem var(--sans); text-decoration: none; text-align: center; border: 2px solid transparent; cursor: pointer; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn:focus-visible, input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn-gold { background: var(--gold); color: var(--forest); }
.btn-gold:hover { background: #D6B23B; }
.btn-ghost { border-color: rgba(244, 239, 230, .4); color: var(--cream); background: transparent; }
.btn-ghost:hover { border-color: var(--cream); }
.btn-dark { background: var(--forest); color: var(--cream); }
.btn-outline { border-color: var(--line); color: var(--forest); background: #fff; }
.btn-outline:hover { border-color: var(--forest); }
.btn-sm { padding: 9px 18px; font-size: .92rem; }
.btn-block { display: block; width: 100%; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; background: var(--forest); border-bottom: 1px solid rgba(201, 162, 39, .18); color: var(--cream); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; font: 600 1.1rem var(--serif); }
.logo em { font-style: normal; color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-text { text-decoration: none; font-size: .95rem; opacity: .85; }
.nav-text:hover { opacity: 1; color: var(--gold); }

/* Hero + upload */
.hero { background: radial-gradient(1200px 500px at 85% -10%, rgba(201, 162, 39, .18), transparent 60%), var(--forest); color: var(--cream); padding: 72px 0 80px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 600; color: var(--gold); margin-bottom: 1.2em; }
.eyebrow.dark { color: var(--gold-2); }
.lede { font-size: 1.12rem; max-width: 56ch; opacity: .9; }
.hero-list { list-style: none; padding: 0; margin: 22px 0 0; max-width: 56ch; }
.hero-list li { padding-left: 26px; position: relative; margin-bottom: 9px; }
.hero-list li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 11px; height: 11px; background: var(--gold); border-radius: 50%; }
/* Sections */
.section { padding: 72px 0; }
.section.alt { background: var(--cream-2); }
.section-lede { font-size: 1.05rem; color: var(--muted); max-width: 64ch; }
.two-col { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: start; }
.two-col > * { min-width: 0; }
.mini { background: #fff; border-radius: var(--radius); padding: 22px 24px; border: 1px solid var(--line); margin-bottom: 16px; }
.mini h3 { color: var(--forest); }
.mini p { color: var(--muted); font-size: .95rem; margin: 0; }
.mini p + p { margin-top: .8em; }
.cloud-head { font: 600 1.25rem var(--serif); color: var(--forest); margin: 28px 0 12px; }
.steps-list > .cloud-head:first-child { margin-top: 0; }
.sql-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 16px 0 8px; }
.sql { margin: 0 0 12px; max-height: 360px; overflow: auto; background: var(--forest); color: var(--cream); border-radius: 10px; padding: 14px 16px; font: .78rem/1.5 var(--mono); white-space: pre; }
.sql code { background: none; padding: 0; color: inherit; font: inherit; overflow-wrap: normal; }
.plain-list { padding-left: 1.1em; margin: 0; }
.plain-list li { margin-bottom: .7em; }

progress { width: 100%; height: 14px; accent-color: var(--gold-2); }
.progress-section { padding: 40px 0; }

.notice { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--gold); border-radius: 10px; padding: 16px 20px; margin: 0 0 24px; }
.notice-err { border-left-color: var(--found); }
.notice-sample { background: var(--unknown-bg); border-left-color: var(--unknown); }

/* ---- Email signup (optional; never required to use a tool) ---- */
.signup { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; background: var(--forest); color: var(--cream); border-radius: var(--radius); padding: 30px; }
.signup .muted { color: rgba(244, 239, 230, .75); }
.guide-form { position: relative; }
.guide-row { display: flex; gap: 10px; }
.guide-row input { flex: 1; min-width: 0; padding: 14px 16px; border-radius: 999px; border: 1px solid rgba(244, 239, 230, .35); font: 1rem var(--sans); background: var(--cream); color: var(--ink); }
.guide-row .btn { white-space: nowrap; }
.guide-consent { font-size: .84rem; opacity: .78; margin: 12px 4px 0; }
.guide-consent a { color: var(--gold); }
.guide-msg { margin: 12px 4px 0; min-height: 1.4em; font-weight: 500; }
.guide-msg.err { color: #F2B8A8; }


/* ---- The one call to action per page ---- */
.offer p { color: var(--muted); max-width: 60ch; }

.offer .btn { margin-right: 12px; margin-bottom: 8px; }
.offer .offer-alt { display: inline-block; font-weight: 600; color: var(--forest); }

/* ---- Tool components ---- */
.tool-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; min-width: 0; }
.tool-card + .tool-card { margin-top: 20px; }
.tool-card h2, .tool-card h3 { color: var(--forest); }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px 20px; }
.field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.field label, .field .label { font-weight: 600; font-size: .92rem; color: var(--forest); }
.field .hint { font-size: .82rem; color: var(--muted); }
.field input, .field select, .search-input { font: 1rem var(--sans); color: var(--ink); background: var(--cream); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; min-width: 0; }
.field input[aria-invalid="true"] { border-color: var(--found); background: var(--found-bg); }
.field-error { font-size: .82rem; color: var(--found); min-height: 1em; margin: 0; }
.check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 16px; margin: 6px 0 0; padding: 0; list-style: none; }
.check-list label { display: flex; gap: 8px; align-items: center; font-size: .92rem; cursor: pointer; }
.provider-head { font: 600 .82rem var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 14px 0 4px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.form-sub { margin-top: 26px; }
details.custom-model, .compare-box { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 16px; }
details.custom-model summary { cursor: pointer; font-weight: 600; color: var(--forest); }
details.custom-model[open] summary { margin-bottom: 10px; }
legend { padding: 0; }

.stat-row { margin-bottom: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.stat { background: var(--forest); color: var(--cream); border-radius: var(--radius); padding: 20px 22px; min-width: 0; }
.stat-k { text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; color: var(--gold); margin: 0 0 .4em; }
.stat-v { font: 600 clamp(1.5rem, 3.4vw, 2.1rem)/1.1 var(--serif); margin: 0; overflow-wrap: anywhere; }
.stat-sub { font-size: .84rem; opacity: .8; margin: .4em 0 0; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
.data th, .data td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data thead th { font-weight: 600; color: var(--muted); background: var(--cream); position: sticky; top: 0; z-index: 2; white-space: nowrap; }
.data td.num, .data th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.data tr.is-primary td, .data tr.is-primary th { background: rgba(201, 162, 39, .12); }
.data .sub { display: block; font-size: .8rem; color: var(--muted); font-family: var(--mono); overflow-wrap: anywhere; }
.data .na { color: var(--muted); }
.sort-btn { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
.sort-btn::after { content: " \2195"; opacity: .45; }
th[aria-sort="ascending"] .sort-btn::after { content: " \2191"; opacity: 1; }
th[aria-sort="descending"] .sort-btn::after { content: " \2193"; opacity: 1; }

.math { background: var(--cream); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin-top: 14px; font-size: .93rem; }
.math h3, .math h4 { margin: 1.2em 0 .4em; }
.math > h3:first-child, .math > h4:first-child { margin-top: 0; }
.math pre, .formula { margin: 8px 0; white-space: pre-wrap; overflow-wrap: anywhere; font: .84rem/1.55 var(--mono); color: var(--ink); }
.math dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; margin: 8px 0 0; font-size: .88rem; }
.math dt { font-family: var(--mono); color: var(--forest); }
.math dd { margin: 0; color: var(--muted); }

.prices-checked { font-size: .88rem; color: var(--muted); margin: 10px 0 0; overflow-wrap: anywhere; }
.prices-checked a { color: var(--gold-2); font-weight: 600; }
.hero .prices-checked { color: rgba(244, 239, 230, .8); }
.hero .prices-checked a { color: var(--gold); }
.note-list { font-size: .86rem; color: var(--muted); padding-left: 1.1em; margin: 6px 0 0; }
.warn { color: var(--unknown); background: var(--unknown-bg); border-radius: 8px; padding: 8px 12px; font-size: .9rem; margin: 10px 0 0; }
.share-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 16px; }
.share-msg { font-size: .88rem; color: var(--muted); }
.hero .share-msg { color: rgba(244, 239, 230, .8); }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: end; margin-bottom: 16px; }
.toolbar .field { flex: 1 1 200px; }
.count { font-size: .88rem; color: var(--muted); margin: 0 0 10px; }

.hero-compact { padding: 56px 0 48px; }
.section-tight { padding-top: 40px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.check-inline { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.field-search { flex-basis: 260px; }
.table-tall { max-height: 78vh; overflow: auto; }
.price-table { font-size: .88rem; line-height: 1.35; }
.price-table th, .price-table td { padding: 7px 8px; }
.price-table thead th { white-space: normal; vertical-align: bottom; }
.price-table .sub { display: inline; margin-left: 6px; }
.price-table td .sub { display: block; margin-left: 0; }
.price-table .model { font-weight: 600; color: var(--forest); }
.price-table th[scope="row"] { min-width: 170px; max-width: 260px; position: sticky; left: 0; z-index: 1; background: #fff; }
.price-table thead th:first-child { left: 0; z-index: 3; }
.price-table td a { color: var(--gold-2); font-weight: 600; white-space: nowrap; }
details.notes { margin-top: 4px; font-weight: 400; }
details.notes summary { cursor: pointer; font-size: .8rem; color: var(--muted); }
details.notes .note-list { font-size: .8rem; margin-top: 4px; }
details.notes a { color: var(--gold-2); }

/* ---- Tools index ---- */
.tool-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.tool-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; display: grid; gap: 6px; align-content: start; }
.tool-item h3 { margin: 0; color: var(--forest); }
.tool-item h3 a { text-decoration: none; }
.tool-item h3 a:hover { color: var(--gold-2); }
.tool-item p { margin: 0; color: var(--muted); font-size: .95rem; }
.tool-item.soon { background: transparent; border-style: dashed; }
.tool-item.soon h3 { color: var(--muted); }
.tag { justify-self: start; display: inline-block; font: 600 .74rem var(--sans); border-radius: 999px; padding: 3px 10px; background: var(--clear-bg); color: var(--clear); }
.tag-soon { background: var(--unknown-bg); color: var(--unknown); }

.footer { background: var(--forest); border-top: 1px solid rgba(201, 162, 39, .18); color: rgba(244, 239, 230, .7); padding: 28px 0; font-size: .88rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; flex-wrap: wrap; }
.footer-link { text-decoration: none; }
.footer-link:hover { color: var(--gold); }

@media (max-width: 960px) {
  .hero-grid, .two-col, .signup { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 48px 0 56px; }
  .section { padding: 48px 0; }
  .nav-text { display: none; }
  .guide-row { flex-direction: column; }
  .signup, .offer, .tool-card { padding: 20px; }
  .table-tall { max-height: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* Print: the inputs and results, no navigation or forms. */
@media print {
  body { background: #fff; font-size: 11pt; }
  .nav, .signup, .share-row, .footer, .skip, .toolbar { display: none !important; }
  .section { padding: 0; }
  .stat { background: #fff; color: var(--ink); border: 1px solid var(--line); }
  .stat-k { color: var(--gold-2); }
  .offer a::after { content: " (" attr(href) ")"; font-weight: 400; color: var(--muted); }
  .offer { break-inside: avoid; background: #fff; }
  .btn { border: 1px solid var(--ink); }
}

/* Paste boxes and file inputs (several tools take pasted CLI output or CSVs). */
.field textarea { width: 100%; min-height: 9rem; font: 0.9rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); resize: vertical; box-sizing: border-box; }
.field input[type="file"] { font: inherit; max-width: 100%; }
