/* pages/plan.css — Income calculator, plan sheet, gold coin quotation, stats.
   Part of the split style.css. Keep the load order in includes/layout.php. */

.plan-picks {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 100%;
  margin: 6px 0 16px;
  padding: 5px;
  border-radius: 999px;
  border: 1px solid rgba(184, 137, 58, .42);
  background:
    linear-gradient(180deg, rgba(248, 241, 222, .95), rgba(242, 230, 204, .72)),
    radial-gradient(circle at 12% 20%, rgba(184, 137, 58, .14), transparent 55%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}

.plan-pick.plan-metal {
  appearance: none;
  min-width: 96px;
  margin: 0;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--maroon-deep);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.plan-pick.plan-metal:hover {
  background: rgba(184, 137, 58, .14);
}

.plan-pick.plan-metal.is-selected {
  background: linear-gradient(180deg, #7c2937, #4b151e);
  color: #f8f1de;
  border-color: rgba(58, 22, 14, .18);
  box-shadow: 0 6px 16px rgba(49, 14, 20, .2);
}

.plan-pick.plan-metal:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.stat-grid, .metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }

.stat, .panel {
  border-radius: 12px;
  padding: 10px 12px 8px;
  border: 1px solid rgba(103, 31, 43, .2);
}

.metric-grid > div {
  border-radius: 10px;
  padding: 8px 10px 6px;
  border: 1px solid rgba(103, 31, 43, .2);
}

.stat strong { font-family: var(--sans); font-size: 20px; display: block; }

.sheet { border-radius: 14px; padding: 12px 14px; border: 1px solid var(--line); }

.sheet h2 { font-size: 22px; }

.sheet h3 { font-size: 16px; margin: 10px 0 4px; }

.sheet-head, .split { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }

.sheet-value { text-align: right; }

.sheet-value strong { font-family: var(--sans); font-size: 20px; display: block; }

.sheet-pdf { margin-top: 10px; display: inline-block; }

.sheet-tools { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }

.sheet-tools .sheet-pdf { margin-top: 0; }

.sheet-share-hint { flex: 1 0 100%; margin: 0; text-align: right; font-size: 12px; color: #6e5d52; }

.sheet-compact { padding: 12px; }

.sheet-compact .sheet-tools { margin-bottom: 10px; }

.calc-boxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.calc-box {
  margin: 0;
  min-width: 0;
  padding: 10px 12px 8px;
  border-radius: 12px;
  border: 1px solid rgba(103, 31, 43, .22);
  background: linear-gradient(180deg, #fbf7f8, #f1e6e8);
}

.calc-box span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #694148;
}

.calc-box strong {
  display: block;
  margin-top: 3px;
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.2;
  color: var(--maroon-deep);
}

.calc-box small,
.calc-box b {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: #664e52;
}

.calc-box-total {
  background: linear-gradient(160deg, #310e14, #671f2b);
  border-color: #310e14;
}

.calc-box-total span,
.calc-box-total small,
.calc-box-sum span,
.calc-box-sum small { color: #e9d8db; }

.calc-box-total strong,
.calc-box-sum strong { color: #fff; font-size: 22px; }

.calc-box-sum {
  background: linear-gradient(160deg, #310e14, #581822);
  border-color: #310e14;
}

@media (max-width: 760px) {
    .calc-boxes { grid-template-columns: 1fr 1fr; }
    .calc-box-total { grid-column: 1 / -1; }
}

.sheet-compact h3 { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }

.sheet-compact .value-table td:first-child { color: #6e5d52; width: 46%; }

.sheet-compact .data td:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.sheet-compact .purchase-row td { color: var(--maroon-deep); font-weight: 700; }

.gold-live { margin: 4px 0 8px; }

.gold-live strong { color: var(--maroon); }

.coin-quote-block { background: linear-gradient(180deg, #071f24 0%, #4c0e19 42%, #f4e6c4 42%, #fff7e8 100%); }

.coin-quote-block .section-head h2,
.coin-quote-block .section-head p { color: #fff7e8; }

.coin-quote-block .kicker { color: #e0b24a; }

.coin-quote-form { margin-top: 8px; }

#coin-quote-mount { margin-top: 16px; }

.coin-quote-only { margin: 0; }

.coin-card-export {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.coin-card-preview {
  display: block;
  width: 100%;
  max-width: 540px;
  height: auto;
  margin: 0 auto;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(7, 31, 36, .35);
}

.sheet .metric-grid { margin-top: 8px; }

.metric-grid strong { display: block; font-family: var(--sans); font-size: 18px; }

.metric-grid small, .sheet-note { color: #6e5d52; font-size: 12px; }

.formula-table td:last-child, .formula-table th:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.formula-table .formula-total td { color: var(--maroon-deep); font-family: var(--sans); font-size: 14px; }

.sheet-empty { padding: 12px; }

@media (max-width: 760px) {
    .sheet-value { text-align: left; }
}

.gold-bill-form textarea { width: 100%; min-height: 84px; }

.gold-bill-scroll { max-width: 100%; overflow-x: auto; }

.gold-bill-form {
  border: 1px solid #e7d3a3;
  background:
    radial-gradient(circle at 100% 0, rgba(231, 211, 163, .35), transparent 32%),
    linear-gradient(180deg, #fffdf8, #fff);
  box-shadow: 0 0 0 4px #f8f1de, 0 16px 36px rgba(49, 14, 20, .08);
}

.gold-bill-form h2 { color: #671f2b; letter-spacing: .04em; }

.gold-bill-form label { color: #671f2b; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }

.gold-bill-form input,
.gold-bill-form select,
.gold-bill-form textarea { border-color: rgba(184, 137, 58, .55); background: #fffdf8; }

.gold-bill {
  width: 148mm;
  min-height: 210mm;
  max-width: none;
  margin: 0 auto;
  padding: 7mm 6mm 6mm;
  background: #fffef8;
  border: 1px solid #c4a15a;
  box-shadow: inset 0 0 0 1px #671f2b;
  color: #1c1c1c;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.3;
}

.gold-bill-table { width: 100%; margin: 8px 0 0; border-collapse: collapse; }

.gold-bill-table th, .gold-bill-table td { border: 1px solid #671f2b; padding: 3px 3px; vertical-align: top; }

.gold-bill-table th {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .02em;
  text-align: center;
  background: #671f2b;
  color: #fff8e8;
}

.gold-bill-table td { text-align: center; background: #fffef8; }

.gold-bill-table tbody td { height: 48px; }
