/* ═══ FAQ as a card-index drawer (2 Nov 2026), shared by the Solo and Studio pages ═══════════════
   Harvey: "update the design of the FAQ to this one ... make sure we use our font". The design is
   the "FAQ Index" Tactile UI block (faq-drawer.tsx). Its numbers are copied from its stylesheet.

   What is deliberately NOT the design's:
   ⚠ THE FONTS. The design ships Instrument Sans and Geist Mono as data URIs. This page uses the
     FrameSide app's own faces (see README, Type): LEMON MILK (--lm) for the uppercase labels (the
     section label, the card tabs, the drawer's label card) and LM Pro (--lmp) for everything else,
     including the "typed" questions and answers the design sets in a mono.
   ⚠ NO -webkit-font-smoothing. The design sets antialiased; the README says why this page never does.
   ⚠ GRAPHITE, ALWAYS. The design picks aluminium or graphite from the system's dark setting. Both
     FrameSide pages are dark whatever the visitor's system says, so the finish is fixed in the
     markup (data-finish="graphite") and the desk is the page itself (transparent), not a grey band.
   ⚠ A CLASS, NOT <details>. The design opens a card with native <details name>. Here a card is a
     <button> plus .open, toggled by faq.js, as both pages' FAQs already were: a <summary> swallows
     the Space key and clicks inside it, which fights the copy editor editing the question in place.
     The answer opens by grid rows 0fr to 1fr in the design's 320ms, so nothing is measured.
   ⚠ THE CARD NUMBER IS A CSS COUNTER, so it is not text the editor would have to own. */

.fq {
  color-scheme: dark;
  --tui-face: #1b1c1e;
  --tui-face-hi: #28292c;
  --tui-face-lo: #141516;
  --tui-well: #121315;
  --tui-ink: #e8e6e1;
  --tui-ink-2: #a6a7a9;
  --tui-cap: #e9e7e2;
  --tui-cap-hi: #f6f4ef;
  --tui-cap-skirt: #a8a7a3;
  --tui-cap-ink: #17181a;
  --tui-cap-hl: rgb(255 255 255 / 0.8);
  --tui-hl: rgb(255 255 255 / 0.11);
  --tui-sh: 0 0 0;
  --tui-sh-a: 0.55;
  --tui-grain: 0.35;
  --tui-focus: #e8e6e1;
  --tui-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --tui-well-fill: linear-gradient(to bottom, #070808, var(--tui-well) 45%, #17181a);
  --tui-raised:
    inset 0 1px 0 var(--tui-hl),
    0 0 0 1px rgb(var(--tui-sh) / calc(var(--tui-sh-a) * 0.35)),
    0 1px 1.5px rgb(var(--tui-sh) / calc(var(--tui-sh-a) * 1.2)),
    0 5px 12px -5px rgb(var(--tui-sh) / var(--tui-sh-a));
  --tui-inset:
    inset 0 3px 3px -2px rgb(var(--tui-sh) / calc(var(--tui-sh-a) * 2.6)),
    inset 0 9px 12px -9px rgb(var(--tui-sh) / calc(var(--tui-sh-a) * 1.8)),
    inset 0 0 0 1px rgb(var(--tui-sh) / calc(var(--tui-sh-a) * 0.45)),
    inset 0 -1px 0 color-mix(in oklab, var(--tui-hl) 60%, transparent),
    0 1px 0 var(--tui-hl),
    0 -1px 0 rgb(var(--tui-sh) / calc(var(--tui-sh-a) * 0.35));
  --tui-pressed:
    inset 0 5px 5px -4px rgb(var(--tui-sh) / calc(var(--tui-sh-a) * 3)),
    inset 4px 0 4px -4px rgb(var(--tui-sh) / calc(var(--tui-sh-a) * 1.4)),
    inset -4px 0 4px -4px rgb(var(--tui-sh) / calc(var(--tui-sh-a) * 1.4)),
    0 -1px 0 rgb(var(--tui-sh) / calc(var(--tui-sh-a) * 1.3)),
    0 1px 0 var(--tui-hl);
  --tui-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0.28 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  /* Index-card stock and ribbon: the same in both finishes. */
  --fq-paper: #f3f0e7;
  --fq-type: #26251f;
  --fq-type-2: #5d5b53;
  --fq-rule: rgb(38 37 31 / 0.13);
  --fq-rule-2: rgb(38 37 31 / 0.34);
  --fq-fibre: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3' seed='9' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .42 0 0 0 0 .35 0 0 0 .1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
  --fq-drop: rgb(0 0 0 / 0.55);
  --fq-sans: var(--lmp);
  --fq-caps: var(--lm);

  position: relative;
  container: fq / inline-size;
  background: transparent;
  color: var(--tui-ink);
  font: 400 15px/1.55 var(--fq-sans);
  text-align: left;
}
.fq *, .fq *::before, .fq *::after { box-sizing: border-box; }
.fq-head > *, .fq-card p, .fq-ask p { margin: 0; }

/* ── layout ── */
.fq-wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.35fr);
  gap: 40px clamp(40px, 6cqi, 104px);
  align-items: start;
  padding-block: 40px 0;
}
/* The head stays in view while cards are pulled on a wide container. */
.fq-head { position: sticky; top: 96px; padding-top: 34px; }
.fq-label {
  display: block;
  margin-bottom: 16px;
  font: 400 10.5px/1.2 var(--fq-caps);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--tui-ink-2);
}
/* The Solo page's label is stored with its |[| |]| bracket marks inside the editable text. */
.fq-label b { display: none; }
.fq-title {
  margin: 0;
  font: 500 clamp(32px, 4cqi, 52px)/1.02 var(--fq-sans);
  letter-spacing: -0.015em;
  color: #FFFFFF;
  text-wrap: balance;
  max-width: none;
  white-space: normal;
}
.fq-lead { margin-top: 20px !important; max-width: 36ch; font-size: clamp(15px, 1.3cqi, 17px); line-height: 1.55; color: var(--tui-ink-2); text-wrap: pretty; }

