:root {
  color-scheme: light;
  --ink: #0b1739;
  --muted: #52617d;
  --muted-strong: #35435f;
  --line: #d9e1ee;
  --line-strong: #bdc9dc;
  --surface: #ffffff;
  --surface-soft: #f6f8fc;
  --surface-blue: #eef4ff;
  --primary: #155eef;
  --primary-dark: #0c46c7;
  --primary-soft: #e8f0ff;
  --success: #13795b;
  --danger: #c92a2a;
  --danger-soft: #fff1f1;
  --shadow-sm: 0 8px 24px rgba(18, 40, 80, 0.08);
  --shadow-lg: 0 24px 70px rgba(18, 40, 80, 0.14);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --page-width: 1480px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 84% 8%, rgba(21, 94, 239, 0.08), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #fbfcff 65%, #f6f8fc 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

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

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(21, 94, 239, 0.25);
  outline-offset: 2px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(217, 225, 238, 0.85);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(calc(100% - 48px), var(--page-width));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(21, 94, 239, 0.24);
}

.brand-mark svg {
  width: 21px;
  height: 21px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  color: var(--muted-strong);
  font-size: 0.94rem;
  font-weight: 650;
}

.site-nav a {
  transition: color 160ms ease;
}

.site-nav a:hover {
  color: var(--primary);
}

.github-button {
  min-height: 40px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #cad5e7;
  border-radius: 11px;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 5px 14px rgba(17, 33, 62, 0.07);
  font-size: 0.88rem;
  font-weight: 760;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.github-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  stroke: none;
}

.github-button:hover {
  border-color: #9eb2d1;
  color: var(--primary);
  box-shadow: 0 8px 20px rgba(17, 33, 62, 0.11);
  transform: translateY(-1px);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 54px 0 72px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto auto 0 0;
  width: 460px;
  height: 160px;
  opacity: 0.46;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 6%, rgba(21, 94, 239, 0.08) 6% 7%, transparent 7% 100%),
    linear-gradient(0deg, transparent 0 18%, rgba(21, 94, 239, 0.08) 18% 19%, transparent 19% 100%);
  mask-image: linear-gradient(to right, #000, transparent);
}

.hero-grid {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 48px), var(--page-width));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(340px, 0.78fr) minmax(720px, 1.22fr);
  gap: clamp(36px, 4vw, 74px);
  align-items: start;
}

.hero-copy {
  position: sticky;
  top: 112px;
  padding-top: 28px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--primary);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 670px;
  margin-bottom: 22px;
  font-size: clamp(3.25rem, 5.4vw, 5.85rem);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.hero-description {
  max-width: 610px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.5vw, 1.34rem);
  line-height: 1.65;
}

.benefit-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin: 0 0 30px;
  padding: 0;
  list-style: none;
  color: var(--muted-strong);
  font-size: 0.9rem;
  font-weight: 700;
}

.benefit-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.benefit-list span {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.74rem;
}

.hero-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
  font-weight: 760;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button svg {
  width: 19px;
  height: 19px;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(180deg, #2472ff 0%, var(--primary) 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(21, 94, 239, 0.26);
}

.button-primary:hover {
  box-shadow: 0 16px 34px rgba(21, 94, 239, 0.32);
}

.button-secondary {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
}

.button-secondary:hover,
.button-quiet:hover {
  border-color: #98a7c0;
  background: #fff;
}

.button-quiet {
  border-color: var(--line);
  background: transparent;
  color: var(--muted-strong);
  box-shadow: none;
}

.feature-strip {
  margin-top: 42px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(217, 225, 238, 0.88);
  border-radius: var(--radius-md);
  background: var(--line);
  box-shadow: var(--shadow-sm);
}

.feature-strip article {
  min-height: 142px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.9);
}

.feature-strip svg {
  width: 28px;
  height: 28px;
  margin-bottom: 14px;
  color: var(--primary);
}

.feature-strip h2 {
  margin-bottom: 5px;
  font-size: 0.9rem;
}

.feature-strip p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.calculator-card {
  scroll-margin-top: 94px;
  overflow: hidden;
  border: 1px solid rgba(199, 210, 226, 0.95);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-lg);
}

