/* ==========================================================================
   Home (/app) — 9/24 redesign, Billy's picks: 2A "producer's desk" (returning) and 2B (first visit, .home--first).
   Grid: the next session (left) · at a glance + latest clips (right) · what Remy is drawing from (rail) · what Remy
   knows (compact facts). The brand card spans the whole row while its editor is open, and so does the research card
   while its details are open. Every rule is scoped under .home; loaded after app.css (tokens, .card, .btn, .pill,
   .ref-thumb, .format-card, .capstyle-*, .swatch live there).
   ========================================================================== */

.app-main:has(> .home){ padding: var(--s-5) clamp(20px, 2vw, 32px) var(--s-6); }
.home{
  --home-gap: clamp(16px, 1.5vw, 22px);
  --home-pad: clamp(20px, 1.7vw, 26px);
  --remy-line: rgba(155,92,255,.6);
  --remy-glow: rgba(155,92,255,.35);
  /* small secondary text: the app-wide --ink-faint (.4) is ~3.6:1 on these cards, under WCAG AA for text this size;
     .56 is ~5.5:1 and still reads as secondary next to --ink-dim (.64) */
  --home-faint: rgba(244,239,230,.56);
  max-width: 1640px;
}
.home .faint{ color: var(--home-faint); }
.home .card{ padding: var(--home-pad); border-radius: 20px; }

/* ---------------------------------------------------------------- top bar */
.home .home-top{ display:flex; align-items:flex-end; justify-content:space-between; gap: var(--s-4); flex-wrap:wrap; margin-bottom: var(--s-4); }
.home .home-name{ font-family: var(--font-display); font-weight:400; font-size: clamp(2.1rem, 3.2vw, 3.1rem); line-height:1; letter-spacing:-.01em; margin-top: 6px; }

/* the project switcher: "SkipVoicemail ▾" + Business/Idea tag (ui.js projectMenuHtml) */
.home .pm{ position:relative; display:flex; align-items:center; gap: var(--s-3); flex-wrap:wrap; }
.home .pm-h{ margin-bottom:0; }
.home .pm-btn{ display:inline-flex; align-items:center; gap: 10px; max-width:100%; background:none; border:0; padding: 2px 8px 4px 0; margin-left: 0; cursor:pointer; color: var(--ink); border-radius: 12px;
  font: inherit; letter-spacing: inherit; text-align:left; }
