/* First-run questions (onboarding-view.js): a full-screen layer over the page in design B, the owner's pick of
   24 Nov 2026 (the cream takeover, big COL-blue Newsreader questions, drawn-icon tiles that fill warm with an
   orange check, an orange bar with one part per question). Values from the design; the page's own tokens where it has the same value.
   No side stripes, no card inside a card, tap targets of at least 44px, comfortable at 375px. */

/* The design's own values, named once. The takeover keeps its cream look in the page's dark mode too, so the
   colours that the page swaps for dark mode (text, muted, orange text, the warm fill, the error red) are fixed here. */
.ob-layer {
  --ob-cream: #fbfaf7;
  --ob-ink: #1a1a1a;
  --ob-muted: #5f6875;
  --ob-navy: #0b2545;
  --ob-warm-text: #9a4a00;
  --ob-warm-fill: #fef6ee;
  --ob-warm-rule: rgba(242, 154, 69, .38);
  --ob-highlight: rgba(242, 154, 69, .5);
  --ob-line: #e7e1d6;
  --ob-line-soft: #ece7de;
  --ob-hover-line: #d8b48c;
  --ob-field-line: #cfc6b8;
  --ob-tile: #ffffff;
  --ob-card-hover: #f7f5f0;
  --ob-well: #eef3f8;
  --ob-seg: #e9e2d6;
  --ob-off: #ebe5da;
  --ob-off-text: #5a5348;
  --ob-placeholder: #737b86;
  --ob-error: #b3261e;
  --ob-blue-hover: rgba(0, 68, 130, .07);
  --ob-shadow: 0 1px 2px rgba(16, 36, 64, .04);
  --ob-shadow-hover: 0 6px 18px rgba(16, 36, 64, .07);
  --ob-fade-to: rgba(251, 250, 247, 0);

  position: fixed; inset: 0; z-index: 1100;
  background: var(--ob-cream); color: var(--ob-ink);
  font-family: var(--font); font-size: 15px; line-height: 1.4; text-align: left;
  -webkit-font-smoothing: antialiased; overscroll-behavior: contain;
}
html.ob-open, html.ob-open body { overflow: hidden; }
.ob-layer *, .ob-layer *::before, .ob-layer *::after { box-sizing: border-box; }
/* :where() keeps these resets weaker than every class rule below */
:where(.ob-layer) button, :where(.ob-layer) input { font: inherit; color: inherit; }
:where(.ob-layer) button { cursor: pointer; }
.ob-stage { position: absolute; inset: 0; }
.ob-scr { position: absolute; inset: 0; display: flex; flex-direction: column; overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; }

/* focus: a ring for keyboard focus on real controls; headings take focus for screen readers and never show one */
.ob-layer :focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.ob-layer [data-head]:focus, .ob-layer [data-head]:focus-visible, .ob-title:focus, .ob-title:focus-visible { outline: none !important; }
.ob-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* icons: one stroke style */
.ob-i { display: inline-flex; flex: none; }
.ob-i svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* the COL mark with its orange ring */
.ob-mk { position: relative; display: inline-block; flex: none; width: var(--s, 40px); height: var(--s, 40px); }
.ob-mk img { display: block; width: 100%; height: 100%; border-radius: 22%; }
.ob-mk-ring, .ob-mk-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ob-arc { fill: none; stroke: var(--warm); stroke-width: 5; stroke-linecap: round; transform-box: view-box; transform-origin: 49.6px 49.2px; transform: rotate(-90deg); }
.ob-mk-spin .ob-arc { animation: ob-spin 1.3s cubic-bezier(.45, 0, .55, 1) infinite; }

