/* ProfitLens (arcommerce.fyi) - ARCommerce brand chrome */
:root{
  --brand:#FF4A1F;
  --bg:#FAF6F0; --surface:#ffffff; --surface-2:#f3ede2;
  --ink:#1c1917; --muted:#6f6a5e; --faint:#a8a29b;
  --line:rgba(28,25,23,.12); --line-soft:rgba(28,25,23,.06);
  --good:#1e7d46; --bad:#b3362b;
  --card-shadow:0 1px 2px rgba(28,25,23,.04),0 12px 32px -12px rgba(28,25,23,.12);
  --font:-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text","Segoe UI",Inter,Roboto,"Helvetica Neue",Arial,sans-serif;
}
[data-bs-theme="dark"]{
  --bg:#141412; --surface:#1d1d1a; --surface-2:#191918;
  --ink:#f4f1ea; --muted:#a8a29a; --faint:#6e6a63;
  --line:rgba(255,255,255,.12); --line-soft:rgba(255,255,255,.06);
  --good:#4cc07a; --bad:#e0685c;
  --card-shadow:0 1px 2px rgba(0,0,0,.3),0 16px 40px -16px rgba(0,0,0,.5);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{font-family:var(--font);background:var(--bg);color:var(--ink);margin:0;line-height:1.6;-webkit-font-smoothing:antialiased}
a{color:inherit}
.wrap{max-width:62rem;margin:0 auto;padding:0 1.25rem}
:focus-visible{outline:2px solid var(--brand);outline-offset:2px;border-radius:4px}

/* header */
.site-head{border-bottom:1px solid var(--line-soft);background:color-mix(in srgb,var(--surface) 72%,transparent)}
.head-in{display:flex;align-items:center;justify-content:space-between;height:4.25rem}
.brand{display:flex;align-items:center;gap:.6rem;font-weight:700;text-decoration:none;font-size:1.02rem}
.brand img{height:1.9rem;width:auto;display:block;border-radius:8px;box-shadow:0 0 0 1.5px rgba(139,148,163,.6),0 1px 4px rgba(0,0,0,.35)}
.head-nav{display:flex;align-items:center;gap:1.4rem}
.head-nav a{font-size:.92rem;color:var(--muted);text-decoration:none;font-weight:500}
.head-nav a:hover{color:var(--ink)}
.iconbtn{display:inline-flex;align-items:center;justify-content:center;width:2.4rem;height:2.4rem;border-radius:50%;border:1px solid var(--line);background:transparent;color:var(--ink);cursor:pointer}
.iconbtn svg{width:1.05rem;height:1.05rem}
html[data-bs-theme="dark"] .moon-i{display:none}
html[data-bs-theme="light"] .sun-i{display:none}

/* hero */
.hero{padding:3.2rem 0 1.6rem;text-align:center}
.kicker{font-size:.74rem;font-weight:650;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);margin:0 0 1rem}
.kicker .dot{color:var(--brand);margin-right:.5em}
.hero h1{font-size:clamp(1.8rem,4vw,2.1rem);letter-spacing:-.03em;font-weight:760;line-height:1.15;margin:0 auto 1rem;max-width:26ch}
.lede{font-size:1.1rem;color:var(--muted);max-width:42rem;margin:0 auto}
.h-sec{font-size:clamp(1.4rem,2.6vw,1.8rem);letter-spacing:-.025em;font-weight:700;margin:0 0 1.2rem}
.h-sub{font-size:1.05rem;font-weight:700;margin:1.8rem 0 .8rem}
.section{padding:2.6rem 0 0}
.body-copy{color:var(--muted);max-width:46rem}
.fineprint{font-size:.85rem;color:var(--faint);margin-top:1rem}

/* calculator shell */
.card{background:var(--surface);border:1px solid var(--line);border-radius:20px;box-shadow:var(--card-shadow)}
.calc-shell{padding:1.6rem;margin-top:1.4rem}
.calc-top{display:flex;flex-wrap:wrap;gap:1rem;align-items:flex-end;justify-content:space-between;border-bottom:1px solid var(--line-soft);padding-bottom:1.1rem;margin-bottom:1.2rem}
.gate-status{font-size:.9rem;color:var(--muted);margin:0}
.field{display:flex;flex-direction:column;gap:.3rem}
.field label{font-size:.8rem;font-weight:600;color:var(--muted)}
.field input,.field select{padding:.55rem .7rem;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);color:var(--ink);font:inherit;font-size:.95rem;min-width:0}
.field input:focus,.field select:focus{outline:2px solid var(--brand);outline-offset:1px}

/* product cards */
.prod{border:1px solid var(--line);border-radius:16px;padding:1.2rem 1.2rem 1.3rem;margin-bottom:1.2rem;background:var(--surface)}
.prod-head{display:flex;gap:.8rem;align-items:flex-end;justify-content:space-between;margin-bottom:1rem}
.prod-head .field{flex:1}
.prod-name{font-weight:700;font-size:1rem}
.remove-btn{flex:none;background:none;border:1px solid var(--line);color:var(--muted);border-radius:10px;padding:.5rem .8rem;font:inherit;font-size:.85rem;cursor:pointer}
.remove-btn:hover{color:var(--bad);border-color:var(--bad)}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:.8rem}
.prod-out{margin-top:1.1rem;border-top:1px dashed var(--line);padding-top:1rem;display:none}
.prod-out.show{display:block}
.out-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:.7rem;margin-bottom:.9rem}
.out-cell{background:var(--surface-2);border-radius:12px;padding:.7rem .85rem}
.out-cell .k{font-size:.76rem;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}
.out-cell .v{font-size:1.12rem;font-weight:720;letter-spacing:-.01em}
.out-cell .v.pos{color:var(--good)}
.out-cell .v.neg{color:var(--bad)}
.breakdown{font-size:.92rem;color:var(--muted);margin:0}
.breakdown li{margin:.15rem 0}

