/* Customer pages (client.southerndream.homes). The look of the Workbench and the
   book: warm paper, white cards, hairline rules, Cormorant Garamond titles,
   small tracked Jost labels, one walnut button. Phone first. */
:root {
  --paper: #f5f1eb; --paper-2: #efebe3; --card: #ffffff; --ink: #26241f; --soft: #6e685d; --grey: #525252;
  --walnut: #2f201b; --dusk: #f6eee4; --rule: rgba(38, 36, 31, 0.16);
  --good: #eaf3de; --good-ink: #27500a; --warn: #fbeed3; --warn-ink: #4d3200;
  --display: "Cormorant Garamond", Georgia, serif; --label: Jost, system-ui, sans-serif;
  --sans: Geist, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; color: inherit; }
a { color: var(--walnut); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; line-height: 1.02; }
.eyebrow { font-family: var(--label); font-size: 11px; font-weight: 500; letter-spacing: 0.26em; text-transform: uppercase; color: var(--soft); margin: 0; }
.mark { font-family: var(--display); font-size: 20px; letter-spacing: 0.18em; }
.small { font-size: 13px; color: var(--soft); }
.sub { margin: 0; font-size: 14px; color: var(--soft); }
.error { margin: 0; color: #8a1c0a; font-size: 14px; min-height: 0; }
.error:empty { display: none; }

.top { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px 12px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
  background: var(--paper); border-bottom: 1px solid var(--rule); }
.top .count { justify-self: end; font-size: 13px; color: var(--soft); text-align: right; }
.top .count b { color: var(--ink); font-weight: 600; }
.bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: rgba(38, 36, 31, 0.12); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--walnut); }

main { max-width: 1240px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px)); }
.cover { display: grid; gap: 14px; padding: 28px 0 8px; }
.cover h1 { font-size: clamp(40px, 9vw, 64px); }
.lead { margin: 0; font-size: 16px; color: var(--grey); max-width: 42em; }

.banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 16px 18px;
  border-radius: 8px; background: var(--walnut); color: var(--dusk); }
.banner p { margin: 4px 0 0; font-size: 14px; opacity: 0.85; }
.banner .primary { background: var(--dusk); color: var(--walnut); }
.banner.quiet { background: var(--paper-2); color: var(--ink); }
.banner.quiet .secondary { background: transparent; }

.chips { position: sticky; top: 58px; z-index: 4; display: flex; gap: 8px; margin: 16px -16px 0; padding: 10px 16px; overflow-x: auto;
  background: var(--paper); scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid rgba(38, 36, 31, 0.3);
  border-radius: 22px; background: var(--card); color: var(--ink); text-decoration: none; font-weight: 500; }
.chip span { font-size: 13px; color: var(--soft); font-weight: 400; }

.room { padding-top: 28px; scroll-margin-top: 120px; }
.room h2 { margin: 6px 0 4px; font-size: clamp(40px, 9vw, 72px); letter-spacing: 0.06em; text-transform: uppercase; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 18px; align-items: start; }

.card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid rgba(38, 36, 31, 0.12); border-radius: 8px; background: var(--card);
  scroll-margin-top: 120px; }
.pic { position: relative; aspect-ratio: 4 / 3; background: #f0f0f0; }
.pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.noimg { width: 100%; height: 100%; background: var(--paper-2); }
.badge { position: absolute; left: 12px; top: 12px; padding: 5px 10px; border-radius: 4px; background: var(--walnut); color: var(--dusk); font-size: 13px; font-weight: 500; }
.body { display: grid; gap: 14px; padding: 18px 18px 20px; }
.body h3 { font-size: 30px; line-height: 1.05; margin-top: -8px; }
dl { margin: 0; border-top: 1px solid var(--rule); }
dl .row { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
dt { color: var(--soft); }
dd { margin: 0; text-align: right; }
.was { margin: 0; padding: 10px 12px; border-radius: 4px; background: var(--paper-2); font-size: 14px; }

.actions, .row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border-radius: 4px;
  font-weight: 500; text-decoration: none; cursor: pointer; text-align: center; }
.primary { border: 0; background: var(--walnut); color: var(--dusk); }
.secondary { border: 1px solid var(--ink); background: var(--card); color: var(--ink); }
.primary:disabled { opacity: 0.45; cursor: default; }
.link { border: 0; padding: 0; background: none; color: inherit; text-decoration: underline; cursor: pointer; min-height: 32px; }
.done { display: grid; gap: 6px; padding: 12px 14px; border-radius: 4px; }
.done p { margin: 0; font-size: 14px; }
.done.ok { grid-template-columns: 1fr auto; align-items: center; background: var(--good); color: var(--good-ink); font-weight: 600; }
.done.ok .link { font-weight: 400; }
.done.asked { background: var(--warn); color: var(--warn-ink); }
.done.asked .small { color: var(--warn-ink); }
.busy { opacity: 0.6; pointer-events: none; }

footer { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--soft); }

dialog { width: 100%; max-width: 100%; margin: auto 0 0; padding: 0; border: 0; border-radius: 14px 14px 0 0; background: #f9f7f3; color: var(--ink); }
dialog::backdrop { background: rgba(11, 5, 3, 0.45); }
.sheet { display: grid; gap: 12px; padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px)); }
.sheet h2 { font-size: 28px; }
.sheet label { font-weight: 500; font-size: 14px; }
textarea, input[type="text"], #typed { width: 100%; padding: 12px; border: 1px solid rgba(38, 36, 31, 0.4); border-radius: 4px; background: #fff; font-size: 16px; }
textarea { resize: vertical; }

.plain { max-width: 640px; margin: 0 auto; padding: 48px 20px; display: grid; gap: 16px; }
.plain.wide { max-width: 820px; }
.plain h1 { font-size: 44px; }
.plain p { margin: 0; font-size: 16px; color: var(--grey); }
.summary { margin: 0; padding: 16px; border: 1px solid var(--rule); border-radius: 8px; background: #fff; white-space: pre-wrap; overflow-wrap: anywhere;
  font: 14px/1.6 var(--sans); max-height: 60vh; overflow: auto; }
.signform { display: grid; gap: 10px; }
.tick { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; }
.tick input { width: 22px; height: 22px; margin: 2px 0 0; flex: 0 0 auto; }

@media (min-width: 700px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  main { padding-left: 32px; padding-right: 32px; }
  .top { padding-left: 32px; padding-right: 32px; }
  .chips { margin: 16px -32px 0; padding: 10px 32px; }
  dialog { max-width: 560px; margin: auto; border-radius: 8px; }
  .sheet { padding: 28px; }
}
@media (min-width: 1100px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  main { padding-left: 48px; padding-right: 48px; }
  .top { padding-left: max(48px, calc((100vw - 1240px) / 2 + 48px)); padding-right: max(48px, calc((100vw - 1240px) / 2 + 48px)); }
  .chips { margin: 16px -48px 0; padding: 10px 48px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
