/* ───────────────────────────────────────────────────────────────
   Sitehouse — shared app styles
   Same type, colour and hairline language as the landing page.
   ─────────────────────────────────────────────────────────────── */

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-feature-settings: "kern" 1, "liga" 1; }

.h-display { font-family:'Inter','Helvetica Neue',Arial,sans-serif; font-weight:600; letter-spacing:-0.02em; line-height:1.1; }
.h-section { font-family:'Inter','Helvetica Neue',Arial,sans-serif; font-weight:600; letter-spacing:-0.017em; line-height:1.25; }

.eyebrow {
  font-family:'IBM Plex Mono',ui-monospace,monospace;
  font-size:0.6875rem; font-weight:400; letter-spacing:0.16em; text-transform:uppercase;
}
.mono-label {
  font-family:'IBM Plex Mono',ui-monospace,monospace;
  font-size:0.6875rem; letter-spacing:0.14em; text-transform:uppercase;
}

.doc-title { font-size: clamp(1.9rem, 4.2vw, 2.8rem); }
.arrow { color:rgb(var(--c-accent)); font-weight:600; }

/* Price / status tags — the landing page device, reused */
.tag {
  font-family:'IBM Plex Mono',ui-monospace,monospace;
  font-size:0.625rem; letter-spacing:0.14em; text-transform:uppercase;
  padding:0.25rem 0.5rem; border-radius:0.25rem; white-space:nowrap; display:inline-block;
}
.tag-once  { background:rgb(var(--c-accent-tint)); color:rgb(var(--c-accent-text)); border:1px solid rgb(var(--c-line-firm)); }
.tag-month { background:rgb(var(--c-accent)); color: rgb(var(--c-on-accent)); }
.tag-soon  { background:transparent; color:rgb(var(--c-ink-soft)); border:1px dashed rgb(var(--c-line-firm)); }
.tag-ok    { background:rgb(var(--c-accent)); color: rgb(var(--c-on-accent)); }
.tag-wait  { background:rgb(var(--c-accent-tint)); color:rgb(var(--c-ink-mid)); border:1px solid rgb(var(--c-line-firm)); }
.tag-due   { background:rgb(var(--c-surface)); color:rgb(var(--c-accent-text)); border:1px solid rgb(var(--c-accent-text)); }
.tag-off   { background:transparent; color:rgb(var(--c-ink-soft)); border:1px solid rgb(var(--c-line)); }

/* Cards */
.card { background:rgb(var(--c-surface)); border:1px solid rgb(var(--c-line)); border-radius:0.5rem; }
.card-quiet { background:rgb(var(--c-paper)); border:1px solid rgb(var(--c-line)); border-radius:0.5rem; }
.card-ink { background:rgb(var(--c-accent)); color: rgb(var(--c-on-accent)); border-radius:0.5rem; }

/* Buttons */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:0.5rem;
  border-radius:0.375rem; font-size:0.875rem; font-weight:600; padding:0.7rem 1.25rem;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
  cursor:pointer; border:1px solid transparent; font-family:inherit;
}
.btn-primary { background:rgb(var(--c-accent)); color: rgb(var(--c-on-accent)); }
.btn-primary:hover { background:rgb(var(--c-accent-hi)); }
.btn-ghost { background:rgb(var(--c-surface)); color:rgb(var(--c-accent)); border-color:rgb(var(--c-line)); }
.btn-ghost:hover { border-color:rgb(var(--c-line-firm)); }
.btn-light { background:rgb(var(--c-surface)); color:rgb(var(--c-accent)); }
.btn-light:hover { background:rgb(var(--c-accent-tint)); }
.btn:disabled { opacity:0.4; cursor:not-allowed; }
.btn-block { width:100%; }