.home .pm-btn:hover .pm-caret, .home .pm.is-open .pm-caret{ background: rgba(244,239,230,.12); color: var(--ink); }
.home .pm-btn:focus-visible{ outline: 2px solid var(--rec); outline-offset: 4px; }
.home .pm-name{ min-width:0; overflow-wrap:anywhere; }
.home .pm-caret{ display:grid; place-items:center; width: 34px; height: 34px; flex:none; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--ink-dim); transition: background .15s var(--ease), transform .15s var(--ease); }
.home .pm.is-open .pm-caret{ transform: rotate(180deg); }
.home .pm-caret svg{ width: 18px; height: 18px; }
.home .pm-kind{ display:inline-flex; align-items:center; font-family: var(--font-ui); font-size:.72rem; font-weight:600; letter-spacing:.04em; text-transform:uppercase; padding: 3px 9px; border-radius: 999px; white-space:nowrap;
  color: #9fb2ef; background: rgba(124,147,224,.14); border: 1px solid rgba(124,147,224,.32); }
.home .pm-kind--idea{ color: var(--amber); background: var(--amber-dim); border-color: rgba(224,167,94,.35); }
.home .pm-kind--lg{ font-size:.76rem; padding: 4px 11px; }
.home .pm-menu{ position:absolute; top: calc(100% + 8px); left:0; z-index: 60; min-width: min(360px, calc(100vw - 32px)); max-width: calc(100vw - 32px); list-style:none; margin:0; padding: 6px;
  background: #1f1d27; border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: 0 24px 60px -20px rgba(0,0,0,.85); }
.home .pm-head{ font-size:.7rem; letter-spacing:.08em; text-transform:uppercase; color: var(--home-faint); padding: 8px 10px 6px; }
.home .pm-item{ display:flex; align-items:center; gap: 10px; width:100%; min-height: 44px; padding: 8px 10px; border:0; border-radius: 10px; background:none; color: var(--ink); font: inherit; font-size:.95rem; text-align:left; cursor:pointer; }
.home .pm-item:hover, .home .pm-item:focus-visible{ background: rgba(244,239,230,.08); outline: none; }
.home .pm-item:focus-visible{ box-shadow: inset 0 0 0 2px var(--rec); }
.home .pm-item[aria-checked="true"]{ font-weight:600; }
.home .pm-check{ width: 18px; flex:none; text-align:center; color: var(--rec); font-weight:700; }
.home .pm-item-name{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.home .pm-sep{ height:1px; background: var(--line); margin: 6px 4px; }
.home .pm-add{ color: var(--ink-dim); }
.home .pm-add .pm-check{ color: var(--sage); font-size: 1.1rem; }
.home .pm-add:hover, .home .pm-add:focus-visible{ color: var(--ink); }

/* ---------------------------------------------------------------- grid */
.home .home-grid{ display:grid; gap: var(--home-gap); grid-template-columns: minmax(0, 1.52fr) minmax(340px, 1fr); align-items:stretch; }
.home .home-side{ display:grid; gap: var(--home-gap); grid-template-rows: auto 1fr; min-width:0; }
.home .home-research, .home .home-brand{ align-self:start; min-width:0; }
.home .home-research.is-open, .home .home-brand.is-editing{ grid-column: 1 / -1; }

/* card heads */
.home .home-card-head{ display:flex; align-items:flex-start; justify-content:space-between; gap: var(--s-3); margin-bottom: var(--s-4); }
.home .home-card-title{ font-family: var(--font-display); font-weight:400; font-size: clamp(1.35rem, 1.55vw, 1.7rem); line-height:1.1; letter-spacing:-.005em; }
.home .home-card-sub{ color: var(--ink-dim); font-size:.92rem; margin-top: 4px; }
.home .home-card-link{ display:inline-flex; align-items:center; gap:6px; flex-shrink:0; background:none; border:0; padding: 6px 0; cursor:pointer;
  font: inherit; font-size:.85rem; color: var(--ink-dim); white-space:nowrap; min-height: 32px; }
.home .home-card-link:hover{ color: var(--ink); }
.home .home-card-link svg{ width:15px; height:15px; }

/* ---------------------------------------------------------------- the next session */
.home .home-next{ position:relative; overflow:hidden; container-type: inline-size; container-name: next;
  background:
    radial-gradient(90% 80% at 12% 0%, rgba(255,75,62,.16), transparent 62%),
    radial-gradient(60% 60% at 18% 42%, rgba(155,92,255,.10), transparent 70%),
    linear-gradient(180deg, #221b22, #1b1920 60%);
  border-color: rgba(255,75,62,.16); }
.home .home-next-in{ display:grid; grid-template-columns: minmax(170px, 31%) minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "eye eye" "remy body"; column-gap: clamp(16px, 2vw, 28px); }
.home .home-next-in > .home-next-eyebrow{ grid-area: eye; margin-bottom: var(--s-3); }
.home .home-next-in > .home-remy{ grid-area: remy; }
.home .home-next-in > .home-next-body{ grid-area: body; min-width:0; display:flex; flex-direction:column; }
.home .home-next-in > .home-next-body > .home-plan{ margin-top: auto; }
.home .home-next-in > .home-next-body > .home-next-lede{ margin-bottom: var(--s-4); }
.home .home-next-in > .home-remy{ align-self:start; margin-top: var(--s-2); }
.home .home-next-in .home-remy-img{ width: 116%; max-width: 280px; margin: -8px -8% -4px; }
.home .home-next{ display:flex; flex-direction:column; }
.home .home-next-in{ flex:1; }
.home .home-next-title{ font-family: var(--font-display); font-weight:400; font-size: clamp(1.9rem, 2.65vw, 2.75rem); line-height:1.02; letter-spacing:-.012em; text-wrap: balance; }
.home .home-next-lede{ color: var(--ink-dim); font-size: .98rem; line-height:1.5; margin-top: var(--s-3); max-width: 46ch; }

/* Remy + his speech bubble */
.home .home-remy{ display:flex; flex-direction:column; align-items:center; min-width:0; }
.home .home-remy-img{ width: 100%; max-width: 250px; height:auto; aspect-ratio:1; margin: -8px 0 -4px;
  filter: drop-shadow(0 18px 40px rgba(155,92,255,.28)) drop-shadow(0 0 30px rgba(255,75,62,.12)); }
.home .home-bubble{ position:relative; width:100%; max-width: 240px; padding: 14px 18px; border-radius: 16px; font-size:1.02rem; line-height:1.35; color: var(--ink);
  background: rgba(21,20,27,.72); border: 1.5px solid var(--remy-line); box-shadow: 0 0 24px -8px var(--remy-glow), inset 0 0 20px -12px var(--remy-glow); }
.home .home-bubble span{ display:block; color: var(--ink-dim); font-size:.95rem; margin-top: 4px; }
.home .home-bubble::before{ content:''; position:absolute; top:-9px; right: 42px; width:16px; height:16px; background: #1a1720;
  border-left: 1.5px solid var(--remy-line); border-top: 1.5px solid var(--remy-line); transform: rotate(45deg) skew(8deg, 8deg); }

/* the plan (2A: numbered list inside a panel, Start at its foot) */
.home .home-plan{ margin-top: var(--s-4); padding: var(--s-4) var(--s-4) var(--s-4); border-radius: 16px; background: rgba(15,14,19,.45); border: 1px solid var(--line); }
.home .home-plan-label{ font-size:.68rem; color: var(--ink-dim); }
.home .home-plan-list{ margin-top: var(--s-2); display:flex; flex-direction:column; }
.home .home-plan-item{ display:flex; align-items:center; gap: var(--s-3); padding: 7px 0; min-height: 44px; }
.home .home-plan-n{ width:32px; height:32px; flex:none; border-radius:50%; display:grid; place-items:center; font-weight:600; font-size:.9rem;
  border: 1px solid var(--line-strong); background: rgba(244,239,230,.04); color: var(--ink); }
.home .home-plan-text{ display:flex; flex-direction:column; min-width:0; }
.home .home-plan-title{ font-size: 1.02rem; font-weight:500; color: var(--ink); line-height:1.3; }
.home .home-plan-hint{ display:block; font-size:.74rem; color: var(--home-faint); line-height:1.3; margin-top: 2px; }
.home .home-plan-sub{ font-size:.84rem; color: var(--home-faint); line-height:1.4; margin-top: 4px; }
.home .home-plan-skel{ flex:1; height: 16px; max-width: 280px; }
.home .home-plan-wait{ display:flex; align-items:center; gap: var(--s-2); margin-top: var(--s-3); font-size:.88rem; color: var(--ink-dim); }
.home .home-plan-note{ margin-top: var(--s-3); font-size:.9rem; color: var(--ink-dim); line-height:1.5; display:flex; gap: var(--s-2); align-items:flex-start; }
.home .home-plan-note .spinner{ flex:none; margin-top: 3px; }

.home .home-start{ display:flex; align-items:center; gap: var(--s-4); flex-wrap:wrap; margin-top: var(--s-4); }
.home .home-start-btn{ min-width: 220px; font-size: 1.08rem; border-radius: 16px; }
.home .home-start-btn svg{ width:22px; height:22px; }
.home .home-start-time{ display:inline-flex; align-items:center; gap: 6px; color: var(--home-faint); font-size:.9rem; }
.home .home-start-time svg{ width:18px; height:18px; }

/* narrow next-session card (1280-wide laptops, tablets, phones): Remy shrinks to a corner, no bubble */
@container next (max-width: 620px){
  .home .home-next-in{ grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "eye remy" "body body"; }
  .home .home-next-in > .home-remy{ align-self:start; margin: -14px -8px -6px var(--s-2); }
  .home .home-next-in .home-remy-img{ width: 84px; margin:0; }
  .home .home-next-in .home-bubble{ display:none; }
}

/* 2B: first visit — the headline and Start lead, Remy on the right, the plan as three cards */
.home .home-next--first{ display:flex; flex-direction:column; }
.home .home-next--first > .home-plan{ margin-top: auto; padding-top: var(--s-4); }
.home .home-next-top{ display:grid; grid-template-columns: minmax(0, 1fr) minmax(170px, 31%); gap: var(--s-4); align-items:start; }
.home .home-next--first .home-next-title{ font-size: clamp(2.1rem, 3vw, 3.1rem); margin-top: var(--s-3); white-space: nowrap; }
@container next (max-width: 700px){ .home .home-next--first .home-next-title{ white-space: normal; } }
.home .home-next--first .home-start{ flex-direction:column; align-items:flex-start; gap: var(--s-3); margin-top: var(--s-5); }
.home .home-next--first .home-start-btn{ min-width: 0; padding: 0 var(--s-6); }
.home .home-next--first .home-remy{ position:relative; margin-top: 8px; }
.home .home-next--first .home-remy-img{ width: 150%; max-width: 380px; margin: 16px -8% -40px -42%; }
.home .home-next--first .home-bubble{ position:absolute; top:0; right:0; width:auto; max-width: 200px; padding: 10px 16px; font-size:.95rem; z-index:1; }
.home .home-next--first .home-bubble::before{ top:auto; bottom:-9px; right:auto; left: 34px; transform: rotate(225deg) skew(8deg, 8deg); }
.home .home-plan--cards{ background:none; border:0; padding:0; margin-top: var(--s-4); }
.home .home-plan--cards .home-plan-list{ display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); margin-top: var(--s-3); }
.home .home-plan--cards .home-plan-item{ align-items:flex-start; padding: var(--s-4) var(--s-3); border-radius: 14px; background: rgba(15,14,19,.5); border: 1px solid var(--line-strong); min-height: 100px; }
.home .home-plan--cards .home-plan-title{ font-size:.96rem; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.home .home-plan--cards .home-plan-hint{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.home .home-plan--cards .home-plan-sub{ display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.home .home-plan--cards .home-plan-n{ width:34px; height:34px; }
@container next (max-width: 620px){
  .home .home-next-top{ grid-template-columns: minmax(0, 1fr) auto; }
  .home .home-next--first .home-bubble{ display:none; }
  .home .home-next--first .home-remy{ margin: -14px -8px 0 0; }
  .home .home-next--first .home-remy-img{ width: 84px; margin:0; }
  .home .home-plan--cards .home-plan-list{ grid-template-columns: 1fr; }
  .home .home-plan--cards .home-plan-item{ min-height:0; padding: var(--s-3); }
}

/* ---------------------------------------------------------------- at a glance */
.home .home-glance .home-card-head{ margin-bottom: var(--s-3); }
.home .home-stats{ display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); }
.home .home-stat{ display:flex; flex-direction:column; min-width:0; }
.home .home-stat b{ white-space:nowrap; font-size: clamp(1.6rem, 2vw, 2rem); font-weight:600; line-height:1.1; color: var(--ink); letter-spacing:-.01em; font-variant-numeric: tabular-nums; }
.home .home-stat > span:not(.home-stat-num){ font-size:.84rem; color: var(--ink-dim); margin-top: 4px; line-height:1.3; }
.home .home-stat small{ display:flex; align-items:center; gap:4px; white-space:nowrap; font-size:.78rem; color: var(--home-faint); margin-top: var(--s-2); }
.home .home-stat small.is-up{ color: var(--sage); }
.home .home-stat small svg{ width:13px; height:13px; }
.home .home-stat--tile{ padding: var(--s-3) var(--s-3) var(--s-3) 14px; border-radius: 14px; border: 1px solid var(--line-strong); background: rgba(15,14,19,.35); }
.home .home-ring{ --p: 100; width: 16px; height: 16px; flex:none; border-radius:50%;
  background: conic-gradient(var(--rec) calc(var(--p) * 1%), rgba(244,239,230,.12) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3px)); }
.home .home-ring.is-low{ background: conic-gradient(var(--amber) calc(var(--p) * 1%), rgba(244,239,230,.12) 0); }

/* 2B: stats in a row with icons and dividers, then the minutes bar */
.home .home-stats--row{ gap:0; }
.home .home-stats--row .home-stat{ padding: 0 var(--s-4); border-left: 1px solid var(--line); }
.home .home-stats--row .home-stat:first-child{ padding-left: 0; border-left: 0; }
.home .home-stat-num{ display:flex; align-items:center; gap: 10px; }
.home .home-stats--row .home-stat svg{ width:26px; height:26px; flex:none; color: #7c93e0; }
.home .home-stats--row .home-stat:nth-child(3) svg{ color: var(--sage); }
.home .home-meter{ height: 8px; border-radius: 999px; background: rgba(244,239,230,.1); margin-top: var(--s-5); overflow:hidden; }
.home .home-meter i{ display:block; height:100%; border-radius: inherit; background: var(--rec); min-width: 8px; }
.home .home-meter.is-low i{ background: var(--amber); }
.home .home-meter-note{ font-size:.84rem; color: var(--ink-dim); margin-top: var(--s-2); }

/* ---------------------------------------------------------------- latest clips */
.home .home-clips{ display:flex; flex-direction:column; }
.home .home-clips .home-card-head{ margin-bottom: var(--s-3); }
.home .home-clip-grid{ display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); }
.home .home-clip{ position:relative; display:block; border-radius: 12px; overflow:hidden; border: 1px solid var(--line-strong); background: var(--bg-sunken); text-decoration:none;
  transition: border-color .15s var(--ease), transform .15s var(--ease); }
.home .home-clip:hover{ border-color: var(--ink-faint); transform: translateY(-2px); }
.home .home-clip-thumb{ position:relative; display:flex; align-items:center; justify-content:center; aspect-ratio: 9 / 13; max-height: 240px; width:100%; background: rgba(244,239,230,.04); }
.home .home-clip-thumb img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.home .home-clip-wait{ position:relative; display:flex; flex-direction:column; align-items:center; gap: var(--s-2); font-size:.78rem; color: var(--home-faint); }
.home .home-clip-dur{ position:absolute; top:6px; right:6px; font-family: var(--font-mono); font-size:.72rem; padding: 2px 7px; border-radius: 999px; background: rgba(14,14,18,.72); color: var(--ink); }
.home .home-clip .pill{ position:absolute; left:8px; bottom:8px; max-width: calc(100% - 16px); white-space:nowrap; overflow:hidden; font-size:.68rem; padding: 3px 9px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.home .home-clip .pill:not(.pill--sage):not(.pill--amber):not(.pill--rec){ background: rgba(14,14,18,.72); }
.home .home-clip .pill--sage{ background: rgba(20,40,32,.82); }
.home .home-clip .pill--amber{ background: rgba(48,34,14,.85); }
.home .home-clip .pill--rec{ background: rgba(52,16,14,.85); }
.home .home-clips-empty{ flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap: var(--s-2);
  padding: var(--s-5) var(--s-4); border: 1.5px dashed var(--line-strong); border-radius: 14px; color: var(--ink); min-height: 170px; }
.home .home-clips-empty svg{ width:40px; height:40px; color: var(--ink-dim); margin-bottom: var(--s-1); }
.home .home-clips-empty p{ max-width: 30ch; line-height:1.45; }
.home .home-clips-empty p.faint{ font-size:.88rem; }

/* ---------------------------------------------------------------- what Remy is drawing from */
.home .home-research .home-card-head{ margin-bottom: var(--s-4); }
.home .home-rail{ display:grid; grid-auto-flow: column; grid-auto-columns: minmax(96px, calc((100% - 5 * var(--s-3)) / 6)); gap: var(--s-3); overflow-x:auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; padding-bottom: 6px; margin-bottom: -6px; scrollbar-width: thin; }
.home .home-ref{ display:flex; flex-direction:column; align-items:flex-start; gap: var(--s-2); min-width:0; scroll-snap-align: start; }
.home .home-ref .ref-thumb{ max-height:none; aspect-ratio: 9 / 16; border-radius: 12px; background: var(--bg-sunken); }
.home .home-ref .ref-thumb img{ opacity: .95; }
.home .home-ref .ref-thumb-platform{ display:none; }
.home .home-ref .ref-thumb-play{ width:34px; height:34px; font-size:.75rem; opacity:0; transition: opacity .15s var(--ease); }
.home .home-ref .ref-thumb:hover .ref-thumb-play, .home .home-ref .ref-thumb:focus-visible .ref-thumb-play, .home .home-ref .ref-thumb:not(:has(img)) .ref-thumb-play{ opacity:1; }
.home .home-ref .ref-thumb-views{ left:6px; right:6px; bottom:6px; background: none; padding:0; font-size:.72rem; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.home .home-ref .ref-thumb::after{ content:''; position:absolute; inset: 55% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.6)); pointer-events:none; }
.home .home-tag{ display:inline-flex; align-items:center; gap:5px; font-size:.74rem; font-weight:500; padding: 3px 10px; border-radius: 999px; white-space:nowrap;
  color: var(--ink-dim); background: rgba(244,239,230,.06); border: 1px solid var(--line-strong); }
.home .home-tag--proven{ color: var(--sage); background: var(--sage-dim); border-color: rgba(143,184,168,.3); }
.home .home-tag--notyet{ color: #c3b2ff; background: rgba(155,92,255,.14); border-color: rgba(155,92,255,.35); }
.home .home-rail-empty{ display:flex; align-items:center; gap: var(--s-2); color: var(--ink-dim); font-size:.9rem; padding: var(--s-4) 0; }
.home .home-retry{ display:flex; align-items:center; justify-content:space-between; gap: var(--s-3); flex-wrap:wrap; margin: calc(-1 * var(--s-2)) 0 var(--s-3); font-size:.88rem; color: var(--ink-dim); }
.home .home-research-detail{ margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.home .home-detail-intro{ font-size:.9rem; max-width: 70ch; }
.home .home-detail-h{ font-size: .98rem; font-weight:600; margin: var(--s-5) 0 var(--s-3); }
.home .home-detail-empty{ font-size:.86rem; margin-bottom: var(--s-3); }
.home .home-paste{ margin-top: var(--s-5); }
/* D11: "Remy's using this for" — a proven reference that a planned short actually calls back to */
.home .home-using-for{ font-size:.8rem; color: var(--sage); background: var(--sage-dim); border: 1px solid rgba(143,184,168,.3); border-radius: 8px; padding: 5px 9px; margin: 0 0 2px; line-height:1.35; }
.home .home-using-for strong{ font-weight:600; }
.home .example-why{ font-size:.82rem; margin-top: 2px; }

/* R6 (9/25): the format-library fallback shown when research finishes with nothing proven or not-proven-yet, and
   isn't running — never a dead end. Reuses .home-rail/.home-ref/.home-tag/.format-card so it reads as the same
   system, just honestly labeled as "library" instead of "proven"/"not proven yet". */
.home .home-library{ display:flex; flex-direction:column; gap: var(--s-3); }
.home .home-library-heading{ font-size:.78rem; letter-spacing:.03em; text-transform:uppercase; color: var(--home-faint); }
.home .home-rail--library{ grid-auto-columns: minmax(150px, calc((100% - 2 * var(--s-3)) / 3)); }
.home .home-ref--library{ width:100%; padding: var(--s-3); border-radius: 12px; background: var(--bg-sunken); border: 1px solid var(--line); }
.home .home-ref--library .hook-pattern{ font-size:.92rem; margin-top: var(--s-2); }
.home .home-ref--library .example{ margin-top: 2px; }
.home .home-tag--library{ color: var(--ink-dim); background: rgba(244,239,230,.08); }
.home .home-library-search{ align-self:flex-start; }
.home .format-card--library{ background: var(--bg-sunken); }
/* ---------------------------------------------------------------- S5: style references (creator LOOK, not topic) */
/* Sits after the rail, before the collapsible detail — visible without opening "See details" (9/25). */
.home .home-style{ margin: var(--s-4) 0 0; }
.home .home-style-head{ margin-bottom: var(--s-3); }
.home .home-style-title{ font-family: var(--font-display); font-weight:400; font-size: 1.18rem; letter-spacing:-.003em; }
.home .home-style-sub{ font-size:.86rem; color: var(--ink-dim); margin-top: 3px; max-width: 60ch; line-height:1.4; }
.home .home-style-empty{ display:flex; align-items:center; gap: var(--s-3); flex-wrap:wrap; }
.home .home-style-empty p{ margin:0; font-size:.9rem; }
.home .home-style-note{ display:flex; align-items:center; flex-wrap:wrap; gap: var(--s-2); font-size:.9rem; color: var(--ink-dim); }
.home .home-style-row{ display:flex; gap: var(--s-3); overflow-x:auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
  margin: 0 0 -6px; padding: 0 0 6px; list-style:none; scrollbar-width: thin; }
.home .style-ref{ display:flex; gap: var(--s-3); flex: 0 0 auto; width: min(280px, 78vw); padding: var(--s-3); border-radius: 14px;
  border: 1px solid var(--line-strong); background: rgba(15,14,19,.35); scroll-snap-align: start; }
.home .style-ref .ref-thumb{ flex:none; width: 76px; max-height:none; aspect-ratio: 9 / 16; border-radius: 10px; background: var(--bg-sunken); }
.home .style-ref .ref-thumb-platform{ display:none; }
/* the views badge lives in .style-ref-views below instead — the thumb's own tiny overlay would just repeat it */
.home .style-ref .ref-thumb-views{ display:none; }
.home .style-ref-body{ min-width:0; flex:1; display:flex; flex-direction:column; gap: 7px; }
/* 9/25 review #14: a long handle (e.g. @sold_by_henrygalasso, 21 chars, no break points) has no default shrink floor
   in a flex row and pushed the "Style" chip past the card's right edge, overlapping the next card. Let the handle
   truncate with an ellipsis instead, and keep the chip's own pill shape fixed so it never shares the squeeze. */
.home .style-ref-body .spread > .faint{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.home .home-tag--style{ color: #9fb2ef; background: rgba(124,147,224,.14); border-color: rgba(124,147,224,.32); flex:none; }
.home .style-ref-views{ align-self:flex-start; }
.home .style-ref-notes{ margin:0; padding-left: 1.15em; display:flex; flex-direction:column; gap: 3px; font-size:.82rem; color: var(--ink-dim); line-height:1.35; }
.home .style-ref-notes li[hidden]{ display:none; }
.home .style-ref-more{ align-self:flex-start; background:none; border:0; padding:0; color: var(--ink-dim); font-size:.8rem; cursor:pointer; text-decoration: underline; text-underline-offset: 2px; }
.home .style-ref-more:hover, .home .style-ref-more:focus-visible{ color: var(--ink); }
.home .style-ref-hook{ font-size:.82rem; color: var(--ink); line-height:1.4; margin:0; }
.home .style-ref-hook span{ color: var(--ink-dim); }
.home .style-ref .meta-row{ margin-top:auto; padding-top: 2px; }

/* ---------------------------------------------------------------- creators Remy studies (D8/D11) */
.home .home-creators{ margin: var(--s-3) 0 var(--s-5); padding: var(--s-4); border-radius: 14px; border: 1px solid var(--line-strong); background: rgba(15,14,19,.35); }
.home .home-creators .home-detail-h{ margin-top:0; }
.home .creator-chips{ display:flex; flex-wrap:wrap; gap: var(--s-2); margin-bottom: var(--s-3); }
.home .home-creators-empty{ font-size:.86rem; margin:0; }
.home .creator-chip{ display:inline-flex; align-items:center; gap:7px; font-size:.82rem; padding: 6px 6px 6px 12px; border-radius: 999px; background: rgba(244,239,230,.06); border: 1px solid var(--line-strong); color: var(--ink); }
.home .creator-chip-plat{ color: var(--home-faint); font-size:.72rem; text-transform:uppercase; letter-spacing:.03em; }
.home .creator-chip-handle{ font-weight:500; }
.home .creator-chip-x{ display:grid; place-items:center; width:22px; height:22px; flex:none; border-radius:50%; border:0; background: rgba(244,239,230,.08); color: var(--ink-dim); font-size:.72rem; line-height:1; cursor:pointer; }
.home .creator-chip-x:hover, .home .creator-chip-x:focus-visible{ background: rgba(255,75,62,.22); color: var(--ink); }
.home .creator-add-row{ display:flex; gap: var(--s-2); flex-wrap:wrap; }
/* .select/.input default to width:100% (app.css); an explicit numeric flex-basis (never `auto`, which falls back to
   that width) is what actually keeps the platform picker from claiming the whole row on its own */
.home .creator-add-row .select{ flex: 0 1 150px; width:auto; min-width: 128px; }
.home .creator-add-row .input{ flex: 1 1 220px; width:auto; min-width: 200px; }
.home .creator-add-row[aria-disabled="true"]{ opacity:.6; }
.home .home-creators #creator-error{ margin: var(--s-2) 0 0; }
.home .home-creators-caption{ font-size:.86rem; margin-top: var(--s-3); display:flex; align-items:center; gap: var(--s-3); flex-wrap:wrap; }
.home .home-creators-caption .btn{ flex:none; }

/* ---------------------------------------------------------------- what Remy knows */
.home .home-facts{ display:flex; flex-direction:column; margin:0; }
.home .home-fact{ display:grid; grid-template-columns: minmax(118px, 34%) minmax(0, 1fr); gap: var(--s-3); align-items:center; padding: 12px 0; border-top: 1px solid var(--line); }
.home .home-fact:first-child{ border-top:0; padding-top: 0; }
.home .home-fact dt{ display:flex; align-items:center; gap: 10px; color: var(--ink-dim); font-size:.9rem; }
.home .home-fact dt svg{ width:20px; height:20px; flex:none; color: var(--ink-faint); }
.home .home-fact dd{ margin:0; font-size:.9rem; line-height:1.45; color: var(--ink); display:flex; align-items:center; gap: var(--s-3); min-width:0; }
.home .home-swatch{ width:28px; height:28px; border-radius: 8px; flex:none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.home .home-capstyle{ display:flex; align-items:center; gap: var(--s-3); padding: 6px 12px 6px 6px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(15,14,19,.4); min-width:0; }
.home .home-capstyle img{ width: 34px; height: 60px; object-fit:cover; border-radius: 6px; flex:none; }
.home .home-capstyle b{ display:block; font-weight:600; }
.home .home-capstyle span span{ display:block; color: var(--ink-dim); font-size:.8rem; line-height:1.35; }
.home .home-fact.is-new{ animation: home-learned 2.6s var(--ease); }
@keyframes home-learned{ 0%, 35%{ background: rgba(143,184,168,.16); box-shadow: -8px 0 0 rgba(143,184,168,.16), 8px 0 0 rgba(143,184,168,.16); } 100%{ background: transparent; box-shadow:none; } }
@media (prefers-reduced-motion: reduce){ .home .home-fact.is-new{ animation:none; background: rgba(143,184,168,.1); } }
.home .home-brand.is-editing .home-card-head{ margin-bottom: var(--s-3); }
/* chat with Remy: the strip at the foot of the card */
.home .home-chat-cta{ display:flex; flex-wrap:wrap; align-items:center; gap: var(--s-3); margin-top: var(--s-4); padding: 12px 14px 14px 10px; border-radius: 16px;
  background: rgba(155,92,255,.08); border: 1.5px solid rgba(155,92,255,.35); box-shadow: inset 0 0 24px -14px var(--remy-glow); }
.home .home-chat-cta[hidden]{ display:none; }
.home .home-chat-cta img{ width: 52px; height: 52px; flex:none; filter: drop-shadow(0 6px 14px rgba(155,92,255,.35)); }
.home .home-chat-cta p{ flex: 1 1 calc(100% - 70px); min-width:0; font-size:.9rem; line-height:1.35; }
.home .home-chat-cta p b{ display:block; font-weight:600; color: var(--ink); }
.home .home-chat-cta p span{ display:block; color: var(--ink-dim); font-size:.84rem; margin-top: 2px; }
.home .home-chat-btn{ flex: 1 1 100%; margin-left: 64px; border-color: rgba(155,92,255,.55); color: var(--ink); }
.home .home-chat-btn:hover{ background: rgba(155,92,255,.18); }
.home .home-brand .capstyle-grid{ max-width: 560px; }

/* ---------------------------------------------------------------- responsive */
/* laptops (1180–1360): tighter type so Start stays on screen at 1280x720 */
@media (max-width: 1360px){
  .home .home-next-lede{ font-size:.93rem; }
  .home .home-plan-item{ padding: 4px 0; min-height: 40px; }
  .home .home-stats{ gap: var(--s-2); }
  .home .home-stat--tile{ padding: var(--s-3) 10px; }
}
@media (max-height: 760px) and (min-width: 1180px){
  .home .home-top{ margin-bottom: var(--s-3); }
  .home .home-name{ font-size: 2.1rem; }
  .home .home-next-title{ font-size: 2.1rem; }
  .home .home-next-lede{ margin-top: var(--s-2); }
  .home .home-plan{ margin-top: var(--s-3); padding-top: var(--s-3); padding-bottom: var(--s-3); }
  .home .home-start{ margin-top: var(--s-3); }
}
/* tablets + small laptops: one column; the glance and clips cards sit side by side */
@media (max-width: 1179px){
  .home .home-grid{ grid-template-columns: minmax(0, 1fr); }
  .home .home-side{ grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: none; }
}
@media (max-width: 760px){
  .home .home-side{ grid-template-columns: minmax(0, 1fr); }
  .home .home-top{ align-items:flex-start; }
  .home .home-name{ font-size: 2.1rem; }
  .home .home-next-title, .home .home-next--first .home-next-title{ font-size: 2rem; }
  .home .home-start{ gap: var(--s-3); }
  .home .home-start-btn{ width:100%; min-width:0; }
  .home .home-next--first .home-start{ align-items:stretch; width:100%; }
  .home .home-stat--tile{ padding: 10px; }
  .home .home-stat b{ font-size: 1.3rem; }
  .home .home-stat > span:not(.home-stat-num){ font-size:.8rem; }
  .home .home-stats--row .home-stat{ padding: 0 var(--s-2); }
  .home .home-rail{ grid-auto-columns: 104px; }
  .home .home-fact{ grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .home .home-card-head{ flex-wrap:wrap; }
  .home .home-research .home-card-head .home-card-link{ order: 2; }
  .home .pm-caret{ width: 30px; height: 30px; }
  .home .home-chat-btn{ margin-left: 0; }
  .home .creator-add-row .select, .home .creator-add-row .input{ flex-basis: 100%; }
  .home .home-creators{ padding: var(--s-3); }
}
