/* Salt City Sheets. Phone first, system fonts only, no external resources (the site ships a strict CSP). */
:root {
  color-scheme: light dark;
  --page: #f4faf9;
  --card: #ffffff;
  --ink: #10272b;
  --muted: #4b6366;
  --brand: #0f766e;
  --brand-deep: #0b5e58;
  --brand-tint: #dff4f0;
  --accent: #f5b82e;
  --accent-ink: #b45309;
  --line: #dde8e8;
  --field-bg: #ffffff;
  --field-border: #76959a;
  --focus: #0f766e;
  --band: #0f766e;
  --band-ink: #ffffff;
  --band-muted: #e0f2ef;
  --hero-a: #0f766e;
  --hero-b: #0b5e58;
  --hero-ink: #ffffff;
  --hero-muted: #e0f2ef;
  --hero-line: rgba(255, 255, 255, 0.28);
  --btn-bg: #0f766e;
  --btn-ink: #ffffff;
  --btn-hover: #0b5e58;
  --offer-bg: #fff8e8;
  --offer-line: #f1dfae;
  --warn: #9b2c2c;
  --shadow: rgba(16, 39, 43, 0.08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #0c1618;
    --card: #152225;
    --ink: #e8f1f1;
    --muted: #a6b9bb;
    --brand: #5eead4;
    --brand-deep: #2dd4bf;
    --brand-tint: #123a37;
    --accent: #fbbf24;
    --accent-ink: #fcd34d;
    --line: #27393c;
    --field-bg: #0c1618;
    --field-border: #6b878b;
    --focus: #5eead4;
    --band: #0f766e;
    --band-ink: #ffffff;
    --band-muted: #e0f2ef;
    --hero-a: #0f766e;
    --hero-b: #0b5e58;
    --hero-ink: #ffffff;
    --hero-muted: #e0f2ef;
    --hero-line: rgba(255, 255, 255, 0.28);
    --btn-bg: #2dd4bf;
    --btn-ink: #06302c;
    --btn-hover: #5eead4;
    --offer-bg: #1d1a12;
    --offer-line: #4a3f22;
    --warn: #f4a3a3;
    --shadow: rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--brand); }
a:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.preview-bar {
  background: var(--accent);
  color: #10272b;
  text-align: center;
  font-size: 14px;
  padding: 6px 16px;
}

/* Header band: full width colour, content aligned with the 648px column below. */
.top {
  background: var(--band);
  color: var(--band-ink);
  padding: 14px max(16px, calc(50% - 324px));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--band-ink);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand:focus-visible { outline-color: var(--band-ink); }
.brand .mark { width: 32px; height: 32px; display: block; flex: none; }
.byline { color: var(--band-muted); font-size: 14px; }
.byline a { color: inherit; text-decoration: none; border-radius: 2px; }
.byline a:hover, .byline a:focus-visible { text-decoration: underline; }
.byline a:focus-visible { outline: 3px solid var(--band-ink); outline-offset: 2px; }

main, .foot { max-width: 680px; margin: 0 auto; padding: 0 16px; }

