/* Cost calculators + colour guide (builder D). Figma: Cost 55:9678–59:11918, Calculator 55:10038, Color Guide 63:13765–63:14371 */

/* ============ Hero with sofa cut-out (Figma 55:9679 / image 55:9676) ============ */
.calc-hero { overflow-x: clip; overflow-y: visible; z-index: 1; }
.calc-hero .page-hero__inner--split { display: block; position: relative; }
.calc-hero .page-hero__text { position: relative; z-index: 1; max-width: 672px; }
.calc-hero .display { line-height: 1.2; }
.calc-hero .page-hero__intro { font-weight: 300; line-height: 1.9; }
.calc-hero__img { display: block; width: 100%; height: auto; }
@media (min-width: 1100px) {
  .calc-hero .page-hero__aside { position: absolute; left: calc(50% + 24px); top: -39px; width: 980px; pointer-events: none; }
}
@media (max-width: 1099px) {
  .calc-hero .page-hero__aside { margin: 24px calc(-1 * var(--pad)) -64px auto; max-width: 720px; }
}

/* ============ Wizard (Figma 55:10303 / 55:10038) ============ */
.calc-section { padding-top: clamp(64px, 8vw, 96px); }
.wizard.calc { max-width: 672px; }
.calc .wizard__bar { margin-bottom: 0; }
.calc-count { margin: 48px 0 8px; font: 500 12px/16px var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.calc .wizard__q { font-size: clamp(28px, 3vw, 36px); line-height: 1.12; margin: 0; outline: none; }
.calc-sub { margin: 12px 0 0; font-size: 14px; line-height: 20px; color: var(--muted); }
.calc-sub a { color: var(--gold-ink); text-decoration: underline; text-underline-offset: 2px; }
.calc .opts, .calc .chks { margin: 40px 0 0; }
.calc .opts { gap: 16px; }

/* option cards — unselected cream with hairline, selected gold outline on white */
.calc .opt, .calc-form .opt { border: 2px solid var(--line); background: var(--cream); padding: 24px 26px; }
.calc .opt:has(input:checked), .calc-form .opt:has(input:checked) { border-color: var(--gold); background: var(--bg); }
.opt__body { display: block; }
.opt__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.calc .opt__t { font-size: 24px; line-height: 32px; }
.calc .opt__d { font-size: 14px; line-height: 20px; }
.calc-opts--sm .opt { padding: 18px 22px; }
.calc-opts--sm .opt__t { font-size: 20px; line-height: 28px; }
.calc-opts--finish .opt__t { font-size: 20px; line-height: 28px; }
.calc-opts--finish .opt__d { line-height: 22.75px; margin-top: 8px; }
.opt__p { font: 500 14px/20px var(--sans); color: var(--gold-ink); white-space: nowrap; }

/* checkbox cards (Figma 55:10768) */
.chks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chks[hidden] { display: none; }
.chk { position: relative; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 16px 22px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--cream); cursor: pointer; transition: border-color .2s, background .2s; }
.chk:hover { border-color: color-mix(in srgb, var(--gold) 50%, var(--line)); }
.chk input { position: absolute; opacity: 0; pointer-events: none; }
.chk__box { flex: none; width: 16px; height: 16px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); display: grid; place-items: center; }
.chk__box::after { content: ""; width: 5px; height: 8px; border: solid #fff; border-width: 0 1.5px 1.5px 0; transform: translateY(-1px) rotate(45deg); opacity: 0; }
.chk__t { font: 500 14px/20px var(--sans); color: var(--ink); }
.chk__d { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.chk:has(input:checked) { border-color: var(--gold); background: var(--bg); }
.chk:has(input:checked) .chk__box { background: var(--gold); border-color: var(--gold); }
.chk:has(input:checked) .chk__box::after { opacity: 1; }
.chk:has(input:checked) .chk__t { color: var(--gold-ink); }
.chk:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.chk--all { border-style: dashed; }
@media (max-width: 600px) { .chks { grid-template-columns: 1fr; } }

/* area input + slider (Figma 55:11235) */
.calc-area { margin-top: 48px; }
.calc-area__label { display: block; font: 500 12px/16px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.calc-area__num { display: flex; align-items: flex-end; gap: 12px; padding-bottom: 24px; }
.calc-area__input { width: 170px; border: 0; border-bottom: 2px solid var(--gold); background: transparent; padding: 0 0 6px; font: 300 48px/48px var(--serif); font-variation-settings: "SOFT" 0, "WONK" 1; color: var(--ink); text-align: right; -moz-appearance: textfield; appearance: textfield; border-radius: 0; }
.calc-area__input::-webkit-outer-spin-button, .calc-area__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.calc-area__input:focus { outline: none; border-bottom-color: var(--gold-ink); box-shadow: 0 6px 0 -4px var(--gold-soft); }
.calc-area__num > span { font-size: 18px; line-height: 28px; color: var(--muted); padding-bottom: 4px; }
.calc-range { --p: 0%; display: block; width: 100%; height: 24px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.calc-range::-webkit-slider-runnable-track { height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--gold) var(--p), var(--line) var(--p)); }
.calc-range::-moz-range-track { height: 2px; border-radius: 2px; background: var(--line); }
.calc-range::-moz-range-progress { height: 2px; background: var(--gold); }
.calc-range::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -7px; border-radius: 50%; background: var(--gold); border: 0; box-shadow: 0 0 0 4px var(--bg); }
.calc-range::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--gold); border: 0; }
.calc-range:focus-visible { outline: none; }
.calc-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--gold); }
.calc-scale { position: relative; height: 24px; padding-top: 8px; font-size: 12px; line-height: 16px; color: var(--muted); }
.calc-scale span { position: absolute; top: 8px; white-space: nowrap; }
.calc-seats { margin-top: 32px; max-width: 260px; }
.calc-num__wrap { display: flex; align-items: center; gap: 8px; }
.calc-num__wrap em { font-style: normal; font-size: 13px; color: var(--muted); white-space: nowrap; }
.calc-num small { font-size: 12px; color: var(--muted); }