/* Form controls */
.field label, .field .label { display:block; font-size:0.875rem; font-weight:600; color:rgb(var(--c-ink)); }
.field .hint { display:block; margin-top:0.2rem; font-size:0.8125rem; line-height:1.45; color:rgb(var(--c-ink-soft)); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"],
.field input[type="url"], .field input[type="password"], .field input[type="date"],
.field input[type="file"], .field select, .field textarea {
  margin-top:0.5rem; width:100%; background:rgb(var(--c-surface)); border:1px solid rgb(var(--c-line)); border-radius:0.375rem;
  padding:0.6rem 0.75rem; font-size:0.9375rem; color:rgb(var(--c-ink)); font-family:inherit;
  transition: border-color 180ms ease;
}
.field textarea { min-height:6rem; resize:vertical; line-height:1.55; }
.field input:hover, .field textarea:hover, .field select:hover { border-color:rgb(var(--c-line-firm)); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline:none; border-color:rgb(var(--c-accent)); box-shadow: inset 0 0 0 1px rgb(var(--c-accent));
}
.field input[readonly] { background:rgb(var(--c-paper)); color:rgb(var(--c-ink-mid)); }

/* Six-digit verification code */
.code-input {
  font-family:'IBM Plex Mono',ui-monospace,monospace;
  font-size:1.5rem; letter-spacing:0.6em; text-align:center; text-indent:0.6em;
  padding:0.9rem 0.75rem;
}

/* Demo notice — honest about what is simulated */
.demo-note {
  border:1px dashed rgb(var(--c-line-firm)); background:rgb(var(--c-accent-tint)); border-radius:0.375rem;
  padding:0.75rem 0.9rem; font-size:0.8125rem; line-height:1.5; color:rgb(var(--c-ink-mid));
}
.demo-note strong { color:rgb(var(--c-ink)); font-weight:600; }

/* App shell */
.app-nav a { display:block; padding:0.5rem 0.75rem; border-radius:0.375rem; font-size:0.875rem; color:rgb(var(--c-ink-mid)); }
.app-nav a:hover { background:rgb(var(--c-accent-tint)); color:rgb(var(--c-ink)); }
.app-nav a.is-active { background:rgb(var(--c-accent)); color: rgb(var(--c-on-accent)); font-weight:600; }
.app-nav .group-label { padding:0 0.75rem; margin:1.25rem 0 0.4rem; }

/* Progress tracker */
.track li { display:flex; gap:0.75rem; align-items:flex-start; padding:0.7rem 0; }
.track li + li { border-top:1px solid rgb(var(--c-line)); }
.track .dot {
  width:1.125rem; height:1.125rem; border-radius:999px; flex:none; margin-top:0.15rem;
  display:flex; align-items:center; justify-content:center; font-size:0.625rem; font-weight:700;
}
.track .dot-done { background:rgb(var(--c-accent)); color: rgb(var(--c-on-accent)); }
.track .dot-active { background:rgb(var(--c-surface)); border:2px solid rgb(var(--c-accent)); }
.track .dot-wait { background:rgb(var(--c-surface)); border:1px solid rgb(var(--c-line-firm)); }

/* Tables */
.tbl { width:100%; border-collapse:collapse; }
.tbl th {
  font-family:'IBM Plex Mono',ui-monospace,monospace; font-size:0.625rem; letter-spacing:0.14em;
  text-transform:uppercase; color:rgb(var(--c-ink-soft)); text-align:left; font-weight:400;
  padding:0.6rem 0.75rem; border-bottom:1px solid rgb(var(--c-line)); white-space:nowrap;
}
.tbl td { padding:0.75rem; border-bottom:1px solid rgb(var(--c-line)); font-size:0.875rem; color:rgb(var(--c-ink-mid)); vertical-align:middle; }
.tbl tr:last-child td { border-bottom:0; }
.tbl tbody tr.clickable { cursor:pointer; }
.tbl tbody tr.clickable:hover { background:rgb(var(--c-paper)); }
.tbl td .name { color:rgb(var(--c-ink)); font-weight:600; }

/* Timeline */
.timeline li { position:relative; padding-left:1.4rem; padding-bottom:1.1rem; }
.timeline li::before {
  content:""; position:absolute; left:0.3rem; top:0.45rem; width:0.5rem; height:0.5rem;
  border-radius:999px; background:rgb(var(--c-accent));
}
.timeline li::after {
  content:""; position:absolute; left:0.53rem; top:1.1rem; bottom:0; width:1px; background:rgb(var(--c-line));
}
.timeline li:last-child { padding-bottom:0; }
.timeline li:last-child::after { display:none; }
.timeline li.pending::before { background:rgb(var(--c-surface)); box-shadow: inset 0 0 0 1px rgb(var(--c-line-firm)); }

/* Focus + motion */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline:2px solid rgb(var(--c-accent)); outline-offset:3px; border-radius:2px;
}
a, button { transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease; }
.skip:not(:focus){ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
@media (prefers-reduced-motion: reduce){ html{scroll-behavior:auto;} a,button{transition:none;} }

/* Package builder — selectable product tiles */
.build-card {
  display:flex; flex-direction:column; width:100%; text-align:left; font-family:inherit;
  background:rgb(var(--c-surface)); border:1px solid rgb(var(--c-line)); border-radius:0.5rem; padding:0.9rem 1rem;
  cursor:pointer; transition: border-color 180ms ease, box-shadow 180ms ease;
}
.build-card:hover:not(:disabled) { border-color:rgb(var(--c-line-firm)); }
.build-card.is-on { border-color:rgb(var(--c-accent)); box-shadow: inset 0 0 0 1px rgb(var(--c-accent)); }
.build-card:disabled { opacity:0.45; cursor:not-allowed; }
.build-card .build-state {
  margin-top:0.75rem; align-self:flex-start; font-family:'IBM Plex Mono',ui-monospace,monospace;
  font-size:0.625rem; letter-spacing:0.14em; text-transform:uppercase;
  color:rgb(var(--c-ink-soft)); border:1px solid rgb(var(--c-line)); border-radius:0.25rem; padding:0.2rem 0.45rem;
}
.build-card.is-on .build-state { background:rgb(var(--c-accent)); border-color:rgb(var(--c-accent)); color: rgb(var(--c-on-accent)); }


/* ═══════════════════════════════════════════════════════════════
   Dashboard — the builder, rebuilt phone-first

   The old builder was a desktop two-column layout that got narrower
   on a phone. This one is designed at 375px and grows: one column of
   full-width cards with 44px targets, the running total handed to the
   sticky bar that already exists at the bottom, and the summary panel
   only becoming a sidebar once there is a column to put it in.
   ═══════════════════════════════════════════════════════════════ */

.build-wrap { display: grid; gap: 2rem; margin-top: 1.75rem; }
@media (min-width: 1024px) {
  .build-wrap { grid-template-columns: minmax(0, 1fr) 22rem; gap: 2.5rem; align-items: start; }
}
.build-main { min-width: 0; display: grid; gap: 2.5rem; }

.build-step { border-top: 2px solid rgb(var(--c-accent)); padding-top: 1.15rem; }
.build-step-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 1rem; }
.build-step-aside { margin-left: auto; }
.build-note {
  margin-top: 0.8rem; max-width: 40rem;
  font-size: 0.875rem; line-height: 1.6; color: rgb(var(--c-ink-mid));
}

