  :root {
    --bg:      #ffffff;
    --wash:    #f4f4f3;
    --wash-2:  #e8e8e5;
    --ink:     #111111;   /* 18.9:1  AAA */
    --ink-2:   #3d3d3d;   /* 10.9:1  AAA */
    --ink-3:   #575757;   /*  7.2:1  AAA */
    --muted:   #767676;   /*  4.5:1  AA  */
    --line:    #d6d6d2;
    --line-2:  #8e8e8a;   /*  3.3:1  non-text AA */
    --kraft:   #a87c4f;   /*  3.7:1  non-text AA; the color of cardboard */
    --kraft-tint: #f3eadf;

    --max: 74rem;
    --rail: 22rem;
    --toolbar-h: 7rem;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }
  [hidden] { display: none !important; }

  html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
  }

  body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--ink);
    font-size: 15px;
    line-height: 1.55;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.005em;
  }

  button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
  button { cursor: pointer; }

  .wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 2rem;
  }

  .num { font-variant-numeric: tabular-nums; }

  .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;
  }

  .print-only { display: none; }

  .link-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.875rem;
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--line-2);
    text-underline-offset: 3px;
  }

  .link-btn:hover { text-decoration-color: var(--ink); }
  .link-btn:disabled { color: var(--muted); text-decoration: none; cursor: default; }

  /* ───── Masthead ───── */
  .masthead { padding: 3rem 0 2.25rem; }

  .masthead h1 {
    font-size: clamp(2rem, 4.4vw, 2.8rem);
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 1.08;
  }

  .tagline {
    margin-top: 0.9rem;
    max-width: 36rem;
    font-size: 1rem;
    color: var(--ink-2);
  }

  .presets {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.75rem;
  }

  .presets-label {
    margin-right: 0.35rem;
    font-size: 0.85rem;
    color: var(--ink-3);
  }

  .preset {
    padding: 0.6rem 1.05rem;
    border: none;
    border-radius: 8px;
    background: var(--wash);
    font-size: 0.875rem;
    color: var(--ink);
    transition: background 0.15s ease;
  }

  .preset:hover { background: var(--wash-2); }

  /* ───── Calculator layout ───── */
  .calc {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--rail);
    gap: 3.5rem;
    align-items: start;
    padding-bottom: 4.5rem;
  }

  /* Search and room shortcuts */
  .toolbar {
    position: sticky;
    top: 0;
    z-index: 15;
    padding: 0.9rem 0 0.85rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }

  /* Extends the toolbar's backdrop over the edges of highlighted rows */
  .toolbar::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -0.75rem;
    right: -0.75rem;
    z-index: -1;
    background: var(--bg);
  }

  .search { position: relative; }

  .search svg {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    fill: none;
    stroke: var(--ink-3);
    stroke-width: 1.8;
    stroke-linecap: round;
    pointer-events: none;
  }

  .search input {
    width: 100%;
    height: 2.9rem;
    padding: 0 2.9rem 0 2.6rem;
    border: 1px solid var(--line-2);
    border-radius: 10px;
    background: var(--bg);
    font-size: 1rem;
  }

  .search input::-webkit-search-cancel-button { -webkit-appearance: none; }

  .search-clear {
    position: absolute;
    right: 0.45rem;
    top: 50%;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 50%;
    background: var(--wash);
    color: var(--ink-2);
    font-size: 1.15rem;
    line-height: 1;
    transform: translateY(-50%);
  }

  .search-clear:hover { background: var(--wash-2); color: var(--ink); }

  .search input::placeholder { color: var(--muted); }

  .rooms {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.75rem;
  }

  .room-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.38rem 0.8rem;
    border-radius: 999px;
    background: var(--wash);
    color: var(--ink-2);
    font-size: 0.8rem;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
  }

  .room-chip:hover { background: var(--wash-2); color: var(--ink); }
  .room-chip.current { background: var(--wash-2); color: var(--ink); font-weight: 500; }

  .chip-count {
    display: inline-grid;
    place-items: center;
    min-width: 1.2rem;
    height: 1.2rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: var(--ink);
    color: var(--bg);
    font-size: 0.68rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
  }

  /* Rooms and items */
  .section {
    margin-top: 2.25rem;
    scroll-margin-top: calc(var(--toolbar-h) + 0.75rem);
  }

  .section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--line-2);
  }

  .section-head h3 {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: -0.015em;
  }

  .section-sum {
    font-size: 0.8rem;
    color: var(--ink-3);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  .grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr));
    column-gap: 2.5rem;
  }

  .item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 3.6rem;
    margin: 0 -0.6rem;
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid var(--line);
    transition: background 0.15s ease;
  }

  .item.on { background: var(--wash); }
  .item.flash { animation: flash 1.6s ease-out; }

  @keyframes flash { from { background: var(--kraft-tint); } }

  .item-text { flex: 1; min-width: 0; }

  .item-name {
    display: block;
    font-size: 0.925rem;
    line-height: 1.3;
  }

  .item.on .item-name { font-weight: 500; }

  .item-meta {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.78rem;
    color: var(--ink-3);
  }

  .item.on .item-meta { color: var(--ink-2); }
  .remove-btn { margin-top: 0.2rem; font-size: 0.78rem; }

  /* Quantity stepper */
  .qty {
    display: inline-flex;
    align-items: center;
    gap: 0.1rem;
    flex-shrink: 0;
  }

  .qty-btn {
    display: grid;
    place-items: center;
    width: 2.1rem;
    height: 2.1rem;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--bg);
    color: var(--ink-2);
    font-size: 1.05rem;
    line-height: 1;
    transition: border-color 0.15s ease, color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .qty-btn:hover { border-color: var(--line-2); color: var(--ink); }
  .qty-btn.off { opacity: 0.4; }
  .qty-btn.off:hover { border-color: var(--line); color: var(--ink-2); }

  .qty-input {
    width: 2.4rem;
    border: none;
    background: none;
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
    text-align: center;
    color: var(--ink-3);
    -moz-appearance: textfield;
  }

  input[type="number"]::-webkit-outer-spin-button,
  input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
  input[type="number"] { -moz-appearance: textfield; }

  .qty-input:focus { outline: none; }

  .qty-input:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 1px;
    border-radius: 4px;
  }

  .item.on .qty-input { color: var(--ink); font-weight: 500; }

  @media (pointer: coarse) {
    .qty-btn { width: 2.6rem; height: 2.6rem; }
  }

  .no-results { padding: 2.5rem 0 1rem; }
  .no-results p { margin-bottom: 0.5rem; color: var(--ink-2); }

  /* Your own items */
  .custom {
    margin-top: 3rem;
    padding: 1.5rem 1.5rem 1.35rem;
    border-radius: 14px;
    background: var(--wash);
  }

  .custom h3 {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: -0.015em;
  }

  .custom-help {
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: var(--ink-2);
  }

  .custom-form {
    display: grid;
    grid-template-columns: minmax(8rem, 1.1fr) minmax(15rem, 2fr) 4.5rem auto;
    gap: 0.75rem;
    align-items: end;
    margin-top: 1rem;
  }

  .field { min-width: 0; margin: 0; padding: 0; border: none; }

  .field label,
  .field legend {
    display: block;
    margin-bottom: 0.3rem;
    padding: 0;
    font-size: 0.78rem;
    color: var(--ink-3);
  }

  .field input,
  .field select {
    width: 100%;
    height: 2.6rem;
    padding: 0 0.6rem;
    border: 1px solid var(--line-2);
    border-radius: 8px;
    background: var(--bg);
    font-size: 0.95rem;
  }

  .dims { display: flex; align-items: center; gap: 0.35rem; }
  .dims input { flex: 1 1 0; min-width: 0; padding: 0 0.3rem; text-align: center; }
  .dims span { font-size: 0.85rem; color: var(--ink-3); }
  .dims select { flex: 0 0 auto; width: auto; padding: 0 0.4rem; }

  .btn {
    height: 2.6rem;
    padding: 0 1.1rem;
    border: none;
    border-radius: 8px;
    background: var(--ink);
    color: var(--bg);
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
  }

  .btn:hover { background: #2b2b2b; }

  .form-error {
    grid-column: 1 / -1;
    font-size: 0.8rem;
    color: #8f1d1d;
  }

  .form-error:empty { display: none; }

  /* ───── Result panel ───── */
  .rail {
    position: sticky;
    top: 1.25rem;
    max-height: calc(100vh - 2.5rem);
    overflow-y: auto;
    padding: 1.4rem 1.4rem 1.25rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--bg);
    scrollbar-width: thin;
  }

  .rail-label {
    display: block;
    font-size: 0.78rem;
    color: var(--ink-3);
  }

  .unit-name {
    margin-top: 0.35rem;
    font-size: 3.1rem;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.045em;
    font-variant-numeric: tabular-nums;
  }

  .unit-name.combo {
    font-size: 1.9rem;
    line-height: 1.15;
    letter-spacing: -0.03em;
  }

  .unit-name.empty { color: var(--line-2); }
  .unit-name.bump { animation: bump 0.35s ease-out; }

  @keyframes bump { from { opacity: 0.25; transform: translateY(5px); } }

  .unit-sub {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--ink);
  }

  .unit-detail {
    margin-top: 0.2rem;
    font-size: 0.8rem;
    color: var(--ink-3);
  }

  .unit-detail:empty { display: none; }

  .unit-view { margin: 0.9rem -0.5rem 0; }

  .unit-view svg {
    display: block;
    width: 100%;
    height: auto;
  }

  .unit-view figcaption {
    margin-top: 0.15rem;
    padding: 0 0.5rem;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--ink-3);
    text-align: center;
  }

  /* Unit illustration */
  .unit-art .floor { fill: #f1f1ef; }
  .unit-art .wall { stroke: var(--line-2); stroke-width: 1; stroke-linejoin: round; }
  .unit-art .wall.back { fill: #e6e6e3; }
  .unit-art .wall.side { fill: #ececea; }
  .unit-art .rib { stroke: #d8d8d4; stroke-width: 1; }
  .unit-art .edge { stroke: var(--ink-3); stroke-width: 1; stroke-linecap: round; }
  .unit-art .door { fill: #dcdbd7; stroke: var(--ink-3); stroke-width: 1; stroke-linejoin: round; }
  .unit-art .door-line { stroke: #b9b8b3; stroke-width: 0.8; }
  .unit-art .box polygon { stroke: #87643f; stroke-width: 0.6; stroke-linejoin: round; }
  .unit-art .box .t { fill: #dcc29e; }
  .unit-art .box .l { fill: #c39b6c; }
  .unit-art .box .r { fill: #a87c4f; }
  .unit-art .box .tape { stroke: #efe2cb; stroke-width: 1.1; stroke-linecap: round; }
  .unit-art .box.ghost polygon { fill-opacity: 0.22; stroke-dasharray: 2 2; }
  .unit-art .box.ghost .tape { display: none; }
  .unit-art .box.in { animation: box-in 0.34s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
  .unit-art .person { fill: #cacac6; }
  .unit-art .veh polygon { stroke: #6f747a; stroke-width: 0.6; stroke-linejoin: round; }
  .unit-art .veh .t { fill: #d5d9dd; }
  .unit-art .veh .l { fill: #bfc4c9; }
  .unit-art .veh .r { fill: #a9afb5; }
  .unit-art .veh.glass .t { fill: #e4e9ed; }
  .unit-art .veh.glass .l { fill: #cfd8df; }
  .unit-art .veh.glass .r { fill: #bcc6ce; }
  .unit-art .wheel { fill: #3d3d3d; }

  @keyframes box-in { from { opacity: 0; transform: translateY(-7px); } }

  /* Size comparison */
  .compare { margin-top: 1.1rem; }

  .compare-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
  }

  .rec-key {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--ink-3);
  }

  .rec-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--kraft);
  }

  .size-chips {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.25rem;
    margin-top: 0.45rem;
  }

  .size-chip {
    position: relative;
    padding: 0.5rem 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg);
    color: var(--ink-2);
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  }

  .size-chip:hover { border-color: var(--line-2); color: var(--ink); }

  .size-chip[aria-pressed="true"] {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--bg);
  }

  .size-chip.rec::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -8px;
    width: 6px;
    height: 6px;
    margin-left: -3px;
    border-radius: 50%;
    background: var(--kraft);
  }

  .fit-hint {
    margin-top: 1rem;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--ink-2);
  }

  .fit-hint:empty { display: none; }

  /* Packing */
  .packing {
    margin-top: 1.15rem;
    padding-top: 1.05rem;
    border-top: 1px solid var(--line);
  }

  .seg {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 0.45rem;
    padding: 3px;
    border-radius: 9px;
    background: var(--wash);
  }

  .seg button {
    padding: 0.5rem 0.4rem;
    border: none;
    border-radius: 7px;
    background: none;
    font-size: 0.8rem;
    color: var(--ink-2);
    transition: background 0.2s ease, color 0.2s ease;
  }

  .seg button[aria-pressed="true"] {
    background: var(--ink);
    color: var(--bg);
    font-weight: 500;
  }

  .packing-help {
    margin-top: 0.45rem;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--ink-3);
  }

  /* Your list */
  .your-list {
    margin-top: 1.1rem;
    border-top: 1px solid var(--line);
  }

  .your-list summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 0;
    list-style: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
  }

  .your-list summary::-webkit-details-marker { display: none; }

  .your-list summary::after {
    content: '+';
    margin-left: 0.25rem;
    font-weight: 300;
    color: var(--ink-3);
  }

  .your-list[open] summary::after { content: '\2212'; }

  .list-count {
    margin-left: auto;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--ink-3);
    font-variant-numeric: tabular-nums;
  }

  .list-items {
    max-height: 16rem;
    overflow-y: auto;
    list-style: none;
    scrollbar-width: thin;
  }

  .list-items li {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 3.6rem;
    gap: 0.6rem;
    align-items: baseline;
    padding: 0.35rem 0 0.6rem;
    font-size: 0.82rem;
  }

  .list-items li::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0.25rem;
    width: var(--share, 0%);
    height: 2px;
    border-radius: 2px;
    background: var(--kraft);
  }

  .li-name {
    overflow: hidden;
    padding: 0;
    border: none;
    background: none;
    color: var(--ink);
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .li-name:hover { text-decoration: underline; text-underline-offset: 2px; }

  .li-qty,
  .li-vol {
    color: var(--ink-3);
    font-variant-numeric: tabular-nums;
    text-align: right;
  }

  .list-empty {
    padding-bottom: 0.85rem;
    font-size: 0.82rem;
    color: var(--ink-3);
  }

  .rail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    padding-top: 0.95rem;
    border-top: 1px solid var(--line);
  }

  .rail-actions .link-btn { font-size: 0.82rem; }

  /* ───── Phone result bar ───── */
  .dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: none;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    background: var(--bg);
    box-shadow: 0 -8px 24px rgba(17, 17, 17, 0.06);
    transform: translateY(110%);
    visibility: hidden;
    transition: transform 0.25s ease, visibility 0s linear 0.25s;
  }

  .dock.show {
    transform: none;
    visibility: visible;
    transition: transform 0.25s ease;
  }

  .dock-bar {
    position: absolute;
    left: 0;
    top: -1px;
    width: 0;
    height: 2px;
    background: var(--kraft);
    transition: width 0.35s ease;
  }

  .dock-main {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    flex: 1;
    min-width: 0;
  }

  .dock-unit {
    font-size: 1.35rem;
    font-weight: 500;
    letter-spacing: -0.03em;
    white-space: nowrap;
  }

  .dock-sub {
    overflow: hidden;
    font-size: 0.8rem;
    color: var(--ink-2);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dock-btn {
    flex-shrink: 0;
    padding: 0.6rem 0.95rem;
    border: none;
    border-radius: 8px;
    background: var(--ink);
    color: var(--bg);
    font-size: 0.82rem;
    font-weight: 500;
  }

  /* ───── Toast ───── */
  .toast {
    position: fixed;
    left: 50%;
    bottom: 1.25rem;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: calc(100vw - 2rem);
    padding: 0.7rem 0.9rem 0.7rem 1.1rem;
    border-radius: 10px;
    background: var(--ink);
    color: var(--bg);
    font-size: 0.875rem;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 0.75rem);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
  }

  .toast.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .toast button {
    flex-shrink: 0;
    padding: 0.15rem 0.2rem;
    border: none;
    background: none;
    color: var(--bg);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  .dock.show ~ .toast { bottom: 5.25rem; }

  /* ───── Size guide and method ───── */
  .guide { padding: 1rem 0 3.5rem; }

  .guide h2,
  .faq h2 {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--line-2);
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--ink);
  }

  .faq h2 { margin-bottom: 0.25rem; }

  .guide p {
    max-width: 58ch;
    margin-top: 1rem;
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--ink-2);
  }

  .table-wrap {
    overflow-x: auto;
    margin-top: 1.25rem;
    -webkit-overflow-scrolling: touch;
  }

  .sizes {
    width: 100%;
    min-width: 44rem;
    border-collapse: collapse;
    font-size: 0.875rem;
  }

  .sizes th,
  .sizes td {
    padding: 0.8rem 1.5rem 0.8rem 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
  }

  .sizes thead th {
    border-bottom-color: var(--line-2);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--ink-3);
    vertical-align: bottom;
  }

  .sizes tbody th { font-weight: 500; white-space: nowrap; }
  .sizes td { color: var(--ink-2); }
  .sizes td:last-child { min-width: 15rem; }

  .sizes .n {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }

  .unit-cell { display: inline-flex; align-items: center; gap: 0.85rem; }
  .plan { flex-shrink: 0; overflow: visible; }
  .plan rect { fill: var(--wash); stroke: var(--ink-3); stroke-width: 1; }
  .plan .door { stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }

  .noscript {
    margin: 1.5rem 0;
    padding-left: 0.75rem;
    border-left: 2px solid var(--ink);
    font-size: 0.9rem;
    color: var(--ink-2);
  }

  /* ───── FAQ ───── */
  .faq { padding: 1rem 0 4rem; }
  .faq details { border-bottom: 1px solid var(--line); }

  .faq summary {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.05rem 0;
    font-size: 0.95rem;
    cursor: pointer;
    list-style: none;
  }

  .faq summary::-webkit-details-marker { display: none; }

  .faq summary::after {
    content: '+';
    flex-shrink: 0;
    font-size: 1rem;
    font-weight: 300;
    line-height: 1;
    color: var(--ink-3);
  }

  .faq details[open] summary::after { content: '\2212'; }

  .faq details p {
    max-width: 58ch;
    padding-bottom: 1.35rem;
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--ink-2);
  }

  /* ───── Site header and footer ───── */
  .site-head { border-bottom: 1px solid var(--line); }

  .site-head .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 3.6rem;
  }

  .brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: -0.015em;
    color: var(--ink);
    text-decoration: none;
    white-space: nowrap;
  }

  .brand svg { width: 20px; height: 20px; flex-shrink: 0; }
  .brand .t { fill: #dcc29e; }
  .brand .l { fill: #c39b6c; }
  .brand .r { fill: #a87c4f; }
  .brand polygon { stroke: #87643f; stroke-width: 0.8; stroke-linejoin: round; }

  .site-nav { display: flex; gap: 1.25rem; }

  .site-nav a {
    font-size: 0.875rem;
    color: var(--ink-2);
    text-decoration: none;
    white-space: nowrap;
  }

  .site-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
  .site-nav a[aria-current="page"] { color: var(--ink); font-weight: 500; }

  .site-foot { border-top: 1px solid var(--line); }

  .site-foot .wrap {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2rem;
    padding-top: 2rem;
    padding-bottom: 3rem;
    font-size: 0.82rem;
    color: var(--ink-3);
  }

  .site-foot h2 {
    margin-bottom: 0.6rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ink);
  }

  .site-foot ul { display: grid; gap: 0.35rem; list-style: none; }
  .site-foot .foot-sizes { display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; }
  .site-foot a { color: var(--ink-2); text-decoration: none; }
  .site-foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
  .site-foot p { max-width: 36ch; line-height: 1.55; }
  .site-foot p + p { margin-top: 0.5rem; }
  .site-foot .foot-legal { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; margin-top: 1rem; }
  .site-foot .foot-copy { color: var(--muted); }

  /* Affiliate notice: put it right next to affiliate links */
  .aff-note {
    margin: 1rem 0;
    padding: 0.6rem 0.8rem;
    border-left: 2px solid var(--kraft);
    background: var(--wash);
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--ink-2);
  }

  .aff-note a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
  .info-page .content-section { margin-top: 2.5rem; }

  /* 404 */
  .notfound .size-intro { margin-top: 0.5rem; align-items: center; }
  .nf-code { font-size: 0.85rem; color: var(--ink-3); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }

  .nf-title {
    margin-top: 0.5rem;
    font-size: clamp(2rem, 4.4vw, 2.8rem);
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 1.08;
  }

  .nf-h2 { margin-top: 2.25rem; font-size: 0.85rem; font-weight: 400; color: var(--ink-3); }
  .notfound .size-nav { margin-top: 0.6rem; }
  .nf-more { margin-top: 1.25rem; font-size: 0.9rem; color: var(--ink-2); }

  .nf-more a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--line-2);
    text-underline-offset: 3px;
  }

  /* ───── Result panel additions ───── */
  .unit-cost {
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: var(--ink-3);
  }

  .unit-cost a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--line-2);
    text-underline-offset: 2px;
  }

  .unit-cost a:hover { color: var(--ink); text-decoration-color: var(--ink); }

  .notes { display: grid; gap: 0.5rem; margin-top: 0.9rem; }
  .notes:empty { display: none; }

  .note {
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    background: var(--kraft-tint);
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--ink-2);
  }

  .seg.seg-3 { grid-template-columns: repeat(3, 1fr); }
  .ceiling { margin-top: 1rem; }

  .moving {
    margin-top: 1.15rem;
    padding-top: 1.05rem;
    border-top: 1px solid var(--line);
  }

  .moving dl { display: grid; gap: 0.45rem; margin-top: 0.5rem; }

  .moving dl div {
    display: grid;
    grid-template-columns: 6.6rem minmax(0, 1fr);
    gap: 0.6rem;
    align-items: baseline;
    font-size: 0.8rem;
  }

  .moving dt { color: var(--ink-3); }
  .moving dd { color: var(--ink); }

  .section-help {
    margin-top: 0.6rem;
    font-size: 0.8rem;
    color: var(--ink-3);
  }

  .guide-more { margin-top: 1rem; font-size: 0.9rem; }

  .guide a:not(.room-chip),
  .faq details p a,
  .content-section p a,
  .content-section li a,
  .content-section td a,
  .content-section th a,
  .lead a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--line-2);
    text-underline-offset: 3px;
  }

  .guide a:hover,
  .faq details p a:hover,
  .content-section a:hover,
  .lead a:hover { text-decoration-color: var(--ink); }

  .sizes a { font-weight: 500; }

  /* ───── Content pages ───── */
  .wrap.page { padding-top: 2.25rem; padding-bottom: 3.5rem; }

  .crumbs { font-size: 0.8rem; color: var(--ink-3); }
  .crumbs ol { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; }
  .crumbs li + li::before { content: '/'; margin-right: 0.4rem; color: var(--line-2); }
  .crumbs a { color: var(--ink-2); text-decoration: none; }
  .crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

  .page-head h1 {
    margin-top: 0.9rem;
    font-size: clamp(2rem, 4.4vw, 2.8rem);
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 1.08;
  }

  .lead {
    max-width: 42rem;
    margin-top: 0.9rem;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--ink-2);
  }

  .size-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 23rem);
    gap: 3rem;
    align-items: start;
    margin-top: 2rem;
  }

  .facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2rem;
    margin-top: 1.75rem;
    border-top: 1px solid var(--line-2);
  }

  .facts div { padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
  .facts dt { font-size: 0.78rem; color: var(--ink-3); }

  .facts dd {
    margin-top: 0.15rem;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
  }

  .facts dd small {
    display: block;
    margin-top: 0.1rem;
    font-size: 0.75rem;
    letter-spacing: 0;
    color: var(--ink-3);
  }

  .figure { margin: 0; }
  .figure svg { display: block; width: 100%; height: auto; }

  .figure figcaption {
    margin-top: 0.3rem;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--ink-3);
  }

  .figure-card {
    padding: 1rem 1rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: 16px;
  }

  .figure-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 1.25rem;
  }

  .actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.4rem;
    margin-top: 1.5rem;
  }

  .btn-link {
    display: inline-flex;
    align-items: center;
    height: 2.75rem;
    padding: 0 1.15rem;
    border-radius: 9px;
    background: var(--ink);
    color: var(--bg);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
  }

  .btn-link:hover { background: #2b2b2b; }

  .text-link {
    font-size: 0.9rem;
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--line-2);
    text-underline-offset: 3px;
  }

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

  .content-section { margin-top: 3.25rem; scroll-margin-top: 1rem; }

  .content-section h2 {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--line-2);
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: -0.02em;
  }

  .content-section h3 {
    margin-top: 1.75rem;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: -0.015em;
  }

  .content-section p,
  .content-section li {
    max-width: 64ch;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--ink-2);
  }

  .content-section p { margin-top: 1rem; }
  .content-section ul { display: grid; gap: 0.35rem; margin-top: 0.75rem; padding-left: 1.1rem; }
  .content-section .table-wrap { max-width: 52rem; margin-top: 1.25rem; }
  .content-section .table-wrap.full { max-width: none; }
  .content-section p.small { margin-top: 0.75rem; font-size: 0.8rem; color: var(--ink-3); }

  table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
  }

  table.data th,
  table.data td {
    padding: 0.7rem 1.25rem 0.7rem 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: baseline;
  }

  table.data thead th {
    border-bottom-color: var(--line-2);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--ink-3);
    vertical-align: bottom;
  }

  table.data tbody th { font-weight: 500; }
  table.data td { color: var(--ink-2); }

  table.data .n {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }

  table.data .muted { color: var(--muted); }
  table.data tr.current > * { background: var(--wash); }
  table.data tr.current > :first-child { box-shadow: -0.6rem 0 0 var(--wash); }
  table.data.wide { min-width: 40rem; }

  .size-nav { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.25rem; }

  .size-nav a {
    padding: 0.5rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--ink-2);
    text-decoration: none;
    font-variant-numeric: tabular-nums;
  }

  .size-nav a:hover { border-color: var(--line-2); color: var(--ink); }
  .size-nav a[aria-current="page"] { border-color: var(--ink); background: var(--ink); color: var(--bg); }

  .plans-figure { max-width: 46rem; margin: 2rem 0 0; }
  .plans-figure svg { display: block; width: 100%; height: auto; }
  .plans-figure figcaption { margin-top: 0.5rem; font-size: 0.8rem; color: var(--ink-3); }
  .plans-figure .plan-unit { fill: var(--wash); stroke: var(--ink-3); stroke-width: 1; }
  .plans-figure .plan-door { stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
  .plans-figure .plan-car { fill: #d5d9dd; stroke: #6f747a; stroke-width: 1; }
  .plans-figure .plan-label { font-size: 10.5px; font-weight: 500; fill: var(--ink); }
  .plans-figure .plan-sub { font-size: 9px; fill: var(--ink-3); }

  .content-section ul.contents {
    display: block;
    columns: 3 13rem;
    column-gap: 2rem;
    margin-top: 1rem;
    padding: 0;
    list-style: none;
  }

  .content-section .contents li {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.32rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.85rem;
    break-inside: avoid;
  }

  .contents .n { color: var(--ink-3); font-variant-numeric: tabular-nums; }
  table.data .desc { display: block; font-size: 0.75rem; font-weight: 400; color: var(--ink-3); }
  .vehicle-figure { max-width: 26rem; margin-top: 1.25rem; }

  /* ───── Moving box calculator ───── */
  .wrap.box-head { padding-top: 2.25rem; padding-bottom: 2.25rem; }
  .box-inputs .field-block + .field-block { margin-top: 2.25rem; }

  .block-label {
    display: block;
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
    color: var(--ink-3);
  }

  .home-picks { margin-top: 0; }
  .preset[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
  .preset[aria-pressed="true"]:hover { background: #2b2b2b; }
  .box-inputs .seg { max-width: 30rem; }
  .box-inputs .section-head { flex-wrap: wrap; row-gap: 0.2rem; }
  .box-inputs .section-sum { white-space: normal; }
  .box-inputs .packing-help { max-width: 34rem; font-size: 0.82rem; }

  .box-list { margin-top: 1rem; border-top: 1px solid var(--line); list-style: none; }

  .box-list li {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: baseline;
    padding: 0.6rem 0 0.7rem;
    border-bottom: 1px solid var(--line);
  }

  .box-list li::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: var(--share, 0%);
    height: 2px;
    background: var(--kraft);
    transition: width 0.3s ease;
  }

  .bl-title { display: block; font-size: 0.9rem; font-weight: 500; }
  .bl-desc { display: block; margin-top: 0.1rem; font-size: 0.75rem; line-height: 1.4; color: var(--ink-3); }

  .bl-n {
    font-size: 1.3rem;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
  }

  .supplies { margin-top: 1.1rem; }

  .supply-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem 1rem;
    margin-top: 0.5rem;
  }

  .supply-list dt { font-size: 0.75rem; color: var(--ink-3); }
  .supply-list dd { font-size: 0.95rem; font-variant-numeric: tabular-nums; }

  .box-storage {
    margin-top: 1.1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
  }

  .box-storage p { font-size: 0.8rem; line-height: 1.5; color: var(--ink-2); }
  .btn-link.btn-small { height: 2.4rem; margin-top: 0.75rem; padding: 0 0.9rem; font-size: 0.82rem; }
  .box-calc .rail-actions { margin-top: 1.1rem; }
  .wrap.box-article { padding-bottom: 3.5rem; }
  .box-article .content-section:first-child { margin-top: 0; }

  .moving-more { margin-top: 0.65rem; font-size: 0.8rem; }

  .moving-more a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--line-2);
    text-underline-offset: 2px;
  }

  /* Item reference on the calculator page */
  .item-ref {
    columns: 3 18rem;
    column-gap: 2.5rem;
    margin-top: 0.5rem;
  }

  .item-ref details { border-bottom: 1px solid var(--line); break-inside: avoid; }

  .item-ref summary {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 0;
    font-size: 0.95rem;
    cursor: pointer;
    list-style: none;
  }

  .item-ref summary::-webkit-details-marker { display: none; }
  .item-ref summary::after { content: '+'; color: var(--ink-3); font-weight: 300; }
  .item-ref details[open] summary::after { content: '\2212'; }
  .item-ref summary span { margin-left: auto; font-size: 0.8rem; color: var(--ink-3); }
  .item-ref table { margin-bottom: 1rem; }
  .item-ref table.data th, .item-ref table.data td { padding: 0.4rem 0.75rem 0.4rem 0; font-size: 0.82rem; }
  .item-ref table.data tbody th { font-weight: 400; color: var(--ink); }
  .item-ref .desc { display: block; font-size: 0.75rem; color: var(--ink-3); }

  /* ───── Focus ───── */
  :focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
  }

  .search input:focus-visible,
  .field input:focus-visible,
  .field select:focus-visible { outline-offset: 1px; }

  /* ───── Responsive ───── */
  @media (max-width: 1180px) {
    .custom-form { grid-template-columns: 5rem auto 1fr; }
    .field-name, .field-dims { grid-column: 1 / -1; }
  }

  @media (min-width: 961px) and (max-height: 860px) {
    .unit-view svg { width: auto; height: 190px; max-width: 100%; margin: 0 auto; }
  }

  @media (min-width: 961px) and (max-height: 740px) {
    .unit-view svg { height: 150px; }
  }

  @media (max-width: 960px) {
    .wrap { padding: 0 1.25rem; }
    .masthead { padding: 2rem 0 1.75rem; }

    .calc {
      grid-template-columns: minmax(0, 1fr);
      gap: 2.5rem;
      padding-bottom: 3.5rem;
    }

    .rail {
      position: static;
      max-height: none;
      overflow: visible;
    }

    .rooms {
      flex-wrap: nowrap;
      overflow-x: auto;
      margin: 0.7rem -1.25rem 0;
      padding: 0 1.25rem 0.1rem;
      scrollbar-width: none;
    }

    .rooms::-webkit-scrollbar { display: none; }
    .toolbar::before { left: -1.25rem; right: -1.25rem; }

    .dock { display: flex; }

    .size-intro { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .site-foot .wrap { grid-template-columns: 1fr 1fr; }
    .site-foot .foot-about { grid-column: 1 / -1; }
  }

  @media (max-width: 560px) {
    .presets { display: grid; grid-template-columns: 1fr 1fr; }
    .presets-label { grid-column: 1 / -1; }
    .custom { padding: 1.25rem 1.1rem; }
    .unit-name { font-size: 2.7rem; }
    .site-head .wrap { min-height: 3.3rem; }
    .site-nav { gap: 0.85rem; }
    .site-nav a { font-size: 0.82rem; }
    .brand { font-size: 0.88rem; }
    .site-nav .nav-home { display: none; }
    .figure-pair { grid-template-columns: minmax(0, 1fr); }
    .facts { column-gap: 1.25rem; }
    .facts dd { font-size: 1.05rem; }
    .site-foot .wrap { grid-template-columns: 1fr; gap: 1.5rem; }
  }

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

  /* ───── Print: the estimate and the list ───── */
  @media print {
    @page { margin: 16mm; }

    body { font-size: 11pt; }

    .masthead,
    .picker,
    .dock,
    .toast,
    .compare-head,
    .size-chips,
    .packing,
    .rail-actions,
    .guide,
    .faq,
    .site-head,
    .site-foot,
    .ceiling,
    .notes,
    .box-head,
    .box-inputs,
    .box-article,
    .box-storage,
    .your-list summary::after { display: none !important; }

    .print-only { display: block; }

    .print-head {
      margin-bottom: 6mm;
      padding-bottom: 4mm;
      border-bottom: 1px solid #999;
    }

    .print-title { font-size: 16pt; font-weight: 500; }
    .print-date { font-size: 10pt; color: #444; }
    .print-foot { margin-top: 6mm; font-size: 9pt; color: #444; }

    .calc { display: block; padding: 0; }

    .rail {
      position: static;
      max-height: none;
      overflow: visible;
      padding: 0;
      border: none;
    }

    .unit-view { max-width: 110mm; margin: 4mm 0 0; }
    .unit-view figcaption { text-align: left; }
    .list-items { max-height: none; overflow: visible; }
    .list-items li { break-inside: avoid; }
    .list-items li::after { display: none; }
    .your-list summary { cursor: default; }
  }
