/* Mobile-first. Desktop rules live in the min-width blocks at the end. */
:root {
  --brand: #0f766e; --brand-d: #115e59; --brand-l: #ccfbf1;
  --ink: #0f172a; --muted: #475569; --line: #e2e8f0; --bg: #ffffff; --soft: #f8fafc;
  --warn: #b45309; --radius: 10px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); overflow-wrap: anywhere; }
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--brand-d); }
h1 { font-size: 1.75rem; line-height: 1.2; margin: .6em 0 .4em; }
h2 { font-size: 1.35rem; line-height: 1.25; margin: 1.8em 0 .5em; }
h3 { font-size: 1.1rem; margin: 1.3em 0 .4em; }
code { background: var(--soft); padding: .1em .3em; border-radius: 4px; font-size: .9em; word-break: break-all; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.small { font-size: .875rem; color: var(--muted); }
.lede { font-size: 1.1rem; color: var(--muted); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 10; }

/* header: mobile uses a <details> menu, desktop a plain row */
.top { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 5; }
.top-in { display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
.logo { display: flex; gap: 8px; align-items: center; font-weight: 700; text-decoration: none; color: var(--ink); }
.nav-desktop { display: none; }
.nav-mobile summary { list-style: none; cursor: pointer; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); min-height: 44px; }
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile nav { position: absolute; left: 0; right: 0; top: 56px; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px 16px; max-height: 75vh; overflow-y: auto; }
.nav-mobile nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.nav-mobile .nav-cta { font-weight: 700; }

/* home */
.hero { background: linear-gradient(180deg, var(--brand-l), #fff); padding: 8px 0 4px; }
.how { padding-left: 1.2em; color: var(--muted); }
.cards { display: grid; gap: 14px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: #fff; }
.card h3 { margin-top: 0; }
.card-price { font-weight: 700; color: var(--brand-d); margin: 0 0 4px; }
.guide-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.guide-list li { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.guide-list a { display: block; font-weight: 600; }

/* calculator */
.calc { margin: 16px 0 24px; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
button { font: inherit; min-height: 44px; padding: 8px 14px; border-radius: var(--radius); border: 1px solid var(--brand); background: #fff; color: var(--brand-d); cursor: pointer; }
button:hover { background: var(--brand-l); }
.calc-grid { display: grid; gap: 16px; }
.calc-form, .calc-result { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--soft); min-width: 0; }
.calc-result { background: #fff; }
fieldset { border: 0; padding: 0; margin: 0 0 8px; }
legend { font-weight: 700; margin-bottom: 6px; }
label { display: block; margin: 8px 0; font-weight: 600; font-size: .95rem; }
label.opt, label.check { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-weight: 500; min-height: 44px; margin: 2px 0; }
label.opt .small { flex-basis: 100%; padding-left: 28px; margin-top: -10px; }
input[type=number], select { display: block; width: 100%; font: inherit; font-size: 16px; padding: 10px; margin-top: 4px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; min-height: 44px; }
input[type=radio], input[type=checkbox] { width: 20px; height: 20px; margin: 0; }
.row { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
.store-only, .freelancer-only { display: none; }
.is-store .store-only { display: grid; }
.is-freelancer .freelancer-only { display: flex; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kpis > div { background: var(--soft); border-radius: 8px; padding: 10px; }
.kpis .k-main { background: var(--brand); color: #fff; }
.k-label { display: block; font-size: .8rem; opacity: .85; }
.k-val { display: block; font-size: 1.35rem; font-weight: 700; }
.warn { color: var(--warn); font-weight: 600; }
.compare .best td { background: var(--brand-l); }
.compare .current td:first-child { font-weight: 700; }
.compare em { font-style: normal; font-size: .8rem; color: var(--brand-d); border: 1px solid var(--brand); border-radius: 99px; padding: 0 6px; margin-left: 4px; white-space: nowrap; }
.breakdown .sum td { font-weight: 700; border-top: 2px solid var(--ink); }
.assume input { width: 7em; margin: 0; }
/* mobile-only bar that keeps the total visible while filling in the form */
.calc-bar { position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 6; display: flex; justify-content: space-between; gap: 8px; padding: 12px 16px; border-radius: 12px; background: var(--ink); color: #fff; text-decoration: none; font-weight: 600; box-shadow: 0 6px 20px rgba(0,0,0,.25); transition: transform .2s; }
.calc-bar.off, .calc-bar.away, .calc:not(.ready) .calc-bar { transform: translateY(150%); }
.kind-home .foot, .kind-tool .foot { padding-bottom: 72px; }

/* tables: always inside .table-wrap so they scroll on their own, never the page */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 12px 0; border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--soft); white-space: nowrap; }
.table-wrap table th:first-child, .table-wrap table td:first-child { position: sticky; left: 0; background: #fff; }
.table-wrap table th:first-child { background: var(--soft); }
.content table { min-width: 560px; }
.calc table { min-width: 0; }

/* article */
.crumbs { font-size: .85rem; color: var(--muted); margin-top: 12px; }
.content ol, .content ul { padding-left: 1.3em; }
.content li { margin: .35em 0; }
.callout { background: var(--brand-l); border-radius: var(--radius); padding: 12px 16px; margin: 16px 0; }
.mistakes li strong { color: var(--warn); }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); padding: 0 14px; margin: 8px 0; }
.faq summary { cursor: pointer; font-weight: 600; padding: 12px 0; min-height: 44px; }
.cta-box { border-left: 4px solid var(--brand); background: var(--soft); padding: 12px 16px; margin: 24px 0; }
.related ul { padding-left: 1.2em; }
.disclaimer { margin: 28px 0; padding: 12px 16px; border: 1px dashed #cbd5e1; border-radius: var(--radius); color: var(--muted); font-size: .9rem; }

/* footer */
.foot { border-top: 1px solid var(--line); margin-top: 40px; padding: 24px 0; background: var(--soft); }
.foot-grid { display: grid; gap: 18px; }
.foot nav a { display: block; padding: 6px 0; }
.foot-brand { font-weight: 700; margin: 0; }
.foot-h { font-weight: 700; margin: 0 0 4px; }

@media (min-width: 600px) {
  .row { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .guide-list { grid-template-columns: 1fr 1fr; }
  label.opt .small { flex-basis: auto; padding-left: 0; margin-top: 0; }
}
@media (min-width: 860px) {
  body { font-size: 18px; }
  h1 { font-size: 2.3rem; }
  .nav-mobile { display: none; }
  .nav-desktop { display: flex; gap: 18px; font-size: .95rem; }
  .nav-desktop a { text-decoration: none; }
  .calc-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; }
  .calc-result { position: sticky; top: 72px; }
  .calc-bar { display: none; }
  .kind-home .foot, .kind-tool .foot { padding-bottom: 24px; }
  .cards { grid-template-columns: repeat(4, 1fr); }
  .foot-grid { grid-template-columns: 2fr 1fr 1fr; }
  .kpis { grid-template-columns: repeat(4, 1fr); }
}
