:root {
  color-scheme: light dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --color-bg: #f4f6f8;
  --color-surface: #fcfcfd;
  --color-surface-raised: #fcfcfd;
  --color-surface-subtle: #f6f8fb;
  --color-input-bg: #ffffff;
  --color-inverse-surface: #182230;
  --color-on-accent: #ffffff;
  --color-on-strong-muted: rgba(255, 255, 255, 0.82);
  --color-border: #dde3ea;
  --color-border-strong: #cbd5e1;
  --color-text: #172235;
  --color-text-muted: #64748b;
  --color-text-subtle: #94a3b8;
  --color-accent: #ff650c;
  --color-accent-hover: #e95808;
  --color-accent-soft: rgba(255, 101, 12, 0.10);
  --color-error: #dc2626;
  --color-error-soft: rgba(220, 38, 38, 0.08);
  --color-success: #15803d;
  --color-success-soft: rgba(21, 128, 61, 0.08);
  --color-focus-ring: rgba(255, 101, 12, 0.18);
  --color-shadow: rgba(15, 23, 42, 0.05);
  background: var(--color-bg);
  color: var(--color-text);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #111827;
    --color-surface: #192535;
    --color-surface-raised: #202c3b;
    --color-surface-subtle: #1c2938;
    --color-input-bg: #121c28;
    --color-inverse-surface: #142033;
    --color-on-accent: #ffffff;
    --color-on-strong-muted: rgba(248, 250, 252, 0.78);
    --color-border: #344150;
    --color-border-strong: #4b596a;
    --color-text: #f8fafc;
    --color-text-muted: #a8b3c2;
    --color-text-subtle: #7f8b99;
    --color-accent: #f97316;
    --color-accent-hover: #fb923c;
    --color-accent-soft: rgba(249, 115, 22, 0.14);
    --color-error: #f87171;
    --color-error-soft: rgba(248, 113, 113, 0.10);
    --color-success: #4ade80;
    --color-success-soft: rgba(74, 222, 128, 0.10);
    --color-focus-ring: rgba(249, 115, 22, 0.22);
    --color-shadow: rgba(0, 0, 0, 0.16);
  }
}

* {
  box-sizing: border-box;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  margin: 0;
}

header {
  align-items: center;
  background: var(--color-surface-raised);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  padding: 16px clamp(16px, 5vw, 56px);
}

a {
  color: var(--color-accent);
  font-weight: 700;
  text-decoration: none;
}

a:focus-visible {
  border-radius: 2px;
  box-shadow: 0 0 0 3px var(--color-focus-ring);
  outline: none;
}

.brand {
  color: var(--color-text);
  font-size: 1.25rem;
}

.brand-accent {
  color: var(--color-accent);
}

.site-nav {
  align-items: center;
  display: flex;
  gap: 20px;
}

.site-nav a {
  color: var(--color-text-muted);
  font-size: 0.92rem;
}

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

main {
  margin: 0 auto;
  max-width: 1120px;
  padding: clamp(24px, 6vw, 64px) 16px;
}

.panel,
.calculator-shell {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: 0 8px 30px var(--color-shadow);
  overflow: hidden;
}

@media (prefers-color-scheme: dark) {
  .panel,
  .calculator-shell {
    box-shadow: 0 12px 32px var(--color-shadow);
  }
}

.calculator-header {
  align-items: flex-start;
  background: var(--color-surface-subtle);
  border-bottom: 1px solid var(--color-border);
  display: block;
  padding: clamp(16px, 3vw, 24px) clamp(22px, 5vw, 40px);
}

.calculator-section {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 5vw, 40px);
}

.input-section {
  background: var(--color-surface);
}

.narrow {
  max-width: 560px;
}

h1 {
  color: var(--color-text);
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  letter-spacing: 0;
  line-height: 1.12;
  margin: 0;
}

h2 {
  font-size: 1.15rem;
  letter-spacing: 0;
  margin: 0;
}

.muted {
  color: var(--color-text-muted);
  margin-top: 0;
}

