/* ==========================================================================
   MMINT Retail: content pages (calculator, customer pages, guides).
   Loaded after landing.css and only uses its tokens. New file name on purpose:
   /landing/ is served with an immutable cache.
   ========================================================================== */

/* ---------- Page intro ---------- */
.page-hero { position: relative; padding: 40px 0 48px; overflow: hidden; isolation: isolate; }
.page-hero .display { font-size: clamp(1.75rem, 5.6vw, 3.4rem); max-width: 20ch; text-wrap: balance; }
.page-hero .lead { margin-top: 18px; }
.page-hero .cta-row { margin-top: 28px; }
/* Centered intro: breadcrumb, eyebrow, H1 and lead */
.page-hero .container { text-align: center; }
.page-hero .display { margin-left: auto; margin-right: auto; }
.page-hero .lead { margin-left: auto; margin-right: auto; }
.page-hero .crumbs ol { justify-content: center; }

.crumbs { margin-bottom: 18px; font-size: 0.875rem; color: var(--text-dim); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; }
.crumbs li + li::before { content: "/"; margin: 0 8px; color: var(--text-dim); }
.crumbs a { color: var(--text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }

/* ---------- Long-form text ---------- */
.prose { max-width: 72ch; color: var(--text-muted); font-size: 1.0625rem; line-height: 1.7; }
.prose > * + * { margin-top: 18px; }
.prose h2 {
  margin-top: 48px; color: var(--text);
  font-family: var(--font-display); font-weight: 800; font-stretch: 112%; font-variation-settings: "wdth" 112;
  font-size: clamp(1.375rem, 3.4vw, 1.875rem); line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance;
}
.prose h3 { margin-top: 32px; color: var(--text); font-size: 1.1875rem; line-height: 1.3; }
.prose strong { color: var(--text); }
.prose a { color: var(--text); text-decoration-color: rgba(255, 61, 203, 0.7); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 8px; }
.prose li::marker { color: var(--accent-soft); }

.note {
  padding: 16px 18px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent-soft);
  font-size: 0.9875rem; color: var(--text-muted);
}

/* Worked example tables: scroll inside their own box on narrow screens */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.table-wrap th, .table-wrap td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-wrap td.num, .table-wrap th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap tfoot td, .table-wrap .is-total td { color: var(--text); font-weight: 700; }
.table-wrap thead th { color: var(--text); background: var(--surface); }

/* ---------- Cards (links between pages) ---------- */
.cards { display: grid; gap: 16px; }
.card {
  display: grid; gap: 8px; padding: 22px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text-muted);
  transition: border-color 200ms ease, transform 180ms var(--ease-out);
}
.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.card h3, .card h2 { color: var(--text); font-size: 1.1875rem; line-height: 1.3; font-family: var(--font-body); font-weight: 700; letter-spacing: 0; margin: 0; max-width: none; }
.card p { font-size: 0.9875rem; }
.card__more { color: var(--accent-soft); font-weight: 700; font-size: 0.9375rem; }

/* Numbered steps for customer pages */
.howto { display: grid; gap: 14px; counter-reset: howto; }
.howto li {
  position: relative; padding: 18px 18px 18px 64px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line); counter-increment: howto;
}
.howto li::before {
  content: counter(howto); position: absolute; left: 18px; top: 16px;
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gradient); color: #fff; font-weight: 700;
}
.howto strong { display: block; color: var(--text); margin-bottom: 2px; }

/* Closing call to action band */
.cta-band {
  padding: 32px 24px; border-radius: var(--radius); text-align: left;
  background: linear-gradient(120deg, rgba(85, 0, 161, 0.35), rgba(144, 0, 152, 0.28)); border: 1px solid var(--line-strong);
}
.cta-band .h2 { margin-bottom: 12px; }
.cta-band .lead { margin-bottom: 24px; }

