/* ============================================================
   MarginFern — styles
   A warm, editorial look for a practical seller tool.
   ============================================================ */

:root {
  --ink: #132019;
  --ink-2: #1d3127;
  --emerald: #0e7a55;
  --emerald-dark: #0a5c40;
  --emerald-soft: #dff3e7;
  --mint: #eef9f2;
  --mint-2: #f6fcf8;
  --cream: #fbf8f1;
  --paper: #ffffff;
  --amber: #c57a12;
  --amber-soft: #fbf1dd;
  --coral: #b84a3a;
  --coral-soft: #fff3ef;
  --lavender: #8f7ab3;
  --muted: #5f6f66;
  --muted-2: #7d8c84;
  --line: #dbe5de;
  --line-strong: #c8d8ce;
  --footer: #0f1d16;
  --shadow-sm: 0 4px 14px rgba(19, 32, 25, 0.05);
  --shadow-md: 0 18px 50px rgba(19, 32, 25, 0.1);
  --shadow-lg: 0 30px 80px rgba(19, 32, 25, 0.14);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --font-body: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --container: 1180px;
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(900px 520px at 88% -12%, rgba(14, 122, 85, 0.1), transparent 62%),
    radial-gradient(720px 420px at -8% 8%, rgba(197, 122, 18, 0.07), transparent 58%),
    var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--emerald-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--emerald);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
}

p {
  margin-bottom: 1rem;
}

::selection {
  background: var(--emerald-soft);
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid rgba(14, 122, 85, 0.35);
  outline-offset: 2px;
}

.container {
  width: min(100% - 48px, var(--container));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  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: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--cream);
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--emerald-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--emerald);
  box-shadow: 0 0 0 4px rgba(14, 122, 85, 0.11);
}

.muted {
  color: var(--muted);
}

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--emerald);
  color: #fff;
  box-shadow: 0 8px 22px rgba(14, 122, 85, 0.22);
}

.btn-primary:hover {
  background: var(--emerald-dark);
  color: #fff;
}

.btn-secondary {
  background: var(--paper);
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: var(--emerald);
  color: var(--emerald-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
}

.btn-ghost:hover {
  background: rgba(19, 32, 25, 0.05);
  color: var(--ink);
}

.btn-light {
  background: var(--cream);
  color: var(--ink);
}

.btn-light:hover {
  background: #fff;
  color: var(--ink);
}

.btn-small {
  min-height: 36px;
  padding: 8px 14px;
  font-size: 12.5px;
}

.btn-lg {
  min-height: 52px;
  padding: 14px 24px;
  font-size: 15px;
}

.btn-block {
  width: 100%;
}

/* ------------------------------------------------------------
   Header
   ------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 248, 241, 0.84);
  border-bottom: 1px solid rgba(219, 229, 222, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--ink);
  color: var(--emerald-soft);
  box-shadow: 0 6px 16px rgba(19, 32, 25, 0.18);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline: auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 11px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
  background: rgba(14, 122, 85, 0.07);
  color: var(--ink);
}

.nav-link.is-active {
  color: var(--emerald-dark);
  background: var(--emerald-soft);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.header-cta {
  flex-shrink: 0;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
}

.mobile-menu {
  display: none;
  padding: 8px 0 16px;
  border-top: 1px solid var(--line);
}

.mobile-menu.is-open {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 11px 4px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(219, 229, 222, 0.7);
}

.mobile-menu a:last-child {
  border-bottom: 0;
}

.mobile-menu .btn {
  margin-top: 12px;
}

/* ------------------------------------------------------------
   Hero
   ------------------------------------------------------------ */

.hero {
  position: relative;
  padding: 72px 0 56px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: 64px;
}

.hero-copy {
  animation: fadeUp 0.6s ease both;
}

.hero h1 {
  max-width: 13ch;
  margin: 18px 0 22px;
  font-size: clamp(2.9rem, 5.6vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.highlight {
  position: relative;
  z-index: 0;
  white-space: nowrap;
}

.highlight::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 0.05em;
  z-index: -1;
  height: 0.18em;
  border-radius: 999px;
  background: #bfe8d0;
  transform: rotate(-1.2deg);
}

.hero-sub {
  max-width: 56ch;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 1.09rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.trust-list li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.trust-list li::before {
  content: "";
  width: 15px;
  height: 15px;
  border-radius: 999px;
  background: var(--emerald-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 8.3 2.4 2.4L12 5.3' fill='none' stroke='%230e7a55' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat;
}

/* Hero example card */

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  animation: fadeUp 0.7s 0.1s ease both;
}

.hero-visual::before {
  content: "";
  position: absolute;
  width: 78%;
  height: 82%;
  border-radius: 42% 58% 55% 45% / 48% 44% 56% 52%;
  background: linear-gradient(145deg, #d8f0e2, #f2e9d8);
  transform: rotate(8deg);
  filter: blur(2px);
}

.example-card {
  position: relative;
  z-index: 1;
  width: min(100%, 412px);
  padding: 24px 26px 20px;
  border: 1px solid rgba(200, 216, 206, 0.9);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-lg);
  transform: rotate(-1.4deg);
}

.example-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.example-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--emerald-soft);
  color: var(--emerald-dark);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.example-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--emerald);
}

