:root { --ink: #1d232a; --muted: #5b6572; --line: #dde2e8; --bg: #fff; --soft: #f5f7f9; --accent: #0b6e4f; --good: #0b6e4f; --bad: #b42318; }
* { box-sizing: border-box; }
body { margin: 0; font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
.top, main, footer { max-width: 760px; margin: 0 auto; padding: 0 18px; }
.top { padding-top: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 1.2rem 0 .6rem; }
h2 { font-size: 1.35rem; margin: 2.2rem 0 .6rem; }
.lede { font-size: 1.08rem; color: var(--muted); }
a { color: var(--accent); }
.calc fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px 4px; margin: 0 0 14px; }
.calc legend { font-weight: 700; padding: 0 6px; }
.field { display: block; margin-bottom: 12px; }
@media (min-width: 700px) { .calc fieldset { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; } .calc legend { grid-column: 1 / -1; } }
.field .label { display: block; font-weight: 600; }
.field .hint { display: block; font-size: .85rem; color: var(--muted); }
.input { position: relative; display: block; max-width: 280px; }
.input input { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid #b9c1cb; border-radius: 8px; }
.input.usd input { padding-left: 24px; }
.input.pct input { padding-right: 26px; }
.input.usd::before { content: "$"; position: absolute; left: 10px; top: 9px; color: var(--muted); }
.input.pct::after { content: "%"; position: absolute; right: 10px; top: 9px; color: var(--muted); }
.input input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.results { background: var(--soft); border-radius: 10px; padding: 4px 16px 12px; }
.results h2 { margin-top: .8rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.result { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.result .label { display: block; font-size: .85rem; color: var(--muted); }
.result .value { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.verdict { font-weight: 600; padding: 8px 12px; border-radius: 8px; background: var(--bg); border-left: 4px solid var(--line); }
.verdict.good { border-left-color: var(--good); }
.verdict.bad { border-left-color: var(--bad); }
.small { font-size: .85rem; color: var(--muted); }
.formula { font-family: ui-monospace, Consolas, monospace; background: var(--soft); padding: 8px 12px; border-radius: 8px; overflow-x: auto; }
.table { border-collapse: collapse; margin: .6rem 0; }
.table th, .table td { border: 1px solid var(--line); padding: 4px 14px; text-align: right; font-variant-numeric: tabular-nums; }
.checked { color: var(--muted); font-size: .9rem; }
footer { margin-top: 3rem; padding-top: 12px; padding-bottom: 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.input select { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid #b9c1cb; border-radius: 8px; background: #fff; }
.dims { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; grid-column: 1 / -1; }
.dims .field { margin-bottom: 8px; }
.check { display: block; grid-column: 1 / -1; margin: 4px 0 12px; }
.check input { width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; }
button.link { font: inherit; color: var(--accent); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
.scroll { overflow-x: auto; }
.table.text td, .table.text th, .table.fees th, .table.breakdown th { text-align: left; }
.table.fees td { min-width: 5.5em; }
.table.fees td:nth-child(2) { white-space: nowrap; }
.table.breakdown { width: 100%; background: var(--bg); }
.table.breakdown td { font-weight: 600; }
.table.breakdown tr[data-out="fulfillment"], .table.breakdown tr[data-out="amazonFees"], .table.breakdown tr[data-out="profitBeforeAds"] { border-top: 2px solid var(--ink); }
details summary { cursor: pointer; }
details summary h2 { display: inline; }
.table.store th[scope="row"] { text-align: left; }
@media (max-width: 500px) { .table th, .table td { padding: 4px 8px; } }
