:root {
  --bg: #f7faf9;
  --card: #ffffff;
  --ink: #0b2440;
  --muted: #637083;
  --line: #dfe7ec;
  --soft: #eef4f6;
  --soft-green: #eaf7f6;
  --accent: #069a9a;
  --accent-dark: #047878;
  --danger: #9b3b36;
  --success: #047878;
  --shadow: 0 16px 40px rgba(6, 43, 79, .07);
  --radius: 1rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(6,154,154,.08), transparent 30rem),
    var(--bg);
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: absolute;
  left: .75rem;
  top: .75rem;
  transform: translateY(-150%);
  background: var(--accent);
  color: #fff;
  padding: .55rem .7rem;
  border-radius: .55rem;
  z-index: 50;
}
.skip-link:focus { transform: translateY(0); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .62rem clamp(.9rem, 4vw, 2rem);
  background: rgba(255, 255, 255, .95);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}
.brand { display: inline-flex; align-items: center; min-width: 0; }
.brand-logo {
  display: block;
  width: min(280px, 55vw);
  height: auto;
  max-height: 52px;
  object-fit: contain;
}
nav { display: flex; gap: 1rem; font-size: .9rem; color: var(--muted); }
nav a { padding: .35rem .1rem; }
nav a:hover { color: var(--ink); }

main { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }
.intro { padding: 1.15rem 0 .72rem; max-width: 860px; }
.eyebrow {
  margin: 0 0 .35rem;
  color: var(--accent);
  font-size: .74rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.55rem);
  line-height: 1.03;
  letter-spacing: -.055em;
}
.lede {
  margin: .62rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.45vw, 1.12rem);
  max-width: 740px;
}
.intent-strip {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .75rem;
}
.intent-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 1.9rem;
  padding: .32rem .62rem;
  border: 1px solid var(--line);
  border-radius: 99rem;
  background: rgba(255, 255, 255, .85);
  color: var(--muted);
  font-size: .82rem;
  font-weight: 750;
}

.tool-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
}
.tool-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: .85rem;
}
.tool-head h2 { margin: 0; font-size: 1.22rem; letter-spacing: -.025em; }
.tool-head p { margin: .2rem 0 0; color: var(--muted); font-size: .92rem; }
.tool-actions { display: flex; flex-wrap: wrap; gap: .45rem; }

.quick-settings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .7rem;
  padding: .75rem;
  background: var(--soft-green);
  border: 1px solid #d2e9e8;
  border-radius: .9rem;
  margin-bottom: .85rem;
}
label { display: grid; gap: .28rem; color: var(--muted); font-size: .78rem; font-weight: 760; }
input, select {
  width: 100%;
  min-height: 2.55rem;
  padding: .6rem .7rem;
  border: 1px solid var(--line);
  border-radius: .72rem;
  background: #fff;
  color: var(--ink);
  outline: none;
}
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(6, 154, 154, .13); }
input::placeholder { color: #98a4ae; }

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, .82fr);
  gap: .9rem;
  align-items: start;
}
.supplier-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}
.supplier-card {
  border: 1px solid var(--line);
  border-radius: .9rem;
  padding: .82rem;
  background: #fff;
}
.supplier-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .65rem;
}
.supplier-title strong { font-size: .96rem; }
.remove-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: .2rem .3rem;
  border-radius: .45rem;
}
.remove-btn:hover { color: var(--danger); background: #fff0ee; }
.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}
.fields label:first-child { grid-column: 1 / -1; }