.example-platform {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.example-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  color: var(--ink-2);
  font-size: 13.5px;
}

.example-row strong {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.example-row.is-cost {
  color: var(--muted);
}

.example-row.is-cost strong {
  color: var(--coral);
}

.example-divider {
  height: 1px;
  margin: 10px 0;
  background-image: linear-gradient(90deg, var(--line-strong) 45%, transparent 45%);
  background-size: 8px 1px;
}

.example-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.example-total span {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.example-total strong {
  font-family: var(--font-display);
  font-size: 35px;
  font-weight: 600;
  letter-spacing: -0.035em;
  color: var(--emerald);
  font-variant-numeric: tabular-nums;
}

.example-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11.5px;
}

.example-foot span:first-child {
  color: var(--emerald-dark);
  font-weight: 800;
}

.floating-chip {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid rgba(200, 216, 206, 0.9);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
}

.floating-chip strong {
  color: var(--ink);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.chip-fees {
  top: 8px;
  left: -18px;
  transform: rotate(2deg);
}

.chip-margin {
  right: -14px;
  bottom: 18px;
  transform: rotate(-2deg);
}

/* ------------------------------------------------------------
   Logo strip
   ------------------------------------------------------------ */

.logo-strip {
  padding: 10px 0 40px;
}

.logo-strip-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 36px;
  padding: 18px 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.logo-strip-label {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.logo-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.logo-list li {
  color: #46594f;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  opacity: 0.78;
}

/* ------------------------------------------------------------
   Sections
   ------------------------------------------------------------ */

.section {
  padding: 76px 0;
}

.section-tight {
  padding: 52px 0;
}

.section-head {
  max-width: 720px;
  margin-bottom: 34px;
}

.section-head h2 {
  margin: 12px 0 12px;
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.06;
}

.section-head p {
  max-width: 62ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.section-head.is-center {
  margin-inline: auto;
  text-align: center;
}

.section-head.is-center p {
  margin-inline: auto;
}

/* Feature cards */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature-card {
  position: relative;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-sm);
}

.feature-card::after {
  content: "";
  position: absolute;
  inset: auto 24px 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, var(--emerald-soft), transparent);
}

.feature-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 18px;
  border-radius: 10px;
  background: var(--emerald-soft);
  color: var(--emerald-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.feature-card h3 {
  margin-bottom: 9px;
  font-size: 1.22rem;
  line-height: 1.2;
}

.feature-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.6;
}

/* How it works */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.66);
  overflow: hidden;
}

.step {
  padding: 28px;
  border-right: 1px solid var(--line);
}

.step:last-child {
  border-right: 0;
}

.step-no {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--emerald-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.step-no span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--emerald);
  color: #fff;
  font-size: 10.5px;
}

.step h3 {
  margin-bottom: 8px;
  font-size: 1.18rem;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.6;
}

/* ------------------------------------------------------------
   Calculator
   ------------------------------------------------------------ */

.calculator-section {
  padding: 12px 0 76px;
  scroll-margin-top: 92px;
}

.calculator-section .section-head {
  margin-bottom: 26px;
}

.calculator {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.calc-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #fbfdfb);
}

