/* feecalc.net theme: dark navy, money green for profit, coral for fees.
   Practical and numbers-first; every figure is set in tabular numerals. */
:root {
  --c-bg: #f3f5f8;
  --c-surface: #ffffff;
  --c-surface-2: #eef1f6;
  --c-text: #0f1c2e;
  --c-muted: #55627a;
  --c-border: #d9dfe8;
  --c-border-strong: #a9b4c6;
  --c-primary: #12305e;
  --c-primary-hover: #0b2247;
  --c-on-primary: #ffffff;
  --c-primary-soft: #e6ecf6;
  --c-link: #15418a;
  --c-focus: #2f6fe4;
  --c-success: #0b7a43;
  --c-success-bg: #e3f4ea;
  --c-danger: #b93a25;
  --c-danger-bg: #fbe9e5;
  --c-ink: #0f2444;

  --c-profit: #0b7a43;
  --c-fee: #b93a25;

  --c-header-bg: #0f2444;
  --c-header-text: #ffffff;
  --c-header-border: #0f2444;
  --c-nav-hover: rgb(255 255 255 / 0.12);
  --c-nav-current: #7ee2a8;
  --c-footer-bg: #0f2444;
  --c-footer-text: #e6ecf6;
  --c-footer-muted: #9fb0cc;

  --font-sans: "IBM Plex Sans Variable", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: var(--font-sans);
  --font-num: var(--font-sans);
  --radius: 6px;
  --radius-lg: 10px;
  --h1-weight: 650;
}
body { font-variant-numeric: tabular-nums; }
.k-brand__mark { background: #7ee2a8; color: #0f2444; }
.k-header .k-search-btn { background: rgb(255 255 255 / 0.1); border-color: rgb(255 255 255 / 0.25); color: #d8e1f0; }
.k-header .k-search-btn:hover { border-color: #7ee2a8; color: #ffffff; }
.k-header .k-search-btn kbd { background: transparent; border-color: rgb(255 255 255 / 0.35); color: inherit; }
.k-footer { border-top: 0; }
.k-footer__legal { border-top-color: rgb(255 255 255 / 0.15); }

/* ---------- Calculator ---------- */
.fc-verified { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.6rem; margin: 0 0 1rem; font-size: 0.875rem; color: var(--c-muted); }
.fc-country, .fc-mode { border: 0; margin: 0 0 1rem; padding: 0; min-width: 0; }
.fc-mode { margin-bottom: 0; }
.fc-more { border-top: 1px solid var(--c-border); padding-top: 0.75rem; }
.fc-more summary { cursor: pointer; font-weight: 600; color: var(--c-link); }
.fc-more[open] summary { margin-bottom: 0.9rem; }

.fc-result { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 2px solid var(--c-text); }
/* Wide screens: the tool breaks out of the text column, inputs left, live result right. */
@media (min-width: 60rem) {
  .k-prose > .fc { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: 0 2rem; align-items: start; width: min(64rem, calc(100vw - 2 * var(--gap))); margin-left: 50%; transform: translateX(-50%); }
  .fc > .fc-verified, .fc > .fc-country { grid-column: 1 / -1; }
  .fc > .fc-form { grid-column: 1; grid-row: 3 / span 2; }
  .fc > .fc-result { grid-column: 2; grid-row: 3; margin-top: 0; padding: 1.1rem 1.25rem; border: 0; border-radius: var(--radius); background: var(--c-surface-2); }
  .fc > .k-actions { grid-column: 2; grid-row: 4; }
}
.fc-headline__label { margin: 0; font-size: 0.9rem; font-weight: 600; color: var(--c-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.fc-headline__value { margin: 0; font-size: clamp(2.5rem, 1.8rem + 3.5vw, 3.5rem); font-weight: 700; line-height: 1.05; color: var(--c-profit); letter-spacing: -0.02em; }
.is-loss .fc-headline__value, .fc-profit.is-loss, .fc-bar .is-loss, tr.is-loss td { color: var(--c-fee); }
.fc-stats { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; list-style: none; margin: 0.75rem 0 1rem; padding: 0; }
.fc-stats li { display: flex; flex-direction: column; }
.fc-stats span { font-size: 0.8rem; color: var(--c-muted); }
.fc-stats strong { font-size: 1.15rem; font-weight: 650; }
.fc-fee { color: var(--c-fee); }
.fc-breakdown summary { cursor: pointer; font-weight: 600; padding: 0.4rem 0; }
.fc-breakdown table { margin: 0; }
.fc-breakdown th { font-weight: 500; }
.fc-breakdown th span { display: block; font-size: 0.82rem; font-weight: 400; color: var(--c-muted); }
.fc-breakdown td { text-align: right; white-space: nowrap; vertical-align: top; }
.fc-breakdown .fc-row-total th, .fc-breakdown .fc-row-total td { font-weight: 700; }
.fc-breakdown .fc-row-sub th, .fc-breakdown .fc-row-sub td { font-weight: 650; border-top: 2px solid var(--c-border-strong); }
.fc-breakdown tr:last-child th, .fc-breakdown tr:last-child td { border-bottom: 0; }
.fc-breakdown tr.fc-row-total:last-child td { color: var(--c-profit); font-size: 1.1rem; }
.fc-breakdown tr.fc-row-total.is-loss:last-child td { color: var(--c-fee); }

/* Sticky profit bar: only while the form is on screen and the result is not */
.fc-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: baseline; justify-content: center; gap: 0.6rem; width: 100%; min-height: 3.25rem; padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom)); border: 0; background: var(--c-ink); color: #ffffff; font: inherit; font-variant-numeric: tabular-nums; cursor: pointer; box-shadow: 0 -4px 16px rgb(15 36 68 / 0.25); }
.fc-bar[hidden] { display: none; }
.fc-bar span { font-size: 0.85rem; color: #b9c6dc; }
.fc-bar strong { font-size: 1.35rem; color: #7ee2a8; }
.fc-bar strong.is-loss { color: #ff9c8a; }
@media (min-width: 60rem) { .fc-bar { display: none; } }
@media (max-width: 59.99rem) { .k-kind-tool .k-consent { bottom: 4.25rem; } }

/* ---------- Comparison ---------- */
.fc-compare-table { width: 100%; min-width: 30rem; border-collapse: collapse; }
.fc-compare-table th, .fc-compare-table td { padding: 0.65rem 0.6rem; border-bottom: 1px solid var(--c-border); text-align: right; vertical-align: top; white-space: nowrap; }
.fc-compare-table th:first-child { text-align: left; white-space: normal; }
.fc-compare-table thead th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--c-muted); border-bottom: 2px solid var(--c-border-strong); }
.fc-compare-table tbody th { font-weight: 500; }
.fc-compare-table td span, .fc-compare-table tbody th > span:last-child { display: block; font-size: 0.8rem; font-weight: 400; color: var(--c-muted); }
.fc-compare-table .fc-profit { font-weight: 700; color: var(--c-profit); }
.fc-compare-table tr.is-best { background: var(--c-success-bg); }

/* Marketplace chips: coloured, logo-free */
.fc-chip { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 650; }
.fc-chip::before { content: ""; width: 0.7rem; height: 0.7rem; border-radius: 3px; background: var(--chip, var(--c-primary)); }
.fc-chip a { color: inherit; }
.fc-chip--ebay { --chip: #2b6fd6; }
.fc-chip--etsy { --chip: #d9601a; }
.fc-chip--depop { --chip: #d0342c; }
.fc-chip--mercari { --chip: #5b61d6; }
.fc-chip--poshmark { --chip: #8a2548; }
.fc-chip--paypal { --chip: #1f4fa3; }
.fc-chip--vinted { --chip: #0f8a8f; }
.fc-chip--amazon { --chip: #c77700; }

/* ---------- Home ---------- */
.fc-platforms { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); list-style: none; margin: 0 0 1rem; padding: 0; }
.fc-platform { display: flex; flex-direction: column; gap: 0.3rem; height: 100%; padding: 1rem 1.1rem; background: var(--c-surface); border: 1px solid var(--c-border); border-left: 4px solid var(--chip, var(--c-primary)); border-radius: var(--radius); color: var(--c-text); text-decoration: none; }
.fc-platform:hover { box-shadow: var(--shadow); border-color: var(--c-border-strong); border-left-color: var(--chip, var(--c-primary)); }
.fc-platform strong { font-size: 1.1rem; }
.fc-platform span { font-size: 0.9rem; color: var(--c-muted); }
.fc-platform em { font-style: normal; font-weight: 650; color: var(--c-fee); }
.fc-changelog { list-style: none; margin: 0; padding: 0; }
.fc-changelog li { display: grid; gap: 0.15rem 1rem; grid-template-columns: 8.5rem 1fr; padding: 0.9rem 0; border-bottom: 1px solid var(--c-border); }
.fc-changelog time { font-weight: 650; }
.fc-changelog p { margin: 0; }
@media (max-width: 36rem) { .fc-changelog li { grid-template-columns: 1fr; } }

/* ---------- Comparison guides ---------- */
.fc-structures { margin: 0 0 1rem; }
.fc-structures dt { margin-top: 0.9rem; }
.fc-structures dd { margin: 0.2rem 0 0; }
.fc-grid-table td, .fc-grid-table th { white-space: nowrap; }
.fc-grid-table td.is-best { background: var(--c-success-bg); font-weight: 650; color: var(--c-success); }

/* Notes under a result (for example what the buyer pays on Vinted) */
.fc-notes { margin: 0.75rem 0 0; padding-left: 1.1rem; font-size: 0.92rem; color: var(--c-muted); }

/* Wordmark: the second half of the name carries the brand colour */
.k-header .k-brand__name span, .k-footer .k-brand__name span { color: #7ee2a8; }
/* The mark's tile is the header colour, so a hairline keeps its shape visible */
.k-header .k-brand__logo svg, .k-footer .k-brand__logo svg { border-radius: 22%; box-shadow: 0 0 0 1px rgb(255 255 255 / 0.22); }

/* ---------- Home hero example ---------- */
.fc-hero-card .k-hero-card__value { color: var(--c-profit); }
.fc-hero-card dl { margin: 1rem 0 0; border-top: 2px solid var(--c-text); }
.fc-hero-card dl > div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--c-border); }
.fc-hero-card dt, .fc-hero-card dd { margin: 0; }
.fc-hero-card dd { color: var(--c-fee); font-weight: 600; }
.fc-hero-card__total dt, .fc-hero-card__total dd { font-weight: 700; color: var(--c-text); }
