/* DeskLark Studio -- Wedding Budget Calculator
   Brand palette matches the Pinterest pin-card system
   (build/marketing/pinterest/make_pin_cards.py):
   teal #132F32 / teal-light #2C544E / cream #F8F5EF / gold #C9A24B
   / ink #221F1C / gray #55504A. Wedding printable's own accent
   (dusty rose #9C5B62) is used only as a small priority-flag accent. */

:root {
  --teal: #132F32;
  --teal-light: #2C544E;
  --cream: #F8F5EF;
  --cream-dim: #EFEAE0;
  --gold: #C9A24B;
  --ink: #221F1C;
  --gray: #55504A;
  --rose: #9C5B62;
  --rule: #DAD3C4;
  --radius: 10px;
  --max-w: 760px;
  font-size: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.55;
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--teal);
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 4vw, 1.7rem); margin-top: 0; }
h3 { font-size: clamp(1.05rem, 3vw, 1.2rem); }

p { margin: 0 0 1em; }

a { color: var(--teal-light); }
a:hover, a:focus { color: var(--teal); }

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

.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;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--teal);
  color: var(--cream);
  padding: 10px 16px;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--rose);
  outline-offset: 2px;
}

/* ---------- header / footer ---------- */

.site-header {
  background: var(--teal);
  color: var(--cream);
  padding: 22px 0;
}
.site-header .wordmark {
  font-family: Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 4px;
  color: var(--cream);
}
.site-header .tagline {
  margin: 0;
  font-size: 0.92rem;
  color: #C9C4B8;
}

.site-footer {
  background: var(--teal);
  color: #C9C4B8;
  margin-top: 48px;
  padding: 24px 0 32px;
  font-size: 0.85rem;
}
.site-footer p { margin: 0 0 6px; }
.footer-fine { color: #9c9686; }

.site-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}
.site-links a {
  color: #E4DCC4;
  text-decoration: none;
}
.site-links a:hover, .site-links a:focus {
  color: var(--gold);
  text-decoration: underline;
}

/* ---------- layout sections ---------- */

main.wrap { padding-top: 28px; padding-bottom: 12px; }

section { margin-bottom: 40px; }

.intro .lede {
  color: var(--gray);
  font-size: 1.02rem;
  max-width: 62ch;
}

/* ---------- calculator ---------- */

.calculator {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 22px 20px 8px;
}

.field-group {
  margin-bottom: 22px;
  border: 0;
  padding: 0;
}

.field-group > label,
.field-group legend {
  display: block;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 8px;
  font-size: 1rem;
}

.hint {
  color: var(--gray);
  font-size: 0.85rem;
  margin: 6px 0 0;
}

.range-pair {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

input[type="range"] {
  flex: 1 1 160px;
  min-width: 120px;
  accent-color: var(--teal-light);
  height: 28px;
}

.number-prefix {
  display: flex;
  align-items: center;
  background: var(--cream-dim);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 0 10px;
  flex: 0 0 auto;
}
.number-prefix span {
  color: var(--gray);
  font-weight: 700;
  margin-right: 2px;
}
.number-prefix input[type="number"] {
  border: 0;
  background: transparent;
}

input[type="number"] {
  font-size: 1.05rem;
  padding: 9px 10px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  width: 11ch;
  background: #fff;
  color: var(--ink);
  /* Native spin buttons are redundant with the paired range slider and
     were eating into the visible text width, clipping larger numbers. */
  -moz-appearance: textfield;
  appearance: textfield;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"]:focus {
  border-color: var(--teal-light);
}

.priorities .hint { margin-bottom: 10px; }

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.88rem;
  cursor: pointer;
  background: #fff;
  color: var(--ink);
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.chip input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--rose);
}

.chip:has(input:checked),
.chip.is-checked {
  background: color-mix(in srgb, var(--gold) 28%, white);
  border-color: var(--gold);
  font-weight: 700;
}

.chip:has(input:disabled:not(:checked)) {
  opacity: 0.45;
  cursor: not-allowed;
}

#priority-count {
  font-weight: 700;
  color: var(--teal);
}

.priority-note {
  color: var(--rose);
}

/* ---------- results ---------- */

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
  font-size: 0.92rem;
}

thead th {
  text-align: left;
  background: var(--teal);
  color: var(--cream);
  padding: 10px 12px;
  font-weight: 700;
  position: sticky;
  top: 0;
}

tbody th, tbody td, tfoot th, tfoot td {
  padding: 9px 12px;
  border-top: 1px solid var(--rule);
}

tbody th {
  text-align: left;
  font-weight: 600;
  color: var(--ink);
}

.num { text-align: right; }
.muted { color: var(--gray); }
.amount { font-weight: 700; color: var(--teal); }

tr.is-priority {
  background: color-mix(in srgb, var(--gold) 12%, white);
}

.priority-flag { color: var(--rose); }

tfoot th, tfoot td {
  border-top: 2px solid var(--teal);
  font-weight: 700;
  color: var(--teal);
}

.cost-per-guest {
  margin-top: 14px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--teal-light);
}

.how-it-works {
  margin-top: 14px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 10px 14px;
  background: #fff;
}
.how-it-works summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--teal);
}
.how-it-works p {
  margin-top: 10px;
  color: var(--gray);
  font-size: 0.9rem;
}

.share-box {
  margin-top: 22px;
  border: 1px dashed var(--rule);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--cream-dim);
}
.share-box h3 { margin-bottom: 10px; }

.summary-text {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 240px;
  overflow-y: auto;
  margin: 0 0 12px;
}

.btn {
  display: inline-block;
  border: 0;
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: var(--teal);
  color: var(--cream);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--teal-light);
}

.copy-status {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: var(--teal-light);
  min-height: 1.2em;
}

/* ---------- FAQ ---------- */

.faq-item {
  border-bottom: 1px solid var(--rule);
  padding: 16px 0;
}
.faq-item:last-child { border-bottom: 0; }
.faq-item h3 { margin-bottom: 6px; }
.faq-item p { color: var(--gray); margin-bottom: 0; }

/* ---------- promo cards ---------- */

.promo-intro { color: var(--gray); }

.promo-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.promo-card {
  display: block;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 18px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.12s ease, transform 0.12s ease;
}
.promo-card:hover, .promo-card:focus-visible {
  border-color: var(--gold);
  transform: translateY(-1px);
}
.promo-card h3 { color: var(--teal); }
.promo-card p { color: var(--gray); font-size: 0.92rem; }

.promo-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--rose);
  margin-bottom: 6px;
}

.promo-cta {
  display: inline-block;
  font-weight: 700;
  color: var(--teal-light);
}

.promo-card--soon {
  background: var(--cream-dim);
  cursor: default;
}
.promo-card--soon:hover, .promo-card--soon:focus-visible {
  transform: none;
  border-color: var(--rule);
}
.promo-cta--disabled {
  color: var(--gray);
}

@media (min-width: 620px) {
  .promo-cards {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 640px) {
  :root { font-size: 17px; }
  .calculator { padding: 28px 28px 10px; }
}