/* actions + buttons */
.calc-actions{display:flex;gap:.7rem;flex-wrap:wrap;margin-top:.4rem}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;font-weight:650;font-size:.95rem;padding:.72rem 1.35rem;border-radius:10px;border:1px solid var(--line);background:var(--surface);color:var(--ink);cursor:pointer;text-decoration:none}
.btn.primary{background:var(--brand);border-color:var(--brand);color:#fff;box-shadow:0 1px 2px rgba(0,0,0,.12),0 8px 20px -8px rgba(255,74,31,.55)}
.btn.primary:hover{filter:brightness(1.06)}
.btn.ghost:hover{border-color:var(--brand)}
.btn[disabled]{opacity:.5;cursor:not-allowed}

/* results table */
.tbl-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:16px;background:var(--surface);box-shadow:var(--card-shadow)}
.tbl{width:100%;border-collapse:collapse;font-size:.93rem;min-width:760px}
.tbl th,.tbl td{padding:.7rem .9rem;text-align:right;border-bottom:1px solid var(--line-soft);white-space:nowrap}
.tbl th:first-child,.tbl td:first-child{text-align:left;white-space:normal}
.tbl thead th{font-size:.78rem;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);font-weight:650}
.tbl tbody tr:last-child td{border-bottom:0}
.tbl .pos{color:var(--good);font-weight:650}
.tbl .neg{color:var(--bad);font-weight:650}

/* bars */
.bars{display:flex;flex-direction:column;gap:.55rem}
.bar-row{display:grid;grid-template-columns:11rem 1fr 6.5rem;gap:.8rem;align-items:center;font-size:.92rem}
.bar-name{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bar-track{background:var(--surface-2);border-radius:8px;height:1.35rem;position:relative;overflow:hidden}
.bar-fill{height:100%;border-radius:8px;background:var(--brand);min-width:2px}
.bar-fill.neg{background:var(--bad)}
.bar-val{text-align:right;font-weight:650}
@media (max-width:560px){.bar-row{grid-template-columns:7.5rem 1fr 5.5rem}}

/* steps */
.steps{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1rem}
.step{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:1.3rem 1.4rem;box-shadow:var(--card-shadow)}
.step-n{display:inline-flex;align-items:center;justify-content:center;width:1.9rem;height:1.9rem;border-radius:50%;background:rgba(255,74,31,.12);color:var(--brand);font-weight:720;margin-bottom:.6rem}
.step h3{font-size:1.02rem;margin:0 0 .35rem}
.step p{margin:0;color:var(--muted);font-size:.95rem}

/* faq */
.faq{max-width:46rem}
.faq details{border:1px solid var(--line);border-radius:14px;background:var(--surface);margin-bottom:.8rem;padding:0 1.3rem}
.faq summary{cursor:pointer;font-weight:650;padding:1rem 0;list-style:none;display:flex;justify-content:space-between;gap:1rem}
.faq summary::-webkit-details-marker{display:none}
.faq .pm{color:var(--brand);font-weight:400}
.faq details p{color:var(--muted);margin:0 0 1.1rem}

/* footer */
.site-foot{border-top:1px solid var(--line-soft);margin-top:3.5rem;padding:2.2rem 0 2.6rem}
.foot-in p{color:var(--muted);max-width:44rem}
.foot-links a{margin-right:1.1rem;font-size:.92rem;text-decoration:none;color:var(--muted)}
.foot-links a:hover{color:var(--ink)}

/* email gate modal (fleet pattern) */
.pc-modal-backdrop{position:fixed;inset:0;background:rgba(20,18,16,.55);display:flex;align-items:center;justify-content:center;padding:1rem;z-index:200}
.pc-modal-backdrop[hidden]{display:none}
.pc-modal{background:var(--surface);color:var(--ink);border-radius:18px;max-width:26rem;width:100%;padding:1.8rem;position:relative;box-shadow:0 24px 60px -18px rgba(0,0,0,.45)}
.pc-modal h2{font-size:1.3rem;letter-spacing:-.02em;margin:0 0 .6rem}
.pc-modal p{color:var(--muted);font-size:.95rem}
.pc-modal-close{position:absolute;top:.7rem;right:.9rem;background:none;border:0;font-size:1.5rem;line-height:1;color:var(--muted);cursor:pointer}
.pc-modal form{display:flex;flex-direction:column;gap:.6rem;margin-top:1rem}
.pc-modal input[type=email]{padding:.75rem .9rem;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);color:var(--ink);font:inherit}
.pc-modal-msg{font-size:.9rem;min-height:1.2em;margin:.7rem 0 0}
.pc-modal-msg.err{color:var(--bad)}
.pc-modal-msg.ok{color:var(--good)}
.pc-modal-note{font-size:.82rem;color:var(--faint);margin:.6rem 0 0}