.eyebrow {
  color: var(--color-accent);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.seller-name {
  color: var(--color-text-muted);
  font-size: 0.96rem;
  margin: 6px 0 0;
}

.seller-link {
  align-items: center;
  color: inherit;
  display: inline-flex;
  gap: 4px;
  text-decoration-color: var(--color-border-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.seller-name-value {
  font-weight: 700;
}

.seller-link:hover {
  color: var(--color-accent);
  text-decoration-color: currentColor;
}

.seller-link:focus-visible {
  border-radius: 2px;
  box-shadow: 0 0 0 3px var(--color-focus-ring);
  outline: none;
}

.external-link-icon {
  background: currentColor;
  display: inline-block;
  flex: 0 0 auto;
  height: 14px;
  -webkit-mask: url("/icons/open-in-new.svg") center / contain no-repeat;
  mask: url("/icons/open-in-new.svg") center / contain no-repeat;
  opacity: 0.7;
  width: 14px;
}

.section-heading {
  display: grid;
  gap: 6px;
}

.section-heading p {
  color: var(--color-text-muted);
  line-height: 1.5;
  margin: 0;
}

.section-heading.compact h3 {
  margin: 0;
}

.error {
  background: var(--color-error-soft);
  border: 1px solid var(--color-error);
  border-radius: 8px;
  color: var(--color-error);
  padding: 12px;
}

form {
  display: grid;
  gap: 0;
}

.landing {
  display: grid;
  gap: clamp(56px, 9vw, 112px);
  padding: clamp(20px, 3vw, 36px) 0 clamp(24px, 4vw, 48px);
}

.landing-hero {
  display: grid;
  gap: 18px;
  max-width: 780px;
}

.landing h1 {
  font-size: clamp(2.35rem, 5vw, 4.4rem);
  letter-spacing: -0.035em;
  line-height: 1.04;
}

.landing-title-accent {
  color: var(--color-accent);
}

.landing-lead {
  color: var(--color-text-muted);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.55;
  margin: 0;
}

.landing-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 20px;
  margin-top: 4px;
}

.text-link {
  color: var(--color-text-muted);
  text-decoration: underline;
  text-decoration-color: var(--color-border-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.text-link:hover {
  color: var(--color-accent);
  text-decoration-color: currentColor;
}

.landing-screenshot {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: 0 8px 30px var(--color-shadow);
  margin: 0;
  overflow: hidden;
}

.landing-screenshot img {
  display: block;
  height: auto;
  width: 100%;
}

.landing-section {
  display: grid;
  gap: 24px;
}

.landing-section h2,
.landing-contact h2 {
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  letter-spacing: -0.02em;
  line-height: 1.16;
}

.landing-copy {
  gap: 14px;
  max-width: 780px;
}

.landing-copy p,
.step-card p,
.benefit-item p,
.landing-contact p {
  color: var(--color-text-muted);
  line-height: 1.55;
  margin: 0;
}

.steps-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.step-card,
.benefit-item {
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 20px;
}

.step-number {
  color: var(--color-accent);
  font-size: 0.86rem;
  font-weight: 900;
  margin: 0 0 12px;
}

.step-card h3,
.benefit-item h3 {
  font-size: 1rem;
  margin: 0 0 8px;
}

.benefits-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.landing-contact {
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  display: grid;
  gap: 16px;
  padding: clamp(24px, 5vw, 40px);
}

.landing-contact .button-link {
  justify-self: center;
  justify-content: center;
  margin-top: 4px;
  max-width: 300px;
  text-align: center;
  width: 100%;
}

.button-link {
  align-items: center;
  background: var(--color-accent);
  border-radius: 6px;
  color: var(--color-on-accent);
  display: inline-flex;
  min-height: 44px;
  padding: 12px 18px;
}

.button-link:hover {
  background: var(--color-accent-hover);
}

.form-grid {
  display: grid;
  gap: 12px;
}

.piece-row,
.furniture-row {
  align-items: start;
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  display: grid;
  gap: 14px;
  grid-template-columns: 104px minmax(0, 1fr) auto;
  padding: 16px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.piece-row.has-error,
.furniture-row.has-error {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px var(--color-error-soft);
}

.row-title {
  color: var(--color-text);
  font-size: 0.92rem;
  font-weight: 900;
  padding-top: 31px;
}

.row-fields {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(86px, 0.6fr) repeat(2, minmax(130px, 1fr));
}

.furniture-fields {
  display: flex;
  gap: 12px;
  min-width: 0;
}

.furniture-fields > .field {
  flex: 1 1 0;
  min-width: 0;
}

.furniture-fields > .field-quantity {
  flex: 0 0 84px;
}

.furniture-fields > .field-custom {
  flex-grow: 1.35;
}

.furniture-row {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px) auto;
}

.piece-row {
  grid-template-columns: minmax(0, 1fr);
}

.piece-row .row-title,
.furniture-row .row-title {
  align-items: center;
  color: var(--color-text-muted);
  display: flex;
  font-size: 0.84rem;
  font-weight: 850;
  grid-column: 1 / -1;
  justify-content: space-between;
  padding-top: 0;
}

.piece-row .row-fields,
.furniture-row .furniture-fields {
  grid-column: 1;
}

.furniture-row .edge-field {
  grid-column: 2;
}

.row-controls {
  display: flex;
  gap: 8px;
}

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

.rule-strip.subtle {
  justify-content: flex-end;
}

.rule-strip span {
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 9px;
}

.furniture-grid {
  gap: 14px;
}

.edge-picker {
  border: 1px solid var(--color-border-strong);
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 320px;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  padding: 0;
}

.edge-field {
  max-width: 320px;
  min-width: 260px;
}

.edge-field .field-error {
  min-height: 2.7em;
}

.furniture-row.no-edge-picker {
  grid-template-columns: minmax(0, 1fr) auto;
}

.edge-toggle {
  align-items: center;
  cursor: pointer;
  display: flex;
  justify-content: center;
  min-width: 0;
  position: relative;
}

.edge-toggle + .edge-toggle {
  border-left: 1px solid var(--color-border-strong);
}

.edge-toggle input {
  opacity: 0;
  pointer-events: none;
  position: absolute;
}

.edge-toggle > span {
  background: var(--color-surface-raised);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 8px;
  text-align: center;
  width: 100%;
}

.edge-toggle:hover input:not(:disabled):not(:checked) + span {
  background: var(--color-accent-soft);
  box-shadow: inset 0 0 0 1px var(--color-accent);
  color: var(--color-accent);
}

.edge-toggle:hover input:checked + span {
  background: var(--color-accent-hover);
}

.edge-toggle input:checked + span {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.edge-toggle input:focus-visible + span {
  box-shadow: inset 0 0 0 2px var(--color-accent), 0 0 0 3px var(--color-focus-ring);
}

.edge-toggle input:checked:focus-visible + span {
  box-shadow: inset 0 0 0 2px var(--color-on-accent), 0 0 0 3px var(--color-focus-ring);
}

.edge-icon {
  background: currentColor;
  display: block;
  height: 28px;
  -webkit-mask: var(--edge-icon) center / contain no-repeat;
  mask: var(--edge-icon) center / contain no-repeat;
  padding: 0;
  width: 28px;
}

.edge-icon-left {
  --edge-icon: url("/icons/border-left-variant.svg");
}

.edge-icon-top {
  --edge-icon: url("/icons/border-top-variant.svg");
}

.edge-icon-right {
  --edge-icon: url("/icons/border-right-variant.svg");
}

.edge-icon-bottom {
  --edge-icon: url("/icons/border-bottom-variant.svg");
}

label {
  font-weight: 700;
}

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

.field-label {
  align-items: center;
  color: var(--color-text);
  display: flex;
  font-size: 0.86rem;
  font-weight: 850;
  gap: 6px;
}

.field-label .field-unit {
  color: var(--color-text-muted);
  font-weight: 750;
}

.dimension-icon {
  fill: none;
  flex: 0 0 auto;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
  width: 18px;
}

.dimension-icon-dotted {
  stroke-dasharray: 1 3.5;
}

.field-guidance {
  color: var(--color-text-muted);
  display: none;
  font-size: 0.78rem;
  line-height: 1.35;
  min-height: 1.05rem;
}

.field-error {
  color: var(--color-error);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.35;
  min-height: 1.05rem;
  overflow-wrap: anywhere;
}

input,
select,
textarea {
  background: var(--color-input-bg);
  border: 1px solid var(--color-border-strong);
  color: var(--color-text);
  border-radius: 8px;
  box-sizing: border-box;
  font: inherit;
  min-height: 46px;
  min-width: 0;
  padding: 12px;
  width: 100%;
}

@media (prefers-color-scheme: dark) {
  input,
  select,
  textarea {
    border-color: var(--color-border);
  }
}

select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%23576657' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-repeat: no-repeat;
  padding-right: 40px;
}

@media (prefers-color-scheme: dark) {
  select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%23a8b3c2' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  }
}

input::placeholder,
textarea::placeholder {
  color: var(--color-text-subtle);
  opacity: 1;
}

input:hover:not(:disabled),
select:hover:not(:disabled),
textarea:hover:not(:disabled) {
  border-color: var(--color-border-strong);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
  outline: none;
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  background: var(--color-error-soft);
  border-color: var(--color-error);
}

button {
  background: var(--color-accent);
  border: 0;
  border-radius: 8px;
  color: var(--color-on-accent);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  justify-self: start;
  min-height: 44px;
  padding: 12px 18px;
  transition: background-color 150ms ease, box-shadow 150ms ease;
}

button:hover:not(:disabled) {
  background: var(--color-accent-hover);
}

button:focus-visible,
.button-link:focus-visible {
  box-shadow: 0 0 0 3px var(--color-focus-ring);
  outline: none;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

button[hidden] {
  display: none;
}

.icon-button {
  align-items: center;
  display: inline-flex;
  font-size: 1.25rem;
  height: 42px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 42px;
}

.secondary {
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border-strong);
  color: var(--color-text);
}

.secondary:hover:not(:disabled) {
  background: var(--color-surface-subtle);
  border-color: var(--color-accent);
  color: var(--color-text);
}

.add-row-button {
  background: transparent;
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  margin-top: 2px;
}

.add-row-button:hover:not(:disabled) {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-on-accent);
}

.add-row-button:active:not(:disabled) {
  background: var(--color-accent-hover);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.16);
}

.remove-row-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--color-text-muted);
  display: inline-flex;
  height: 38px;
  justify-content: center;
  min-height: 38px;
  padding: 0;
  width: 38px;
}

