/* "Start a project" — brief builder in #contact (js/brief.js).
   The form is drawn as a sheet: title strip, a dimension line for progress, hairline fields, a title block for review. */

.brief {
  --brief-sheet: var(--sheet);
  --brief-field: #ffffff;
  --brief-hover: #e4ecea;
  --brief-error: #a3352b;
  --brief-placeholder: #5b6a6f;
  --brief-field-line: rgba(var(--ink-rgb), .5); /* control boundaries: 3.4:1 on the sheet, 3.5:1 on white */
  --focus: var(--cobalt); /* amber focus rings vanish on paper; cobalt keeps 3:1 and more */
  position: relative;
  min-width: 0;
}
.brief [hidden] { display: none !important; }
/* Keyboard focus that scrolls the page (e.g. Shift+Tab) stops below the sticky progress strip, not under it. */
.brief-body :is(input, textarea, select, button, a, summary), .brief-nav button { scroll-margin-top: 160px; }
.js .brief:empty { min-height: 560px; } /* hold space until the module renders */

.brief-sheet {
  --bp-pad: clamp(18px, 3vw, 40px);
  container: brief / inline-size;
  position: relative;
  background: var(--brief-sheet);
  border: 1.5px solid var(--ink);
  box-shadow: var(--shadow-sheet, 0 18px 40px -24px rgba(var(--ink-rgb), .35));
}

/* ---------- title strip + progress (sticky while a long step scrolls) ---------- */
.brief-head {
  position: sticky;
  top: var(--header-h);
  z-index: 3;
  padding: 16px var(--bp-pad) 14px;
  background: var(--brief-sheet);
  border-bottom: 1px solid var(--line);
  transition: top var(--t-med) var(--ease);
}
html:has(.site-header.is-hidden) .brief-head { top: 0; }
.brief-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; font-size: var(--fs-label, .75rem); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.brief-meta span { white-space: nowrap; }

/* Dimension line: dashed where it is still to be drawn, solid where it has been. Oblique ticks mark each step. */
.bf-bp { position: relative; margin-top: 12px; }
.bf-bp-ticks { position: relative; z-index: 1; display: flex; justify-content: space-between; margin: 0; padding: 0; list-style: none; }
.bf-bp-line { position: absolute; left: 22px; right: 22px; top: 32px; height: 1px;
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 5px, transparent 5px 9px); }
.bf-bp-fill { position: absolute; inset: 0; background: var(--ink); transform-origin: left center;
  transform: scaleX(var(--p, 0)); transition: transform .7s var(--ease); }
.bf-bp-tick { position: relative; display: grid; justify-items: center; align-content: start; width: 44px; height: 48px;
  padding: 0; border: 0; background: transparent; color: var(--muted); }
.bf-bp-tick:not(:disabled):hover { color: var(--cobalt); }
.bf-bp-tick:disabled { cursor: default; }
.bf-bp-num { font-family: var(--font-mono); font-size: var(--fs-label, .75rem); letter-spacing: .1em; line-height: 1; margin-top: 4px; }
.bf-bp-mark { position: absolute; left: 50%; top: 32px; width: 1.5px; height: 15px; background: var(--line-strong);
  transform: translate(-50%, -50%) rotate(45deg); transition: background var(--t-fast), width var(--t-med) var(--ease), height var(--t-med) var(--ease), transform var(--t-med) var(--ease); }
