/* Cloud Bill Gotchas Checker. Tokens and components follow revelations.consulting/styles.css.
 * Fonts: the site loads Fraunces and Inter from Google Fonts. This page's CSP allows only
 * same-origin styles and fonts, so it names them first and falls back to Georgia and the
 * system sans. Self-host the two fonts under the site (font-src 'self') to get the exact look. */
: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, a:focus-visible, .drop:focus-within { 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-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%; }

.upload-card { background: var(--forest-2); border: 1px solid rgba(201, 162, 39, .35); border-radius: var(--radius); padding: 28px; }
.drop { display: grid; gap: 6px; place-items: center; text-align: center; padding: 34px 18px; border: 2px dashed rgba(201, 162, 39, .6); border-radius: 12px; cursor: pointer; transition: background .15s, border-color .15s; }
.drop:hover, .drop.drag { background: rgba(201, 162, 39, .1); border-color: var(--gold); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.drop-title { font: 600 1.2rem var(--serif); color: var(--cream); }
.drop-sub { font-size: .9rem; opacity: .8; }
.promise { margin: 18px 0 4px; font-size: 1.02rem; color: var(--gold); }
.promise-sub { font-size: .88rem; opacity: .8; margin: 0; }
.promise-sub a { color: var(--gold); }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0; opacity: .6; font-size: .85rem; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid rgba(244, 239, 230, .25); }
.sample-note { font-size: .84rem; opacity: .75; margin: 10px 2px 0; }
.sample-row { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; flex-wrap: wrap; }
.sample-label { font-size: .9rem; opacity: .85; }
.sample-select { flex: 1; min-width: 0; font: inherit; font-size: .92rem; color: var(--forest); background: var(--cream); border: 1px solid rgba(201, 162, 39, .6); border-radius: 8px; padding: 8px 10px; }

/* 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); }

/* Results */
.summary { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; margin-bottom: 28px; }
.total-card { background: var(--forest); color: var(--cream); border-radius: var(--radius); padding: 28px 30px; }
.total-k { text-transform: uppercase; letter-spacing: .12em; font-size: .76rem; color: var(--gold); margin-bottom: .5em; }
.total-v { font: 600 clamp(2rem, 4.5vw, 2.9rem)/1.1 var(--serif); margin-bottom: .4em; }
.total-note { font-size: .86rem; opacity: .8; margin: 0; }

.result-list { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 16px; }
.result { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; min-width: 0; }
.result.status-found { border-left: 5px solid var(--found); }
.result.status-canttell { border-left: 5px solid var(--unknown); }
.result.status-notfound { border-left: 5px solid var(--clear); }
.result-head { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: start; }
.result-title { margin: 0 0 .15em; color: var(--forest); }
.result-guide { margin: 0; font-size: .88rem; color: var(--muted); }
.result-dollars { margin: 0; font: 600 1.45rem var(--serif); color: var(--forest); white-space: nowrap; }
.result-summary { margin: 12px 0 0; }
.pill { display: inline-block; font: 600 .78rem var(--sans); border-radius: 999px; padding: 4px 11px; white-space: nowrap; margin-top: 3px; }
.pill-found { background: var(--found-bg); color: var(--found); }
.pill-clear { background: var(--clear-bg); color: var(--clear); }
.pill-unknown { background: var(--unknown-bg); color: var(--unknown); }
.status-notfound .result-summary, .status-notfound .result-dollars { color: var(--muted); }

.estimate { background: var(--cream); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin-top: 14px; font-size: .93rem; }
.estimate p { margin: 0 0 .5em; }
.estimate p:last-child { margin: 0; }
.estimate-head { font-weight: 600; color: var(--forest); }
.estimate-source { color: var(--muted); font-size: .86rem; overflow-wrap: anywhere; }

.howto { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 4px; }
.howto-text { font-size: .95rem; color: var(--ink); }
.howto-links { font-size: .9rem; margin: 0; }
.howto-links a { color: var(--gold-2); font-weight: 600; }

.detail { border-top: 1px dashed var(--line); margin-top: 14px; }
.ev-block { overflow-x: auto; }
table.ev { width: 100%; border-collapse: collapse; font-size: .88rem; }
.ev th, .ev td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ev th { font-weight: 600; color: var(--muted); }
.ev .num { text-align: right; white-space: nowrap; }
.ev .mono { font-family: var(--mono); font-size: .82rem; overflow-wrap: anywhere; }
.ev-notes { font-size: .9rem; color: var(--muted); padding-left: 1.1em; margin: 10px 0 0; overflow-wrap: anywhere; }
.result-summary, .howto-text, .estimate p { overflow-wrap: anywhere; }

/* Gate (same form as /guide) */
.gate { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; background: var(--forest); color: var(--cream); border-radius: var(--radius); padding: 30px; margin-bottom: 24px; }
.gate .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; }

.detail-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 24px; }

.offer { background: var(--cream-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 30px; }
.offer p { color: var(--muted); max-width: 60ch; }

.print-head { display: none; }

.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, .summary, .gate { 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; }
  .result { padding: 18px 18px; }
  .result-head { grid-template-columns: 1fr auto; }
  .result-head .pill { grid-column: 1 / -1; justify-self: start; }
  .guide-row { flex-direction: column; }
  .upload-card, .gate, .offer, .total-card { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* Printable report: the results only, details open, no navigation or forms. */
@media print {
  body { background: #fff; font-size: 11pt; }
  .nav, .hero, .gate, .detail-actions, #export, #privacy, .footer, .progress-section, #errorSection, .skip { display: none !important; }
  .section { padding: 0; }
  .print-head { display: block; font-size: 9pt; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 14px; }
  .total-card { background: #fff; color: var(--ink); border: 1px solid var(--line); }
  .total-k { color: var(--gold-2); }
  .result { break-inside: avoid; page-break-inside: avoid; border-color: #ccc; }
  .howto-links a::after, .offer a::after { content: " (" attr(href) ")"; font-weight: 400; color: var(--muted); }
  .offer { break-inside: avoid; background: #fff; }
  .btn { border: 1px solid var(--ink); }
}