.trash-icon {
  background: currentColor;
  display: block;
  height: 19px;
  mask: url("/icons/trash-can-outline.svg") center / contain no-repeat;
  -webkit-mask: url("/icons/trash-can-outline.svg") center / contain no-repeat;
  width: 19px;
}

.remove-row-button:hover:not(:disabled) {
  background: var(--color-error-soft);
  color: var(--color-error);
}

.empty-state {
  background: var(--color-surface-subtle);
  border: 1px dashed var(--color-border-strong);
  border-radius: 10px;
  color: var(--color-text-muted);
  margin: 0;
  padding: 16px;
}

.result-panel {
  display: grid;
  gap: 18px;
  padding: 0 clamp(22px, 5vw, 40px) clamp(22px, 5vw, 40px);
}

.result-hero {
  background: var(--color-inverse-surface);
  border-radius: 14px;
  color: var(--color-on-accent);
  display: grid;
  gap: 8px;
  padding: clamp(20px, 5vw, 34px);
}

.result-hero p {
  color: var(--color-on-strong-muted);
  font-size: 0.86rem;
  font-weight: 850;
  margin: 0;
}

.result-hero h2 {
  color: var(--color-on-accent);
  font-size: clamp(2.2rem, 7vw, 4.4rem);
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0;
}

