/* ============================================================
   Liftli glossary — "Paper Atelier" reading layout.
   Tokens, fonts, header/footer/nav chrome live in /css/site.css;
   this file only styles the glossary page bodies.
   ============================================================ */

/* Calm reading column for entry pages (~70ch of Instrument Sans).
   The index carries .gloss-index and stays full width for its grid. */
main.wrap { max-width: 780px; }
main.wrap.gloss-index { max-width: var(--maxw); }

/* ---------- Breadcrumb ---------- */
.crumb { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em; color: var(--ink-mute); padding: 26px 0 0; }
.crumb a:hover { color: var(--clay-link); }

/* ---------- Term hero ---------- */
.page-hero { padding: clamp(30px, 5vh, 54px) 0 clamp(22px, 3.5vh, 36px); border-bottom: 1px solid var(--hairline); }
.page-hero .eyebrow { margin-bottom: 16px; }
.page-hero h1 { font-size: var(--step-4); letter-spacing: -0.02em; margin: 0 0 18px; }
.page-hero .sub { font-size: var(--step-1); color: var(--ink-soft); max-width: 40em; }
.page-hero .sub b { color: var(--ink); }
.gloss-def {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: var(--step-1);
  font-weight: 460;
  line-height: 1.45;
  color: var(--ink);
  max-width: 34em;
  border-left: 3px solid var(--clay);
  padding-left: 20px;
  text-wrap: pretty;
}
.free-line { font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.05em; color: var(--ink-mute); margin-top: 16px; }
.free-line .ok { color: var(--green); }
.byline { font-size: 0.85rem; color: var(--ink-mute); margin-top: 16px; }
.byline a { color: var(--clay-link); font-weight: 600; }
.byline a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Body blocks ---------- */
.blk { padding: clamp(26px, 4vh, 42px) 0 0; }
.blk h2 { font-size: var(--step-2); margin-bottom: 16px; }
.blk > p { margin-bottom: 16px; line-height: 1.7; }
.blk > p:last-child { margin-bottom: 0; }
.blk a:not(.btn) { color: var(--clay-link); font-weight: 600; }
.blk a:not(.btn):hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- FAQ (details/summary) ---------- */
.faq details { border-bottom: 1px solid var(--hairline); }
.faq details:first-of-type { border-top: 1px solid var(--hairline); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  cursor: pointer; list-style: none; padding: 18px 4px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 {
  font-family: var(--sans); font-size: 1.04rem; font-weight: 650;
  letter-spacing: 0; line-height: 1.35; color: var(--ink); margin: 0;
}
.faq summary::after {
  content: ''; flex: none; width: 14px; height: 14px; margin-right: 4px;
  background:
    linear-gradient(var(--sanguine), var(--sanguine)) center / 14px 2px no-repeat,
    linear-gradient(var(--sanguine), var(--sanguine)) center / 2px 14px no-repeat;
  transition: transform 260ms var(--ease-soft);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .a { padding: 0 4px 22px; color: var(--ink-mute); line-height: 1.65; max-width: 64ch; }

/* ---------- "Put it into practice" card ---------- */
.agent-blk {
  background: var(--sheet); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 22px 26px; box-shadow: var(--shadow-rest);
}
.agent-blk .t {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--sanguine);
  margin-bottom: 10px;
}
.agent-blk p { color: var(--ink-soft); line-height: 1.6; }
.agent-blk b { color: var(--ink); }

/* ---------- Related terms: clay-wash chips ---------- */
.related-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.related-card {
  display: inline-flex; align-items: center;
  font-family: var(--mono); font-size: 0.82rem; font-weight: 500;
  padding: 9px 16px; border-radius: 999px;
  background: var(--clay-wash); color: var(--clay-link);
  border: 1px solid rgba(178, 94, 73, 0.25);
  transition: transform var(--t-micro) var(--ease-soft), background-color var(--t-micro) var(--ease-soft), color var(--t-micro) var(--ease-soft);
}
.related-card:hover { background: var(--clay-pale); color: #2b1509; transform: translateY(-2px); }
.related-card .d { display: none; } /* chips carry the term name only; the definition lives on the target page */

.hint { font-size: 0.9rem; color: var(--ink-mute); }
.hint a { color: var(--clay-link); font-weight: 600; }
.hint a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Index: full definition cards, not chips ---------- */
.gloss-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.gloss-grid .related-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  font-family: var(--sans); font-size: 0.92rem; font-weight: 400;
  padding: 20px 22px; border-radius: var(--radius);
  background: var(--sheet); color: var(--ink-soft);
  border: 1px solid var(--hairline); box-shadow: var(--shadow-rest);
  transition: transform var(--t-micro) var(--ease-soft), box-shadow var(--t-micro) var(--ease-soft);
}
.gloss-grid .related-card:hover { background: var(--sheet); color: var(--ink-soft); transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.gloss-grid .related-card .n { font-family: var(--serif); font-optical-sizing: auto; font-size: 1.14rem; font-weight: 560; line-height: 1.2; color: var(--ink); }
.gloss-grid .related-card .d { display: block; font-size: 0.87rem; color: var(--ink-mute); line-height: 1.5; }

/* ---------- CTA band ---------- */
.cta-band { padding: clamp(52px, 8vh, 88px) 0 clamp(56px, 9vh, 96px); }
.cta-band .wrap {
  max-width: 780px; text-align: center;
  background: var(--sheet); border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-rest);
  padding: clamp(34px, 5vw, 54px) clamp(22px, 4vw, 48px);
}
.cta-band h2 { font-size: var(--step-3); margin-bottom: 12px; }
.cta-band p { color: var(--ink-mute); max-width: 44em; margin: 0 auto 26px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) { .gloss-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .gloss-grid { grid-template-columns: 1fr; }
  .gloss-def { padding-left: 16px; }
  .cta-band .wrap { margin-left: 20px; margin-right: 20px; }
}
