:root {
  --ivory: #F8F5ED;
  --cream: #EFEAE0;
  --ink: #101010;
  --jet: #090909;
  --orange: #FFB000;
  --orange-soft: #FFD27A;
  --muted: #68645d;
  --border: #E5E0D3;
  --white: #fff;
  --green: #26885a;
  --red: #b94638;
  --shadow: 0 18px 45px rgba(16,16,16,.08);
  --font: "Manrope", "Plus Jakarta Sans", Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
.app-shell { min-height: 100vh; }
.tool-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
  padding: .8rem clamp(1rem, 3vw, 2.5rem);
  border-bottom: 1px solid rgba(16,16,16,.08);
  background: rgba(248,245,237,.92);
  backdrop-filter: blur(14px);
}
.tool-brand { display: flex; align-items: center; gap: .7rem; }
.tool-brand-mark {
  display: grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  border-radius: .85rem;
  background: var(--orange);
  font-size: .64rem;
  font-weight: 900;
  letter-spacing: .03em;
}
.tool-brand strong { display: block; font-size: .86rem; }
.tool-brand small { display: block; color: var(--muted); font-size: .64rem; margin-top: .08rem; }
.tool-header-actions { display: flex; align-items: center; gap: .5rem; }
.tool-user { display: none; color: var(--muted); font-size: .76rem; }
.tool-main { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: 1.25rem 0 4rem; }
.tool-hero {
  display: grid;
  gap: 1rem;
  align-items: end;
  padding: 1.25rem;
  border-radius: 1.4rem;
  background: var(--ink);
  color: var(--ivory);
  overflow: hidden;
  position: relative;
}
.tool-hero::after {
  content: "";
  position: absolute;
  right: -3rem;
  top: -4rem;
  width: 11rem;
  height: 11rem;
  border-radius: 50%;
  background: var(--orange);
  opacity: .9;
}
.tool-hero > * { position: relative; z-index: 1; }
.eyebrow { color: var(--orange); text-transform: uppercase; letter-spacing: .2em; font-size: .63rem; font-weight: 800; }
.tool-hero h1 { margin: .45rem 0 0; font-size: clamp(1.55rem, 4vw, 2.7rem); letter-spacing: -.035em; line-height: 1.03; }
.tool-hero p { max-width: 40rem; margin: .7rem 0 0; color: rgba(248,245,237,.68); font-size: .82rem; line-height: 1.55; }
.demo-pill {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem .8rem;
  border: 1px solid rgba(248,245,237,.18);
  border-radius: 999px;
  font-size: .67rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.demo-pill::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: #4fd38a; }
.app-card {
  margin-top: 1rem;
  border: 1px solid rgba(16,16,16,.07);
  border-radius: 1.4rem;
  background: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-pad { padding: 1.1rem; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.card-head h2, .card-head h3 { margin: 0; font-size: 1rem; }
.card-head p { margin: .3rem 0 0; color: var(--muted); font-size: .73rem; line-height: 1.45; }
.steps {
  display: grid;
  grid-template-columns: repeat(var(--step-count, 3), 1fr);
  border-bottom: 1px solid var(--border);
  background: var(--cream);
}
.step-btn {
  position: relative;
  padding: .9rem .45rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: .67rem;
  font-weight: 800;
  cursor: pointer;
}
.step-btn::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; }
.step-btn.is-active { color: var(--ink); }
.step-btn.is-active::after { background: var(--orange); }
.step-panel { display: none; padding: 1.1rem; }
.step-panel.is-active { display: block; }
.grid { display: grid; gap: .85rem; }
.grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
.field { min-width: 0; }
.field label { display: block; margin-bottom: .35rem; color: #514e48; font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .075em; }
.input, .select {
  width: 100%;
  height: 2.75rem;
  padding: 0 .75rem;
  border: 1px solid var(--border);
  border-radius: .75rem;
  outline: 0;
  background: var(--ivory);
  color: var(--ink);
  font-size: .8rem;
}
.input:focus, .select:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,176,0,.16); }
.input[readonly] { background: var(--cream); color: var(--muted); }
.field-help { margin-top: .35rem; color: var(--muted); font-size: .65rem; line-height: 1.4; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 2.55rem;
  padding: .65rem 1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-size: .74rem;
  font-weight: 800;
}
.btn-dark { background: var(--ink); color: var(--ivory); }
.btn-orange { background: var(--orange); color: var(--ink); }
.btn-outline { background: var(--white); border-color: var(--border); }
.btn-small { min-height: 2rem; padding: .4rem .65rem; font-size: .67rem; }
.btn-danger { color: var(--red); background: rgba(185,70,56,.08); }
.action-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .65rem; margin-top: 1rem; }
.action-row-right { display: flex; flex-wrap: wrap; gap: .5rem; margin-left: auto; }
.notice {
  display: flex;
  gap: .65rem;
  padding: .8rem;
  border-radius: .85rem;
  background: rgba(255,176,0,.11);
  color: #61522b;
  font-size: .7rem;
  line-height: 1.45;
}
.notice strong { color: var(--ink); }
.category-tabs { display: flex; gap: .45rem; overflow-x: auto; padding: 0 0 .7rem; scrollbar-width: thin; }
.category-tab {
  flex: 0 0 auto;
  padding: .55rem .75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  cursor: pointer;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 800;
}
.category-tab.is-active { background: var(--ink); border-color: var(--ink); color: var(--ivory); }
.line-list { display: grid; gap: .7rem; }
.line-card { padding: .85rem; border: 1px solid var(--border); border-radius: 1rem; background: var(--ivory); }
.line-card-head { display: flex; justify-content: space-between; gap: .6rem; align-items: center; margin-bottom: .7rem; }
.line-card-head strong { font-size: .76rem; }
.line-cost { color: var(--green); font-size: .74rem; font-weight: 900; }
.line-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .55rem; }
.line-grid .field-wide { grid-column: 1 / -1; }
.line-grid .input, .line-grid .select { height: 2.45rem; padding-inline: .6rem; font-size: .73rem; }
.line-grid .field label { font-size: .58rem; }
.section-total { margin-top: .7rem; text-align: right; color: var(--muted); font-size: .7rem; }
.section-total strong { color: var(--ink); font-size: .9rem; }
.summary-grid { display: grid; gap: .7rem; }
.summary-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1rem; border-radius: .9rem; background: var(--cream); }
.summary-card span { font-size: .73rem; color: var(--muted); }
.summary-card strong { font-size: .9rem; }
.summary-card.total { background: var(--ink); color: var(--ivory); }
.summary-card.total span { color: rgba(248,245,237,.65); }
.summary-card.total strong { color: var(--orange); font-size: 1.25rem; }
.metric-grid { display: grid; gap: .65rem; grid-template-columns: repeat(2, minmax(0,1fr)); }
.metric { padding: .85rem; border-radius: .9rem; background: var(--cream); }
.metric span { display: block; color: var(--muted); font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }
.metric strong { display: block; margin-top: .3rem; font-size: 1rem; }
.platform-list { display: grid; gap: .7rem; }
.platform-card { border: 1px solid var(--border); border-radius: 1rem; overflow: hidden; }
.platform-card-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .85rem; background: var(--cream); }
.platform-card-head strong { font-size: .78rem; }
.platform-card-head small { display: block; margin-top: .18rem; color: var(--muted); font-size: .62rem; }
.platform-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .6rem; padding: .8rem; }
.platform-fields .input { height: 2.35rem; font-size: .72rem; }
.check-row { display: flex; align-items: center; gap: .6rem; font-size: .75rem; }
.check-row input { accent-color: var(--orange); width: 1rem; height: 1rem; }
.price-results { display: grid; gap: .7rem; }
.price-row { display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; padding: .9rem; border: 1px solid var(--border); border-radius: 1rem; }
.price-row.is-highest { border-color: var(--orange); background: rgba(255,176,0,.1); }
.price-row strong { font-size: .8rem; }
.price-row .price { font-size: 1.05rem; font-weight: 900; }
.price-row small { color: var(--muted); font-size: .63rem; }
.universal-price { margin-top: 1rem; padding: 1.1rem; border-radius: 1rem; background: var(--ink); color: var(--ivory); }
.universal-price span { display: block; color: rgba(248,245,237,.6); font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.universal-price strong { display: block; margin-top: .25rem; color: var(--orange); font-size: 1.55rem; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 1rem;
  background: rgba(16,16,16,.62);
  backdrop-filter: blur(5px);
}
.modal.is-open { display: grid; }
.modal-card { width: min(430px, 100%); padding: 1.25rem; border-radius: 1.2rem; background: var(--ivory); box-shadow: 0 25px 70px rgba(0,0,0,.3); }
.modal-card h2 { margin: 0; font-size: 1.15rem; }
.modal-card p { margin: .7rem 0 1rem; color: var(--muted); font-size: .78rem; line-height: 1.55; }
.demo-footer { margin-top: 1rem; text-align: center; color: var(--muted); font-size: .63rem; }

body.embed .tool-header, body.embed .tool-hero, body.embed .demo-footer { display: none; }
body.embed .tool-main { width: 100%; padding: .55rem; }
body.embed .app-card { margin-top: 0; border-radius: 1rem; box-shadow: none; }
body.embed .step-panel { padding: .75rem; }
body.embed .steps { position: sticky; top: 0; z-index: 8; }
body.embed .card-pad { padding: .8rem; }
body.embed .tool-user { display: none; }

@media (min-width: 700px) {
  .tool-user { display: inline; }
  .tool-main { padding-top: 2rem; }
  .tool-hero { grid-template-columns: 1fr auto; padding: 2rem; }
  .card-pad, .step-panel { padding: 1.5rem; }
  .grid-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .grid-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .grid-4 { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .line-grid { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .line-grid .field-wide { grid-column: span 2; }
  .platform-fields { grid-template-columns: repeat(5,minmax(0,1fr)); }
  .summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metric-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .price-results { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 380px) {
  .tool-main { width: calc(100% - .7rem); }
  .step-btn { padding-inline: .2rem; font-size: .6rem; }
  .line-grid, .platform-fields { grid-template-columns: 1fr; }
}