/* ---------- Margin calculator ---------- */
.calc { display: grid; gap: 24px; align-items: start; }
.calc__form, .calc__out { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.calc__form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.calc__form fieldset + fieldset { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.calc__form legend { padding: 0; margin-bottom: 12px; color: var(--text); font-weight: 700; font-size: 1rem; }
.calc__grid { display: grid; gap: 14px; }
.calc .field select {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 12px;
  background: var(--bg); border: 1.5px solid var(--line-strong); color: var(--text); font: inherit;
}
.calc .field select:focus-visible { border-color: var(--focus); }
.field__hint { font-size: 0.8125rem; color: var(--text-dim); line-height: 1.45; }
.input-affix { position: relative; }
.input-affix > span {
  position: absolute; top: 50%; transform: translateY(-50%); color: var(--text-dim); pointer-events: none; font-size: 0.9375rem;
}
.input-affix--pre > span { left: 14px; }
.input-affix--pre input { padding-left: 30px; }
.input-affix--post > span { right: 14px; }
.input-affix--post input { padding-right: 34px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9375rem; color: var(--text-muted); cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }

.calc__out { position: relative; }
.calc__out h2 { font-size: 1.125rem; margin-bottom: 14px; color: var(--text); }
.kpis { display: grid; gap: 12px; }
.kpi { padding: 16px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--line); }
.kpi dt { font-size: 0.875rem; color: var(--text-muted); }
.kpi dd {
  margin-top: 4px; font-family: var(--font-display); font-weight: 800; font-stretch: 115%; font-variation-settings: "wdth" 115;
  font-size: clamp(1.5rem, 5vw, 2rem); line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums;
}
.kpi--target { border-color: rgba(255, 61, 203, 0.55); background: linear-gradient(160deg, rgba(255, 61, 203, 0.12), rgba(15, 12, 23, 0.6)); }
.kpi--target dd { color: var(--cost-text); }
.kpi.is-negative dd { color: #ff8a8a; }
.kpi dd.kpi__note { margin-top: 4px; font-family: var(--font-body); font-weight: 400; font-stretch: 100%; font-variation-settings: normal; font-size: 0.8125rem; color: var(--text-dim); }
.breakdown { margin-top: 18px; font-size: 0.9375rem; }
.breakdown summary { cursor: pointer; color: var(--text); font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.breakdown dl { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin-top: 8px; color: var(--text-muted); }
.breakdown dd { text-align: right; font-variant-numeric: tabular-nums; color: var(--text); }
.breakdown .is-total { color: var(--text); font-weight: 700; border-top: 1px solid var(--line); padding-top: 8px; }
.calc__msg { margin-top: 14px; font-size: 0.9375rem; color: var(--text-muted); }
.calc__msg.is-warn { color: #ffb4b4; }

/* ---------- Landing: discreet links to the content pages ---------- */
.site-footer__links--resources a { color: var(--text-dim); }
.site-footer__links--resources a:hover { color: var(--text); }
.try__more { margin-top: 18px; color: var(--text-muted); }
.try__more a { color: var(--text); text-decoration-color: rgba(255, 61, 203, 0.7); text-underline-offset: 3px; }

@media (min-width: 640px) {
  .calc__grid--2 { grid-template-columns: 1fr 1fr; }
  .cards--2 { grid-template-columns: 1fr 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi--target { grid-column: 1 / -1; }
  .cta-band { padding: 40px; }
}
@media (min-width: 960px) {
  .page-hero { padding: 56px 0 56px; }
  .calc { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
  .calc__out { position: sticky; top: calc(var(--header-h) + 16px); }
  .cards--3 { grid-template-columns: repeat(3, 1fr); }
  .cards--4 { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Small helpers ---------- */
.section--flush { padding-top: 0; }
.prose > h2.first, .prose > h2:first-child { margin-top: 0; }
.section__more { margin-top: 28px; }
.inline-link { color: var(--text); text-decoration-color: rgba(255, 61, 203, 0.7); text-underline-offset: 4px; text-decoration-thickness: 2px; }
.inline-link:hover { text-decoration-color: var(--accent); }
.calc__disclaimer { margin-top: 24px; }
.field--check { align-content: center; }
.cards--auto { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

/* Footer with two link rows (resources + legal) next to the brand */
@media (min-width: 640px) {
  .site-footer__brand { grid-row: span 2; }
  .site-footer__inner > nav { grid-column: 2; }
}