/* ── the drawer ── */
.fq-drawer {
  position: relative;
  isolation: isolate;
  padding: 12px 12px 0;
  border-radius: 14px;
  background: var(--tui-face);
  box-shadow: var(--tui-raised);
}
.fq-drawer::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--tui-noise), linear-gradient(170deg, rgb(255 255 255 / 0.06), transparent 40%);
  opacity: var(--tui-grain);
  pointer-events: none;
}
.fq-tray {
  display: grid;
  padding: 40px 12px 16px;
  border-radius: 9px 9px 4px 4px;
  background: var(--tui-well-fill) var(--tui-well);
  box-shadow: var(--tui-inset);
  counter-reset: fq;
}

/* ── a card ── */
.fq-card {
  --shade: calc(var(--depth, 0) * 0.11);
  position: relative;
  counter-increment: fq;
  margin-inline: calc(var(--depth, 0) * 5px);
  border-radius: 4px 4px 1px 1px;
  background:
    linear-gradient(rgb(40 36 26 / var(--shade)), rgb(40 36 26 / var(--shade))),
    var(--fq-fibre),
    var(--fq-paper);
  color: var(--fq-type);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.95),
    inset 0 2px 0 rgb(0 0 0 / 0.05),
    0 -1px 0 rgb(0 0 0 / 0.1),
    0 -7px 10px -5px var(--fq-drop);
  transition: transform 220ms var(--tui-ease), box-shadow 220ms var(--tui-ease), margin-top 220ms var(--tui-ease);
}
.fq-card:first-child { box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.95), 0 -1px 0 rgb(0 0 0 / 0.08); }
.fq-card:not(.open):hover { transform: translateY(-3px); }
.fq-card.open {
  z-index: 2;
  margin-top: 9px;
  transform: translateY(-12px);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.95),
    0 -5px 9px -5px var(--fq-drop),
    0 22px 30px -16px var(--fq-drop),
    0 2px 3px rgb(0 0 0 / 0.12);
}

/* The top edge: the index, the question typed along it. */
.fq-edge {
  display: grid;
  grid-template-columns: 5.2ch minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: 12px;
  width: 100%;
  margin: 0;
  padding: 16px 18px 22px;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: 400 15px/22px var(--fq-sans);
  border-radius: inherit;
  -webkit-tap-highlight-color: transparent;
}
.fq-edge:focus-visible { outline: 2px solid var(--fq-type); outline-offset: -5px; }
.fq-no { font-size: 11.5px; letter-spacing: 0.04em; color: var(--fq-type-2); }
.fq-no::before { content: 'Q.' counter(fq, decimal-leading-zero); }
.fq-q { margin: 0; font: inherit; color: var(--fq-type); letter-spacing: 0; text-wrap: pretty; }
.fq-mark { width: 12px; height: 12px; align-self: center; position: relative; }
.fq-mark::before, .fq-mark::after { content: ''; position: absolute; left: 1px; right: 1px; top: 5.25px; height: 1.5px; background: var(--fq-type-2); }
.fq-mark::after { transform: rotate(90deg); transition: transform 220ms var(--tui-ease); }
.fq-card.open .fq-mark::after { transform: rotate(0deg); }

