/* Bertie Guide (index.html). Standing engine template in the Bertie Foundation's own colors:
   dark by default, a vivid red-and-maroon glow blended with white, glass cards with a thin colored
   strip, Space Grotesk headings. All sizes in rem so the text-size control scales everything. */
:root{
  --brand:#d81f25; --red:#ff4c4c; --rose:#ff8a95; --blush:#ffc9cf; --maroon:#7a1620; --sky:#44a9df;
  --head:'Space Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --sans:'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --page:#14050a;
  --text:#fff4f5; --text-soft:rgba(255,236,238,.84); --text-dim:rgba(255,236,238,.7);
  --card:#2a080d; --card-glass:rgba(40,7,12,.72); --card-line:rgba(255,255,255,.14);
  --well:rgba(255,255,255,.08); --well-2:rgba(255,255,255,.14);
  --value:#ffb8bf;
  --bar:#1e060b; --bar-glass:rgba(30,6,11,.66);
  --shadow:0 1.375rem 3.125rem rgba(0,0,0,.45);
  --hero-ink:#ffffff; --hero-sub:#ffffff;
  --error-ink:#ffb4a8; --error-bg:rgba(255,138,122,.13); --error-line:#ff8a7a;
  --chip-bg:rgba(30,6,11,.72); --chip-ink:#ffe1e4;
}
html[data-theme="light"]{
  --page:#fff5f6;
  --text:#2a0a10; --text-soft:rgba(42,10,16,.8); --text-dim:rgba(42,10,16,.68);
  --card:#ffffff; --card-glass:rgba(255,255,255,.86); --card-line:rgba(122,22,32,.16);
  --well:rgba(216,31,37,.06); --well-2:rgba(216,31,37,.12);
  --value:#a3121d;
  --bar:#ffffff; --bar-glass:rgba(255,255,255,.84);
  --shadow:0 1.25rem 2.75rem rgba(122,22,32,.16);
  --hero-ink:#2a0a10; --hero-sub:#3a0d14;
  --error-ink:#b42318; --error-bg:#fef3f2; --error-line:#f97066;
  --chip-bg:rgba(255,255,255,.82); --chip-ink:#7a1620;
}
html[data-font-size="sm"]{font-size:100%;}
html[data-font-size="md"]{font-size:112.5%;}
html[data-font-size="lg"]{font-size:125%;}
html[data-font-size="xl"]{font-size:137.5%;}

