/* =========================================================
   Features cluster (/features/ hub + per-feature pages)
   Loads after styles.css + blog.css. Shares the same tokens.
   ========================================================= */

/* 4:5 before/after slider (the app's canvas ratio) */
.ba.ratio-45 { aspect-ratio: 4 / 5; max-width: 520px; margin: 0 auto; }

/* ---------- Version stack demo (mirrors the app's vertical paging) ---------- */
.vstack-demo { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 2rem; align-items: center; margin: 2.2em 0; }
.vstack-phone {
  position: relative; background: var(--paper); border: 1px solid var(--line-strong);
  border-radius: 34px; padding: 14px; box-shadow: var(--shadow-lg);
}
.vstack {
  height: 560px; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain;
  border-radius: 22px; scrollbar-width: none; -webkit-overflow-scrolling: touch; outline: none;
}
.vstack::-webkit-scrollbar { display: none; }
.vstack:focus-visible { box-shadow: 0 0 0 3px var(--clay); }
.vslide {
  height: 100%; scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 6px 4px;
}
.vslide img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 18px; display: block; }
.vbubble {
  align-self: flex-start; max-width: 92%; background: var(--sand); color: var(--ink-soft);
  border-radius: 16px; border-bottom-left-radius: 5px; padding: 8px 12px; font-size: 0.86rem; line-height: 1.4;
}
.vbubble b { color: var(--clay-deep); font-weight: 600; margin-right: 4px; }
.vcount {
  position: absolute; bottom: 28px; right: 28px; z-index: 2; background: rgba(31, 27, 22, 0.72); color: #fff;
  font-size: 0.78rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; pointer-events: none;
}
.vdots { position: absolute; right: -18px; top: 50%; transform: translateY(-50%); display: grid; gap: 7px; }
.vdots span { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); transition: background 0.25s var(--ease), transform 0.25s var(--ease); }
.vdots span.on { background: var(--clay-deep); transform: scale(1.35); }
.vstack-copy h3 { margin-top: 0; }
.vstack-copy p { font-size: 0.98rem; }
.vhint { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--muted); }
.vhint svg { width: 16px; height: 16px; }
@media (max-width: 760px) {
  .vstack-demo { grid-template-columns: 1fr; }
  .vstack-phone { max-width: 340px; margin: 0 auto; }
  .vstack { height: 500px; }
  .vdots { right: -14px; }
}

/* ---------- Definition list ("in one sentence") ---------- */
.feature-defs { margin: 1.6em 0; display: grid; gap: 0.9em; }
.feature-defs div { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 1em 1.2em; }
.feature-defs dt { font-family: var(--serif); font-weight: 500; color: var(--ink); font-size: 1.1rem; margin-bottom: 0.25em; }
.feature-defs dd { margin: 0; color: var(--ink-soft); line-height: 1.65; }

/* ---------- Limits callout ---------- */
.limits { border-left: 3px solid var(--clay); background: var(--sand); border-radius: 0 var(--r-md) var(--r-md) 0; padding: 1.1em 1.3em; margin: 1.6em 0; }
.limits p:last-child { margin-bottom: 0; }

/* ---------- Hub grid ---------- */
.article .feature-cards { list-style: none; margin: 2em 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.article .feature-cards li { margin: 0; }
.feature-cards a {
  display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 1.4em 1.5em; text-decoration: none; box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.feature-cards a:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); text-decoration: none; }
.article .feature-cards h2 { font-family: var(--serif); font-weight: 500; font-size: 1.3rem; color: var(--ink); margin: 0 0 0.4em; padding: 0; border: none; }
.feature-cards p { font-size: 0.96rem; margin-bottom: 1em; flex: 1; }
.feature-cards .more { font-weight: 600; color: var(--clay-deep); font-size: 0.92rem; }
@media (max-width: 680px) { .article .feature-cards { grid-template-columns: 1fr; } }

/* ---------- Branch diagram ---------- */
.branch-diagram { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.4em; display: grid; gap: 1.1em; }
.bd-row { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 0.8em; }
.bd-name { font-weight: 600; font-size: 0.88rem; color: var(--ink); }
.bd-track { display: flex; gap: 14px; align-items: flex-start; }
.bd-v { position: relative; width: 96px; flex-shrink: 0; text-align: center; }
.bd-v img { width: 96px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 12px; display: block; }
.bd-v em { display: block; font-style: normal; font-size: 0.78rem; color: var(--muted); margin-top: 6px; }
.bd-v + .bd-v::before { content: ""; position: absolute; left: -14px; top: 60px; width: 14px; border-top: 2px solid var(--line-strong); }
.bd-v.is-fork img { box-shadow: 0 0 0 3px var(--clay); }
.bd-row.is-branch .bd-track { padding-left: 110px; }
.bd-row.is-branch .bd-v:first-child img { box-shadow: 0 0 0 3px var(--clay); }
.bd-v.is-next > span { display: flex; align-items: center; justify-content: center; width: 96px; aspect-ratio: 4 / 5; border: 2px dashed var(--line-strong); border-radius: 12px; font-size: 0.78rem; color: var(--muted); padding: 8px; }
@media (max-width: 560px) {
  .bd-row { grid-template-columns: 1fr; }
  .bd-v, .bd-v img, .bd-v.is-next > span { width: 74px; }
  .bd-v + .bd-v::before { top: 46px; }
  .bd-row.is-branch .bd-track { padding-left: 88px; }
}