/* The tab stands up from the card's top edge at its station. */
.fq-tab {
  position: absolute;
  bottom: 100%;
  left: calc(var(--tab-at, 0) * 100%);
  height: 19px;
  padding: 3px 11px 0;
  border-radius: 5px 5px 0 0;
  background:
    linear-gradient(rgb(40 36 26 / var(--shade)), rgb(40 36 26 / var(--shade))),
    var(--fq-fibre),
    var(--fq-paper);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.95), 0 -4px 7px -4px var(--fq-drop);
  font: 400 10.5px/16px var(--fq-caps);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fq-type-2);
  white-space: nowrap;
}

/* The face: the answer on ruled stock, under a double heading rule. */
.fq-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 320ms var(--tui-ease); }
.fq-card.open .fq-body { grid-template-rows: 1fr; }
.fq-body > div { overflow: hidden; min-height: 0; }
.fq-face {
  margin: -8px 18px 0;
  padding: 16px 0 22px calc(5.2ch + 12px);
  border-top: 3px double var(--fq-rule-2);
  font: 400 14px/26px var(--fq-sans);
  background: repeating-linear-gradient(to bottom, transparent 0 25px, var(--fq-rule) 25px 26px) 0 20px / 100% calc(100% - 42px) no-repeat;
}
.fq-a { max-width: 60ch; padding: 0 !important; font: inherit !important; color: var(--fq-type) !important; }
.fq-a a { color: var(--fq-type); text-decoration: underline; text-underline-offset: 3px; }
.fq-filed { margin-top: 26px !important; font-size: 11px; letter-spacing: 0.06em; color: var(--fq-type-2); text-align: right; }

/* ── the drawer front ── */
.fq-front {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 0 -12px;
  padding: 16px 0 18px;
  border-radius: 0 0 14px 14px;
  background: linear-gradient(to bottom, color-mix(in oklab, var(--tui-face-hi) 70%, var(--tui-face)), var(--tui-face));
  box-shadow: inset 0 1px 0 var(--tui-hl), inset 0 2px 0 rgb(var(--tui-sh) / calc(var(--tui-sh-a) * 0.6)), 0 -1px 0 rgb(var(--tui-sh) / calc(var(--tui-sh-a) * 0.9));
}
.fq-holder {
  display: block;
  padding: 3px;
  border-radius: 3px;
  background: linear-gradient(var(--tui-face-lo), var(--tui-face-hi));
  box-shadow: 0 0 0 1px rgb(var(--tui-sh) / calc(var(--tui-sh-a) * 1.2)), 0 1px 0 var(--tui-hl), inset 0 1px 1px rgb(0 0 0 / 0.25);
}
.fq-holder-card {
  display: block;
  min-width: 132px;
  padding: 3px 12px 2px;
  border-radius: 1px;
  background: var(--fq-fibre), var(--fq-paper);
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.25);
  font: 400 11px/16px var(--fq-caps);
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  color: var(--fq-type);
}
.fq-pull {
  display: block;
  width: 108px;
  height: 22px;
  border-radius: 3px 3px 54px 54px / 3px 3px 22px 22px;
  background: var(--tui-well-fill) var(--tui-well);
  box-shadow: var(--tui-inset);
}

/* ── ask ── */
.fq-ask {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  margin-top: 28px;
  padding-inline: 4px;
}
.fq-note { font-size: 14.5px; line-height: 1.55; color: var(--tui-ink-2); max-width: 44ch; }
.fq-key {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 22px;
  border-radius: 9px;
  font: 700 14px/1 var(--fq-sans);
  color: var(--tui-cap-ink);
  text-decoration: none;
  background:
    radial-gradient(120% 90% at 50% 0%, rgb(255 255 255 / 0.1), transparent 60%),
    linear-gradient(var(--tui-cap-hi), var(--tui-cap));
  box-shadow:
    inset 0 1px 0 var(--tui-cap-hl),
    0 3px 0 var(--tui-cap-skirt),
    0 4px 2px rgb(var(--tui-sh) / calc(var(--tui-sh-a) * 1.4)),
    0 9px 14px -6px rgb(var(--tui-sh) / var(--tui-sh-a));
  transition: transform 70ms var(--tui-ease), box-shadow 70ms var(--tui-ease);
}
.fq-key:hover { color: var(--tui-cap-ink); }
.fq-key:active { transform: translateY(3px); box-shadow: var(--tui-pressed); }
.fq-key:focus-visible { outline: 2px solid var(--tui-focus); outline-offset: 3px; }