*,*::before,*::after{box-sizing:border-box;}
html{-webkit-text-size-adjust:100%;}
body{margin:0; background:var(--page); color:var(--text); font-family:var(--sans); font-size:.9375rem; line-height:1.55;}
h1,h2,h3,h4{font-family:var(--head); font-weight:700; margin:0; line-height:1.12; letter-spacing:-.01em;}
p{margin:0;}
a{color:inherit;}
button{font:inherit; color:inherit;}
:focus-visible{outline:.125rem solid var(--blush); outline-offset:.125rem; border-radius:.375rem;}
html[data-theme="light"] :focus-visible{outline-color:var(--brand);}
.sr{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap;}
.skip{position:absolute; left:-999rem; top:0; z-index:100; background:var(--brand); color:#fff; padding:.5rem 1rem;}
.skip:focus{left:1rem; top:calc(.5rem + env(safe-area-inset-top, 0px));}

/* ───────── stage: the glow stays vivid, no scrim over it ───────── */
.stage{position:relative; min-height:100vh; min-height:100svh; padding-bottom:3rem; background-color:#2a070d;
  background-image:
    radial-gradient(42% 40% at 8% 6%, rgba(216,31,37,.85), transparent 70%),
    radial-gradient(36% 34% at 92% 10%, rgba(255,201,207,.42), transparent 70%),
    radial-gradient(52% 46% at 56% 64%, rgba(179,18,31,.78), transparent 72%),
    radial-gradient(40% 40% at 4% 92%, rgba(255,76,76,.5), transparent 70%),
    radial-gradient(30% 30% at 96% 88%, rgba(255,255,255,.18), transparent 70%),
    linear-gradient(160deg, #2a070d 0%, #5c0f17 42%, #7a1620 70%, #2a070d 100%);}
html[data-theme="light"] .stage{background-color:#ffe9eb;
  background-image:
    radial-gradient(42% 40% at 8% 6%, rgba(216,31,37,.42), transparent 70%),
    radial-gradient(40% 36% at 92% 10%, rgba(255,255,255,.95), transparent 70%),
    radial-gradient(52% 46% at 56% 64%, rgba(255,76,76,.32), transparent 72%),
    radial-gradient(40% 40% at 4% 92%, rgba(255,138,149,.45), transparent 70%),
    linear-gradient(160deg, #ffd3d8 0%, #fff6f7 48%, #ffc6cc 100%);}

/* ───────── nav: sticky full-width glass bar, one centred row that wraps on phones ───────── */
.topbar{position:sticky; top:0; z-index:40; background:var(--bar); border-bottom:1px solid var(--card-line);
  padding-top:env(safe-area-inset-top, 0px); padding-left:env(safe-area-inset-left, 0px); padding-right:env(safe-area-inset-right, 0px);}
@supports ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){
  .topbar{background:var(--bar-glass); -webkit-backdrop-filter:blur(.875rem); backdrop-filter:blur(.875rem);}
}
.nav{display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:.5rem 1.25rem; width:100%; max-width:83.75rem; margin:0 auto; padding:.5625rem 1rem;}
.brand{display:inline-flex; align-items:center; gap:.625rem; min-width:0; text-decoration:none;}
.brand-mark{display:inline-flex; width:2.25rem; height:2.25rem; flex-shrink:0; border-radius:.625rem; background:#ffffff; box-shadow:0 0 0 .125rem rgba(255,255,255,.2), 0 0 1rem rgba(255,76,76,.55); overflow:hidden;}
.brand-mark img{width:100%; height:100%; display:block;}
.brand-text{font-family:var(--head); font-weight:700; font-size:1.125rem; line-height:1.1; min-width:0;}
.brand-text small{display:block; font-family:var(--sans); font-weight:600; font-size:.8125rem; color:var(--value);}
.nav-links{display:flex; flex-wrap:wrap; justify-content:center; gap:.25rem 1.125rem; font-size:.875rem; font-weight:500;}
.nav-links a{text-decoration:none; color:var(--text-soft); padding:.375rem 0;}
.nav-links a:hover,.nav-links a[aria-current="page"]{color:var(--text);}
.nav-links a[aria-current="page"]{font-weight:700; box-shadow:inset 0 -.125rem 0 var(--red);}
.controls{display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:.5rem;}
.size-group{display:inline-flex; border:1px solid var(--card-line); border-radius:999px; overflow:hidden; background:var(--well);}
.size-group button{border:0; background:none; cursor:pointer; min-width:2.25rem; min-height:2.25rem; padding:0 .5rem; font-weight:700; color:var(--text-soft); line-height:1;}
.size-group button[data-size="sm"] span{font-size:.75rem;} .size-group button[data-size="md"] span{font-size:.875rem;}
.size-group button[data-size="lg"] span{font-size:1rem;} .size-group button[data-size="xl"] span{font-size:1.125rem;}
.size-group button[aria-pressed="true"]{background:linear-gradient(135deg, var(--brand), #9e1a23); color:#ffffff;}
.theme{display:inline-flex; align-items:center; gap:.5rem; min-height:2.25rem; padding:0 .875rem; border:1px solid var(--card-line); border-radius:999px; background:var(--well); cursor:pointer; font-weight:600; font-size:.8125rem;}
.theme-dot{width:.625rem; height:.625rem; border-radius:50%; background:linear-gradient(135deg, var(--blush), var(--red));}
html[data-theme="light"] .theme-dot{background:#2a0a10;}
@media (min-width:56.25em){
  .nav{flex-wrap:nowrap; justify-content:space-between; padding:.5625rem 1.5rem;}
  .brand{margin-right:auto;}
  .controls{margin-left:auto;}
}

/* ───────── hero: compact, so the board sits above the fold ───────── */
.hero{text-align:center; padding:1.125rem 1rem .875rem;}
.hero-chip{display:inline-block; padding:.25rem .75rem; border-radius:999px; margin-bottom:.5rem; background:var(--chip-bg); border:1px solid var(--card-line); color:var(--chip-ink); font-size:.8125rem; font-weight:600;}
.hero h1{font-size:clamp(1.625rem, 1.05rem + 2.4vw, 2.75rem); color:var(--hero-ink); margin:0 auto; text-wrap:balance;
  text-shadow:0 1px 0 rgba(0,0,0,.6), 0 .25rem 1.25rem rgba(0,0,0,.4);}
html[data-theme="light"] .hero h1{text-shadow:0 1px 0 rgba(255,255,255,.7);}
.hero h1 .grad{color:var(--blush); background:linear-gradient(95deg, #ffffff 0%, #ffd0d5 45%, #ff9aa3 100%); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; text-shadow:none;
  filter:drop-shadow(0 1px 0 rgba(0,0,0,.75)) drop-shadow(0 0 .125rem rgba(0,0,0,.6));}
html[data-theme="light"] .hero h1 .grad{color:var(--brand); background:linear-gradient(95deg, #a3121d 0%, #d81f25 55%, #b3121f 100%); -webkit-background-clip:text; background-clip:text; filter:none;}
.hero-sub{max-width:36rem; margin:.5rem auto 0; font-size:clamp(.9375rem, .85rem + .3vw, 1.0625rem); font-weight:600; line-height:1.45; color:var(--hero-sub);
  text-shadow:0 1px 0 rgba(0,0,0,.9), 0 0 .1875rem rgba(0,0,0,.85), 0 .125rem .5rem rgba(0,0,0,.6);}
html[data-theme="light"] .hero-sub{text-shadow:none;}
.hero-links{display:flex; flex-wrap:wrap; justify-content:center; gap:.5rem; margin-top:.75rem;}
.hero-link{display:inline-flex; align-items:center; min-height:2.25rem; padding:.375rem .875rem; border-radius:999px; background:var(--chip-bg); border:1px solid var(--card-line); color:var(--chip-ink); font-size:.875rem; font-weight:700; text-decoration:none;}
.hero-link:hover{border-color:var(--red);}

/* ───────── board ─────────
   Phones: one column. From 700px: three columns, chat across the top row.
   From 1100px: four columns (1.36 / 1.06 / 0.98 / 0.98). Every card sits in an explicit cell and
   keeps its own height (align-items:start), so the board is staggered, never stretched. */
.board{display:grid; grid-template-columns:minmax(0,1fr); gap:.75rem; align-items:start; width:min(100% - 2rem, clamp(56.25rem, 66vw, 83.75rem)); margin:0 auto;}
@media (min-width:43.75em){
  .board{width:min(100% - 3rem, clamp(56.25rem, 66vw, 83.75rem)); grid-template-columns:repeat(3, minmax(0,1fr));}
  .slot-chat{grid-column:1 / -1; grid-row:1;}
  .slot-match{grid-column:1; grid-row:2;} .slot-short{grid-column:2; grid-row:2;} .slot-detail{grid-column:3; grid-row:2;}
}
@media (min-width:68.75em){
  .board{grid-template-columns:minmax(0,1.36fr) minmax(0,1.06fr) minmax(0,.98fr) minmax(0,.98fr);}
  .slot-chat{grid-column:1; grid-row:1;}
  .slot-match{grid-column:2; grid-row:1;} .slot-short{grid-column:3; grid-row:1;} .slot-detail{grid-column:4; grid-row:1;}
}
.slot{min-width:0;}
.card{position:relative; min-width:0; background:var(--card); border:1px solid var(--card-line); border-radius:.875rem; padding:.875rem 1rem 1rem; box-shadow:var(--shadow); overflow:hidden;}
@supports ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){
  .card{background:var(--card-glass); -webkit-backdrop-filter:blur(1rem) saturate(1.2); backdrop-filter:blur(1rem) saturate(1.2);}
}
.card::before{content:""; position:absolute; left:0; right:0; top:0; height:.1875rem; background:var(--strip);}
.chat{--strip:linear-gradient(90deg, var(--red), var(--blush));}
#matchCard{--strip:linear-gradient(90deg, var(--brand), var(--rose));}
#shortCard{--strip:linear-gradient(90deg, var(--rose), var(--blush));}
#detailCard{--strip:linear-gradient(90deg, var(--brand), var(--sky));}
.mini-h{font-size:1rem; line-height:1.25;}

/* chat */
.chat{display:flex; flex-direction:column; container-type:inline-size;}
.chat-head{position:relative; text-align:center; padding:0 7.75rem 0 0; text-align:left;}
.chat-head h2{font-size:1.125rem;}
.chat-head .sub{font-size:.8125rem; color:var(--text-soft); margin-top:.125rem;}
.head-icons{position:absolute; top:-.25rem; right:0; display:flex; gap:.125rem;}
.icon{width:2.5rem; height:2.5rem; border:0; background:none; border-radius:.5rem; color:var(--text-soft); cursor:pointer; display:inline-flex; align-items:center; justify-content:center; gap:.375rem;}
.icon:hover:not(:disabled){color:var(--text); background:var(--well);}
.icon:disabled{opacity:.4; cursor:not-allowed;}
.icon svg{width:1rem; height:1rem; flex-shrink:0;}
.expand-btn{width:auto; padding:0 .625rem; font-size:.8125rem; font-weight:600; border:1px solid var(--card-line); background:var(--well);}
.expand-btn .i-close{display:none;}
.chat.expanded .expand-btn .i-open{display:none;} .chat.expanded .expand-btn .i-close{display:inline;}
@container (max-width:20rem){ .expand-label{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap;} }
.count-chip{display:inline-flex; align-items:center; gap:.375rem; margin-top:.625rem; padding:.1875rem .625rem; border-radius:999px; background:var(--well); font-size:.75rem; font-weight:600; align-self:flex-start;}
.count-chip .dot{width:.375rem; height:.375rem; border-radius:50%; background:var(--text-dim);}
.count-chip.live .dot{background:#86efac; box-shadow:0 0 .375rem #86efac;}
.count-chip.error .dot{background:var(--error-line);}
.messages{display:flex; flex-direction:column; gap:.625rem; margin:.625rem -.25rem 0; padding:.125rem .5rem .125rem .25rem; height:clamp(16rem, 52svh, 26rem); overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin;}
@media (min-width:68.75em){
  .chat{height:clamp(22rem, 100svh - 22.5rem, 38rem);}
  .messages{flex:1 1 auto; height:auto; min-height:0;}
}
.msg{max-width:94%; padding:.625rem .75rem; border-radius:.625rem; font-size:.9375rem; line-height:1.5; overflow-wrap:anywhere; text-align:left;}
.msg.assistant{align-self:flex-start; background:var(--well);}
.msg.user{align-self:flex-end; background:linear-gradient(135deg, #c41a22, #8f1c26); color:#ffffff; white-space:pre-wrap;}
.msg.error{position:relative; padding-left:2.25rem; background:var(--error-bg); border:1px solid var(--error-line); color:var(--error-ink);}
.msg.error::before{content:"!"; position:absolute; left:.625rem; top:.625rem; width:1.125rem; height:1.125rem; border-radius:50%; background:var(--error-line); color:#2a0a10; font-weight:800; font-size:.75rem; line-height:1.125rem; text-align:center;}
.msg > * + *{margin-top:.5rem;}
.msg ul,.msg ol{margin-bottom:0; padding-left:1.2em;}
.msg li{margin:.1875rem 0;}
.msg a{color:var(--value); font-weight:600;}
.draft{position:relative; border-radius:.625rem; background:rgba(0,0,0,.28); border:1px solid var(--card-line);}
html[data-theme="light"] .draft{background:#fff5f6;}
.draft pre{margin:0; padding:2.25rem .75rem .75rem; white-space:pre-wrap; overflow-wrap:anywhere; font-family:var(--sans); font-size:.875rem; line-height:1.5;}
.copy{position:absolute; top:.375rem; right:.375rem; border:1px solid var(--card-line); background:var(--card); border-radius:.5rem; padding:.25rem .625rem; font-size:.75rem; font-weight:600; cursor:pointer; color:var(--text);}

/* thinking indicator: three dots that pulse in turn, plus notes for long waits */
.msg.thinking{display:flex; flex-direction:column; gap:.375rem;}
.msg.thinking > * + *{margin-top:0;}
.dots{display:inline-flex; gap:.3125rem; padding:.25rem 0;}
.dots span{width:.5rem; height:.5rem; border-radius:50%; background:var(--red); animation:dot 1.2s ease-in-out infinite;}
.dots span:nth-child(2){animation-delay:.18s;} .dots span:nth-child(3){animation-delay:.36s;}
@keyframes dot{0%,80%,100%{opacity:.3; transform:translateY(0);} 40%{opacity:1; transform:translateY(-.1875rem);}}
.wait-note{font-size:.8125rem; color:var(--text-soft);}
.wait-note[hidden]{display:none;}

/* composer: one line with mic and Send inline when the card is at least 18.5rem wide,
   otherwise the box takes its own row with mic and Send underneath. */
.composer{display:flex; flex-direction:column; gap:.5rem; margin-top:.75rem;}
.composer textarea{width:100%; min-width:0; resize:none; height:2.875rem; max-height:10rem; padding:.75rem; border:.09375rem solid rgba(255,138,149,.7); border-radius:.6875rem; background:var(--well); color:var(--text); font-family:var(--sans); font-size:max(16px, 1rem); line-height:1.3; outline:none; overflow-y:hidden;}
html[data-theme="light"] .composer textarea{border-color:rgba(163,18,29,.45); background:#ffffff;}
.composer textarea::placeholder{color:var(--text-dim); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.composer textarea:focus{border-color:var(--rose); box-shadow:0 0 0 .1875rem rgba(255,138,149,.28);}
.composer-actions{display:flex; justify-content:flex-end; align-items:center; gap:.5rem;}
@container (min-width:18.5rem){
  .composer{flex-direction:row; align-items:flex-end;}
  .composer textarea{flex:1 1 auto; width:auto;}
}
.mic{width:2.875rem; height:2.875rem; flex-shrink:0; display:inline-flex; align-items:center; justify-content:center; border-radius:50%; border:.09375rem solid rgba(255,138,149,.7); background:var(--well); color:var(--text); cursor:pointer;}
html[data-theme="light"] .mic{border-color:rgba(163,18,29,.45); background:#ffffff;}
.mic[hidden]{display:none;}
.mic svg{width:1.25rem; height:1.25rem;}
.mic:hover{border-color:var(--red);}
.mic[aria-pressed="true"]{border-color:var(--error-line); background:var(--error-bg); color:var(--error-ink); animation:mic-pulse 1.3s ease-in-out infinite;}
@keyframes mic-pulse{50%{box-shadow:0 0 0 .4375rem rgba(255,138,122,0);} 0%,100%{box-shadow:0 0 0 0 rgba(255,138,122,.45);}}
@media (pointer:coarse){ .mic{width:3rem; height:3rem;} }
.send{min-height:2.875rem; min-width:5rem; padding:0 1.125rem; border:0; border-radius:.6875rem; cursor:pointer; flex-shrink:0; background:linear-gradient(135deg, #c41a22, #8f1c26); color:#ffffff; font-weight:700; font-size:.9375rem; box-shadow:0 .625rem 1.375rem rgba(179,18,31,.4);}
.send:disabled{cursor:progress; background:linear-gradient(135deg, #9e1a23, #6e1820); color:#ffe9eb; box-shadow:none;}
.voice-note{margin-top:.5rem; font-size:.8125rem; color:var(--text-soft);}
.voice-note.is-error{color:var(--error-ink); font-weight:600;}
.voice-note[hidden]{display:none;}
.chat-foot{margin-top:.5rem; font-size:.75rem; color:var(--text-dim);}

/* full page: the chat becomes a fixed reading view; its empty slot keeps its height so nothing behind it moves */
html.chat-open, html.chat-open body{overflow:hidden;}
.chat.expanded{position:fixed; inset:0; z-index:60; height:auto; margin:0; border-radius:0; border:0; background:var(--card);
  padding:calc(1rem + env(safe-area-inset-top, 0px)) calc(1rem + env(safe-area-inset-right, 0px)) calc(1rem + env(safe-area-inset-bottom, 0px)) calc(1rem + env(safe-area-inset-left, 0px));}
@supports ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){ .chat.expanded{background:var(--card); -webkit-backdrop-filter:none; backdrop-filter:none;} }
html[data-theme="dark"] .chat.expanded{background:#2a080d;}
.chat.expanded > *{width:100%; max-width:52rem; margin-left:auto; margin-right:auto;}
.chat.expanded .count-chip{width:auto; align-self:center;}
.chat.expanded .messages{flex:1 1 auto; height:auto; min-height:0;}
.chat.expanded .msg{font-size:1.0625rem; max-width:100%;}

/* top match */
.pill{display:inline-block; padding:.1875rem .625rem; border-radius:999px; background:var(--well-2); color:var(--value); font-size:.78125rem; font-weight:700;}
.tile{position:relative; display:flex; flex-direction:column; justify-content:space-between; gap:.5rem; margin-top:.75rem; min-height:7.25rem; padding:.875rem; border-radius:.75rem; overflow:hidden; text-align:left;
  background:linear-gradient(135deg, #c41a22 0%, #8f1c26 62%, #5c0f17 100%); color:#ffffff; box-shadow:0 .75rem 1.75rem rgba(0,0,0,.28);}
.tile::after{content:""; position:absolute; right:-2.25rem; bottom:-2.25rem; width:8rem; height:8rem; border-radius:50%; border:1.125rem solid rgba(255,201,207,.18);}
.tile.k-event{background:linear-gradient(135deg, #b3121f 0%, #7a1620 60%, #3d080e 100%);}
.tile.k-guide{background:linear-gradient(135deg, #8f1c26 0%, #5c0f17 60%, #2a070d 100%);}
.tile-kind{position:relative; z-index:1; font-size:.75rem; font-weight:700; color:#ffe1e4;}
.tile-title{position:relative; z-index:1; font-family:var(--head); font-weight:700; font-size:1.25rem; line-height:1.12; overflow-wrap:anywhere;}
.fit{margin-top:.75rem; font-size:.875rem; color:var(--text-soft);}
.fit[hidden]{display:none;}
.fit-score{font-family:var(--head); font-weight:700; font-size:1.375rem; color:var(--value); margin-right:.125rem;}
.why{margin-top:.375rem; font-size:.875rem; color:var(--text-soft);}
.match-links{display:flex; flex-wrap:wrap; gap:.375rem .875rem; margin-top:.625rem;}
.match-links a{font-weight:700; font-size:.875rem; color:var(--value); text-underline-offset:.2em; overflow-wrap:anywhere;}

/* shortlist */
.donut-wrap{display:flex; justify-content:center; margin:.75rem 0 .5rem;}
.donut{width:5.5rem; height:5.5rem; position:relative;}
.donut svg{width:100%; height:100%; transform:rotate(-90deg);}
.donut .track{stroke:rgba(255,255,255,.14);}
html[data-theme="light"] .donut .track{stroke:rgba(122,22,32,.12);}
.donut .arc{transition:stroke-dashoffset .6s ease;}
.donut .center{position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center;}
.donut .pct{font-family:var(--head); font-weight:700; font-size:1.375rem; line-height:1;}
.donut .lbl{font-size:.6875rem; color:var(--text-soft); margin-top:.25rem;}
.center-text{text-align:center; font-size:.84375rem; color:var(--text-soft);}
.shortlist{list-style:none; margin:.75rem 0 0; padding:0; display:flex; flex-direction:column; gap:.375rem;}
.pick{display:grid; grid-template-columns:minmax(0,1fr) auto; gap:.125rem .625rem; width:100%; text-align:left; padding:.5625rem .6875rem; border-radius:.625rem; border:1px solid var(--card-line); background:var(--well); cursor:pointer; color:var(--text);}
.pick:hover{border-color:var(--rose);}
.pick[aria-pressed="true"]{border-color:var(--rose); background:var(--well-2); box-shadow:inset .1875rem 0 0 var(--red);}
.pick-title{font-weight:600; font-size:.875rem; overflow-wrap:anywhere;}
.pick-score{font-family:var(--head); font-weight:700; color:var(--value); font-size:.875rem;}
.pick-kind{grid-column:1 / -1; font-size:.75rem; color:var(--text-dim);}
.empty-li{font-size:.8125rem; color:var(--text-dim); text-align:center;}

/* details */
.detail-head{display:flex; justify-content:space-between; align-items:baseline; gap:.625rem; flex-wrap:wrap;}
.detail-kind{font-weight:700; color:var(--value); font-size:.84375rem;}
.detail-title{margin-top:.625rem; font-size:1.0625rem; overflow-wrap:anywhere;}
.detail-sum{margin-top:.375rem; font-size:.875rem; color:var(--text-soft);}
.facts{margin:.875rem 0 0; display:flex; flex-direction:column; gap:.5rem;}
.facts div{display:grid; grid-template-columns:minmax(0,1fr); gap:.0625rem; font-size:.84375rem; line-height:1.45;}
.facts dt{font-family:var(--head); font-weight:700; color:var(--value); overflow-wrap:anywhere;}
.facts dd{margin:0; color:var(--text-soft); overflow-wrap:anywhere;}
.guide-link{display:inline-block; margin-top:.75rem; font-weight:700; font-size:.875rem; color:var(--value); text-underline-offset:.2em;}
.guide-link[hidden]{display:none;}
.next{margin-top:.875rem; padding-top:.75rem; border-top:1px solid var(--card-line);}
.next-h{font-family:var(--sans); font-weight:700; font-size:.90625rem;}
.block-text{font-size:.875rem; color:var(--text-soft); margin-top:.375rem;}

/* phones: headings and copy centred; lists and rows stay left */
@media (max-width:43.74em){
  .result{text-align:center;}
  .result .tile,.result .shortlist,.result .pick,.result .facts,.result .facts div{text-align:left;}
  .result .match-links,.detail-head{justify-content:center;}
  .chat-head{text-align:left;}
}

/* ───────── notes + footer ───────── */
.notes{background:var(--page); padding:2.75rem 1rem 1.25rem;}
.notes > *{width:100%; max-width:83.75rem; margin-left:auto; margin-right:auto;}
.notes h2{font-size:1.625rem; text-align:center;}
.notes-grid{display:grid; grid-template-columns:minmax(0,1fr); gap:.875rem 2.75rem; margin-top:1rem;}
@media (min-width:56.25em){ .notes-grid{grid-template-columns:repeat(2, minmax(0,1fr));} }
@media (min-width:45em){ .notes h2{text-align:left;} .notes{padding-left:1.5rem; padding-right:1.5rem;} }
.notes p{font-size:.90625rem; color:var(--text-soft); line-height:1.65; text-align:center;}
@media (min-width:45em){ .notes p{text-align:left;} }
.notes strong{color:var(--text);}
.foot{background:var(--page); text-align:center; padding:1.5rem 1rem calc(1.75rem + env(safe-area-inset-bottom, 0px)); font-size:.8125rem; color:var(--text-dim); overflow-wrap:anywhere;}
.foot a{color:var(--text-soft);}

@media (prefers-reduced-motion:reduce){
  *{animation:none !important; transition:none !important; scroll-behavior:auto !important;}
  .dots span{opacity:1;}
}