.result-hero span {
  color: var(--color-on-strong-muted);
  line-height: 1.45;
}

.invalid-result {
  background: var(--color-surface-subtle);
  color: var(--color-text);
}

.invalid-result h2,
.invalid-result p,
.invalid-result span {
  color: inherit;
}

.copy-panel {
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  display: grid;
  gap: 14px;
  padding: 18px;
}

.validation-summary {
  background: var(--color-error-soft);
  border: 1px solid var(--color-error);
  border-radius: 10px;
  color: var(--color-error);
  padding: 14px 16px;
}

.validation-summary ul {
  line-height: 1.55;
  margin: 8px 0 0;
  padding-left: 20px;
}

.calculation-details {
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 16px 18px;
}

.calculation-details summary {
  color: var(--color-accent);
  cursor: pointer;
  font-weight: 800;
}

.calculation-details[open] summary {
  margin-bottom: 12px;
}

.details-grid {
  display: grid;
  gap: 0;
}

.details-section {
  padding: 14px 0;
}

.details-section + .details-section {
  border-top: 1px solid var(--color-border);
}

.details-grid h3 {
  font-size: 0.95rem;
  margin: 0 0 10px;
}

.detail-items,
.details-rules {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.detail-items li {
  border-left: 2px solid var(--color-border-strong);
  padding-left: 12px;
}

.detail-items h4,
.detail-items p {
  margin: 0;
}

.detail-items h4 {
  color: var(--color-text-muted);
  font-size: 0.82rem;
  margin-bottom: 3px;
}

.detail-items p + p {
  color: var(--color-text-muted);
  font-size: 0.88rem;
  margin-top: 2px;
}

.detail-item-calculation {
  font-variant-numeric: tabular-nums;
}

.details-totals {
  display: grid;
  gap: 8px;
  margin: 0;
  max-width: 460px;
}

.details-totals div {
  align-items: baseline;
  border-bottom: 1px solid var(--color-border);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding-bottom: 8px;
}

.details-totals dd {
  font-weight: 800;
}

.details-rules {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.details-empty {
  color: var(--color-text-muted);
  margin: 14px 0;
}

pre {
  background: var(--color-input-bg);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  border-radius: 10px;
  font: 1rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  margin: 0;
  overflow-x: auto;
  padding: 16px;
  white-space: pre-wrap;
}

.actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 0;
}

.copy-feedback {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.copy-feedback.is-success {
  color: var(--color-success);
}

.copy-feedback.is-error {
  color: var(--color-error);
}

.identifier {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 800;
}

.pieces {
  line-height: 1.7;
  margin-top: 0;
  padding-left: 20px;
}

dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

dl div {
  align-items: baseline;
  border-bottom: 1px solid var(--color-border);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding-bottom: 8px;
}

dt {
  color: var(--color-text-muted);
}

dd {
  font-weight: 800;
  margin: 0;
}

.site-footer {
  border-top: 1px solid var(--color-border);
  margin-top: clamp(32px, 5vw, 64px);
}

.footer-inner {
  align-items: flex-start;
  display: flex;
  gap: 20px 36px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1120px;
  padding: 28px 16px;
}

.footer-brand {
  display: grid;
  gap: 5px;
}

.footer-brand strong {
  color: var(--color-text);
}

.footer-brand p,
.footer-business,
.calculator-footer p {
  color: var(--color-text-muted);
  font-size: 0.86rem;
  margin: 0;
}

.footer-nav {
  display: flex;
  gap: 16px;
}

.footer-nav a,
.calculator-footer a {
  color: var(--color-text-muted);
  font-size: 0.86rem;
}

.footer-nav a:hover,
.calculator-footer a:hover {
  color: var(--color-accent);
}

.footer-business {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  justify-content: flex-end;
}

.calculator-footer {
  margin-top: 24px;
}

.calculator-footer .footer-inner {
  align-items: center;
  padding-bottom: 20px;
  padding-top: 20px;
}

@media (max-width: 847px) {
  header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  main {
    padding: 16px 10px 32px;
  }

  .calculator-shell {
    border-radius: 12px;
  }

  .landing {
    gap: 48px;
    padding-top: 8px;
  }

  .steps-grid,
  .benefits-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-business {
    justify-content: flex-start;
  }

  .rule-strip.subtle {
    justify-content: flex-start;
  }

  .piece-row,
  .furniture-row {
    grid-template-columns: 1fr;
  }

  .row-title {
    padding-top: 0;
  }

  .row-fields,
  .furniture-fields,
  .edge-picker {
    grid-column: 1 / -1;
  }

  .furniture-row .furniture-fields,
  .furniture-row .edge-field {
    grid-column: 1;
  }

  .row-fields,
  .furniture-fields {
    grid-template-columns: 1fr;
  }

  .furniture-fields {
    display: grid;
  }

  .edge-field {
    min-width: 0;
  }

  .result-panel {
    padding-left: 16px;
    padding-right: 16px;
  }

  .result-hero h2 {
    font-size: clamp(2rem, 15vw, 3rem);
  }

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

  dl div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

}