/* city */
.calc-city__label { margin: 32px 0 12px; font: 500 12px/16px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.calc-seg label { position: relative; }
.calc-seg label:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }

/* nav (Figma 55:10336) */
.calc-nav { justify-content: space-between; padding-top: 40px; }
.calc--first .calc-nav { justify-content: flex-start; }
.calc-nav .btn--gold { padding: 14px 32px; font-weight: 500; letter-spacing: .1em; }
.calc-nav .btn--gold[disabled], .calc-form .btn--gold[disabled] { opacity: 1; background: var(--line); color: var(--muted); }
.calc-back { padding: 10px 0; font-size: 12px; line-height: 16px; letter-spacing: .12em; }

/* ============ Result (Figma 59:12090) ============ */
.calc-result { max-width: 760px; margin-inline: auto; }
.calc-result[hidden] { display: none; }
.calc-result__head { max-width: 576px; margin-inline: auto; text-align: center; }
.calc-result__head .eyebrow { margin-bottom: 0; }
.calc-result__range { margin: 24px 0 0; font-size: clamp(40px, 6.25vw, 80px); line-height: 1.1; outline: none; }
.calc-result__range span { white-space: nowrap; }
.calc-result__sum { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.calc-result__note { margin: 8px 0 0; font-size: 12px; font-style: italic; color: var(--muted); }
.calc-result__gst { margin: 12px 0 0; font: 500 13px/1.5 var(--sans); color: var(--gold-ink); }
.calc-result__actions { display: grid; gap: 16px; max-width: 320px; margin: 40px auto 0; }
.calc-result__actions .btn { width: 100%; }
.calc-again { border: 1px solid var(--line); background: transparent; color: var(--muted); text-transform: none; letter-spacing: 0; padding: 13px 20px; }
.calc-again:hover { border-color: var(--gold); color: var(--ink); }
.calc-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 56px 0 0; }
.calc-facts > div { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: var(--cream); }
.calc-facts dt { font: 500 11px/16px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.calc-facts dd { margin: 6px 0 0; font: 300 19px/1.35 var(--serif); color: var(--ink); }
@media (max-width: 640px) { .calc-facts { grid-template-columns: 1fr; } }
.calc-result__h { margin: 40px 0 14px; }
.calc-t th[scope=row] { font-weight: 500; }
.calc-t__note { display: block; font-weight: 400; font-size: 12px; line-height: 1.45; color: var(--muted); margin-top: 2px; max-width: 360px; }
.calc-t tfoot th, .calc-t tfoot td { font-weight: 600; border-bottom: 0; background: var(--cream); }
.calc-t td { white-space: nowrap; vertical-align: top; }
.calc-t th { vertical-align: top; }
@media (max-width: 560px) {
  .calc-t thead th:nth-child(2), .calc-t td:nth-child(2), .calc-t tfoot td:nth-child(2) { display: none; }
  .calc-t__note { display: none; }
  .calc-t td, .calc-t th { padding-inline: 10px !important; font-size: 13px; }
}
.calc-disclaimer { margin: 14px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--muted); }
.calc-quote { display: grid; grid-template-columns: .8fr 1.2fr; gap: 32px; align-items: start; margin-top: 56px; padding-top: 48px; border-top: 1px solid var(--line); }
.calc-quote .panel { padding: clamp(20px, 3vw, 32px); }
.calc-quote a { color: var(--gold-ink); }
@media (max-width: 760px) { .calc-quote { grid-template-columns: 1fr; } }