/* ── re-composed by the width it is given ── */
@container fq (max-width: 959px) {
  .fq-wrap { grid-template-columns: minmax(0, 1fr); }
  .fq-head { position: static; padding-top: 0; max-width: 640px; }
}
@container fq (max-width: 559px) {
  .fq-drawer { padding: 8px 8px 0; }
  .fq-tray { padding: 34px 6px 12px; }
  .fq-card { margin-inline: calc(var(--depth, 0) * 3px); }
  .fq-edge { grid-template-columns: minmax(0, 1fr) auto; padding: 14px 14px 20px; font-size: 14px; line-height: 21px; }
  .fq-no { display: none; }
  .fq-tab { font-size: 9.5px; padding-inline: 8px; }
  .fq-face { margin-inline: 14px; padding-left: 0; font-size: 13.5px; }
  .fq-front { margin-inline: -8px; }
  .fq-ask { flex-direction: column; align-items: stretch; }
  .fq-key { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .fq-card, .fq-mark::after, .fq-key, .fq-body { transition: none; }
  .fq-card:not(.open):hover { transform: none; }
}

/* ── 3 Nov 2026 (Harvey: "make these cards fit the same design styling as the rest of the site") ──
   The drawer stays; the cards leave paper for the site's dark glass: LM Pro on #1B1A18, LEMON MILK caps on the
   tabs and numbers, hairline borders, the amber edge on the card that is out. Nothing above is deleted, so the
   paper look comes back by removing this block. */
.fq-card {
  --fq-type: #FFFFFF;
  --fq-type-2: #8A8782;
  --fq-rule: rgb(255 255 255 / 0.06);
  --fq-rule-2: rgb(255 255 255 / 0.12);
  background: linear-gradient(rgb(0 0 0 / var(--shade)), rgb(0 0 0 / var(--shade))), #1E1D1B;
  border: 1px solid rgb(255 255 255 / 0.08);
  border-bottom: 0;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.05), 0 -7px 12px -5px rgb(0 0 0 / 0.7);
}
.fq-card:first-child { box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.05); }
.fq-card:not(.open):hover { border-color: rgb(255 255 255 / 0.16); }
.fq-card.open {
  background: #22211E;
  border-color: rgb(201 150 58 / 0.55);
  border-bottom: 1px solid rgb(201 150 58 / 0.55);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06), 0 -5px 9px -5px rgb(0 0 0 / 0.7), 0 22px 30px -16px rgb(0 0 0 / 0.8), 0 0 32px rgb(201 150 58 / 0.1);
}
.fq-no { font-family: var(--fq-caps); font-size: 10px; letter-spacing: 0.14em; color: #5E5B55; }
.fq-card.open .fq-no { color: #E5AC3D; }
.fq-q { font-weight: 500; }
.fq-mark::before, .fq-mark::after { background: #B0ACA5; }
.fq-card.open .fq-mark::before, .fq-card.open .fq-mark::after { background: #E5AC3D; }
.fq-edge:focus-visible { outline-color: #E5AC3D; }
.fq-tab {
  background: linear-gradient(rgb(0 0 0 / var(--shade)), rgb(0 0 0 / var(--shade))), #1E1D1B;
  border: 1px solid rgb(255 255 255 / 0.08);
  border-bottom: 0;
  box-shadow: 0 -4px 7px -4px rgb(0 0 0 / 0.7);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: #8A8782;
}
.fq-card.open .fq-tab { background: #22211E; border-color: rgb(201 150 58 / 0.55); color: #E5AC3D; }
.fq-face { background: none; border-top: 1px solid rgb(255 255 255 / 0.08); }
.fq-a { color: #B0ACA5 !important; }
.fq-a a { color: #E5AC3D; text-decoration-color: rgb(229 172 61 / 0.5); }
.fq-filed { font-family: var(--fq-caps); font-size: 9px; letter-spacing: 0.14em; color: #5E5B55; text-transform: uppercase; }
.fq-holder-card { background: #1E1D1B; color: #B0ACA5; box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.5); font-size: 9px; letter-spacing: 0.14em; }
.fq-key {
  font: 500 12px/1 var(--fq-caps); letter-spacing: 0.14em; text-transform: uppercase;
  color: #141000; background: #C9963A; box-shadow: 0 12px 36px rgb(201 150 58 / 0.3);
}
.fq-key:hover { color: #141000; background: #E5AC3D; }
.fq-key:active { transform: scale(0.97); box-shadow: 0 6px 18px rgb(201 150 58 / 0.3); }
