/* FeeWisely design system v1 — clean, professional, user-centered */
:root {
  --bg: #faf9f7;
  --surface: #ffffff;
  --surface-muted: #f1ede6;
  --ink: #1f2937;
  --muted: #6b7280;
  --border: #e7e0d6;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-ink: #0b4f4a;
  --accent: #f59e0b;
  --accent-soft: #fef3c7;
  --success: #15803d;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(15, 118, 110, 0.07);
  --maxw: 1060px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.6; font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 20px; letter-spacing: -0.3px; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 18px;
}
.main-nav { display: flex; gap: 4px; align-items: center; }
.main-nav a {
  text-decoration: none; color: var(--muted); font-size: 14.5px; font-weight: 600;
  padding: 8px 13px; border-radius: 999px;
}
.main-nav a:hover { color: var(--ink); background: var(--surface-muted); }
.main-nav a.active { color: var(--primary-ink); background: #e6f4f2; }
/* dropdown nav */
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-drop { position: relative; }
.drop-btn { background: none; border: none; font: inherit; color: var(--muted); font-size: 14.5px; font-weight: 600; padding: 8px 13px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.drop-btn:hover { color: var(--ink); background: var(--surface-muted); }
.drop-btn.active { color: var(--primary-ink); background: #e6f4f2; }
.drop-btn .caret { font-size: 10px; line-height: 1; }
.drop-menu { display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 235px; background: #fff; border: 1px solid var(--line, #e2e8f0); border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.12); padding: 6px; z-index: 60; }
.drop-menu a { display: block; padding: 9px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.drop-menu a:hover { background: var(--surface-muted); color: var(--ink); }
.nav-burger { display: none; }
@media (min-width: 641px) {
  .nav-drop:hover .drop-menu, .nav-drop:focus-within .drop-menu { display: block; }
}
@media (max-width: 640px) {
  .nav-burger { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; border: 1.5px solid var(--line, #e2e8f0); background: #fff; font-size: 20px; color: var(--ink); cursor: pointer; }
  .main-nav { position: relative; }
  .nav-links { display: none; }
  .main-nav.open .nav-links { display: flex; flex-direction: column; align-items: stretch; gap: 2px; position: absolute; top: calc(100% + 8px); right: 0; background: #fff; border: 1px solid var(--line, #e2e8f0); border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.12); padding: 8px; min-width: 240px; z-index: 60; }
  .nav-links > a, .drop-btn { width: 100%; justify-content: flex-start; text-align: left; }
  .drop-menu { position: static; box-shadow: none; border: none; padding: 2px 0 4px 14px; min-width: 0; }
  .nav-drop.expanded .drop-menu { display: block; }
  .drop-btn .caret { margin-left: auto; }
}

/* hero */
.hero {
  padding: 64px 0 48px; text-align: center;
  background: linear-gradient(180deg, #e8f4f2 0%, #f2faf9 55%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
.hero .kicker {
  display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--primary-ink); background: #e6f4f2; border: 1px solid #cde9e6;
  padding: 5px 14px; border-radius: 999px; margin-bottom: 16px;
}
.hero h1 { font-size: clamp(30px, 5vw, 46px); letter-spacing: -1px; line-height: 1.15; margin-bottom: 14px; }
.hero h1 .hl { color: var(--primary); }
.hero p.lead { color: var(--muted); font-size: 18px; max-width: 640px; margin: 0 auto 26px; }
.btn-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 700; font-size: 15.5px;
  padding: 13px 26px; border-radius: 12px; transition: transform 0.12s, box-shadow 0.12s;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 14px rgba(15, 118, 110, 0.3); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1.5px solid var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary-ink); }
.trust-row { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; margin-top: 30px; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.trust-row span { display: inline-flex; align-items: center; gap: 7px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex: none; }

/* sections */
.section { padding: 44px 0; }
.section h2 { font-size: 26px; letter-spacing: -0.5px; margin-bottom: 8px; text-align: center; }
.section .sub { color: var(--muted); text-align: center; max-width: 620px; margin: 0 auto 28px; }

/* tool cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 820px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .cards { grid-template-columns: 1fr; } }
.pop { position: absolute; top: 16px; right: 16px; font-size: 10.5px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: #fff; background: var(--primary); padding: 3px 10px; border-radius: 999px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
  transition: transform 0.14s, box-shadow 0.14s, border-color 0.14s; display: block; position: relative;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(15, 118, 110, 0.12); border-color: var(--primary); }
.card .icon {
  width: 44px; height: 44px; border-radius: 12px; background: #e6f4f2; color: var(--primary-ink);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.card .icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 17px; margin-bottom: 6px; letter-spacing: -0.2px; }
.card p { font-size: 13.5px; color: var(--muted); }
.card .soon {
  position: absolute; top: 16px; right: 16px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.6px;
  text-transform: uppercase; color: #92400e; background: var(--accent-soft);
  border: 1px solid #fde68a; padding: 3px 9px; border-radius: 999px;
}
.card.disabled { opacity: 0.85; cursor: default; }
.card.disabled:hover { transform: none; box-shadow: var(--shadow); border-color: var(--border); }

/* calculator */
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 26px; }
@media (max-width: 760px) { .calc-grid { grid-template-columns: 1fr; } }
.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px; box-shadow: var(--shadow);
}
.panel h2 { font-size: 17px; margin-bottom: 16px; text-align: left; }
.countries { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.countries button {
  border: 1.5px solid var(--border); background: transparent; color: var(--ink);
  border-radius: 999px; padding: 8px 16px; font-size: 13.5px; font-weight: 700; cursor: pointer;
  font-family: inherit;
}
.countries button.sel { border-color: var(--primary); background: #e6f4f2; color: var(--primary-ink); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--muted); }
.field input {
  width: 100%; padding: 11px 13px; font-size: 16px; border-radius: 10px;
  border: 1.5px solid var(--border); background: var(--bg); color: var(--ink); font-family: inherit;
}
.field input:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: transparent; }
.field select {
  width: 100%; padding: 11px 13px; font-size: 16px; border-radius: 10px;
  border: 1.5px solid var(--border); background: var(--bg); color: var(--ink); font-family: inherit;
}
.field select:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: transparent; }
.toggles { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.toggle { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; font-weight: 600; }
.toggle input { width: 19px; height: 19px; accent-color: var(--primary); cursor: pointer; margin-top: 2px; flex: none; }
.toggle small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 400; }
.results { background: linear-gradient(180deg, #ffffff, #f3faf9); }
.rrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; padding: 7px 0; border-bottom: 1px dashed var(--border); }
.rrow span:last-child { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.rtotal { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0 4px; font-size: 15px; font-weight: 800; }
.rtotal span:last-child { white-space: nowrap; text-align: right; }
.bigbox {
  margin-top: 14px; border-radius: 12px; padding: 16px 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff;
  display: flex; justify-content: space-between; align-items: center;
}
.bigbox .lbl { font-size: 13px; opacity: 0.92; }
.bigbox .sub2 { font-size: 12px; opacity: 0.75; margin-top: 2px; }
.bigbox .val { font-size: 27px; font-weight: 800; font-variant-numeric: tabular-nums; }
.marginbar { height: 9px; border-radius: 99px; background: var(--surface-muted); margin-top: 14px; overflow: hidden; }
.marginbar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #15803d, #4ade80); transition: width 0.25s; }
.marginlbl { font-size: 13px; color: var(--muted); margin-top: 7px; font-weight: 600; }
.fineprint { font-size: 12px; color: var(--muted); margin-top: 16px; }

/* content */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { text-align: left; margin: 30px 0 10px; font-size: 22px; }
.prose p, .prose li { color: #374151; margin-bottom: 12px; }
.prose ul { padding-left: 22px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin: 22px 0 6px; }
.breadcrumb a { color: var(--primary-ink); text-decoration: none; font-weight: 600; }
.page-title { font-size: clamp(26px, 4vw, 36px); letter-spacing: -0.7px; margin-bottom: 10px; }
.page-lead { color: var(--muted); font-size: 17px; max-width: 720px; margin-bottom: 8px; }

/* faq */
.faq { max-width: 760px; margin: 10px auto 0; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; padding: 16px 18px; }
.faq summary { font-weight: 700; cursor: pointer; font-size: 15px; }
.faq details p { margin-top: 8px; color: var(--muted); font-size: 14.5px; }

/* footer */
.site-footer { background: var(--primary-ink); color: #d7e8e6; margin-top: 60px; }
.site-footer .wrap { padding-top: 40px; padding-bottom: 28px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; margin-bottom: 28px; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-grid h4 { color: #fff; font-size: 14px; margin-bottom: 12px; }
.foot-grid a { display: block; color: #bcd9d6; text-decoration: none; font-size: 14px; margin-bottom: 8px; }
.foot-grid a:hover { color: #fff; }
.foot-grid p { font-size: 13.5px; color: #a9c9c6; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,0.14); padding-top: 18px; font-size: 12.5px; color: #9dbfbc; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

.ptype { display: flex; gap: 6px; margin-bottom: 16px; background: var(--surface-muted); padding: 4px; border-radius: 999px; }
.ptype button { flex: 1; border: 0; background: transparent; border-radius: 999px; padding: 9px 6px; font-weight: 700; font-size: 13.5px; cursor: pointer; color: var(--muted); font-family: inherit; }
.ptype button.sel { background: var(--surface); color: var(--primary-ink); box-shadow: 0 1px 4px rgba(0,0,0,0.12); }
.ptype-note { font-size: 12.5px; color: var(--muted); margin: -8px 0 14px; display: none; }

/* premium hero (homepage) */
.hero-fancy {
  position: relative; overflow: hidden; text-align: center; color: #fff;
  padding: 76px 0 68px;
  background-color: #0b4f4a;
  background-image: linear-gradient(150deg, #0e6b63 0%, #0a4a45 60%, #07332f 100%);
}
.hero-fancy::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(circle at 18% 12%, rgba(45, 212, 191, 0.20), transparent 55%),
    radial-gradient(circle at 85% 88%, rgba(245, 158, 11, 0.12), transparent 55%);
}
.hero-fancy .wrap { position: relative; z-index: 1; }
.hero-fancy .kicker {
  display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase;
  color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28);
  padding: 6px 16px; border-radius: 999px; margin-bottom: 18px; backdrop-filter: blur(4px);
}
.hero-fancy h1 { font-size: clamp(32px, 5.4vw, 52px); letter-spacing: -1.5px; line-height: 1.12; margin-bottom: 16px; color: #fff; }
.hero-fancy h1 .hl {
  background: linear-gradient(92deg, #fbbf24, #f59e0b 60%, #fb923c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-fancy .lead { color: rgba(255,255,255,.82); font-size: 18px; max-width: 640px; margin: 0 auto 28px; }
.hero-fancy .btn-primary { background: #f59e0b; color: #1f2937; box-shadow: 0 6px 20px rgba(245, 158, 11, .4); }
.hero-fancy .btn-primary:hover { background: #fbbf24; }
.hero-fancy .btn-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.45); }
.hero-fancy .btn-ghost:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.08); }
.minicalc {
  background: rgba(255,255,255,.98); color: var(--ink); border-radius: 20px;
  max-width: 460px; margin: 36px auto 0; padding: 26px 28px 22px; text-align: left;
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
}
.minicalc .mclabel { font-size: 12px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--primary-ink); margin-bottom: 12px; }
.minicalc .mcrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.minicalc .mcrow label { font-weight: 700; font-size: 15px; }
.mcinput { display: flex; align-items: center; gap: 2px; background: var(--surface-muted); border: 1.5px solid var(--border); border-radius: 10px; padding: 8px 12px; }
.mcinput span { font-weight: 800; color: var(--muted); }
.mcinput input { border: none; background: transparent; font-size: 17px; font-weight: 800; width: 90px; outline: none; color: var(--ink); }
.mcbar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--surface-muted); margin-bottom: 8px; }
.mcbar div { transition: width .25s ease; }
.mckeepbar { background: linear-gradient(90deg, var(--primary), #14b8a6); }
.mctakebar { background: linear-gradient(90deg, #f59e0b, #f97316); }
.mclegend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); font-weight: 600; margin-bottom: 14px; }
.mclegend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }
.mclegend .sw.keep { background: var(--primary); }
.mclegend .sw.take { background: #f59e0b; }
.mcresult { display: flex; gap: 12px; margin-bottom: 14px; }
.mcresult > div { flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.mcresult .amt { font-size: 24px; font-weight: 800; letter-spacing: -.5px; }
.mcresult .keep .amt { color: var(--primary-ink); }
.mcresult .take .amt { color: #b45309; }
.mcresult .cap { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.minicalc .mclink { display: block; text-align: center; font-weight: 700; color: var(--primary-ink); text-decoration: none; font-size: 14.5px; }
.minicalc .mclink:hover { text-decoration: underline; }
.hero-fancy .trust-row { margin-top: 32px; color: rgba(255,255,255,.75); }
.hero-fancy .trust-row .dot { background: #34d399; }
@media (max-width: 560px) {
  .hero-fancy { padding: 56px 0 52px; }
  .minicalc { padding: 20px 18px 18px; }
  .mcresult .amt { font-size: 20px; }
}

/* worked-example fee tables */
.feetable { width:100%; border-collapse:collapse; margin:18px 0 22px; font-size:15px; }
.feetable th, .feetable td { text-align:left; padding:10px 12px; border-bottom:1px solid #e5e7eb; }
.feetable th { color:#0f766e; font-size:13px; text-transform:uppercase; letter-spacing:.4px; }
.feetable tr.total td { font-weight:700; }
.feetable tr.keep td { font-weight:700; color:#0f766e; }
@media (max-width:640px){ .feetable { font-size:13.5px; } .feetable th, .feetable td { padding:8px 8px; } }

/* social icons row */
.social-row { display: flex; gap: 10px; align-items: center; padding: 18px 0 6px; }
.social-row a { display: inline-flex; width: 40px; height: 40px; border-radius: 50%; background: #e6f4f2; color: var(--primary-ink); align-items: center; justify-content: center; transition: background 0.2s, color 0.2s, transform 0.2s; }
.social-row a:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.social-row svg { width: 19px; height: 19px; }

.hero-trust{font-size:14px;color:var(--muted);font-weight:600;margin:8px 0 0;}

/* header mega menu (Etsy dropdown) */
.drop-menu.mega-menu {
  min-width: 640px; max-width: calc(100vw - 40px);
  padding: 16px 18px;
  grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.mega-col { min-width: 0; }
.mega-head {
  display: block; font-size: 11.5px; font-weight: 800; letter-spacing: 0.6px;
  text-transform: uppercase; color: var(--primary-ink);
  padding: 6px 12px 8px; margin-bottom: 4px;
  border-bottom: 1px solid #e6f4f2;
}
.drop-menu.mega-menu a { white-space: normal; }
@media (min-width: 641px) {
  .nav-drop:hover .drop-menu.mega-menu, .nav-drop:focus-within .drop-menu.mega-menu { display: grid; }
}
@media (max-width: 640px) {
  .drop-menu.mega-menu {
    position: static; box-shadow: none; border: none;
    padding: 2px 0 4px 14px; min-width: 0; width: auto;
    grid-template-columns: 1fr; gap: 0;
  }
  .nav-drop.expanded .drop-menu.mega-menu { display: grid; }
  .mega-col { margin-bottom: 10px; }
  .mega-col:last-child { margin-bottom: 0; }
}