.btn {
  border: 0;
  border-radius: .72rem;
  min-height: 2.55rem;
  padding: .58rem .88rem;
  font-weight: 800;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.primary { background: var(--accent); color: #fff; box-shadow: 0 8px 18px rgba(6, 154, 154, .16); }
.primary:hover { background: var(--accent-dark); }
.secondary { background: var(--soft); color: var(--ink); }
.secondary:hover, .subtle:hover { background: #e7eef2; }
.subtle { background: #f7faf9; color: var(--ink); border: 1px solid var(--line); }
.bottom-actions { display: flex; gap: .55rem; flex-wrap: wrap; margin-top: .8rem; }

.result-panel {
  position: sticky;
  top: 4.4rem;
  display: grid;
  gap: .75rem;
}
.winner-box, .note-box {
  background: #f8fbfb;
  border: 1px solid var(--line);
  border-radius: .95rem;
  padding: .9rem;
}
.label {
  margin: 0 0 .25rem;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.winner-box h3 { margin: 0; font-size: clamp(1.15rem, 2vw, 1.6rem); letter-spacing: -.035em; }
.winner-box p:last-child, .note-box p:last-child { margin: .35rem 0 0; color: var(--muted); }
.result-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: .95rem; background: white; }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
th, td { padding: .62rem .6rem; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
tbody tr:last-child td { border-bottom: 0; }
.rank { color: var(--accent); font-weight: 900; }
.warning { color: var(--danger); font-weight: 850; }
.good { color: var(--success); font-weight: 850; }

.ad-slot {
  min-height: 82px;
  margin: .85rem 0;
  border: 1px dashed #c8d6dc;
  border-radius: .9rem;
  background: #f8fbfb;
  color: #7a8794;
  display: grid;
  place-items: center;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .8rem;
  margin: .85rem 0;
}
.content-grid article, .seo-copy, .faq {
  background: rgba(255, 255, 255, .86);
  border: 1px solid var(--line);
  border-radius: .95rem;
  padding: 1rem;
}
.content-grid h2, .seo-copy h2, .faq h2 { margin: 0 0 .45rem; font-size: 1.06rem; letter-spacing: -.025em; }
.content-grid p, .seo-copy p, .faq p { margin: 0; color: var(--muted); }
.seo-copy { margin: .85rem 0; }
.seo-copy p + p { margin-top: .7rem; }
.answer-block + .answer-block { margin-top: 1rem; }
.answer-block h2 { font-size: clamp(1.12rem, 2vw, 1.38rem); }
.answer-block p { max-width: 880px; }
.cost-table-wrap {
  overflow-x: auto;
  margin-top: .85rem;
  border: 1px solid var(--line);
  border-radius: .8rem;
  background: #fff;
}
.cost-table td:first-child { font-weight: 800; color: var(--ink); }
.example-card {
  background: var(--soft-green);
  border: 1px solid #d2e9e8;
  border-radius: .9rem;
  padding: .9rem;
}
.search-intents { border-top: 1px solid var(--line); padding-top: 1rem; }
.faq { margin: .85rem 0 1.4rem; }
details { padding: .78rem 0; border-top: 1px solid var(--line); }
details:first-of-type { border-top: 0; }
summary { cursor: pointer; font-weight: 800; }
details p { margin-top: .45rem !important; }
footer { border-top: 1px solid var(--line); text-align: center; color: var(--muted); padding: 1.3rem; font-size: .9rem; }
.noscript {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 100;
  background: #fff4e5;
  color: #673b00;
  border: 1px solid #f0c36a;
  border-radius: .8rem;
  padding: .8rem 1rem;
  text-align: center;
}

@media (max-width: 1100px) {
  .content-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .calculator-layout { grid-template-columns: 1fr; }
  .result-panel { position: static; }
}
@media (max-width: 720px) {
  main { width: min(100% - 1rem, 1120px); }
  .site-header { align-items: center; padding: .58rem .75rem; }
  .brand-logo { width: min(240px, 68vw); max-height: 48px; }
  nav { display: none; }
  .intro { padding-top: .9rem; }
  .tool-card { padding: .75rem; border-radius: .95rem; }
  .tool-head { flex-direction: column; }
  .tool-actions, .bottom-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .tool-actions .btn:first-child { grid-column: 1 / -1; }
  .quick-settings, .supplier-grid, .fields, .content-grid { grid-template-columns: 1fr; }
  h1 { font-size: 2.05rem; }
  .lede { font-size: .98rem; }
  .intent-strip span { font-size: .78rem; }
  th, td { padding: .56rem .55rem; }
}
@media print {
  .site-header, .intro, .ad-slot, .tool-actions, .bottom-actions, .content-grid, .seo-copy, .faq, footer, .noscript { display: none !important; }
  body { background: white; }
  main { width: 100%; }
  .tool-card { box-shadow: none; border: 0; }
  .calculator-layout { grid-template-columns: 1fr; }
  .result-panel { position: static; }
}