.bf-bp-tick.is-done { color: var(--ink); }
.bf-bp-tick.is-done .bf-bp-mark { background: var(--ink); }
.bf-bp-tick.is-current { color: var(--ink); }
.bf-bp-tick.is-current .bf-bp-num { font-weight: 500; }
.bf-bp-tick.is-current .bf-bp-mark { width: 11px; height: 11px; background: var(--amber); box-shadow: 0 0 0 1px var(--ink); transform: translate(-50%, -50%); }
.bf-bp-tick:focus-visible { outline-offset: -2px; }
.bf-bp-label { margin: 2px 0 0; font-size: var(--fs-label, .75rem); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.bf-bp-label span { position: relative; display: inline-block; white-space: nowrap;
  left: calc(var(--p, 0) * 100%); transform: translateX(calc(var(--p, 0) * -100%));
  transition: left .7s var(--ease), transform .7s var(--ease); }

/* ---------- step body ---------- */
.brief-body { position: relative; padding: clamp(24px, 3.4vw, 44px) var(--bp-pad); }
.brief-body.is-resizing { overflow: hidden; }
.bf-bs-head { margin-bottom: clamp(18px, 2.4vw, 28px); }
.bf-bs-title { font-size: var(--fs-xl); max-width: 20ch; }
.bf-bs-title:focus { outline: none; }
.bf-bs-hint { margin: 10px 0 0; max-width: 52ch; color: var(--muted); font-size: var(--fs-sm); text-wrap: pretty; }

.brief-step.is-entering > * { animation: brief-in .55s var(--ease) both; }
.brief-step.is-entering > :nth-child(2) { animation-delay: 50ms; }
.brief-step.is-entering > :nth-child(3) { animation-delay: 100ms; }
.brief-step.is-entering > :nth-child(n + 4) { animation-delay: 150ms; }
@keyframes brief-in { from { opacity: 0; transform: translate3d(calc(var(--dir, 1) * 22px), 0, 0); } }

/* ---------- fields ---------- */
.bf-field { display: grid; gap: 8px; align-content: start; margin-top: 22px; min-width: 0; }
.bf-bs-head + .bf-field, [data-concept-slot] + .bf-field { margin-top: 0; }
.bf-field-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0;
  font-family: var(--font-mono); font-size: var(--fs-label, .75rem); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.bf-field-opt { font-weight: 400; letter-spacing: .1em; color: var(--muted); }
.bf-field-opt::before { content: "— "; }
.bf-field-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.bf-field-count { font-size: var(--fs-label, .75rem); color: var(--muted); letter-spacing: .06em; }
.bf-field-input {
  width: 100%; min-height: 52px; padding: 13px 16px; margin: 0;
  border: 1px solid var(--brief-field-line); border-radius: var(--radius); background: var(--brief-field); color: var(--ink);
  font-size: 1rem; line-height: 1.4; -webkit-appearance: none; appearance: none;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.bf-field-input::placeholder { color: var(--brief-placeholder); opacity: 1; }
.bf-field-input:hover { border-color: rgba(var(--ink-rgb), .75); }
.bf-field-input:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 1px var(--cobalt); }
.bf-field-input[aria-invalid="true"] { border-color: var(--brief-error); box-shadow: inset 3px 0 0 var(--brief-error); }
.bf-field-input[aria-invalid="true"]:focus { box-shadow: inset 3px 0 0 var(--brief-error), 0 0 0 1px var(--brief-error); }
.bf-field-textarea { min-height: 132px; resize: vertical; }
.bf-field-hint { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.bf-field-conv { margin: 0; min-height: 1.3em; font-size: 12px; letter-spacing: .04em; color: var(--muted); }
.bf-field-error { display: flex; align-items: baseline; gap: 8px; margin: 0; color: var(--brief-error); font-size: var(--fs-sm); line-height: 1.4; }
.bf-field-error::before { content: ""; flex: none; width: 7px; height: 7px; background: currentColor; transform: translateY(-1px); }
.bf-field-error:empty { display: none; }
.bf-field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; margin-top: 22px; }
.bf-field-row > .bf-field { margin-top: 0; }
.bf-field-hint + .bf-field-error { margin-top: 8px; }

/* area + unit */
.bf-field-unit { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.bf-unit-toggle { display: inline-flex; border: 1px solid var(--brief-field-line); border-radius: var(--radius); background: var(--brief-field); }
.bf-unit-toggle label { position: relative; display: grid; place-items: center; min-width: 52px; min-height: 50px; padding: 0 10px;
  font-family: var(--font-mono); font-size: .9rem; cursor: pointer; transition: background var(--t-fast), color var(--t-fast); }
.bf-unit-toggle label + label { border-left: 1px solid var(--brief-field-line); }
.bf-unit-toggle input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.bf-unit-toggle label:hover { background: var(--brief-hover); }
.bf-unit-toggle label:has(input:checked) { background: var(--ink); color: var(--paper); }
.bf-unit-toggle label:has(input:focus-visible) { z-index: 1; outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- step 1: project cards ---------- */
.bf-opt-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.bf-opt-card { position: relative; display: grid; grid-template-rows: auto 1fr; gap: 20px; min-height: 160px; padding: 18px 18px 20px;
  border: 1px solid var(--brief-field-line); background: var(--brief-field); cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.bf-opt-card input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.bf-opt-icon { width: 42px; height: 42px; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: square; stroke-linejoin: miter; color: var(--ink); transition: color var(--t-fast); }
.bf-opt-icon .draw { stroke-dasharray: 1; stroke-dashoffset: 0; }
.bf-opt-icon .dash { stroke-dasharray: 2 2.2; }
.bf-opt-text { display: grid; align-content: end; gap: 6px; }
.bf-opt-title { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; line-height: 1.2; }
.bf-opt-sub { font-size: .82rem; line-height: 1.4; color: var(--muted); text-wrap: balance; } /* "Commercial or / residential interiors" */
.bf-opt-ind { position: absolute; top: 16px; right: 16px; width: 12px; height: 12px; border: 1px solid var(--brief-field-line);
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-med) var(--ease); }
.bf-opt-card:hover { border-color: rgba(var(--ink-rgb), .75); }
.bf-opt-card:hover .bf-opt-ind { border-color: var(--ink); }
.bf-opt-card:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.bf-opt-card:has(input:checked) .bf-opt-ind { background: var(--amber); border-color: var(--ink); transform: scale(1.15); }
.bf-opt-card:has(input:checked) .bf-opt-icon { color: var(--cobalt); }
.bf-opt-card:has(input:checked) .bf-opt-icon .draw { animation: brief-draw .9s var(--ease) both; }
.bf-opt-card:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }
.bf-opt-cards[aria-invalid="true"] .bf-opt-card:not(:hover) { border-color: rgba(163, 53, 43, .6); }
.bf-opt-cards + .bf-field-error { margin-top: 14px; }
@keyframes brief-draw { from { stroke-dashoffset: 1; } }
/* the quiet way out of step 1: a WhatsApp chat instead of the form */
.bf-talk { margin: 14px 0 0; }
.bf-talk a { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--fs-sm); color: var(--cobalt); text-decoration: underline 1px; text-underline-offset: .2em; }
@media (hover: hover) { .bf-talk a:hover { text-decoration-thickness: 2px; } }

/* ---------- segmented choices: title-block cells sharing hairlines ---------- */
.bf-seg { display: flex; flex-wrap: wrap; border-top: 1px solid var(--brief-field-line); border-left: 1px solid var(--brief-field-line); background: var(--brief-field); }
.bf-seg-opt { position: relative; flex: 1 1 128px; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px 14px;
  border-right: 1px solid var(--brief-field-line); border-bottom: 1px solid var(--brief-field-line);
  font-size: .95rem; line-height: 1.3; cursor: pointer; transition: background var(--t-fast), color var(--t-fast); }
.bf-seg--wide .bf-seg-opt { flex-basis: 168px; }
.bf-seg--three .bf-seg-opt { flex-basis: 112px; }
.bf-seg-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.bf-seg-ind { flex: none; width: 11px; height: 11px; border: 1px solid var(--brief-field-line); transition: background var(--t-fast), border-color var(--t-fast); }
.bf-seg-opt:hover { background: var(--brief-hover); }
.bf-seg-opt:hover .bf-seg-ind { border-color: var(--ink); }
.bf-seg-opt:has(input:checked) { background: var(--ink); color: var(--paper); }
.bf-seg-opt:has(input:checked) .bf-seg-ind { background: var(--amber); border-color: var(--amber); }
.bf-seg-opt:has(input:focus-visible) { z-index: 1; outline: 2px solid var(--focus); outline-offset: 2px; }
.bf-seg[aria-invalid="true"] { box-shadow: 0 0 0 1px var(--brief-error); border-color: var(--brief-error); }

/* ---------- attached studio concept ---------- */
.bf-concept-chip { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; padding: 4px 4px 4px 16px;
  border: 1px solid var(--cobalt); background: #ddeeec; color: var(--ink); }
.bf-concept-ind { flex: none; width: 10px; height: 10px; background: var(--amber); box-shadow: 0 0 0 1px var(--cobalt); }
.bf-concept-text { display: grid; gap: 2px; min-width: 0; flex: 1; padding-block: 8px; }
.bf-concept-label { font-size: var(--fs-label, .75rem); letter-spacing: .14em; text-transform: uppercase; color: var(--cobalt); }
.bf-concept-summary { font-size: var(--fs-sm); line-height: 1.4; overflow-wrap: anywhere; }
.bf-concept-remove { position: relative; flex: none; width: 44px; height: 44px; border: 0; background: transparent; color: var(--cobalt); }
.bf-concept-remove span::before, .bf-concept-remove span::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 1.5px; background: currentColor; }
.bf-concept-remove span::before { transform: translate(-50%, -50%) rotate(45deg); }
.bf-concept-remove span::after { transform: translate(-50%, -50%) rotate(-45deg); }
.bf-concept-remove:hover { background: rgba(var(--cobalt-rgb), .08); }
.btb-cell .bf-concept-chip { margin: 6px 0 0; }

/* ---------- review: the brief as a title block ---------- */
.btb { border: 1.5px solid var(--ink); background: var(--brief-field); overflow: hidden; }
.btb-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 16px; padding: 18px 20px 20px; border-bottom: 1.5px solid var(--ink); }
.btb-kicker { margin: 0 0 10px; font-size: var(--fs-label, .75rem); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.btb-project { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: var(--fs-lg); line-height: 1.1; letter-spacing: -0.01em; }
.btb-where { margin: 6px 0 0; color: var(--muted); overflow-wrap: anywhere; }
.btb-where:empty { display: none; }
.btb-mark { width: 40px; height: 40px; }
.btb-mark .m-shape { fill: var(--cobalt); }
.btb-mark .m-win { fill: var(--amber); }
.btb-sq { width: 14px; height: 14px; background: var(--amber); box-shadow: 0 0 0 1px var(--ink); }
.btb-cells { display: flex; flex-wrap: wrap; margin: 0 -1px -1px 0; }
.btb-cell { flex: 1 1 172px; min-width: 0; padding: 11px 16px 13px; border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.btb-cell--long { flex-basis: 260px; }
.btb-cell--wide { flex-basis: 100%; }
.btb-cell dt { margin-bottom: 4px; font-family: var(--font-mono); font-size: var(--fs-label, .75rem); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.btb-cell dd { margin: 0; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.btb-cell--message dd { font-weight: 400; white-space: pre-line; max-height: 14em; overflow: auto; }
.btb-empty { color: var(--muted); font-weight: 400; }
.btb-foot { display: flex; flex-wrap: wrap; font-size: var(--fs-label, .75rem); letter-spacing: .1em; text-transform: uppercase; border-top: 1px solid var(--ink);
  margin: -1px -1px -1px 0; } /* hairlines at the frame edge fall outside .btb and are clipped, as with .btb-cells */
.btb-foot span { flex: 1 1 auto; padding: 10px 16px; border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.btb-foot b { margin-right: 6px; font-weight: 400; color: var(--muted); }

.btb-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; margin-top: 10px; font-size: var(--fs-label, .75rem); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.btb-edit > span { margin-right: 6px; }
.btb-edit-btn { min-height: 44px; padding: 0 8px; border: 0; background: transparent; color: var(--ink); font: inherit; letter-spacing: inherit; text-transform: inherit;
  text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.btb-edit-btn:hover { color: var(--cobalt); text-decoration-color: currentColor; }

.brief-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.brief-actions > * { flex: 1 1 auto; }
.brief-actions .btn--primary { flex-grow: 1.4; }
.brief-ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.brief-copy.is-copied { --btn-bd: var(--cobalt); color: var(--cobalt); }
.brief-mail-note { display: flex; align-items: baseline; gap: 10px; max-width: 62ch; margin: 12px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.brief-mail-note::before { content: ""; flex: none; width: 7px; height: 7px; background: var(--amber); box-shadow: 0 0 0 1px var(--ink); transform: translateY(-1px); }
.brief-copy-status { min-height: 1.4em; margin: 10px 0 0; font-size: var(--fs-label, .75rem); letter-spacing: .12em; text-transform: uppercase; color: var(--cobalt); }

.brief-preview { margin-top: 6px; border-top: 1px solid var(--line); }
.brief-preview summary { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: var(--fs-label, .75rem); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); cursor: pointer; list-style: none; }
.brief-preview summary::-webkit-details-marker { display: none; }
.brief-preview summary::before { content: "+"; display: inline-grid; place-items: center; width: 16px; height: 16px; border: 1px solid var(--line-strong); font-size: 12px; line-height: 1; }
.brief-preview[open] summary::before { content: "−"; }
.brief-pre { margin: 4px 0 0; padding: 16px 18px; max-height: 300px; overflow: auto; background: var(--paper); border: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.brief-privacy { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--muted); }
.brief-privacy .brief-ico { margin-top: 2px; color: var(--ink); }

/* ---------- thank-you state ---------- */
.brief-done { position: relative; display: grid; gap: 16px; justify-items: start; padding-block: 4px; }
.brief-done .bf-bs-title { max-width: 16ch; padding-right: 120px; }
.bf-done-text { margin: 0; max-width: 50ch; font-size: var(--fs-md); line-height: 1.5; }
.lang-zh .bf-done-text { word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance; } /* even lines broken at its 。 and ，, never a lone 回复。 (320–390 px) */
.bf-done-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.brief-done .brief-copy-status { margin: -8px 0 0; }
.bf-done-fallback { margin: 0; max-width: 56ch; font-size: var(--fs-sm); color: var(--muted); }
.brief-done .brief-preview { justify-self: stretch; }
.bf-done-stamp { position: absolute; top: 0; right: 0; display: grid; gap: 2px; justify-items: center; padding: 10px 14px;
  border: 1.5px solid var(--cobalt); color: var(--cobalt); font-size: var(--fs-label, .75rem); letter-spacing: .2em; text-transform: uppercase;
  transform: rotate(-6deg); animation: brief-stamp .7s var(--ease) .2s both; }
.bf-done-stamp span:first-child { font-weight: 500; font-size: 13px; }
@keyframes brief-stamp { from { opacity: 0; transform: rotate(-6deg) scale(1.3); } }

/* ---------- step navigation ---------- */
.brief-nav { display: flex; align-items: center; gap: 12px; padding: 16px var(--bp-pad) 18px; border-top: 1px solid var(--line); }
.brief-back { --btn-bd: var(--line); padding-inline: 16px 20px; }
.brief-back.is-hidden { visibility: hidden; }
.brief-back:hover .arrow { transform: translateX(-4px); }
.brief-next { margin-left: auto; min-width: 148px; }
.brief-status { display: flex; flex-direction: column; gap: 2px; margin-left: auto; font-size: var(--fs-label, .75rem); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-align: right; }
.brief-status + .brief-next { margin-left: 0; }
.brief-draft::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; background: var(--cobalt); vertical-align: 1px; }
.brief-nav.is-final .brief-enter { display: none; }
@media (hover: none) { .brief-enter { display: none; } }

/* ---------- toast (fixed to the viewport, so it is seen from the studio too) ---------- */
.brief-toast { --focus: var(--amber);
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 60;
  display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 32px); padding: 0 0 0 16px;
  background: var(--ink); color: var(--off-white); border: 1px solid rgba(var(--on-rgb), .14);
  font-family: var(--font-mono); font-size: var(--fs-label, .75rem); letter-spacing: .12em; text-transform: uppercase;
  opacity: 0; visibility: hidden; transform: translate(-50%, 16px);
  transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease), visibility 0s linear var(--t-med); }
.brief-toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
.bf-toast-ind { flex: none; width: 9px; height: 9px; background: var(--amber); }
.bf-toast-text { white-space: nowrap; }
.bf-toast-link { min-height: 46px; padding: 0 16px; border: 0; border-left: 1px solid rgba(var(--on-rgb), .18); background: transparent; color: var(--amber);
  font: inherit; letter-spacing: inherit; text-transform: inherit; white-space: nowrap; }
.bf-toast-link:hover { background: rgba(var(--on-rgb), .06); }

/* ---------- narrow sheets ---------- */
@container brief (max-width: 600px) {
  .bf-opt-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container brief (max-width: 520px) {
  .bf-field-row { grid-template-columns: 1fr; gap: 22px; }
  .brief-done .bf-bs-title { padding-right: 0; }
  .bf-done-stamp { position: static; justify-self: start; margin: 4px 0 6px 4px; }
  .brief-draft { display: none; }
}
@container brief (max-width: 440px) {
  .bf-opt-cards { grid-template-columns: 1fr; gap: 8px; }
  .bf-opt-card { grid-template-columns: 36px minmax(0, 1fr); grid-template-rows: none; align-items: center; gap: 14px; min-height: 0; padding: 14px 44px 14px 14px; }
  .bf-opt-icon { width: 36px; height: 36px; }
  .bf-opt-ind { top: 50%; margin-top: -6px; }
  .bf-opt-card:has(input:checked) .bf-opt-ind { transform: scale(1.15); }
  .brief-meta { letter-spacing: .08em; }
  .btb-top { padding: 16px; }
  .btb-cell { flex-basis: 124px; padding-inline: 14px; }
  .btb-cell--long, .btb-cell--wide { flex-basis: 100%; }
  .brief-enter { display: none; }
  .brief-next { min-width: 0; flex: 1; }
  .brief-actions > * { flex-basis: 100%; }
  .btb-foot { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Chinese: no tracking on display type; labels a size up with light tracking, so hanzi stay legible */
.lang-zh .bf-bs-title, .lang-zh .bf-opt-title, .lang-zh .btb-project { letter-spacing: 0; }
.lang-zh :is(.brief-meta, .bf-bp-label, .bf-field-label, .bf-field-opt, .bf-field-count, .bf-concept-label, .btb-kicker, .btb-cell dt,
  .btb-foot, .btb-edit, .brief-copy-status, .brief-preview summary, .brief-status, .brief-toast, .bf-done-stamp) {
  font-size: var(--fs-label-zh, .8125rem);
  letter-spacing: .04em;
}
/* the 12.5 px small print (field hints, the email note, the plain-text preview) at the 13 px floor for hanzi */
.lang-zh :is(.bf-field-hint, .brief-mail-note, .brief-pre) { font-size: var(--fs-label-zh, .8125rem); }

/* Short landscape: the progress strip would take a third of the screen, so it scrolls with the sheet */
@media (orientation: landscape) and (max-height: 500px) {
  .brief-head { position: static; }
}

/* Windows High Contrast: chosen options keep a visible fill, line icons follow the text colour */
@media (forced-colors: active) {
  .bf-seg-opt:has(input:checked), .bf-opt-card:has(input:checked), .bf-unit-toggle label:has(input:checked) {
    forced-color-adjust: none;
    background: Highlight;
    color: HighlightText;
    border-color: Highlight;
  }
  .brief svg { stroke: CanvasText; }
  .brief .btb-mark { stroke: none; } /* the company mark is filled, not drawn */
  .bf-opt-card:has(input:checked) svg { stroke: HighlightText; }
}

@media (prefers-reduced-motion: reduce) {
  .brief-step.is-entering > *, .bf-opt-card:has(input:checked) .bf-opt-icon .draw, .bf-done-stamp { animation: none; }
}