/* One column on a phone. Two only once a card can hold its line of
   text without breaking after three words. */
.build-grid { display: grid; grid-template-columns: 1fr; gap: 0.6rem; }
@media (min-width: 640px)  { .build-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1280px) { .build-grid { grid-template-columns: 1fr 1fr 1fr; } }

.build-card {
  position: relative; display: block; width: 100%;
  min-height: 56px; padding: 0.85rem 5.5rem 0.85rem 0.95rem;
  text-align: left; cursor: pointer;
  border: 1.5px solid rgb(var(--c-line)); border-radius: 0.6rem;
  background: rgb(var(--c-surface)); color: rgb(var(--c-ink));
  font: inherit;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}
.build-card:hover:not(:disabled) { border-color: rgb(var(--c-ink) / 0.4); }
.build-card:active:not(:disabled) { transform: scale(0.995); }
.build-card:focus-visible { outline: 2px solid rgb(var(--c-accent)); outline-offset: 2px; }
.build-card.is-on { border-color: rgb(var(--c-accent)); background: rgb(var(--c-accent-tint)); }
.build-card:disabled { opacity: 0.55; cursor: not-allowed; }
.build-card.is-locked { opacity: 1; cursor: default; border-style: dashed; }

.build-top { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; }
.build-name { font-weight: 600; font-size: 0.9375rem; line-height: 1.35; }
.build-price { font-weight: 600; font-size: 0.9375rem; white-space: nowrap; color: rgb(var(--c-ink)); }
.build-tags { display: block; margin-top: 0.45rem; }
.build-blurb {
  display: block; margin-top: 0.45rem;
  font-size: 0.8125rem; line-height: 1.5; color: rgb(var(--c-ink-mid));
}
.build-state {
  position: absolute; right: 0.85rem; top: 0.85rem;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.625rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgb(var(--c-ink-soft));
}
.build-card.is-on .build-state { color: rgb(var(--c-accent-text)); }

/* ── Summary ─────────────────────────────────────────────────── */
.build-sum {
  overflow: hidden; border: 1px solid rgb(var(--c-line)); border-radius: 0.7rem;
  background: rgb(var(--c-paper));
}
@media (min-width: 1024px) { .build-side { position: sticky; top: 6rem; } }
.build-sum-head { border-bottom: 1px solid rgb(var(--c-line)); padding: 0.9rem 1.15rem; }
.build-sum-block { padding: 1rem 1.15rem; border-bottom: 1px solid rgb(var(--c-line)); }
.sum-list {
  list-style: none; margin: 0.55rem 0 0; padding: 0;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.75rem; color: rgb(var(--c-ink-mid));
}
.sum-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  border-bottom: 1px solid rgb(var(--c-line)); padding: 0.5rem 0;
}
.sum-row span:last-child { color: rgb(var(--c-ink)); white-space: nowrap; }
.sum-total {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  border-top: 1px solid rgb(var(--c-line-firm)); margin-top: 0.5rem; padding-top: 0.6rem;
}

