:root {
  --ink: #161310;
  --paper: #efe6d2;
  --panel: #fffaf0;
  --muted: #534c41;
  --line: #161310;
  --rust: #b45309;
  --rust-deep: #9a4206;
  --rust-ink: #fffaf0;
  --caution: #f0c14b;
  --err: #8a1515;
  --err-bg: #f8e4e0;
  --ok-bg: #ece4cf;
  --max: 70rem;
  --prose: 42rem;
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --stamp: Bahnschrift, "Segoe UI Semibold", "Franklin Gothic Medium", var(--sans);
  --serif: "Palatino Linotype", Palatino, "Iowan Old Style", Georgia, "Times New Roman", serif;
  --display: var(--serif);
  --shadow: 5px 5px 0 var(--ink);
  --grain:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.055'/%3E%3C/svg%3E");
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--paper);
  background-image:
    radial-gradient(1200px 480px at 10% -10%, #f7f0de 0%, transparent 55%),
    var(--grain);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
}

::selection {
  background: var(--caution);
  color: var(--ink);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--ink);
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--rust);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--caution);
  color: var(--ink);
  padding: 0.4rem 0.7rem;
  font-weight: 700;
  z-index: 20;
}

.skip:focus {
  top: 0.75rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 15;
  border-bottom: 3px solid var(--ink);
  background: var(--paper);
}

.brand-bar {
  height: 0.5rem;
  background: repeating-linear-gradient(
    135deg,
    var(--caution) 0 11px,
    var(--ink) 11px 22px
  );
}

.header-inner,
.footer-inner,
.wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
}

.brand {
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.brand:hover {
  color: var(--ink);
}

.mark {
  width: 2.15rem;
  height: 2.15rem;
  flex: 0 0 auto;
  border: 2px solid var(--ink);
  background:
    linear-gradient(var(--caution) 0 28%, transparent 28%),
    repeating-linear-gradient(135deg, var(--caution) 0 6px, var(--ink) 6px 12px) 0 0 / 100% 28%,
    var(--panel);
  box-shadow: inset 0 -0.55rem 0 var(--rust);
}

.brand-copy {
  display: grid;
  gap: 0.08rem;
}

.brand-name {
  font-family: var(--stamp);
  font-size: 1.08rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
  font-weight: 700;
}

.brand-tag {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.8rem;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.nav-toggle {
  display: none;
  background: var(--ink);
  color: var(--panel);
  border: 3px solid var(--ink);
  font-weight: 700;
  padding: 0.4rem 0.7rem;
}

.site-nav ul {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  font-weight: 700;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  padding-bottom: 0.1rem;
}

.site-nav a[aria-current="page"],
.site-nav a:hover {
  border-bottom-color: var(--rust);
}

.hero,
.page-head {
  padding: 1.8rem 0 1.1rem;
}

.hero-top {
  display: grid;
  gap: 1.5rem;
  align-items: end;
  margin-bottom: 1.25rem;
}

@media (min-width: 860px) {
  .hero-top {
    grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.85fr);
  }
}

.kicker {
  display: inline-block;
  background: var(--caution);
  color: var(--ink);
  font-weight: 800;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.22rem 0.5rem;
  border: 2px solid var(--ink);
  margin-bottom: 0.65rem;
}

h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 0.7rem;
}

h1::after {
  content: "";
  display: block;
  width: 2.35rem;
  height: 3px;
  background: var(--rust);
  margin-top: 0.7rem;
}

h2 {
  font-size: 1.35rem;
  line-height: 1.2;
  margin: 2rem 0 0.6rem;
}

.prose h2 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.015em;
}

h3 {
  font-size: 1.1rem;
  margin: 1.4rem 0 0.4rem;
}

.lead,
.prose p,
.prose li {
  color: var(--ink);
}

.lead {
  font-size: 1.08rem;
  max-width: 40rem;
  margin: 0;
}

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.trust li {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  border: 2px solid var(--ink);
  background: var(--panel);
  padding: 0.2rem 0.45rem;
}

.doors {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.4rem 0 1.8rem;
}

.door,
.card,
.job {
  background: var(--panel);
  border: 3px solid var(--ink);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.door,
.card {
  box-shadow: var(--shadow);
  padding: 1.1rem 1.15rem 1.2rem;
}

.door:hover,
.card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--ink);
  color: inherit;
}

.door strong,
.card strong,
.job strong {
  display: block;
  font-size: 1.12rem;
  margin-bottom: 0.3rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.calc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 1.2rem;
  align-items: start;
  margin-bottom: 2rem;
}