/* ============ Rate tables + guide content ============ */
.calc-prose h2:first-of-type { margin-top: 0; }
.calc-rates th[scope=row], .calc-specs th[scope=row], .calc-bhk th[scope=row] { font-weight: 500; white-space: nowrap; }
.calc-rates td, .calc-bhk td { white-space: nowrap; }
.calc-rates td:nth-child(2) { white-space: normal; min-width: 180px; color: var(--muted); }
.calc-specs td { min-width: 180px; vertical-align: top; color: var(--muted); }
.calc-unit { font-size: 11px; color: var(--muted); margin-left: 2px; }
.calc-more { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); margin-top: 12px; }
.calc-more summary { cursor: pointer; padding: 16px 20px; font: 300 20px/1.3 var(--serif); list-style: none; position: relative; }
.calc-more summary::-webkit-details-marker { display: none; }
.calc-more summary::after { content: "+"; position: absolute; right: 20px; top: 14px; color: var(--gold); font: 300 24px var(--sans); }
.calc-more[open] summary::after { content: "–"; }
.calc-more .table-wrap { border: 0; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }
.calc-callout { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; font-size: 14px; color: var(--muted); }
.calc-callout strong { color: var(--ink); font-weight: 500; }
.calc-callout p { margin: 0 0 8px; }
.calc-bhk td { font-variant-numeric: tabular-nums; }
.calc-tools .tool-card__icon { font-family: var(--serif); }
.section-head .h2--sm { margin: 0; }

/* breadcrumb sits on top of the cream hero (site.css lets the positioned hero cover it) */
.crumbs { position: relative; z-index: 2; }
.calc-hero .display { max-width: 640px; }
.calc [hidden], .calc-result [hidden] { display: none !important; }
/* row headers in data tables read as body text, not column labels */
.table tbody th[scope=row], .table tfoot th[scope=row] { font: 500 14px/1.45 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink); }
.calc-t tfoot th[scope=row] { font-weight: 600; }