/* ---------- AI Ideas: intent composer + directions mock (features/ai-ideas) ---------- */
.ideas-mock { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2em; align-items: start; }
.im-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.1em 1.15em; box-shadow: var(--shadow-sm); }
.im-q { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); margin: 0 0 0.7em; }
.im-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 0.8em; }
.im-chip { font-size: 0.8rem; font-weight: 600; color: var(--ink); padding: 5px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--paper); }
.im-chip.on { border-color: var(--clay-deep); box-shadow: 0 0 0 1.5px var(--clay); }
.im-chip.surprise { color: var(--clay-deep); background: var(--sand); border-color: transparent; }
.im-field { font-size: 0.85rem; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 7px 14px; margin-bottom: 0.7em; }
.im-keeps { display: flex; flex-wrap: wrap; gap: 6px; }
.im-keep { font-size: 0.76rem; font-weight: 600; color: var(--muted); padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: 999px; }
.im-keep.on { color: var(--clay-deep); border-color: var(--clay-deep); }
.im-echo { font-size: 0.8rem; font-weight: 600; color: var(--ink); background: var(--sand); border-radius: 999px; padding: 6px 12px; margin-bottom: 0.7em; display: flex; justify-content: space-between; gap: 8px; }
.im-echo span:last-child { color: var(--clay-deep); }
.im-dir { border: 1px solid var(--line); border-radius: var(--r-md); padding: 0.6em 0.8em; margin-bottom: 0.5em; background: var(--paper); }
.im-dir.on { border-color: var(--clay); box-shadow: 0 0 0 1.5px var(--clay); }
.im-dir b { display: block; font-family: var(--serif); font-weight: 500; color: var(--ink); font-size: 1rem; line-height: 1.2; }
.im-dir small { display: block; font-size: 0.8rem; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.im-effort { display: inline-block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: var(--clay-deep); background: var(--sand); border-radius: 999px; padding: 2px 8px; margin-top: 5px; }
.im-spec { border-top: 1px solid var(--line); margin-top: 0.7em; padding-top: 0.7em; font-size: 0.82rem; line-height: 1.5; color: var(--ink-soft); }
.im-spec h4 { font-family: var(--sans, inherit); font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--clay-deep); margin: 0 0 0.3em; }
.im-spec p { margin: 0 0 0.7em; font-size: 0.82rem; }
.article .im-plan { list-style: none; margin: 0; padding: 0; }
.article .im-plan li { margin: 0 0 0.25em; padding-left: 0; display: flex; gap: 8px; align-items: baseline; font-size: 0.82rem; }
.im-act { flex-shrink: 0; min-width: 58px; font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--clay-deep); }
.im-act.keep { color: var(--muted); }
.im-more { font-size: 0.78rem; color: var(--muted); }
.two-asks { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2em; }
.two-asks .ba.ratio-45 { max-width: none; }
.two-asks figcaption { margin-top: 0.6em; }
@media (max-width: 720px) {
  .ideas-mock, .two-asks { grid-template-columns: 1fr; }
}
.table-scroll.fit table { min-width: 0; }
.table-scroll.fit td:first-child { white-space: normal; min-width: 8em; }

/* ---------- Inspiration (features/inspiration) ---------- */
.insp-trio { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 1.2em; align-items: center; }
.insp-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 0.7em; box-shadow: var(--shadow-sm); }
.insp-card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 16px; display: block; height: auto; }
.insp-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 600; color: var(--clay-deep); background: var(--sand); border-radius: 999px; padding: 5px 11px; margin: 0.6em 0 0.1em; }
.insp-trio .ba.ratio-45 { max-width: none; }
.insp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8em; margin: 1.4em 0 1.6em; }
.insp-grid figure { margin: 0; position: relative; }
.insp-grid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 14px; display: block; height: auto; }
.insp-grid figcaption { position: absolute; left: 8px; bottom: 8px; font-size: 0.72rem; font-weight: 600; color: var(--ink); background: rgba(250, 246, 241, 0.92); border-radius: 999px; padding: 3px 9px; margin: 0; }
@media (max-width: 720px) {
  .insp-trio { grid-template-columns: 1fr; }
  .insp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Styles (features/styles) ---------- */
.style-entry { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 1.1em; align-items: start; padding: 1.1em 0; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.style-entry img { width: 150px; height: 150px; object-fit: cover; border-radius: 14px; display: block; }
.article .style-entry h4 { font-family: var(--serif); font-weight: 500; font-size: 1.2rem; color: var(--ink); margin: 0 0 0.25em; }
.article .style-entry p { margin: 0 0 0.45em; font-size: 0.96rem; }
.article .style-entry ul { margin: 0 0 0.45em; padding-left: 1.1em; font-size: 0.92rem; }
.article .style-entry li { margin: 0 0 0.15em; }
.style-entry .pairs { font-size: 0.88rem; color: var(--muted); }
.style-jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 1em 0 1.4em; }
.style-jump a { font-size: 0.82rem; font-weight: 600; padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink); background: var(--paper); }
.style-jump a:hover { border-color: var(--clay-deep); text-decoration: none; }
@media (max-width: 560px) {
  .style-entry { grid-template-columns: 96px minmax(0, 1fr); }
  .style-entry img { width: 96px; height: 96px; }
}