.panel {
  background: var(--panel);
  border: 3px solid var(--ink);
  padding: 1.15rem 1.2rem 1.25rem;
  box-shadow: 3px 3px 0 rgba(22, 19, 16, 0.08);
}

.panel-ticket {
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 10px,
      rgba(22, 19, 16, 0.04) 10px 11px
    ),
    var(--panel);
}

.crumbs {
  font-size: 0.86rem;
  margin: 0 0 0.75rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.9rem;
}

.chip {
  background: var(--caution);
  color: var(--ink);
  border: 2px solid var(--ink);
  font: inherit;
  font-weight: 700;
  font-size: 0.84rem;
  padding: 0.32rem 0.55rem;
  cursor: pointer;
}

.chip:hover {
  background: #f6d36a;
}

.next-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.95rem;
}

.problems {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.2rem 0 2rem;
}

.jobs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin: 1rem 0 1.6rem;
}

.job {
  padding: 0.85rem 0.9rem;
}

.job:hover {
  color: inherit;
  border-color: var(--rust);
}

.job span {
  color: var(--muted);
  font-size: 0.86rem;
}

.panel-title {
  margin: 0 0 0.8rem;
  font-family: var(--stamp);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ticket-mark {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0 0 0.8rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--ink);
}

.field {
  margin-bottom: 0.85rem;
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.28rem;
}

.hint {
  display: block;
  font-weight: 500;
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 0.2rem;
}

.with-unit {
  position: relative;
}

.with-unit input {
  padding-right: 2.6rem;
}

.unit {
  position: absolute;
  right: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--muted);
  pointer-events: none;
}

input[type="number"],
input[type="text"],
select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 3px solid var(--ink);
  padding: 0.58rem 0.65rem;
}

