/* styles/flow.css
 *
 * The ordering flow: /start/ and its three steps, /intake/, /pay/, /admin/.
 *
 * These were the last pages still loading styles.css and pages.css, the
 * previous design. They are the pages a customer actually walks through to buy
 * something, so they were also the worst ones to leave looking older than the
 * site that sold it to them.
 *
 * Written against the tokens in styles/yuisho.css rather than ported from the
 * old sheet. Porting would have produced the old design in new colours, which
 * is what the owner kept objecting to. Load order is yuisho.css, page.css,
 * then this.
 */

/* ---------------------------------------------------------------------------
 * Token bridge.
 *
 * intake/intake.css and start/order.css were written against the token names
 * in the old styles.css. Deleting that sheet left nineteen undefined
 * variables, which is why the intake form rendered as a blank page: its own
 * surfaces and borders resolved to nothing. Rather than rewrite both sheets,
 * the old names are mapped onto the current palette here, in one place, so
 * there is still exactly one set of real colours.
 * ------------------------------------------------------------------------- */
:root {
  --color-bg: var(--kinari);
  --color-bg-alt: var(--paper);
  --color-surface: var(--paper);
  --color-border: var(--line);
  --color-text: var(--sumi);
  --color-text-soft: var(--soft);
  --color-accent: var(--seal);
  --color-accent-soft: var(--seal-soft);
  --color-accent-ink: var(--paper);
  --color-error: #8c2f2f;
  --color-success: #3f6b4a;
  --radius-sm: 6px;
  --radius-md: 10px;
  --shadow-soft: 0 1px 2px rgba(40, 31, 28, .05);
  --type-section: clamp(19px, 4.4vw, 23px);
  --header-h: 68px;
}

/* ---------------------------------------------------------------------------
 * Chrome shared by the utility pages.
 * ------------------------------------------------------------------------- */
.utility-page { background: var(--kinari); }

.site-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--kinari);
}
.site-head .lockup img,
.lockup-exact-img { height: 34px; width: auto; display: block; }

.site-nav {
  display: none;
  gap: 20px;
  font-size: 13.5px;
}
@media (min-width: 720px) { .site-nav { display: flex; } }
.site-nav a { color: var(--soft); text-decoration: none; }
.site-nav a:hover { color: var(--sumi); }

.head-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }

/* The long-form pages get their gutter from .page-main. These pages use .wrap,
 * which the new sheet never defined, so every line was running into both edges
 * of the phone and the Next button sat outside the screen. Same measure and
 * same 24px gutter, so a step of the flow lines up with the page that sold it. */
.wrap { max-width: 720px; margin-inline: auto; padding-inline: 24px; }
.wrap.narrow, .narrow { max-width: 38rem; margin-inline: auto; }
.utility-page main > .section { padding-block: 46px; border-top: 1px solid var(--line-soft); }
.utility-page main > .page-hero { padding: 30px 0 6px; border-top: 0; }
.utility-page .site-head { max-width: 720px; margin-inline: auto; }
.small { font-size: 13px; color: var(--faint); }
.skip-link {
  position: absolute; left: -9999px;
}
.skip-link:focus {
  left: 12px; top: 12px; z-index: 20; padding: 10px 14px;
  background: var(--paper); border-radius: 6px;
}

/* ---------------------------------------------------------------------------
 * Buttons. One shape, three weights.
 * ------------------------------------------------------------------------- */
.btn-seal, .btn-primary, .head-cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 28px; border-radius: 999px;
  background: var(--seal); color: var(--paper);
  font: 400 15px/1 var(--sans); letter-spacing: .04em;
  text-decoration: none; border: 0; cursor: pointer;
  transition: background .3s var(--ease), transform .3s var(--ease);
}
.btn-seal:hover, .btn-primary:hover, .head-cta:hover {
  background: var(--seal-soft); transform: translateY(-1px);
}
.head-cta { padding: 11px 20px; font-size: 13.5px; }
.btn-lg { padding: 17px 34px; font-size: 16px; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px;
  background: none; color: var(--sumi);
  border: 1px solid var(--line); text-decoration: none; cursor: pointer;
  font: 400 14.5px/1 var(--sans);
}
.btn-ghost:hover { border-color: var(--soft); }
.btn-seal:focus-visible, .btn-primary:focus-visible,
.btn-ghost:focus-visible, .head-cta:focus-visible {
  outline: 2px solid var(--sumi); outline-offset: 3px;
}

/* ---------------------------------------------------------------------------
 * The four questions.
 * ------------------------------------------------------------------------- */
.start-intro { padding-bottom: 0; }
.start-guide { margin-top: 8px; }