.build-pay { background: rgb(var(--c-accent)); color: #fff; padding: 1.2rem 1.15rem; }
.build-pay .mono-label { color: rgb(255 255 255 / 0.72); }
.build-pay-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.build-pay-row--split { border-top: 1px solid rgb(255 255 255 / 0.2); margin-top: 0.9rem; padding-top: 0.9rem; }
.build-pay-note { margin-top: 0.35rem; font-size: 0.75rem; line-height: 1.5; color: rgb(255 255 255 / 0.72); }
.build-agree {
  display: flex; align-items: flex-start; gap: 0.6rem; cursor: pointer;
  border-top: 1px solid rgb(255 255 255 / 0.2); margin-top: 1.1rem; padding-top: 1rem;
  font-size: 0.75rem; line-height: 1.55; color: rgb(255 255 255 / 0.85);
}
.build-agree input { width: 17px; height: 17px; margin-top: 1px; flex: none; accent-color: #fff; }
.build-agree a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.build-pay-hint { margin-top: 0.6rem; text-align: center; font-size: 0.75rem; color: rgb(255 255 255 / 0.68); }
.build-pay-demo { margin-top: 0.45rem; text-align: center; font-size: 0.6875rem; line-height: 1.5; color: rgb(255 255 255 / 0.55); }

.build-sum-foot { padding: 0.85rem 1.15rem; }
.build-sum-foot button {
  border: 0; background: none; padding: 0; cursor: pointer; font: inherit;
  font-size: 0.8125rem; font-weight: 600; color: rgb(var(--c-ink-mid));
}
.build-sum-foot button:hover { color: rgb(var(--c-ink)); }

/* On a phone the summary panel is below the fold by definition, so the
   sticky bar carries the number and this is the detail you scroll to. */
@media (max-width: 1023px) {
  .build-side { margin-bottom: 5.5rem; }
}

/* ── Our work, empty ─────────────────────────────────────────── */
.work-empty {
  margin-top: 2rem; padding: 3rem 1.5rem; text-align: center;
  border: 1.5px dashed rgb(var(--c-line-firm)); border-radius: 0.8rem;
  background: rgb(var(--c-surface));
}
.work-empty-mark { color: rgb(var(--c-ink-soft)); }
.work-empty-mark svg { width: 44px; height: 44px; margin: 0 auto; display: block; }
.work-empty-h { margin-top: 1rem; font-weight: 600; font-size: 1.0625rem; color: rgb(var(--c-ink)); }
.work-empty-p {
  margin: 0.5rem auto 0; max-width: 30rem;
  font-size: 0.875rem; line-height: 1.65; color: rgb(var(--c-ink-mid));
}

@media (prefers-reduced-motion: reduce) {
  .build-card { transition: none; }
  .build-card:active:not(:disabled) { transform: none; }
}

/* Contact form result. Three states, all of them honest — there is no
   green tick until something has actually been delivered. */
.contact-note {
  margin-top: 0.9rem; padding: 0.75rem 0.9rem;
  border-radius: 0.5rem; font-size: 0.875rem; line-height: 1.6;
  border: 1px solid rgb(var(--c-line-firm)); background: rgb(var(--c-surface));
  color: rgb(var(--c-ink-mid));
}
.contact-note[hidden] { display: none; }
.contact-note a { color: rgb(var(--c-ink)); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.contact-note strong { color: rgb(var(--c-ink)); font-weight: 600; }
.contact-note.is-bad { border-color: rgb(var(--c-accent)); color: rgb(var(--c-accent-text)); }
.contact-note.is-good { border-color: #22c55e; }


/* ── Rendering budget ──────────────────────────────────────────
   The landing page is long. Sections below the fold are skipped until
   they are near the viewport, with a reserved height so the scrollbar
   stays honest and nothing shifts when they do render.

   Deliberately excluded: the hero, anything fixed or sticky, the side
   rails and the closer — those animate, and skipping their layout is
   how you get a jump instead of a saving. */
main > section:nth-of-type(n + 4):not(.fp-hero):not(.closer) {
  content-visibility: auto;
  contain-intrinsic-size: auto 700px;
}

/* Media never reflows the page while it loads. */
img, video { max-width: 100%; height: auto; }
.prev-frame, .rail-vid, .photo-img, .closer-media video { height: 100%; }