/* buttons and links */
.ob-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 28px; border: 0; border-radius: 14px;
  background: var(--warm); color: var(--ob-navy); font-weight: 700; font-size: 16px;
  transition: background .2s var(--ease), transform .15s var(--ease);
}
.ob-btn:hover { background: var(--warm-hover); }
.ob-btn:active { transform: scale(.98); }
.ob-btn:focus-visible { outline-offset: 3px; }
.ob-btn[disabled], .ob-btn[disabled]:hover { cursor: default; background: var(--ob-off); color: var(--ob-off-text); transform: none; }
.ob-lnk {
  min-height: 44px; padding: 8px 6px; background: none; border: 0; color: var(--ob-warm-text);
  font-weight: 600; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.ob-lnk:hover { color: var(--primary); text-decoration-thickness: 2px; }
.ob-iconbtn { width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; background: none; color: var(--primary); display: inline-flex; align-items: center; justify-content: center; }
.ob-iconbtn:hover { background: var(--ob-blue-hover); }

/* the top: Back, "2 of 7", Skip all; one segment per question, the current step counted as done */
.ob-top { position: sticky; top: 0; z-index: 2; background: var(--ob-cream); padding: 10px 12px 12px; }
.ob-top-plain { padding: 10px 12px; }
.ob-top-done { padding-top: 22px; }
.ob-row { display: flex; align-items: center; justify-content: space-between; }
.ob-count { font-weight: 700; font-size: 15px; color: var(--primary); }
.ob-segs { display: grid; grid-template-columns: repeat(var(--n, 6), 1fr); gap: 5px; margin: 6px 8px 0; }
.ob-segs span { position: relative; height: 6px; border-radius: 6px; background: var(--ob-seg); overflow: hidden; }
.ob-segs span::after { content: ""; position: absolute; inset: 0; background: var(--warm); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.ob-segs span.ob-on::after { transform: scaleX(1); }
.ob-segs span.ob-now::after { animation: ob-grow .5s var(--ease) both; }

/* the question */
.ob-main { flex: 1 0 auto; width: 100%; max-width: 920px; margin: 0 auto; padding: 18px 20px 16px; }
.ob-q { font-family: var(--font-display); font-weight: 600; font-size: 34px; line-height: 1.08; letter-spacing: -.015em; color: var(--primary); margin: 6px 0 10px; }
.ob-help { font-size: 16px; color: var(--ob-muted); margin: 0 0 20px; }
.ob-help b { color: var(--ob-warm-text); font-weight: 600; }

/* tiles: a row with an icon well and a check on a phone, a tall card in a grid on a desktop */
.ob-tiles { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; min-width: 0; }
.ob-tile {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 68px; margin: 0;
  padding: 12px 48px 12px 12px; text-align: left; font-size: 16px; font-weight: 500; line-height: 1.3; color: var(--ob-ink);
  background: var(--ob-tile); border: 1.5px solid var(--ob-line); border-radius: 18px; box-shadow: var(--ob-shadow); cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease), transform .15s var(--ease);
}
.ob-tile:hover { border-color: var(--ob-hover-line); box-shadow: var(--ob-shadow-hover); }
.ob-tile:active { transform: scale(.985); }
.ob-ico { width: 44px; height: 44px; border-radius: 14px; background: var(--ob-well); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; flex: none; transition: background .2s, color .2s; }
/* a tile's short explanation under its words (the delivery question) */
.ob-sub { display: block; margin-top: 4px; font-size: 14px; font-weight: 400; line-height: 1.35; color: var(--ob-muted); }
.ob-chk { position: absolute; right: 14px; top: 50%; margin-top: -13px; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--ob-field-line); display: inline-flex; align-items: center; justify-content: center; }
.ob-chk svg { width: 16px; height: 16px; stroke-width: 2.6; opacity: 0; color: var(--ob-navy); }
.ob-tile[aria-pressed="true"], .ob-choice:has(.ob-box:checked) { background: var(--ob-warm-fill); border-color: var(--warm); box-shadow: 0 0 0 1px var(--warm); }
.ob-tile[aria-pressed="true"] .ob-ico, .ob-choice:has(.ob-box:checked) .ob-ico { background: var(--warm); color: var(--ob-navy); }
.ob-tile[aria-pressed="true"] .ob-chk, .ob-choice:has(.ob-box:checked) .ob-chk { background: var(--warm); border-color: var(--warm); animation: ob-pop .32s var(--ease); }
.ob-tile[aria-pressed="true"] .ob-chk svg, .ob-choice:has(.ob-box:checked) .ob-chk svg { opacity: 1; }
.ob-choice:has(.ob-box:disabled) { opacity: .5; cursor: default; }
.ob-choice:has(.ob-box:disabled):hover { border-color: var(--ob-line); box-shadow: var(--ob-shadow); }
.ob-choice:has(.ob-box:focus-visible) { outline: 3px solid var(--primary); outline-offset: 3px; }
/* the real checkbox stays in the page for keyboards and screen readers; the tile draws its state */
.ob-box { position: absolute; top: 50%; left: 50%; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.ob-picked { font-size: 15px; color: var(--ob-muted); margin: 14px 0 0; min-height: 22px; }
/* yes or no: two tiles side by side, even on a phone */
.ob-yesno { grid-template-columns: 1fr 1fr; }
.ob-yesno .ob-tile { flex-direction: column; align-items: flex-start; justify-content: space-between; min-height: 132px; padding: 16px 16px 18px; gap: 18px; }
.ob-yesno .ob-chk { top: 16px; right: 16px; margin-top: 0; }
.ob-fine { font-size: 14px; line-height: 1.5; color: var(--ob-muted); margin: 18px 0 0; max-width: 44em; }

/* typed answers */
.ob-field { display: grid; gap: 8px; margin: 20px 0 0; }
.ob-label { font-weight: 600; color: var(--ob-ink); }
.ob-input { width: 100%; min-height: 56px; padding: 12px 16px; font-size: 18px; color: var(--ob-ink); background: var(--ob-tile); border: 1.5px solid var(--ob-field-line); border-radius: 14px; }
.ob-input::placeholder { color: var(--ob-placeholder); }
.ob-input:focus-visible { outline: 3px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.ob-input[aria-invalid="true"], .ob-input[aria-invalid="true"]:focus-visible { border-color: var(--ob-error); }
.ob-err { color: var(--ob-error); font-size: 15px; margin: 0; }
.ob-picked + .ob-err { margin-top: 6px; }
.ob-err[hidden] { display: none; }
/* under a typed answer the error line keeps its room, so nothing jumps when it shows */
.ob-field > .ob-err { min-height: 20px; }
.ob-field > .ob-err[hidden] { display: block; visibility: hidden; }
.ob-chip { justify-self: start; min-height: 44px; margin-top: 4px; padding: 8px 18px; border-radius: 999px; border: 1.5px solid var(--ob-field-line); background: var(--ob-tile); font-weight: 600; color: var(--primary); }
.ob-chip:hover { border-color: var(--warm); }

/* the bottom: the main button and a text link, kept in reach on a phone */
.ob-foot { position: sticky; bottom: 0; z-index: 2; display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 20px 16px; background: linear-gradient(to top, var(--ob-cream) 78%, var(--ob-fade-to)); }
.ob-foot .ob-btn { width: 100%; }
.ob-foot .ob-lnk { align-self: center; }

/* welcome */
.ob-wel { position: relative; flex: 1 0 auto; display: flex; flex-direction: column; justify-content: flex-end; width: 100%; max-width: 920px; margin: 0 auto; padding: 30px 24px 8px; }
.ob-deco { position: absolute; right: -150px; top: -110px; width: 400px; height: 400px; pointer-events: none; }
.ob-deco svg { width: 100%; height: 100%; }
.ob-deco circle { fill: none; stroke-width: 22; }
.ob-deco-full { stroke: var(--warm); stroke-opacity: .28; }
.ob-deco-arc { stroke: var(--primary); stroke-linecap: round; }
.ob-wel > .ob-stagger { position: relative; z-index: 1; }
.ob-wel .ob-mk { margin-bottom: 26px; }
.ob-wel-title { font-family: var(--font-display); font-weight: 600; font-size: 46px; line-height: 1.02; letter-spacing: -.02em; color: var(--primary); margin: 0 0 18px; }
.ob-hl { white-space: nowrap; padding: 0 2px; background: linear-gradient(transparent 58%, var(--ob-highlight) 58%, var(--ob-highlight) 92%, transparent 92%); }
.ob-lead { font-size: 18px; line-height: 1.5; margin: 0 0 20px; }
.ob-note { font-size: 15px; font-weight: 600; color: var(--ob-warm-text); margin: 0 0 16px; }
.ob-consent { display: flex; gap: 10px; margin: 0; padding-top: 16px; border-top: 1px solid var(--ob-line); font-size: 14px; line-height: 1.5; color: var(--ob-muted); }
.ob-consent .ob-i svg { width: 18px; height: 18px; margin-top: 2px; color: var(--ob-warm-text); }

/* the last screen */
.ob-sum { list-style: none; margin: 0 0 16px; padding: 0; background: var(--ob-tile); border: 1.5px solid var(--ob-line); border-radius: 18px; }
.ob-sum-line { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; font-size: 16px; line-height: 1.4; }
.ob-sum-line + .ob-sum-line { border-top: 1px solid var(--ob-line); }
.ob-sum-t { flex: 1; }
.ob-sum .ob-ico { width: 32px; height: 32px; border-radius: 10px; }
.ob-sum .ob-ico svg { width: 18px; height: 18px; }
.ob-sum .ob-lnk { font-size: 15px; padding: 8px 2px; flex: none; }
.ob-change { min-height: 44px; }
.ob-close { font-family: var(--font-display); font-size: 21px; line-height: 1.3; color: var(--primary); margin: 0 0 22px; }
.ob-try-h { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-weight: 700; font-size: 16px; color: var(--ob-ink); }
.ob-try-h .ob-i { color: var(--warm-hover); }
.ob-cards { border: 1px solid var(--ob-line-soft); border-radius: 16px; overflow: hidden; background: var(--ob-tile); }
.ob-card { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 14px 16px; text-align: left; background: var(--ob-tile); border: 0; }
.ob-card + .ob-card { border-top: 1px solid var(--ob-line-soft); }
.ob-card:hover { background: var(--ob-card-hover); }
.ob-card:focus-visible { outline-offset: -3px; }
.ob-card-t { flex: 1; }
.ob-card small { display: block; color: var(--ob-muted); font-size: 13px; margin-bottom: 2px; }
.ob-card b { display: block; font-weight: 500; font-size: 15px; }
.ob-card .ob-i { color: var(--ob-muted); }

/* saving, and a save that did not go through */
.ob-wait { flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 40px 24px; text-align: center; }
.ob-wait-t { font-family: var(--font-display); font-size: 21px; line-height: 1.3; color: var(--primary); margin: 0; }
.ob-calm { font-size: 15px; line-height: 1.5; color: var(--ob-ink); margin: 8px 0 22px; padding: 14px 16px; background: var(--ob-warm-fill); border: 1px solid var(--ob-warm-rule); border-radius: 14px; }

/* notes the page shows above the chat box after sign-in (for example, older notes already moved) */
#welcome > .ob-error {
  width: 100%; max-width: 680px; margin: var(--space-4, 16px) auto 0; padding: 12px 16px; text-align: left;
  font-size: 15px; line-height: 1.5; color: var(--text); background: var(--v2-wash); border: 1px solid var(--v2-wash-rule); border-radius: 14px;
}
/* 44 px tap targets for the code sign-in screen's two links ("Send a new code", "Use a different email"); kept here
   because styles.css must stay the same file as the earlier page's. */
#auth-code-view .auth-link-btn { min-height: 44px; padding: 10px 8px; }
/* "Redo the quick questions" in Your askCOL */
.ob-redo { margin: var(--space-3, 12px) 0 0; }

/* desktop: the content block sits in the middle of the screen; tiles become a grid of tall cards */
@media (min-width: 760px) {
  .ob-top { padding: 20px 32px 14px; }
  .ob-row { max-width: 940px; margin: 0 auto; }
  .ob-segs { max-width: 920px; margin: 10px auto 0; padding: 0 8px; }
  .ob-main { padding-top: 36px; }
  .ob-main, .ob-wel { flex: 0 0 auto; margin-top: auto; }
  .ob-main:last-child { margin-bottom: auto; padding-bottom: 48px; }   /* a screen with no bottom row stays centred */
  .ob-q { font-size: 54px; max-width: 16em; }
  .ob-help { font-size: 18px; margin-bottom: 28px; }
  .ob-tiles { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .ob-tiles.ob-two { grid-template-columns: repeat(2, 1fr); }
  .ob-tile { flex-direction: column; align-items: flex-start; justify-content: space-between; min-height: 150px; padding: 18px 18px 20px; font-size: 17px; gap: 22px; }
  .ob-chk, .ob-yesno .ob-chk { top: 18px; right: 18px; margin-top: 0; }
  .ob-yesno { max-width: 720px; }
  .ob-foot { position: static; flex-direction: row; justify-content: flex-start; align-items: center; gap: 20px; width: 100%; max-width: 920px; margin: 0 auto auto; padding: 28px 20px 48px; background: none; }
  .ob-foot .ob-btn { width: auto; min-width: 220px; }
  .ob-wel { justify-content: center; padding: 60px 24px 0; }
  .ob-wel .ob-mk { --s: 84px !important; }
  .ob-wel-title { font-size: 80px; max-width: 10em; }
  .ob-lead { font-size: 21px; max-width: 32em; }
  .ob-consent { max-width: 44em; }
  .ob-deco { width: 620px; height: 620px; right: -230px; top: -300px; }
  .ob-sum, .ob-cards, .ob-calm { max-width: 720px; }
  .ob-wait { flex: 0 0 auto; margin: auto 0; }
}

/* motion: new screens slide in (forward from the right, Back from the left), the old one fades */
.ob-go-f { animation: ob-in-f .46s var(--ease) both; }
.ob-go-b { animation: ob-in-b .46s var(--ease) both; }
.ob-go-out { animation: ob-out .22s ease both; pointer-events: none; }
.ob-fade { animation: ob-fade-in .15s ease both; }
.ob-layer.ob-leaving { animation: ob-out .22s ease both; pointer-events: none; }
.ob-stagger > * { animation: ob-rise .42s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 45ms + 90ms); }
@keyframes ob-in-f { from { opacity: 0; transform: translateX(36px); } to { opacity: 1; transform: none; } }
@keyframes ob-in-b { from { opacity: 0; transform: translateX(-36px); } to { opacity: 1; transform: none; } }
@keyframes ob-out { to { opacity: 0; } }
@keyframes ob-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ob-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes ob-pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
@keyframes ob-spin { from { transform: rotate(-90deg); } to { transform: rotate(270deg); } }
@keyframes ob-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* reduced motion: a short fade only */
@media (prefers-reduced-motion: reduce) {
  .ob-go-f, .ob-go-b { animation: ob-fade-in .15s ease both; }
  .ob-stagger > *, .ob-mk-spin .ob-arc, .ob-segs span.ob-now::after { animation: none; }
  .ob-tile[aria-pressed="true"] .ob-chk, .ob-choice:has(.ob-box:checked) .ob-chk { animation: none; }
  .ob-segs span::after, .ob-tile, .ob-btn, .ob-ico { transition: none; }
  .ob-btn:active, .ob-tile:active { transform: none; }
}