input[type="number"]:focus,
input[type="text"]:focus,
select:focus {
  border-color: var(--rust);
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

button,
.btn {
  appearance: none;
  border: 3px solid var(--ink);
  background: var(--rust);
  color: var(--rust-ink);
  font: inherit;
  font-weight: 800;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

button:hover,
.btn:hover {
  background: var(--rust-deep);
  color: var(--rust-ink);
}

.btn-ghost,
button[type="reset"] {
  background: var(--panel);
  color: var(--ink);
}

.btn-ghost:hover,
button[type="reset"]:hover {
  background: var(--ok-bg);
  color: var(--ink);
}

.out {
  min-height: 14rem;
}

.out-empty {
  color: var(--muted);
  margin: 0.7rem 0 0;
}

.result-num {
  font-family: var(--stamp);
  font-size: clamp(2.6rem, 7vw, 3.8rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  margin: 0.15rem 0 0.7rem;
}

.result-unit {
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0.15rem 0 0;
}

.result-unit-sm {
  font-size: 0.42em;
  letter-spacing: 0;
  font-weight: 700;
}

.result-sec {
  font-size: 1.02rem;
  margin: 0.55rem 0 0.35rem;
}

.path-hint {
  background: var(--ok-bg);
  border: 2px solid var(--ink);
  padding: 0.65rem 0.75rem;
  margin: 0.7rem 0;
  font-weight: 600;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin: 0.2rem 0 0.7rem;
}

.stat {
  border: 2px solid var(--ink);
  background: #fff;
  padding: 0.45rem 0.55rem;
}

.stat-k {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.stat-v {
  display: block;
  font-weight: 800;
  font-size: 1.05rem;
}

.pour-viz {
  display: grid;
  place-items: center;
  min-height: 8.2rem;
  margin: 0 0 1rem;
  padding: 0.9rem 0.6rem 0.7rem;
  background:
    repeating-linear-gradient(90deg, transparent 0 16px, rgba(22, 19, 16, 0.05) 16px 17px),
    repeating-linear-gradient(0deg, transparent 0 16px, rgba(22, 19, 16, 0.05) 16px 17px),
    #fff;
  border: 2px solid var(--ink);
}

.pour-slab {
  width: min(100%, 16rem);
  background: linear-gradient(180deg, #d8d0c0 0 12%, #c4bbb0 12% 100%);
  border: 3px solid var(--ink);
  box-shadow: 6px 8px 0 rgba(22, 19, 16, 0.12);
  position: relative;
  min-height: 4.6rem;
}

.dim {
  position: absolute;
  font-size: 0.72rem;
  font-weight: 800;
  background: var(--caution);
  border: 2px solid var(--ink);
  padding: 0.05rem 0.32rem;
  white-space: nowrap;
}

.dim-l {
  left: 50%;
  top: -0.85rem;
  transform: translateX(-50%);
}

.dim-w {
  right: -0.15rem;
  top: 50%;
  transform: translate(50%, -50%) rotate(90deg);
  transform-origin: center;
}

.dim-t {
  left: 0.4rem;
  bottom: 0.35rem;
}

.bag-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin: 0 0 0.8rem;
}

.bag-dot {
  width: 0.7rem;
  height: 0.9rem;
  background: var(--rust);
  border: 2px solid var(--ink);
}

.bag-more {
  font-size: 0.78rem;
  font-weight: 800;
  align-self: center;
}

.err {
  background: var(--err-bg);
  border: 3px solid var(--err);
  color: var(--err);
  padding: 0.8rem;
  font-weight: 700;
}

.note,
.callout {
  background: var(--ok-bg);
  border: 3px solid var(--ink);
  padding: 0.85rem 1rem;
  margin: 1rem 0;
}

.prose {
  max-width: var(--prose);
}

.prose ul,
.faq-list {
  padding-left: 1.2rem;
}

.faq-list {
  list-style: none;
  padding: 0;
}

.faq-list li {
  border-top: 2px solid var(--ink);
  padding: 0.85rem 0;
}

.faq-list strong {
  display: block;
  margin-bottom: 0.25rem;
}

.more-tools {
  font-size: 0.9rem;
  margin: 0.85rem 0 0;
}

.check-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.check-list li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  border-top: 2px solid var(--ink);
  padding: 0.7rem 0;
}

.check-list li:first-child {
  border-top: 0;
}

.check-list input {
  width: auto;
  margin-top: 0.28rem;
}

.check-list label {
  font-weight: 600;
  margin: 0;
}

.seg {
  border: 2px solid var(--ink);
  margin: 0 0 0.9rem;
  padding: 0.7rem 0.8rem 0.8rem;
}

.seg legend {
  font-weight: 800;
  font-size: 0.86rem;
  padding: 0 0.3rem;
}

.seg-opt {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  margin: 0.25rem 1rem 0 0;
}

.seg-opt input {
  width: auto;
}

.parts {
  list-style: none;
  margin: 0 0 0.85rem;
  padding: 0;
  border: 2px solid var(--ink);
  background: #fff;
}

.parts li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  border-top: 2px solid var(--ink);
  font-size: 0.9rem;
}

.parts li:first-child {
  border-top: 0;
}

.pour-slab.is-round {
  width: 8.4rem;
  aspect-ratio: 1;
  min-height: 0;
  border-radius: 50%;
}

.pour-slab.is-ring {
  background:
    radial-gradient(circle at center, var(--panel) 0 34%, #c4bbb0 36% 100%);
}

.site-footer {
  margin-top: 3rem;
  border-top: 4px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.site-footer a {
  color: var(--caution);
}

.footer-inner {
  padding: 1.4rem 0 1.8rem;
  display: grid;
  gap: 0.7rem;
}

.tiny {
  font-size: 0.86rem;
}

.figure {
  border: 3px solid var(--ink);
  background:
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(20, 18, 16, 0.05) 18px 19px),
    repeating-linear-gradient(0deg, transparent 0 18px, rgba(20, 18, 16, 0.05) 18px 19px),
    #fff;
  min-height: 8rem;
  display: grid;
  place-items: center;
  margin: 1rem 0;
  font-weight: 800;
  letter-spacing: 0.02em;
}

@media (min-width: 801px) {
  .calc-layout .panel:last-child {
    position: sticky;
    top: 5.4rem;
  }
}

@media (max-width: 800px) {
  .doors,
  .grid-2,
  .calc-layout,
  .problems,
  .jobs {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: inline-block;
  }

  .site-nav {
    display: none;
    position: absolute;
    right: 1rem;
    top: 4.2rem;
    background: var(--panel);
    border: 3px solid var(--ink);
    padding: 0.8rem 1rem;
    z-index: 10;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0.7rem;
  }

  .header-inner {
    position: relative;
  }

  .dim-w {
    right: 0.2rem;
    transform: translate(0, -50%) rotate(90deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .door,
  .card,
  .job {
    transition: none;
  }

  .door:hover,
  .card:hover {
    transform: none;
  }
}

@media print {
  .site-header,
  .site-footer,
  .actions,
  .chips,
  .nav-toggle,
  .trust {
    display: none !important;
  }

  body {
    background: #fff;
  }

  main::before {
    content: "Pour Plan  ·  Quantity estimate  ·  Not a mix order";
    display: block;
    font-family: var(--serif);
    font-style: italic;
    font-size: 11pt;
    margin: 0 0 0.9rem;
    padding-bottom: 0.4rem;
    border-bottom: 1pt solid #161310;
  }

  .panel,
  .panel-ticket {
    box-shadow: none;
    break-inside: avoid;
  }

  .parts button {
    display: none;
  }
}
