/* B.W. Painting: paint calculator page.
   The tool reads like a decorator's measured drawing: an axonometric room that redraws as you type,
   a title block of areas, and a ledger of rooms. Black and white only; hatch and tint mark painted surfaces. */

.pg-calculator .calc .label, .pg-calculator .paint__h { font-size: .8125rem; }

/* ---------------- calculator section ---------------- */
.calc { scroll-margin-top: 0; }
.calc__head { margin-bottom: clamp(32px, 4vw, 56px); }
.calc__head h2 { margin-bottom: 18px; }
.calc__head .lede { color: var(--graphite); margin: 0; max-width: 120ch; }

/* no JavaScript: a note and the figures by hand, the tool itself is hidden */
.calc__nojs { display: none; }
.no-js .calc__nojs { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.no-js .calc__grid, .no-js .ledger, .no-js .calc-bar { display: none !important; }
.calc__nojs-h { font-size: clamp(1.5rem, 2.2vw, 2rem); margin-bottom: 14px; }
.calc__nojs ul { margin: 0 0 24px; padding-left: 1.2em; }
.calc__nojs li { margin-bottom: 6px; }
.calc__nojs-pic .frame { aspect-ratio: 3 / 2; max-height: var(--media-cap); }
@media (max-width: 900px) { .no-js .calc__nojs { grid-template-columns: 1fr; } }

.calc__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: start; }
.calc__panel { scroll-margin-top: calc(var(--head-h) + 12px); container-type: inline-size; min-width: 0; }
@media (min-width: 1180px) {
  .calc__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.22fr); gap: clamp(36px, 3.4vw, 64px); }
  .calc__panel { position: sticky; top: 92px; }
}

/* ---------------- the form ---------------- */
.calc__form { container-type: inline-size; min-width: 0; }
.cgroup { border: 0; margin: 0 0 32px; padding: 0; min-width: 0; }
.cgroup:last-child { margin-bottom: 0; }
.cgroup__legend { display: flex; align-items: center; gap: 16px; width: 100%; padding: 0; margin: 0 0 16px; }
.cgroup__legend::after { content: ""; flex: 1; height: 1.5px; background: var(--ink); }
.cgroup__units { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 18px; padding: 10px 10px 10px 16px; background: var(--white); border: 1px solid var(--rule); }
.cgroup__units-lab { font-weight: 600; }
.cgroup__hint { margin: 12px 0 0; padding-left: 14px; border-left: 2px solid var(--ink); color: var(--graphite); font-size: 1rem; line-height: 1.5; }
.cgroup__hint:empty { display: none; }

/* segmented control: metres or feet */
.seg { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; border: 1.5px solid var(--ink); background: var(--white); isolation: isolate; }
.seg__thumb { position: absolute; top: 0; bottom: 0; left: 0; width: 50%; background: var(--ink); z-index: -1; transition: transform .55s var(--ease); }
.seg:has(.seg__opt:nth-of-type(2) input:checked) .seg__thumb { transform: translateX(100%); }
.seg__opt { position: relative; display: grid; place-items: center; min-height: 54px; min-width: 108px; padding: 0 18px; font-weight: 600; cursor: pointer; transition: color .45s var(--ease); }
.seg__opt input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.seg__opt:has(input:checked) { color: var(--white); }
.seg__opt:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; z-index: 1; }