.preset-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--mint-2);
}

.preset-btn {
  min-height: 34px;
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.preset-btn:hover {
  color: var(--ink);
}

.preset-btn.is-active {
  border-color: rgba(200, 216, 206, 0.9);
  background: #fff;
  color: var(--emerald-dark);
  box-shadow: 0 2px 8px rgba(19, 32, 25, 0.07);
}

.market-select {
  display: flex;
  align-items: center;
  gap: 9px;
}

.market-select span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.market-select select {
  min-height: 36px;
  padding: 6px 30px 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
}

.calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  gap: 26px;
  padding: 26px 22px 24px;
}

.calc-form {
  min-width: 0;
}

.form-section {
  min-width: 0;
  margin: 0 0 24px;
  padding: 0;
  border: 0;
}

.form-section:last-child {
  margin-bottom: 0;
}

.form-section legend {
  width: 100%;
  margin-bottom: 12px;
  padding: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.form-section-note {
  margin: -4px 0 14px;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.5;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field.is-full {
  grid-column: 1 / -1;
}

.field-label {
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
}

.input-wrap {
  display: flex;
  align-items: stretch;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-wrap:hover {
  border-color: #b9cdc1;
}

.input-wrap:focus-within {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(14, 122, 85, 0.12);
}

.input-affix {
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.input-affix.is-prefix {
  padding-right: 2px;
}

.input-affix.is-suffix {
  padding-left: 2px;
}

.input-wrap input {
  width: 100%;
  min-width: 0;
  padding: 10px 10px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  outline: none;
}

.input-wrap input::placeholder {
  color: #a6b3ab;
  font-weight: 500;
}

.field-help {
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.45;
}

.advanced {
  margin-top: 14px;
  border-top: 1px dashed var(--line-strong);
}

.advanced summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0 10px;
  color: var(--emerald-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  list-style: none;
}

.advanced summary::-webkit-details-marker {
  display: none;
}

.advanced summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--emerald-soft);
  color: var(--emerald-dark);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.advanced[open] summary::after {
  content: "−";
}

.advanced-grid {
  padding-top: 4px;
}

/* Results */

.results {
  position: sticky;
  top: 92px;
  align-self: start;
  min-width: 0;
  padding: 22px;
  border: 1px solid #cfe8db;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #f2fbf6 0%, #e9f7ef 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.results.is-empty .result-body {
  display: none;
}

.results.is-empty .empty-state {
  display: flex;
}

.result-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.result-eyebrow {
  color: var(--emerald-dark);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.health-badge {
  margin-left: auto;
  padding: 4px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.health-badge.is-strong {
  border-color: #b7e2c9;
  background: #d9f4e4;
  color: #086143;
}

.health-badge.is-ok {
  border-color: #cfe4d7;
  background: #e8f6ee;
  color: #1a6b4b;
}

.health-badge.is-thin {
  border-color: #eed9ac;
  background: #fdf2d8;
  color: #85580a;
}

.health-badge.is-loss {
  border-color: #efc7bf;
  background: #fde7e1;
  color: #9b3527;
}

.health-badge.is-neutral {
  border-color: var(--line);
  background: #fff;
  color: var(--muted);
}

.result-body {
  min-width: 0;
}

.result-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.result-amount {
  color: var(--emerald);
  font-family: var(--font-display);
  font-size: clamp(2.9rem, 4.4vw, 3.65rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.result-amount.is-loss {
  color: var(--coral);
}

.result-period {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.result-sentence {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.profit-bar {
  display: flex;
  width: 100%;
  height: 15px;
  margin-bottom: 12px;
  border: 1px solid rgba(200, 216, 206, 0.75);
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
}

.bar-segment {
  height: 100%;
  min-width: 0;
  box-shadow: inset -2px 0 0 rgba(255, 255, 255, 0.78);
  transition: width 0.25s ease;
}

.bar-segment:last-child {
  box-shadow: none;
}

.bar-fulfillment {
  background: #8aa99a;
}

.bar-fees {
  background: #e0a458;
}

.bar-ads {
  background: #d97b66;
}

.bar-returns {
  background: #b9a7d6;
}

.bar-profit {
  background: var(--emerald);
}

.bar-profit.is-loss {
  background: var(--coral);
}

.bar-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  margin-bottom: 18px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 10.5px;
  line-height: 1.3;
}

.legend-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 999px;
}

.legend-label {
  flex: 1 1 auto;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend-value {
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.stat {
  padding: 10px 12px;
  border: 1px solid rgba(200, 216, 206, 0.8);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.64);
}

.stat-label {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stat-value {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.breakdown {
  margin-bottom: 14px;
  border-top: 1px solid rgba(200, 216, 206, 0.8);
}

.breakdown summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 8px;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}

.breakdown summary::-webkit-details-marker {
  display: none;
}

.breakdown summary::after {
  content: "▾";
  color: var(--muted);
  font-size: 11px;
  transition: transform 0.15s ease;
}

.breakdown[open] summary::after {
  transform: rotate(180deg);
}

.breakdown table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}

.breakdown td {
  padding: 5px 0;
  color: var(--ink-2);
  vertical-align: top;
}

.breakdown td:last-child {
  padding-left: 12px;
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.breakdown tr.is-sub td {
  padding-top: 2px;
  padding-bottom: 2px;
  color: var(--muted-2);
  font-size: 10.5px;
}

.breakdown tr.is-sub td:first-child {
  padding-left: 12px;
}

.breakdown tr.is-total td {
  padding-top: 9px;
  border-top: 1px solid rgba(200, 216, 206, 0.9);
  color: var(--ink);
  font-weight: 800;
}

.breakdown tr.is-total td:last-child {
  color: var(--emerald-dark);
}

.breakdown tr.is-total.is-loss td:last-child {
  color: var(--coral);
}

.breakdown tr[hidden] {
  display: none;
}

.insight {
  margin-bottom: 16px;
  padding: 12px 13px;
  border: 1px solid rgba(200, 216, 206, 0.85);
  border-left: 3px solid var(--emerald);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.insight.is-loss {
  border-left-color: var(--coral);
  background: #fff7f4;
}

.insight-title {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.insight-text {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.result-actions .btn {
  min-height: 32px;
  padding: 6px 11px;
  font-size: 11px;
}

.result-note {
  margin: 0;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.45;
}

.empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  padding: 30px;
  text-align: center;
}

.empty-state svg {
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  color: var(--emerald);
}

.empty-state h3 {
  margin-bottom: 6px;
  font-size: 1.25rem;
}

.empty-state p {
  max-width: 30ch;
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}

.calc-disclaimer {
  max-width: 900px;
  margin: 16px auto 0;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
}

.calc-disclaimer a {
  color: var(--muted);
}

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

.faq {
  max-width: 860px;
  margin: 0 auto;
}

.faq details {
  margin-bottom: 9px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.7);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 19px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--emerald-soft);
  color: var(--emerald-dark);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.faq details[open] summary {
  color: var(--emerald-dark);
}

.faq details[open] summary::after {
  content: "−";
}

.faq-answer {
  padding: 0 19px 18px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

/* ------------------------------------------------------------
   CTA band
   ------------------------------------------------------------ */

.cta-band {
  padding: 20px 0 76px;
}

.cta-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  padding: 48px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(600px 300px at 85% 0%, rgba(14, 122, 85, 0.42), transparent 65%),
    var(--ink);
  color: var(--cream);
  overflow: hidden;
}

.cta-inner::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(223, 243, 231, 0.16);
  border-radius: 999px;
}

.cta-copy {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

.cta-copy .eyebrow {
  color: #a9e5c5;
}

.cta-copy .eyebrow::before {
  background: #a9e5c5;
  box-shadow: 0 0 0 4px rgba(169, 229, 197, 0.12);
}

.cta-copy h2 {
  margin: 12px 0 10px;
  color: var(--cream);
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  line-height: 1.05;
}

.cta-copy p {
  margin: 0;
  color: #b9c9bf;
  font-size: 0.98rem;
}

.cta-actions {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

/* ------------------------------------------------------------
   Article / SEO pages
   ------------------------------------------------------------ */

.page-hero {
  padding: 48px 0 36px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(700px 300px at 88% 0%, rgba(14, 122, 85, 0.1), transparent 65%),
    rgba(255, 255, 255, 0.35);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 18px;
  color: var(--muted-2);
  font-size: 11.5px;
  font-weight: 600;
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--emerald-dark);
}

.breadcrumbs span {
  color: #a5b2aa;
}

.page-hero h1 {
  max-width: 20ch;
  margin: 10px 0 14px;
  font-size: clamp(2.4rem, 4.8vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 68ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.65;
}

.page-hero .last-updated {
  margin-top: 16px;
  color: var(--muted-2);
  font-size: 11px;
}

.article {
  max-width: 868px;
  margin: 0 auto;
  padding: 46px 24px 72px;
}

.article h2 {
  margin: 44px 0 14px;
  font-size: clamp(1.6rem, 2.6vw, 2.15rem);
  line-height: 1.1;
}

.article h3 {
  margin: 28px 0 10px;
  font-size: 1.22rem;
  line-height: 1.2;
}

.article p,
.article li {
  color: #2c3a32;
  font-size: 1rem;
  line-height: 1.7;
}

.article ul,
.article ol {
  margin: 0 0 1.2rem;
  padding-left: 1.35rem;
}

.article li {
  margin-bottom: 7px;
}

.article li::marker {
  color: var(--emerald);
}

.article strong {
  color: var(--ink);
}

.article a {
  color: var(--emerald-dark);
}

.table-wrap {
  margin: 18px 0 24px;
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.fee-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 13px;
}

.fee-table th {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--mint);
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-align: left;
  text-transform: uppercase;
}

.fee-table td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(219, 229, 222, 0.7);
  color: var(--ink-2);
  vertical-align: top;
}

.fee-table tr:last-child td {
  border-bottom: 0;
}

.fee-table td:last-child {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.fee-table tr:nth-child(even) td {
  background: rgba(246, 252, 248, 0.7);
}

.callout {
  margin: 22px 0;
  padding: 18px 20px;
  border: 1px solid #cfe8db;
  border-left: 3px solid var(--emerald);
  border-radius: 11px;
  background: var(--mint-2);
}

.callout p {
  margin: 0;
  font-size: 0.95rem;
}

.callout strong {
  color: var(--emerald-dark);
}

.callout.is-warn {
  border-color: #eed9ac;
  border-left-color: var(--amber);
  background: var(--amber-soft);
}

.callout.is-warn strong {
  color: #85580a;
}

.example-box {
  margin: 22px 0;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.example-box h3 {
  margin-top: 0;
}

.example-box table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.example-box td {
  padding: 6px 0;
  border-bottom: 1px dashed rgba(219, 229, 222, 0.85);
}

.example-box td:last-child {
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.example-box tr:last-child td {
  border-bottom: 0;
}

.example-box tr.is-total td {
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--emerald-dark);
  font-weight: 800;
}

.related-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.related-links a {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.related-links a:hover {
  border-color: var(--emerald);
  transform: translateY(-1px);
}

.related-links span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */

.site-footer {
  padding: 56px 0 24px;
  background: var(--footer);
  color: #b9c9bf;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) repeat(3, minmax(0, 0.7fr));
  gap: 36px;
  padding-bottom: 38px;
}

.footer-brand .brand {
  color: var(--cream);
  margin-bottom: 12px;
}

.footer-brand .brand:hover {
  color: var(--cream);
}

.footer-brand .brand-mark {
  background: rgba(223, 243, 231, 0.12);
  color: var(--emerald-soft);
  box-shadow: none;
}

.footer-brand p {
  max-width: 34ch;
  margin-bottom: 0;
  color: #8fa298;
  font-size: 12.5px;
  line-height: 1.6;
}

.footer-col h3 {
  margin: 0 0 13px;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-col a {
  display: block;
  margin-bottom: 9px;
  color: #9fb1a6;
  font-size: 12.5px;
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--cream);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-top: 22px;
  border-top: 1px solid rgba(185, 201, 191, 0.16);
  color: #7f9388;
  font-size: 10.5px;
  line-height: 1.55;
}

.footer-bottom p {
  max-width: 760px;
  margin: 0;
}

.footer-bottom .footer-copy {
  white-space: nowrap;
}

/* ------------------------------------------------------------
   Toast
   ------------------------------------------------------------ */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 100;
  max-width: min(92vw, 420px);
  padding: 11px 16px;
  border: 1px solid rgba(223, 243, 231, 0.16);
  border-radius: 10px;
  background: var(--ink);
  color: var(--cream);
  box-shadow: var(--shadow-md);
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ------------------------------------------------------------
   404
   ------------------------------------------------------------ */

.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 68vh;
  padding: 60px 0;
  text-align: center;
}

.not-found .eyebrow {
  margin-bottom: 14px;
}

.not-found h1 {
  margin-bottom: 12px;
  font-size: clamp(2.6rem, 6vw, 4.5rem);
}

.not-found p {
  max-width: 42ch;
  margin-bottom: 24px;
  color: var(--muted);
}

/* ------------------------------------------------------------
   Animation
   ------------------------------------------------------------ */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */

@media (max-width: 1080px) {
  .hero-grid {
    gap: 42px;
  }

  .calc-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .results {
    position: static;
  }

  .hero h1 {
    max-width: 14ch;
  }
}

@media (max-width: 920px) {
  .site-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .header-cta {
    display: none;
  }

  .hero {
    padding-top: 52px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero h1 {
    max-width: 15ch;
  }

  .hero-visual {
    max-width: 460px;
    margin: 10px auto 0;
  }

  .floating-chip {
    display: none;
  }

  .feature-grid,
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .step {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .step:last-child {
    border-bottom: 0;
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 36px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 36px, var(--container));
  }

  .hero {
    padding: 42px 0 36px;
  }

  .hero h1 {
    font-size: clamp(2.55rem, 11vw, 3.6rem);
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .field-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .field.is-full {
    grid-column: auto;
  }

  .calc-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .market-select {
    width: 100%;
    justify-content: space-between;
  }

  .market-select select {
    flex: 1;
  }

  .calc-grid {
    padding: 20px 16px;
  }

  .section {
    padding: 56px 0;
  }

  .section-tight {
    padding: 40px 0;
  }

  .logo-strip-inner {
    justify-content: flex-start;
  }

  .logo-list {
    justify-content: flex-start;
  }

  .cta-inner {
    padding: 30px 24px;
  }

  .related-links {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(100% - 28px, var(--container));
  }

  .brand-name {
    font-size: 19px;
  }

  .hero-sub {
    font-size: 1rem;
  }

  .example-card {
    padding: 20px;
  }

  .example-total strong {
    font-size: 30px;
  }

  .preset-group {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preset-btn {
    width: 100%;
  }

  .result-amount {
    font-size: 2.75rem;
  }

  .bar-legend {
    grid-template-columns: minmax(0, 1fr);
  }

  .stat-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cta-inner {
    padding: 26px 20px;
  }
}

/* ------------------------------------------------------------
   Reduced motion
   ------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ------------------------------------------------------------
   Print
   ------------------------------------------------------------ */

@media print {
  @page {
    margin: 16mm;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .site-header,
  .mobile-menu,
  .hero,
  .logo-strip,
  .section,
  .cta-band,
  .site-footer,
  .page-hero,
  .article,
  .calculator-section .section-head,
  .calc-toolbar,
  .calc-form,
  .calc-disclaimer,
  .result-actions,
  .toast,
  .skip-link,
  .page-hero .breadcrumbs,
  .related-links {
    display: none !important;
  }

  .container {
    width: 100%;
    max-width: none;
    padding: 0;
  }

  .calculator-section {
    padding: 0;
  }

  .calculator {
    border: 0;
    box-shadow: none;
  }

  .calc-grid {
    display: block;
    padding: 0;
  }

  .results {
    position: static;
    width: 100%;
    padding: 0;
    border: 0;
    background: #fff;
    box-shadow: none;
  }

  .result-amount {
    color: #000;
  }

  .profit-bar {
    border: 1px solid #999;
  }

  .breakdown,
  .insight,
  .stat {
    break-inside: avoid;
  }

  .breakdown > summary {
    display: none;
  }

  .breakdown:not([open]) > table {
    display: table !important;
  }

  .result-note {
    display: none;
  }

  .print-only {
    display: block !important;
  }
}

.print-only {
  display: none;
}