/* ============ Sub-calculators (kitchen / wardrobe / false ceiling) ============ */
@media (min-width: 901px) { .calc-subhero .page-hero__inner--split { grid-template-columns: 1.15fr .85fr; } }
.calc-aside { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px 26px; box-shadow: var(--shadow); }
.calc-aside .eyebrow { margin-bottom: 4px; }
.calc-aside .kv { margin: 10px 0 14px; font-size: 15px; }
.calc-aside .kv dt, .calc-aside .kv dd { padding: 8px 0; border-bottom: 1px solid var(--line); }
.calc-aside .kv dd { font-weight: 400; color: var(--ink); white-space: nowrap; }
.calc-tool-section { padding-top: clamp(48px, 6vw, 80px); }
.calc-tool { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 32px; }
@media (max-width: 900px) { .calc-tool { grid-template-columns: 1fr; } }
.calc-form { padding: clamp(20px, 3vw, 36px); display: grid; gap: 36px; }
.calc-fs { border: 0; margin: 0; padding: 0; min-width: 0; }
.calc-legend { display: flex; align-items: center; gap: 12px; padding: 0; margin-bottom: 14px; font: 300 22px/1.3 var(--serif); font-variation-settings: "SOFT" 0, "WONK" 1; color: var(--ink); }
.calc-legend em { font-style: normal; font-family: var(--sans); font-size: 13px; color: var(--muted); }
.calc-legend__n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-ink); font: 500 12px/1 var(--sans); }
.calc-help { margin: -6px 0 14px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.calc-mini { margin: 0 0 8px; font: 500 12px/16px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.calc-form .opts { margin: 0; gap: 10px; }
.calc-form .opt { padding: 14px 16px; }
.calc-form .opt__t { font-size: 18px; line-height: 1.3; }
.calc-form .opt__d { font-size: 12.5px; line-height: 1.45; }
.calc-form .opt.is-off { opacity: .4; cursor: not-allowed; }
.calc-opts--icons { grid-template-columns: 1fr 1fr; }
.opt--icon { display: flex; align-items: flex-start; gap: 14px; }
.opt__icon { flex: none; width: 44px; color: var(--gold-ink); }
.opt__icon svg { width: 44px; height: 44px; }
.calc-opts--stack .opt--icon { flex-direction: column; gap: 10px; }
@media (max-width: 600px) { .calc-opts--icons { grid-template-columns: 1fr; } .calc-opts--stack .opt--icon { flex-direction: row; } }
.calc-form .chks { gap: 10px; }
.calc-form .chk { min-height: 52px; padding: 12px 16px; }
.calc-form .chk__t { font-size: 13.5px; }
.calc-walls { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.calc-walls > div[hidden] { display: none; }
.calc-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; margin-top: 14px; }
.calc-row2 > [hidden] { display: none; }
@media (max-width: 520px) { .calc-row2 { grid-template-columns: 1fr; } }
.calc-num .input { padding: 11px 12px; }
.calc-num .calc-num__wrap { position: relative; }

.calc-tool .tool__out { top: calc(var(--hdr-h) + 16px); max-height: calc(100vh - var(--hdr-h) - 32px); overflow: auto; border-radius: var(--radius-lg); }
.calc-out { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(22px, 2.6vw, 30px); }
.calc-out .eyebrow { margin-bottom: 6px; }
.calc-out__range { margin: 0; font: 300 clamp(28px, 2.8vw, 38px)/1.15 var(--serif); font-variation-settings: "SOFT" 0, "WONK" 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.calc-out__sum { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.calc-kv { margin: 18px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; gap: 6px 14px; }
.calc-kv dd { font-weight: 400; white-space: nowrap; }
.calc-out__unit { margin: 14px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.calc-out__gst { margin: 6px 0 18px; font: 500 13px/1.5 var(--sans); color: var(--gold-ink); }
.calc-out__note { margin: 12px 0 0; font-size: 12px; font-style: italic; color: var(--muted); text-align: center; }
.calc-bar { position: fixed; left: 12px; right: 84px; bottom: 18px; z-index: 55; display: none; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border-radius: 999px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.calc-bar strong { font: 500 15px/1.2 var(--sans); letter-spacing: 0; text-transform: none; white-space: nowrap; }
.calc-bar:hover { color: var(--bg); }
.calc-bar.is-on { display: flex; }
@media (min-width: 900px) { .calc-bar.is-on { display: none; } }

.calc-quote2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.calc-quote2 .h2--sm { margin-bottom: 20px; }
@media (max-width: 900px) { .calc-quote2 { grid-template-columns: 1fr; } }
.calc-speclist { list-style: none; margin-top: 16px; display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.calc-speclist strong { color: var(--ink); font-weight: 500; }
.calc-cmp td { min-width: 140px; vertical-align: top; color: var(--muted); font-size: 13.5px; }
.calc-cmp td.num, .calc-cmp td:last-child { color: var(--ink); white-space: nowrap; }
.calc-aside .kv { gap: 0 16px; }
.field > .calc-num__wrap { font: 400 15px/1.4 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink); }

/* result: scope split, optional lines, schedule */
.calc-scope { margin-top: 28px; }
.calc-scope__h { margin: 0 0 10px; font: 500 11px/16px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.calc-scope__list { list-style: none; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.calc-scope__list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 18px; border-top: 1px solid var(--line); }
.calc-scope__list li:first-child { border-top: 0; }
.calc-scope__list li.is-current { background: var(--gold-soft); }
.calc-scope__list strong { font-weight: 500; }
.calc-scope__list em { font-style: normal; font-size: 12px; color: var(--gold-ink); }
.calc-scope__list small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.calc-scope__list b { font: 300 18px/1.3 var(--serif); white-space: nowrap; color: var(--ink); }
.calc-scope__note { margin: 0; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; color: var(--muted); }
.calc-scope__note strong { color: var(--ink); font-weight: 500; }
@media (max-width: 560px) { .calc-scope__list li { flex-direction: column; align-items: flex-start; gap: 4px; } }
.calc-t tfoot tr:first-child th, .calc-t tfoot tr:first-child td { border-top: 1px solid var(--line); }
.calc-t tfoot tr[hidden] { display: none; }
.calc-t tfoot .calc-t__note { font-weight: 400; }
.calc-t__grand th, .calc-t__grand td { background: var(--gold-soft) !important; font-weight: 600; }
.calc-addons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.calc-addons .chk { min-height: 0; padding: 12px 16px; }
.calc-addons .chk__t { font-size: 13.5px; }
@media (max-width: 560px) { .calc-addons { grid-template-columns: 1fr; } }
.calc-pct { font-weight: 400; color: var(--gold-ink); white-space: nowrap; }
@media (max-width: 560px) { .calc-sched td:nth-child(2), .calc-sched thead th:nth-child(2) { display: table-cell !important; } }

/* kitchen work-triangle check */
.calc-tri { margin: 12px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--cream); border: 1px solid var(--line); font-size: 13px; line-height: 1.5; color: var(--muted); }
.calc-tri span { display: block; }
.calc-tri span + span { margin-top: 4px; }
.calc-tri.is-ok { border-color: color-mix(in srgb, #2f7a4a 40%, var(--line)); color: var(--ink); }
.calc-tri.is-warn { border-color: color-mix(in srgb, #b3452f 45%, var(--line)); color: var(--ink); }
.calc-dims td:nth-child(2) { white-space: nowrap; color: var(--ink); }

/* ============ Colour guide (Figma 63:13765 … 63:14530) ============ */
@media (min-width: 901px) { .cg-hero .page-hero__inner--split { grid-template-columns: 1.1fr .9fr; } }
.cg-hero-stripes { height: clamp(180px, 26vw, 340px); box-shadow: var(--shadow); }
.cg-tabs { background: var(--cream); border-bottom: 1px solid var(--line); }
.cg-tabs ul { list-style: none; display: flex; overflow-x: auto; scrollbar-width: none; }
.cg-tabs ul::-webkit-scrollbar { display: none; }
.cg-tabs a { display: block; padding: 12px 20px 14px; border-bottom: 2px solid transparent; font: 500 12px/16px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.cg-tabs a:hover { color: var(--ink); }
.cg-tabs a.is-active { color: var(--gold-ink); border-bottom-color: var(--gold); }
.cg-section { padding-block: clamp(48px, 6vw, 72px); }
.cg { max-width: 512px; margin-inline: auto; }
.cg [hidden] { display: none !important; }
.cg-title { font-size: 24px; line-height: 32px; margin: 0; }
.cg-lead { margin: 8px 0 0; font-size: 14px; line-height: 20px; color: var(--muted); }
.cg-quiz { padding-top: 40px; }
.cg-bar { display: flex; gap: 4px; }
.cg-bar span { flex: 1; height: 4px; border-radius: 4px; background: var(--line); transition: background .3s; }
.cg-bar span.is-done { background: var(--gold); }
.cg-count { margin: 32px 0 0; font: 500 12px/16px var(--sans); letter-spacing: .15em; color: var(--muted); }
.cg-q { margin: 8px 0 0; font-size: 24px; line-height: 32px; outline: none; }
.cg-opts { display: grid; gap: 12px; margin-top: 32px; }
.cg-opts--2 { grid-template-columns: 1fr 1fr; }
.cg-opts--3 { grid-template-columns: repeat(3, 1fr); }
.cg-opt { position: relative; display: block; border: 1px solid var(--line); background: var(--cream); border-radius: var(--radius); padding: 16px 20px; cursor: pointer; transition: border-color .2s, background .2s; }
.cg-opt:hover { border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); }
.cg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.cg-opt__t { display: block; font-size: 14px; line-height: 20px; color: var(--ink); }
.cg-opt__d { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.cg-opt:has(input:checked) { border-color: var(--gold); background: var(--bg); box-shadow: inset 0 0 0 1px var(--gold); }
.cg-opt:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.cg-sub { margin: 28px 0 0; font: 500 12px/16px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cg-sub + .cg-opts { margin-top: 12px; }
.cg-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 32px; }
.cg-nav [data-cg-next]:only-child, .cg-back[hidden] + [data-cg-next] { margin-left: auto; }
.cg-nav .btn--gold[disabled] { opacity: 1; background: var(--line); color: var(--muted); }
.cg-back, .cg-retake { border: 0; background: none; cursor: pointer; padding: 8px 0; font: 400 12px/16px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cg-back:hover, .cg-retake:hover { color: var(--ink); }
@media (max-width: 480px) { .cg-opts--3 { grid-template-columns: 1fr 1fr; } }

/* result */
.cg-result { padding-top: 40px; }
.cg-result .eyebrow { margin: 0; }
.cg-result__name { margin: 8px 0 0; font-size: 30px; line-height: 36px; outline: none; }
.cg-result__meta { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.cg-stripes { display: flex; height: 96px; border-radius: var(--radius); overflow: hidden; }
.cg-stripes span { flex: 1; }
.cg-result .cg-stripes { margin-top: 32px; }
.cg-result__desc { margin: 16px 0 0; font-size: 15px; color: var(--muted); }
.cg-sw { list-style: none; margin-top: 20px; border-top: 1px solid var(--line); }
.cg-sw__item { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cg-sw__chip { width: 56px; height: 56px; border-radius: 10px; border: 1px solid rgba(0,0,0,.08); }
.cg-sw__role { margin: 0; font: 500 11px/16px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cg-sw__role span { color: var(--gold-ink); letter-spacing: .04em; }
.cg-sw__name { margin: 2px 0 4px; font: 300 19px/1.3 var(--serif); font-variation-settings: "SOFT" 0, "WONK" 1; color: var(--ink); }
.cg-sw__meta { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.cg-sw__meta b { font-weight: 500; color: var(--ink); }
.cg-copy { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 6px 12px; font: 500 12px/16px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); cursor: pointer; white-space: nowrap; min-width: 84px; }
.cg-copy:hover { border-color: var(--gold); }
.cg-copy.is-copied { background: var(--gold); border-color: var(--gold); color: #fff; font-family: var(--sans); }
@media (max-width: 420px) { .cg-sw__item { grid-template-columns: 44px 1fr; } .cg-sw__chip { width: 44px; height: 44px; } .cg-copy { grid-column: 2; justify-self: start; } }
.cg-notes { margin-top: 18px; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.cg-notes p { margin: 0; }
.cg-notes p + p { margin-top: 8px; }
.cg-notes:empty { display: none; }
.cg-actions { display: grid; gap: 12px; padding-top: 24px; }
.cg-actions .btn { width: 100%; padding-block: 12px; font-weight: 500; }
.cg-save.is-saved { background: var(--gold-ink); }
.cg-line { border: 1px solid var(--line); color: var(--ink); background: transparent; }
.cg-line:hover { border-color: var(--gold); color: var(--ink); }
.cg-retake { justify-self: center; text-transform: none; letter-spacing: 0; }
.cg-alts { margin-top: 32px; }
.cg-alts__h { margin: 0 0 10px; font: 500 11px/16px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.cg-alts__list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cg-alt { display: grid; gap: 8px; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: var(--radius); padding: 10px; cursor: pointer; }
.cg-alt:hover { border-color: var(--gold); }
.cg-alt__stripes { display: flex; height: 40px; border-radius: 8px; overflow: hidden; }
.cg-alt__stripes i { flex: 1; }
.cg-alt__t { font: 300 16px/1.3 var(--serif); color: var(--ink); }
.cg-alt__t small { display: block; font: 400 11.5px/1.4 var(--sans); color: var(--muted); }

/* palette library */
.cg-lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 32px 24px; }
.pal[hidden] { display: none; }
.pal__media { border-radius: var(--radius); }
.pal__media .cg-stripes { height: 120px; border-radius: 0; }
.pal__name { margin: 14px 0 2px; font-size: 21px; line-height: 1.3; }
.pal__meta { margin: 0 0 10px; font-size: 12px; letter-spacing: .04em; color: var(--muted); }
.pal__hex { list-style: none; display: grid; gap: 4px; margin-bottom: 12px; font-size: 12.5px; color: var(--muted); }
.pal__hex li { display: flex; align-items: center; gap: 8px; }
.pal__hex li span { width: 12px; height: 12px; border-radius: 3px; border: 1px solid rgba(0,0,0,.08); flex: none; }
.pal__hex code { margin-left: auto; font: 500 11.5px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); }
.pal .link-arrow { font-size: 13px; }
.cg-prose h2:first-child { margin-top: 0; }
#palettes .section-head { align-items: flex-end; }
#palettes .section-head .h2 { margin: 0; }
.cg-stripes { border: 1px solid var(--line); }
.cg-hero .page-hero__intro .btn { margin-top: 12px; }
.calc-rates td:last-child { text-align: right; }