.start-question { border: 0; margin: 0 0 40px; padding: 0; }
.start-question legend { display: block; width: 100%; padding: 0; margin: 0 0 16px; }
.start-question legend strong {
  display: block;
  /* The question is the only thing being asked on this screen, so it carries
   * the weight the page heading would elsewhere. */
  font: 400 clamp(19px, 5vw, 23px)/1.5 var(--serif);
  color: var(--sumi);
}
.start-question-number {
  display: block; margin-bottom: 7px;
  font: 400 11px/1 var(--sans); letter-spacing: .18em; color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.start-question-hint { margin: -8px 0 14px; font-size: 13px; color: var(--faint); }

.start-answer-grid { display: grid; gap: 9px; }
@media (min-width: 560px) {
  .start-answer-grid { grid-template-columns: repeat(2, 1fr); }
  .start-answer-grid-compact { grid-template-columns: repeat(3, 1fr); }
}

/* An answer is a label wrapping its own input, so the whole card is the hit
 * area. The input stays in the accessibility tree rather than display:none. */
.start-answer {
  position: relative; display: flex; align-items: center; gap: 11px;
  /* A finger needs a target, not a line of text. Carried over from the old
   * sheet deliberately: it is an accessibility floor, not a style. */
  min-height: 58px;
  padding: 15px 16px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--paper); cursor: pointer; font-size: 14.5px;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.start-answer:hover { border-color: var(--soft); }
.start-answer input {
  appearance: none; -webkit-appearance: none;
  flex: 0 0 auto; width: 17px; height: 17px; margin: 0;
  border: 1px solid var(--soft); border-radius: 50%; background: var(--paper);
}
.start-answer input[type="checkbox"] { border-radius: 4px; }
.start-answer input:checked {
  border-color: var(--seal);
  box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 11px var(--seal);
}
.start-answer:has(input:checked) { border-color: var(--seal); background: #fff; }
.start-answer:has(input:focus-visible) { outline: 2px solid var(--seal); outline-offset: 2px; }
.start-answer-wide { grid-column: 1 / -1; }

.start-form-actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.start-price-inline { margin: 12px 0 0; font-size: 13px; color: var(--faint); }
.start-trust-note, .start-direct-note { margin-top: 16px; font-size: 13px; color: var(--soft); }

.start-context { border-top: 1px solid var(--line-soft); }
.start-help { border-top: 1px solid var(--line-soft); }
.start-help-links { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13.5px; }
.start-help-links a { color: var(--seal); }

/* ---------------------------------------------------------------------------
 * Progress through the steps.
 * ------------------------------------------------------------------------- */
.flow-progress, .guide-meter { margin: 0 0 26px; }
.guide-track {
  height: 2px; background: var(--line); border-radius: 2px; overflow: hidden;
}
.guide-track > * { display: block; height: 100%; background: var(--seal); }
.guide-position {
  margin: 9px 0 0; font: 400 11px/1 var(--sans);
  letter-spacing: .16em; color: var(--faint); font-variant-numeric: tabular-nums;
}
/* An element carrying the hidden attribute must stay hidden. Setting display
 * on .guide-navigation and .guide-review overrides the attribute's own
 * display:none, so the enhanced controls would appear before the script has
 * decided they should. A test caught this; without it the review panel would
 * have shipped visible on first paint. */
.start-guide [hidden],
.intake-form [hidden] { display: none !important; }

.guide-navigation { margin-top: 30px; display: flex; gap: 14px; align-items: center; }
.guide-back { color: var(--soft); text-decoration: none; font-size: 14px; }
.guide-back:hover { color: var(--sumi); }
.guide-next { margin-left: auto; }
.guide-summary, .guide-review {
  margin-top: 26px; padding: 18px 20px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
}
.guide-summary dt, .guide-review dt {
  font: 400 11px/1.6 var(--sans); letter-spacing: .14em; color: var(--faint);
}
.guide-summary dd, .guide-review dd { margin: 2px 0 14px; font-size: 15px; }
.guide-summary dd:last-child, .guide-review dd:last-child { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  .btn-seal, .btn-primary, .head-cta, .start-answer { transition: none; }
}

/* ---------------------------------------------------------------------------
 * Phone.
 *
 * The flow is mostly used on a phone, one-handed, often in a hurry. The
 * actions go full width and stack, so the thumb does not have to find a small
 * target in the corner of the screen.
 * ------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .start-form-actions, .guide-navigation { flex-direction: column; align-items: stretch; }
  .start-form-actions .btn-seal, .start-form-actions .btn-primary,
  .guide-next, .btn-lg { width: 100%; justify-content: center; }
  .guide-next { margin-left: 0; }
  .guide-back { order: 2; text-align: center; padding: 6px 0; }
  .start-question { margin-bottom: 32px; }
  .wrap { padding-inline: 20px; }
}
