:root {
  --ink: #17202a;
  --muted: #5f6975;
  --line: #d8dde3;
  --paper: #f6f1e8;
  --panel: #ffffff;
  --concrete: #6f7882;
  --orange: #d97706;
  --orange-soft: #fff4e5;
  --blue: #0f5f7a;
  --green: #176b5d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 14px max(18px, calc((100vw - 1160px) / 2));
}

.brand {
  align-items: center;
  display: flex;
  gap: 10px;
  font-weight: 850;
}

.brand span {
  font-size: 1.05rem;
}

.topbar p {
  color: var(--muted);
  margin: 0;
  text-align: right;
}

.topbar strong {
  color: var(--blue);
}

.site-nav {
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px max(18px, calc((100vw - 1160px) / 2));
}

.site-nav a {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 7px 10px;
}

.site-nav a[aria-current="page"],
.site-nav a:hover {
  background: var(--orange-soft);
  border-color: #f4bc75;
  color: #9a4f00;
}

main {
  margin: 0 auto;
  max-width: 1160px;
  padding: 28px 18px 56px;
}

.hero {
  align-items: end;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 16px;
}

.eyebrow,
.keyword-pill {
  color: var(--orange);
  font-size: 0.84rem;
  font-weight: 850;
  margin: 0 0 4px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.15rem, 5vw, 4.8rem);
  letter-spacing: 0;
  line-height: 1.02;
  margin-bottom: 10px;
}

h2 {
  font-size: 1.25rem;
  letter-spacing: 0;
  line-height: 1.25;
}

.hero p {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 0;
  max-width: 760px;
}

.hero-facts {
  align-content: end;
  display: grid;
  gap: 8px;
  min-width: 210px;
}

.hero-facts span {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--orange);
  border-radius: 8px;
  font-weight: 800;
  padding: 9px 12px;
}

.single-tool {
  max-width: 920px;
}

.tool-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgb(23 32 42 / 0.08);
  display: grid;
  gap: 16px;
  padding: 18px;
}

.panel-head h2 {
  margin-bottom: 0;
}

.form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

label {
  color: var(--muted);
  display: grid;
  font-size: 0.88rem;
  font-weight: 700;
  gap: 5px;
}

input,
select,
button {
  border-radius: 8px;
  font: inherit;
  min-height: 44px;
}

input,
select {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 8px 10px;
  width: 100%;
}

input:focus,
select:focus {
  border-color: var(--blue);
  outline: 3px solid rgb(15 95 122 / 0.14);
}

button {
  background: var(--orange);
  border: 1px solid var(--orange);
  color: #fff;
  cursor: pointer;
  font-weight: 850;
  padding: 9px 16px;
  width: fit-content;
}

button:hover {
  background: #b95f04;
}

.result-box {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  min-height: 130px;
  padding: 14px;
}

.result-box div {
  align-items: baseline;
  border-bottom: 1px solid #e7ebef;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-bottom: 7px;
}

.result-box div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.result-box span {
  color: var(--muted);
  font-size: 0.9rem;
}

.result-box strong {
  font-size: 1.05rem;
  text-align: right;
}

.error {
  color: #b42318;
  font-weight: 800;
  margin: 0;
}

.assumptions,
.content-section,
.supply-strip,
.internal-links,
.faq {
  margin-top: 22px;
}

.assumptions {
  background: #fff;
  border-left: 6px solid var(--green);
  border-radius: 8px;
  padding: 16px 18px;
}

.assumptions h2,
.supply-strip h2,
.internal-links h2,
.faq h2 {
  margin-bottom: 10px;
}

.assumptions ul {
  margin: 0;
  padding-left: 20px;
}

.content-sections {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.content-section {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.content-section p {
  color: var(--muted);
  max-width: 880px;
}

.fact-list {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.fact-list li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 3px;
  padding: 12px;
}

.fact-list span {
  color: var(--muted);
}

.supply-strip {
  background: var(--ink);
  border-radius: 8px;
  color: #fff;
  padding: 16px 18px;
}

.supply-strip div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.supply-strip span {
  background: rgb(255 255 255 / 0.1);
  border: 1px solid rgb(255 255 255 / 0.18);
  border-radius: 8px;
  padding: 7px 10px;
}

.internal-links div {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.internal-links a {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 3px;
  padding: 12px;
}

.internal-links span {
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 850;
}

.internal-links strong {
  font-size: 0.95rem;
}

details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 8px;
  padding: 12px;
}

summary {
  cursor: pointer;
  font-weight: 850;
}

details p {
  color: var(--muted);
  margin: 8px 0 0;
}

[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .hero {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .hero-facts {
    min-width: 0;
  }

  .form-grid,
  .fact-list,
  .internal-links div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar p {
    text-align: left;
  }

  .form-grid,
  .fact-list,
  .internal-links div {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }

  .result-box div {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .result-box strong {
    text-align: left;
  }
}