.card-heading {
  padding: 26px 28px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.heading-icon {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
}

.heading-icon svg {
  width: 26px;
  height: 26px;
}

.card-heading h2,
.result-heading-row h2 {
  margin-bottom: 4px;
  font-size: 1.2rem;
  letter-spacing: -0.025em;
}

.card-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

#shipment-form {
  padding: 22px 28px 26px;
}

.form-status {
  min-height: 0;
  margin-bottom: 0;
  border-radius: 10px;
  color: var(--muted-strong);
  font-size: 0.84rem;
  font-weight: 700;
}

.form-status:not(:empty) {
  min-height: 42px;
  margin-bottom: 14px;
  padding: 11px 13px;
  display: flex;
  align-items: center;
}

.form-status[data-type="error"] {
  background: var(--danger-soft);
  color: var(--danger);
}

.form-status[data-type="success"] {
  background: #eaf8f3;
  color: var(--success);
}

.shipment-items {
  display: grid;
  gap: 14px;
}

.shipment-row {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 15px;
  background: var(--surface);
  box-shadow: 0 7px 20px rgba(25, 44, 77, 0.045);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.shipment-row:hover {
  border-color: #c4d0e3;
  box-shadow: 0 10px 24px rgba(25, 44, 77, 0.065);
}

.shipment-row-invalid {
  border-color: rgba(201, 42, 42, 0.62);
  box-shadow: 0 0 0 3px rgba(201, 42, 42, 0.08);
}

.row-heading {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.row-heading h3 {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted-strong);
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.icon-text-button,
.icon-button {
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #fff;
  color: var(--muted-strong);
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.icon-text-button {
  min-height: 32px;
  gap: 6px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 0.75rem;
  font-weight: 720;
}

.icon-button {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 9px;
}

.icon-text-button svg,
.icon-button svg {
  width: 15px;
  height: 15px;
}

.icon-text-button:hover {
  border-color: #9eb0c9;
  background: var(--surface-soft);
}

.icon-button-danger {
  color: var(--danger);
}

.icon-button-danger:hover {
  border-color: rgba(201, 42, 42, 0.35);
  background: var(--danger-soft);
}

.field-grid {
  display: grid;
  grid-template-columns: minmax(108px, 1.5fr) minmax(54px, 0.55fr) repeat(3, minmax(56px, 0.65fr)) minmax(92px, 0.85fr) minmax(76px, 0.85fr) minmax(92px, 0.85fr);
  gap: 9px;
  align-items: start;
}

.field {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.field > span:first-child {
  min-height: 30px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  color: var(--muted-strong);
  font-size: 0.68rem;
  font-weight: 740;
  line-height: 1.2;
  white-space: normal;
}

.field small {
  color: #8390a8;
  font-size: 0.64rem;
  font-weight: 650;
}

.field input,
.field select {
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 620;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.field input::placeholder {
  color: #98a4b9;
  font-weight: 500;
}

.field input:hover,
.field select:hover {
  border-color: #9eacc2;
}

.field input:focus,
.field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(21, 94, 239, 0.1);
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"] {
  border-color: var(--danger);
  background: #fffafa;
}

.field-error {
  min-height: 0;
  color: var(--danger);
  font-size: 0.66rem;
  line-height: 1.35;
}

.field-error:not(:empty) {
  min-height: 30px;
}

.row-calculation {
  margin: 11px 0 0;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 620;
}

.add-item-button {
  width: 100%;
  min-height: 44px;
  margin-top: 14px;
  border: 1px dashed #9bb5e8;
  border-radius: 11px;
  cursor: pointer;
  background: #fbfdff;
  color: var(--primary);
  font-weight: 760;
  transition: background 160ms ease, border-color 160ms ease;
}

.add-item-button:hover {
  border-color: var(--primary);
  background: var(--surface-blue);
}

.measurement-note {
  margin-top: 14px;
  padding: 12px 14px;
  display: flex;
  gap: 10px;
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--muted);
}

.measurement-note svg {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  margin-top: 1px;
  color: var(--primary);
}

.measurement-note p {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.55;
}

.form-actions {
  margin-top: 16px;
}

.form-actions .button-primary {
  flex: 1 1 260px;
}

.result-panel {
  border-top: 1px solid var(--line);
  padding: 24px 28px 28px;
  background: linear-gradient(180deg, #f8faff 0%, #f3f7ff 100%);
}

.result-heading-row {
  margin-bottom: 17px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.result-kicker {
  margin-bottom: 4px;
  color: var(--primary);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.result-state {
  border: 1px solid #cbd8ee;
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 720;
  white-space: nowrap;
}

.result-state-stale {
  border-color: #ebc870;
  background: #fff9e9;
  color: #8a6412;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #d3dff1;
  border-radius: 15px;
  background: #fff;
}

.result-card {
  min-width: 0;
  padding: 18px 14px;
  text-align: center;
  background: #fff;
}

.result-card + .result-card {
  border-left: 1px solid #e2e8f2;
}

.result-card-primary {
  background: linear-gradient(180deg, #f5f9ff 0%, #fff 100%);
}

.result-icon {
  width: 36px;
  height: 36px;
  margin: 0 auto 9px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--primary-soft);
  color: var(--primary);
}

.result-icon svg {
  width: 22px;
  height: 22px;
}

.result-card p {
  min-height: 36px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-strong);
  font-size: 0.74rem;
  font-weight: 720;
}

.result-card strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.result-card > span:last-child {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.secondary-results {
  margin-top: 12px;
  padding: 11px 14px;
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  gap: 8px 12px;
  align-items: center;
  border: 1px solid #dce5f3;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.72rem;
}

.secondary-results strong {
  color: var(--ink);
  text-align: right;
}

.row-results {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.row-result {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #dce5f3;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.76);
  animation: result-in 260ms ease both;
  animation-delay: calc(var(--row-order) * 35ms);
}

@keyframes result-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.row-result-heading {
  min-width: 0;
  display: grid;
}

.row-result-heading strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.77rem;
}

.row-result-heading span {
  color: var(--muted);
  font-size: 0.67rem;
}

.row-result-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.row-result-metrics span {
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--surface-blue);
  color: var(--primary-dark);
  font-size: 0.66rem;
  font-weight: 750;
}

.copy-button {
  width: 100%;
  min-height: 46px;
  margin-top: 14px;
  border: 1px solid #9bb7ec;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  background: #fff;
  color: var(--primary);
  font-weight: 780;
  transition: background 160ms ease, border-color 160ms ease;
}

.copy-button svg {
  width: 18px;
  height: 18px;
}

.copy-button:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--surface-blue);
}

.copy-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.copy-status {
  min-height: 18px;
  margin: 7px 0 0;
  color: var(--success);
  text-align: center;
  font-size: 0.7rem;
  font-weight: 720;
}

.clipboard-fallback {
  position: fixed;
  left: -9999px;
  top: 0;
}

.content-section {
  padding: 84px 0;
  border-top: 1px solid var(--line);
  background: #fff;
}

.content-section-muted {
  background: var(--surface-soft);
}

.content-inner {
  width: min(calc(100% - 48px), 1120px);
  margin: 0 auto;
}

.two-column-content,
.formula-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(40px, 7vw, 96px);
  align-items: center;
}

.content-section h2 {
  margin-bottom: 14px;
  font-size: clamp(1.8rem, 3vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.content-section p {
  margin-bottom: 0;
  color: var(--muted);
}

.step-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  list-style: none;
  counter-reset: freight-step;
}

.step-list li {
  position: relative;
  min-height: 76px;
  padding: 16px 16px 16px 62px;
  display: grid;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  counter-increment: freight-step;
}

.step-list li::before {
  content: counter(freight-step);
  position: absolute;
  left: 16px;
  top: 18px;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 820;
}

.step-list strong {
  font-size: 0.92rem;
}

.step-list span {
  color: var(--muted);
  font-size: 0.8rem;
}

.formula-card {
  padding: 22px;
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.formula-card code {
  overflow-x: auto;
  border-radius: 10px;
  padding: 13px 14px;
  background: #0d1731;
  color: #e9f0ff;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  white-space: nowrap;
}

.site-footer {
  padding: 28px 24px;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  text-align: center;
  font-size: 0.78rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 1320px) {
  .hero-grid {
    grid-template-columns: minmax(330px, 0.72fr) minmax(660px, 1.28fr);
    gap: 34px;
  }

  .field-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .field-name {
    grid-column: span 2;
  }

  .field-quantity {
    grid-column: span 1;
  }

  .field:nth-child(3),
  .field:nth-child(4),
  .field:nth-child(5) {
    grid-column: span 1;
  }

  .field:nth-child(6),
  .field:nth-child(7),
  .field:nth-child(8) {
    grid-column: span 2;
  }
}

@media (max-width: 1080px) {
  .hero {
    padding-top: 34px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    max-width: 880px;
  }

  .hero-copy {
    position: static;
    padding-top: 10px;
  }

  h1 {
    max-width: 820px;
  }

  .feature-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .feature-strip article {
    min-height: 132px;
  }
}

@media (max-width: 760px) {
  .header-inner,
  .hero-grid,
  .content-inner {
    width: min(calc(100% - 30px), var(--page-width));
  }

  .header-inner {
    min-height: 64px;
  }

  .site-nav {
    display: none;
  }

  .header-actions {
    gap: 0;
  }

  .github-button {
    min-height: 38px;
    padding: 0 12px;
  }

  .hero {
    padding: 28px 0 50px;
  }

  h1 {
    font-size: clamp(2.7rem, 13vw, 4.2rem);
  }

  .hero-description {
    font-size: 1rem;
  }

  .hero-actions .button {
    width: 100%;
  }

  .feature-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calculator-card {
    border-radius: 18px;
  }

  .card-heading,
  #shipment-form,
  .result-panel {
    padding-left: 17px;
    padding-right: 17px;
  }

  .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field,
  .field-name,
  .field-quantity,
  .field:nth-child(3),
  .field:nth-child(4),
  .field:nth-child(5),
  .field:nth-child(6),
  .field:nth-child(7),
  .field:nth-child(8) {
    grid-column: span 1;
  }

  .field-name {
    grid-column: 1 / -1;
  }

  .row-heading {
    align-items: flex-start;
  }

  .result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-card + .result-card {
    border-left: 0;
  }

  .result-card:nth-child(even) {
    border-left: 1px solid #e2e8f2;
  }

  .result-card:nth-child(n + 3) {
    border-top: 1px solid #e2e8f2;
  }

  .secondary-results {
    grid-template-columns: 1fr auto;
  }

  .row-result {
    align-items: flex-start;
    flex-direction: column;
  }

  .row-result-metrics {
    justify-content: flex-start;
  }

  .two-column-content,
  .formula-layout {
    grid-template-columns: 1fr;
  }

  .content-section {
    padding: 62px 0;
  }
}

@media (max-width: 480px) {
  .feature-strip {
    grid-template-columns: 1fr;
  }

  .feature-strip article {
    min-height: 0;
  }

  .card-heading {
    align-items: center;
  }

  .card-heading p {
    display: none;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .field,
  .field-name,
  .field-quantity,
  .field:nth-child(n) {
    grid-column: 1;
  }

  .icon-text-button {
    width: 32px;
    overflow: hidden;
    padding: 0;
    gap: 0;
    color: transparent;
  }

  .icon-text-button svg {
    color: var(--muted-strong);
  }

  .result-heading-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .result-state {
    white-space: normal;
  }

  .result-card {
    padding: 16px 9px;
  }

  .formula-card {
    padding: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  @page {
    margin: 14mm;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 10pt;
  }

  .site-header,
  .hero-copy,
  .add-item-button,
  .measurement-note,
  .form-actions,
  .row-actions,
  .copy-button,
  .copy-status,
  .content-section,
  .site-footer {
    display: none !important;
  }

  .hero {
    padding: 0;
  }

  .hero-grid {
    width: 100%;
    display: block;
  }

  .calculator-card {
    border: 0;
    box-shadow: none;
  }

  .card-heading,
  #shipment-form,
  .result-panel {
    padding-left: 0;
    padding-right: 0;
  }

  .shipment-row,
  .result-grid,
  .secondary-results,
  .row-result {
    break-inside: avoid;
    box-shadow: none;
  }

  .field input,
  .field select {
    border-color: #888;
  }

  .result-panel {
    background: #fff;
  }
}