.rowA, .rowB { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.rowB { margin-top: 18px; }
@container (min-width: 380px) {
  .rowA { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rowA .field--type { grid-column: 1 / -1; }
}
@container (min-width: 540px) {
  .rowA { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); }
  .rowA .field--type { grid-column: auto; }
  .rowB { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.calc .select { min-height: 58px; font-size: 1.0625rem; }

/* stepper: big, tactile number fields */
.step { display: grid; grid-template-columns: 50px minmax(0, 1fr) 50px; min-height: 58px; border: 1.5px solid #8d8d88; background: var(--white); transition: border-color .3s, box-shadow .3s; }
.step:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(17, 17, 17, .16); }
.field--error .step { border-color: #a4161a; }
.step__btn { display: grid; place-items: center; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; transition: background-color .25s; }
.step__btn:first-child { border-right: 1px solid var(--rule); }
.step__btn:last-child { border-left: 1px solid var(--rule); }
.step__btn:hover { background: var(--chalk); }
.step__btn:active { background: var(--rule); }
.step__btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.step__box { display: flex; align-items: center; min-width: 0; }
.step__input { flex: 1 1 0; min-width: 0; width: 100%; border: 0; background: none; padding: 12px 0; font-family: var(--serif); font-size: 1.35rem; line-height: 1.2; color: var(--ink); text-align: right; -moz-appearance: textfield; appearance: textfield; font-variant-numeric: tabular-nums; }
.step__input:focus { outline: none; }
.step__input:only-child { text-align: center; }
.step__input::-webkit-outer-spin-button, .step__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.step__unit { flex: 1 1 0; padding-left: 6px; color: var(--graphite); font-size: 1rem; }
.field--step .err { font-size: .92rem; }

/* what to paint: checkbox cards */
.pick { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@container (min-width: 440px) { .pick { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pick__card, .surf__card { position: relative; display: block; cursor: pointer; }
.pick__card input, .surf__card input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.pick__in { position: relative; display: flex; flex-direction: column; gap: 12px; height: 100%; min-height: 136px; padding: 16px; background: var(--white); border: 1.5px solid #8d8d88; transition: border-color .35s var(--ease), box-shadow .35s var(--ease); }
.pick__card:hover .pick__in { border-color: var(--ink); }
.pick__card input:checked + .pick__in { border-color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.pick__card input:focus-visible + .pick__in, .surf__card input:focus-visible + .surf__in { outline: 2px solid var(--ink); outline-offset: 3px; }
.pick__pic { width: 56px; height: 44px; fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; }
.pick__fill { fill: var(--ink); stroke: none; opacity: 0; transition: opacity .45s var(--ease); }
.pick__ghost { stroke: #b4b4ae; stroke-dasharray: 3 3; }
.pick__panel { transition: stroke .45s var(--ease); }
.pick__card input:checked + .pick__in .pick__fill { opacity: 1; }
.pick__card input:checked + .pick__in .pick__panel { stroke: var(--white); }
.pick__txt strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.3rem; line-height: 1.2; }
.pick__txt > span { display: block; margin-top: 2px; font-size: .92rem; line-height: 1.35; color: var(--graphite); }
.pick__tick { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 26px; height: 26px; border: 1.5px solid #8d8d88; transition: background-color .3s var(--ease), border-color .3s var(--ease); }
.pick__tick svg { width: 15px; height: 15px; fill: none; stroke: var(--white); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 17; stroke-dashoffset: 17; transition: stroke-dashoffset .4s var(--ease) .05s; }
.pick__card input:checked + .pick__in .pick__tick { background: var(--ink); border-color: var(--ink); }
.pick__card input:checked + .pick__in .pick__tick svg { stroke-dashoffset: 0; }
@container (max-width: 439px) {
  .pick__in { flex-direction: row; align-items: center; min-height: 76px; padding: 12px 56px 12px 14px; }
  .pick__tick { top: 50%; margin-top: -13px; }
}

/* the surfaces now: radio cards, each showing its coats as roller strokes */
.surf { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@container (min-width: 380px) { .surf { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.surf__in { display: flex; align-items: center; gap: 16px; height: 100%; min-height: 86px; padding: 14px 18px; background: var(--white); border: 1.5px solid #8d8d88; transition: background-color .45s var(--ease), color .45s var(--ease), border-color .45s var(--ease); }
.surf__card:hover .surf__in { border-color: var(--ink); }
.surf__card input:checked + .surf__in { background: var(--ink); border-color: var(--ink); color: var(--white); }
.coats { flex: none; width: 40px; height: 30px; fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; }
.coats path { opacity: .5; transition: opacity .4s; }
.coats__full { stroke-dasharray: 34; stroke-dashoffset: 0; }
.coats__mist { stroke-dasharray: 3 5; }
.surf__card input:checked + .surf__in .coats path { opacity: 1; }
.surf__card input:checked + .surf__in .coats__full { animation: bw-coat .7s var(--ease) both; }
.surf__card input:checked + .surf__in .coats path:nth-child(2) { animation-delay: .08s; }
.surf__card input:checked + .surf__in .coats path:nth-child(3) { animation-delay: .16s; }
.surf__card input:checked + .surf__in .coats path:nth-child(4) { animation-delay: .24s; }
@keyframes bw-coat { from { stroke-dashoffset: 34; } to { stroke-dashoffset: 0; } }
.surf__txt strong { display: block; font-weight: 600; font-size: 1rem; line-height: 1.3; }
.surf__txt > span { display: block; margin-top: 2px; font-size: .92rem; color: var(--graphite); transition: color .45s var(--ease); }
.surf__card input:checked + .surf__in .surf__txt > span { color: #d4d4cf; }

/* ---------------- the results sheet ---------------- */
.sheet { display: grid; gap: 16px; padding: clamp(16px, 1.8vw, 24px); background: var(--white); border: 1.5px solid var(--ink); }
.sheet__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.sheet__title { font-size: clamp(1.5rem, 2vw, 1.9rem); }
.sheet__dims { margin: 0; color: var(--graphite); font-variant-numeric: tabular-nums; }

.sheet__top { display: grid; grid-template-columns: minmax(0, 1fr); border: 1px solid var(--rule); }
.sheet__draw { position: relative; display: grid; place-items: center; padding: 10px; background-color: var(--white); background-image: linear-gradient(#ececE8 1px, transparent 1px), linear-gradient(90deg, #ececE8 1px, transparent 1px); background-size: 22px 22px; background-position: -1px -1px; }
.draw { position: relative; width: min(100%, calc(clamp(190px, 33vh, 330px) * 4 / 3)); aspect-ratio: 4 / 3; }
.room { width: 100%; height: 100%; overflow: visible; }
.dim { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 1px 6px; background: var(--white); font-size: 13px; font-weight: 600; line-height: 1.35; white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; }

.tblock { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.tblock__cell { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 12px 14px; border-left: 1px solid var(--rule); }
.tblock__cell:first-child { border-left: 0; }
.tblock dt { font-size: .8125rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--graphite); }
.tblock dd { margin: 2px 0 0; font-family: var(--serif); font-size: clamp(1.3rem, 1.7vw, 1.6rem); line-height: 1.2; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tblock dd [data-area-unit] { font-family: var(--sans); font-size: .95rem; }
.tblock__cell.is-off dd { color: var(--graphite); text-decoration: line-through; text-decoration-thickness: 1px; }
.tblock__cell.is-off dt::after { content: ", not painting"; text-transform: none; letter-spacing: 0; font-weight: 500; }

.sheet__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.paint__h { margin: 0 0 4px; color: var(--graphite); }
.paint__list { list-style: none; margin: 0; padding: 0; }
.paint__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 4px 12px; padding: 9px 0 10px; border-top: 1px solid var(--rule); }
.paint__k { font-weight: 600; }
.paint__v { font-family: var(--serif); font-size: 1.4rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.paint__row.is-off .paint__v { color: var(--graphite); }
.paint__tins { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; min-height: 28px; }
.paint__off { color: var(--graphite); font-size: .95rem; }
.tin { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 7px; border: 1px solid var(--ink); font-size: .9rem; font-weight: 600; line-height: 1.5; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tin svg { width: 13px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; }

.est { position: relative; align-self: start; margin-top: 12px; padding: 28px 16px 14px; border: 1.5px dashed var(--ink); }
.est__badge { position: absolute; top: -13px; left: 14px; margin: 0; padding: 3px 10px; background: var(--ink); color: var(--white); font-size: .8125rem; font-weight: 600; line-height: 1.45; letter-spacing: .14em; text-transform: uppercase; }
.est__row { display: flex; flex-direction: column; margin: 0 0 10px; }
.est__k { color: var(--graphite); font-size: .95rem; font-weight: 500; }
.est__v { font-family: var(--serif); font-size: clamp(1.5rem, 2vw, 1.9rem); line-height: 1.15; font-variant-numeric: tabular-nums; }
.est__v--days { font-size: 1.35rem; }
.est__note { margin: 0; padding-top: 10px; border-top: 1px solid var(--rule); color: var(--graphite); font-size: .95rem; line-height: 1.45; }
.sheet.is-empty .est__v { color: var(--graphite); }

.sheet__none, .sheet__all { margin: 0; padding: 12px 14px; background: var(--chalk); font-size: 1rem; line-height: 1.5; }
.sheet__all a { font-weight: 600; }
.sheet__acts { display: flex; flex-wrap: wrap; gap: 12px; }
.sheet__acts .btn { flex: 1 1 220px; justify-content: center; }
.sheet__acts .i-roller { width: 22px; height: 22px; }
.sheet__acts .btn.is-done { background: var(--ink); color: var(--white); border-color: var(--ink); }

@container (min-width: 600px) {
  .sheet__top { grid-template-columns: minmax(0, 1fr) 176px; }
  .tblock { grid-template-columns: minmax(0, 1fr); border-top: 0; border-left: 1px solid var(--rule); }
  .tblock__cell { border-left: 0; border-top: 1px solid var(--rule); }
  .tblock__cell:first-child { border-top: 0; }
  .sheet__body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* the drawing (inline SVG) */
.room__floor { fill: #f3f3f0; }
.room__boards path { fill: none; stroke: #dcdcd7; stroke-width: 1; }
.room__wall { fill: var(--white); }
.room__wall--side { fill: #f7f7f5; }
.room__hatch path { fill: url(#room-hatch); }
.room__edge { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
.room__wood { fill: var(--white); stroke: var(--ink); stroke-width: 1.2; stroke-linejoin: round; transition: fill .7s var(--ease); }
.room.is-wood .room__wood { fill: var(--ink); }
.room__panel { fill: none; stroke: var(--ink); stroke-width: 1; transition: stroke .7s var(--ease); }
.room.is-wood .room__panel { stroke: #8d8d88; }
.room__glass { fill: #e8e8e4; stroke: var(--ink); stroke-width: 1; }
.room__bar { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.room__lead path { fill: none; stroke: var(--ink); stroke-width: 1; stroke-dasharray: 2 4; }
.room__ceil { fill: rgba(17, 17, 17, .14); }
.room__ceil-edge { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-dasharray: 6 5; stroke-linejoin: round; }
.room.is-ceil .room__ceil-edge { stroke-dasharray: none; }
.room__dimline { fill: none; stroke: var(--graphite); stroke-width: 1; }
.room__wet { stroke: var(--ink); stroke-width: 3; opacity: 0; }

/* ---------------- ledger of saved rooms ---------------- */
.ledger { margin-top: clamp(48px, 6vw, 88px); }
.ledger__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-bottom: 14px; border-bottom: 1.5px solid var(--ink); }
.ledger__h { display: flex; align-items: center; gap: 14px; font-size: clamp(1.6rem, 2.4vw, 2.1rem); }
.ledger__count { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border-radius: 20px; background: var(--ink); color: var(--white); font-family: var(--sans); font-size: 1rem; font-weight: 600; letter-spacing: 0; }
.ledger__note { margin: 0; color: var(--graphite); }
.ledger__list { list-style: none; margin: 0; padding: 0; }
.ledger__empty { margin: 0; min-height: 138px; padding: 12px 0 0; color: var(--graphite); line-height: 34px; background: repeating-linear-gradient(180deg, transparent 0 45px, var(--rule) 45px 46px); }
.lrow, .ledger__total { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.25fr) minmax(0, 1.25fr) minmax(0, .9fr) 50px; gap: 10px 24px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--rule); overflow: clip; }
.lrow__name { display: block; font-family: var(--serif); font-size: 1.3rem; line-height: 1.25; }
.lrow__sub { display: block; color: var(--graphite); font-size: .95rem; line-height: 1.45; }
.lrow__cell { min-width: 0; line-height: 1.5; }
.lrow__cell small { display: block; margin-bottom: 2px; color: var(--graphite); font-size: .8125rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.lrow__x { display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1.5px solid #8d8d88; background: var(--white); color: var(--ink); cursor: pointer; transition: background-color .3s, color .3s, border-color .3s; }
.lrow__x:hover, .lrow__x:focus-visible { background: var(--ink); border-color: var(--ink); color: var(--white); }
.lrow__x svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.ledger__total { margin-top: 14px; padding: 20px 22px; border: 0; background: var(--ink); color: var(--white); }
.ledger__total .lrow__name { font-size: 1.45rem; }
.ledger__total .lrow__sub, .ledger__total .lrow__cell small { color: var(--ash); }
.ledger__total .tin { border-color: rgba(255, 255, 255, .7); }
.ltins { display: flex; flex-direction: column; gap: 6px; }
.ltins__g { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ltins__g b { min-width: 56px; font-weight: 500; font-size: .95rem; }
@media (max-width: 1000px) {
  .lrow, .ledger__total { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 50px; }
  .lrow > :first-child, .ledger__total > :first-child { grid-column: 1 / 3; }
  .lrow > .lrow__x { grid-column: 3; grid-row: 1; }
}
@media (max-width: 600px) {
  .lrow, .ledger__total { grid-template-columns: minmax(0, 1fr) 50px; }
  .lrow > :first-child, .ledger__total > :first-child { grid-column: 1; }
  .lrow > .lrow__cell, .ledger__total > .lrow__cell { grid-column: 1 / -1; }
  .lrow > .lrow__x { grid-column: 2; }
  .ledger__total { padding: 18px 16px; }
}

/* ---------------- compact total bar on phones and tablets ---------------- */
.calc-bar { display: none; }
@media (max-width: 1179px) {
  .js .calc-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; display: flex; align-items: center; gap: 18px; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--white); box-shadow: 0 -12px 30px -18px rgba(0, 0, 0, .6); transform: translateY(110%); visibility: hidden; transition: transform .5s var(--ease), visibility 0s .5s; }
  .js .calc-bar.is-shown { transform: none; visibility: visible; transition: transform .5s var(--ease), visibility 0s; }
}
.calc-bar__txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.calc-bar__txt:first-child { flex: 1 1 auto; }
.calc-bar__k { color: var(--ash); font-size: .8125rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.calc-bar__v { overflow: hidden; font-size: 1rem; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.calc-bar__go { display: inline-flex; align-items: center; gap: 8px; flex: none; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--white); font-weight: 600; text-decoration: none; }
.calc-bar__go svg { width: 12px; height: 8px; }
@media (max-width: 440px) { .calc-bar__txt--est { display: none; } }

/* ---------------- how we work it out ---------------- */
.how { background: var(--white); overflow: clip; }
.how__head { margin-bottom: clamp(36px, 4.5vw, 64px); }
.how__head h2 { margin-bottom: 18px; }
.how__head .lede { margin: 0; max-width: 120ch; color: var(--graphite); }
.how__grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 88px); align-items: center; }
.how__pic { justify-self: start; width: min(100%, calc(min(66vh, 640px) * .8 + 14px)); }
.how__pic .frame { aspect-ratio: 4 / 5; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 3vw, 48px); }
.fact { --p: 1; position: relative; padding: 16px 0 18px; }
.fact::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1.5px; background: var(--ink); transform: scaleX(var(--p)); transform-origin: left; }
.fact dt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-family: var(--serif); font-size: clamp(1.55rem, 2.1vw, 2rem); line-height: 1.15; }
.fact__n { font-variant-numeric: tabular-nums; }
.fact dt small { font-family: var(--sans); font-size: .8125rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--graphite); }
.fact dd { margin: 8px 0 0; color: var(--graphite); line-height: 1.5; }

.tips { margin-top: clamp(56px, 7vw, 104px); }
.tips__h { font-size: clamp(1.6rem, 2.4vw, 2.1rem); margin-bottom: 26px; }
.tips__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 48px); }
.tip { padding-top: 22px; border-top: 1.5px solid var(--ink); }
.tip__pic { width: 64px; height: 56px; margin-bottom: 14px; fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.tip__acc { stroke-width: 3; }
.tip__dark { fill: var(--ink); }
.tip__h { margin: 0 0 8px; font-family: var(--serif); font-weight: 400; font-size: 1.35rem; line-height: 1.25; }
.tip p { margin: 0; color: var(--graphite); }

/* ---------------- closing band ---------------- */
.close { padding-block: clamp(72px, 7vw, 112px); }
.close__grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(32px, 5vw, 88px); align-items: center; }
.close__txt h2 { margin-bottom: 20px; }
.close__steps { list-style: none; margin: 28px 0 34px; padding: 0; }
.close__steps li { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 18px; align-items: center; padding: 14px 0; border-top: 1px solid rgba(255, 255, 255, .2); color: #e4e4e0; }
.close__steps li:last-child { border-bottom: 1px solid rgba(255, 255, 255, .2); }
.close__n { display: grid; place-items: center; width: 44px; height: 44px; border: 1.5px solid var(--white); border-radius: 50%; font-family: var(--serif); font-size: 1.2rem; color: var(--white); }
.close__pic { justify-self: end; width: min(40vw, calc(min(62vh, 600px) * .75 + 14px)); color: var(--white); }
.close__pic .frame { aspect-ratio: 3 / 4; background: var(--coal); }

/* ---------------- smaller screens ---------------- */
@media (max-width: 900px) {
  .how__grid, .close__grid { grid-template-columns: minmax(0, 1fr); }
  .how__pic, .close__pic { justify-self: center; width: min(100%, calc(var(--media-cap) * .8)); }
  .close__pic { width: min(100%, calc(var(--media-cap) * .75)); }
  .tips__list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .facts { grid-template-columns: minmax(0, 1fr); }
  .cgroup__units { padding-left: 12px; }
  .seg__opt { min-width: 96px; padding: 0 14px; }
}
abbr.unit { text-decoration: none; border: 0; cursor: inherit; }
.ledger__total[hidden], .calc [hidden] { display: none !important; }

/* ---------------- compact sizing (Lee, 2026-09-29): the whole tool fits one desktop screen, no inner scrollbar ---------------- */
.cgroup { margin-bottom: clamp(14px, 2.2vh, 22px); }
.cgroup__legend { margin-bottom: 10px; }
.cgroup__units { margin-bottom: 12px; padding: 6px 6px 6px 14px; }
.seg__opt { min-height: 44px; min-width: 92px; padding: 0 14px; }
.calc .select { min-height: 50px; font-size: 1rem; }
.step { grid-template-columns: 44px minmax(0, 1fr) 44px; min-height: 50px; }
.step__input { min-height: 46px; padding: 6px 0; font-size: 1.2rem; }
.rowA, .rowB { gap: 12px; }
.rowB { margin-top: 12px; }
.calc .field { gap: 5px; }
.pick { gap: 10px; }
.pick__in { gap: 8px; min-height: 0; padding: 12px 14px; }
.pick__pic { width: 40px; height: 32px; }
.pick__txt strong { font-size: 1.15rem; }
.pick__txt > span { font-size: .88rem; }
.pick__tick { top: 10px; right: 10px; width: 24px; height: 24px; }
.surf { gap: 10px; }
.surf__in { min-height: 0; gap: 12px; padding: 10px 14px; }
.coats { width: 32px; height: 24px; }
.surf__txt strong { font-size: .98rem; }
.surf__txt > span { font-size: .88rem; }
@container (max-width: 439px) { .pick__in { min-height: 64px; padding: 10px 50px 10px 12px; } }

.sheet { gap: 12px; padding: clamp(14px, 1.4vw, 20px); }
.sheet__title { font-size: clamp(1.35rem, 1.7vw, 1.65rem); }
.draw { width: min(100%, calc(clamp(150px, 23vh, 240px) * 4 / 3)); }
.sheet__draw { padding: 6px; }
.tblock__cell { padding: 8px 12px; }
.tblock dd { font-size: clamp(1.2rem, 1.45vw, 1.4rem); }
.sheet__body { gap: 16px; }
.paint__row { padding: 6px 0 7px; }
.paint__v { font-size: 1.2rem; }
.paint__tins { min-height: 0; }
.est { margin-top: 10px; padding: 22px 14px 10px; }
.est__row { margin-bottom: 6px; }
.est__v { font-size: clamp(1.35rem, 1.7vw, 1.6rem); }
.est__v--days { font-size: 1.15rem; }
.est__note { padding-top: 8px; font-size: .9rem; line-height: 1.4; }
.sheet__none, .sheet__all { padding: 8px 12px; font-size: .95rem; }
.sheet__acts { gap: 10px; }
.sheet__acts .btn { min-height: 48px; padding-block: 10px; }
@container (min-width: 600px) { .sheet__top { grid-template-columns: minmax(0, 1fr) 160px; } }