h1 {
  font-size: clamp(27px, 6.5vw, 36px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 28px 0 10px;
}
h2 { font-size: 20px; line-height: 1.3; margin: 0 0 12px; }
.lead { color: var(--muted); margin: 0 0 20px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  margin: 18px 0;
  box-shadow: 0 1px 2px var(--shadow), 0 12px 32px -14px var(--shadow);
}

/* Fields: 18px text so iOS does not zoom, 52px tall so a thumb lands. */
label { display: block; font-weight: 600; font-size: 16px; margin: 18px 0 6px; }
.card h2 + label { margin-top: 4px; }
input, select {
  width: 100%;
  font: inherit;
  font-size: 18px;
  line-height: 1.3;
  color: var(--ink);
  background: var(--field-bg);
  border: 1.5px solid var(--field-border);
  border-radius: 12px;
  padding: 13px 14px;
  min-height: 52px;
  -webkit-appearance: none;
  appearance: none;
}
input::placeholder { color: var(--muted); opacity: 1; }
input:focus, select:focus { border-color: var(--focus); }
.select-wrap { position: relative; }
.select-wrap select { font-size: 17px; padding: 13px 40px 13px 12px; cursor: pointer; text-overflow: ellipsis; }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 19px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2.5px solid var(--muted);
  border-bottom: 2.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.money, .percent {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 14px;
  background: var(--field-bg);
  border: 1.5px solid var(--field-border);
  border-radius: 12px;
}
.money span, .percent span { color: var(--muted); font-weight: 700; font-size: 18px; }
.money input, .percent input {
  flex: 1;
  min-width: 0;
  min-height: 0;
  padding: 13px 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.money input:focus, .percent input:focus { outline: none; }
.money:focus-within, .percent:focus-within { border-color: var(--focus); outline: 3px solid var(--focus); outline-offset: 2px; }
.hint { color: var(--muted); font-size: 15px; line-height: 1.45; margin: 6px 0 0; }

/* The result is the hero: one big number on a deep teal panel. */
.result {
  position: relative;
  overflow: hidden;
  color: var(--hero-ink);
  background: linear-gradient(145deg, var(--hero-a), var(--hero-b));
  border-color: transparent;
}
.result::before {
  content: "";
  position: absolute;
  right: -50px;
  bottom: -70px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  pointer-events: none;
}
.result h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hero-muted);
  margin: 0 0 4px;
}
.result h2::after {
  content: "";
  display: block;
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--accent);
  margin-top: 8px;
}
.result dl { margin: 0; display: flex; flex-direction: column; position: relative; }
.result dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--hero-line);
}
.result dt { color: var(--hero-muted); }
.result dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.result .big { order: -2; display: block; border: 0; padding: 6px 0 0; }
.result .big dt {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.result .big dd {
  font-size: clamp(42px, 12vw, 58px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--hero-ink);
  overflow-wrap: anywhere;
}
.result .due, .result .big + div {
  order: -1;
  justify-content: flex-start;
  gap: 8px;
  border: 0;
  padding: 6px 0 14px;
  font-size: 18px;
}
.result .hint { color: var(--hero-muted); margin-top: 10px; }

/* The offer: a warm sand card with a clear primary choice. */
.offer { background: var(--offer-bg); border-color: var(--offer-line); }
.editions { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 16px 0; }
.edition {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
}
.edition:has(.button:not(.secondary)) { border: 2px solid var(--brand); }
.edition h3 { margin: 0; font-size: 18px; }
.edition-lead { margin: 4px 0 0; font-weight: 700; color: var(--brand); }
/* The way from the result to the offer: a plain link, brand on the page background (AA light and dark). */
.result-cta { margin: -4px 0 18px; font-weight: 600; }
.result-cta a { color: var(--brand); }
.offer .price { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin: 6px 0 2px; color: var(--accent-ink); }
.edition .hint { flex: 1; margin: 0 0 14px; }
.button {
  display: block;
  width: 100%;
  min-height: 52px;
  text-align: center;
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 13px 18px;
  margin-top: auto;
}
.button:hover { background: var(--btn-hover); }
.button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.button.secondary { background: transparent; color: var(--brand); border-color: var(--brand); }
.button.secondary:hover { background: var(--brand-tint); }
.offer .hint strong { color: var(--ink); }

/* Pictures of the spreadsheet, each a link to the full-size file. */
.shots { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 16px 0 8px; }
.shots figure { margin: 0; }
.shots a { display: block; border-radius: 10px; }
.shots a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.shots img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 1px 2px var(--shadow);
}
.shots figcaption { color: var(--muted); font-size: 15px; margin-top: 6px; }

/* Notes the calculator raises: amber with a rule, so they read as a caution, not an error. */
.warn-note, .adjusted { color: var(--accent-ink); border-left: 3px solid var(--accent); padding-left: 10px; margin-top: 8px; }
.adjusted { margin-top: 18px; }

/* "Start over" is a small secondary action, not a call to action. */
.start-over {
  display: inline-block;
  width: auto;
  min-height: 44px;
  margin-top: 20px;
  padding: 9px 18px;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  color: var(--brand);
  background: transparent;
  border-color: var(--brand);
  cursor: pointer;
}
.start-over:hover { background: var(--brand-tint); }

.faq h3 { font-size: 17px; line-height: 1.35; margin: 16px 0 4px; }
.faq p { margin: 0; }
.button[aria-disabled="true"] { background: var(--line); color: var(--muted); border-color: transparent; pointer-events: none; }
.buy-pending { color: var(--muted); font-style: italic; }
main a.button { width: 100%; }

.fine { font-size: 15px; color: var(--muted); margin: 28px 0; }
.fine h2 { font-size: 17px; color: var(--ink); margin: 24px 0 8px; }
.fine strong { color: var(--warn); }
.foot { color: var(--muted); font-size: 14px; padding-top: 16px; padding-bottom: 40px; border-top: 1px solid var(--line); }

@media (min-width: 560px) {
  .editions { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 600px) {
  .card { padding: 28px; }
  h1 { margin-top: 36px; }
}
@media (prefers-reduced-motion: no-preference) {
  .button, input, select, .money, .percent { transition: background-color 0.15s ease, border-color 0.15s ease; }
}
