/* guide.css — reference guides: covenants, feasts, the tabernacle. Tokens from base.css. */

.gd-page { max-width: 1040px; }
.gd-head { display: grid; gap: var(--s3); max-width: 46rem; margin-bottom: var(--s6); }
.gd-title { font-size: clamp(2.4rem, 1.5rem + 4vw, 4.2rem); line-height: 1.02; letter-spacing: -.03em; }
.gd-crumbs { display: flex; gap: var(--s2); font-size: var(--fs-sm); color: var(--text-faint); margin-bottom: var(--s5); }
.gd-crumbs a:hover { color: var(--gold-bright); }
.gd-state { display: grid; gap: var(--s3); justify-items: start; max-width: 40rem; padding: var(--s7) 0; }

/* ── Index ──────────────────────────────────────────────────────────── */
.gd-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); gap: var(--s4); list-style: none; margin: 0; padding: 0; }
a.card.gd-card { display: grid; gap: var(--s3); height: 100%; border-top: 3px solid var(--tone, var(--gold)); align-content: start; }
.gd-card-title { font-size: 1.7rem; line-height: 1.12; }
.gd-card:hover .gd-card-title { color: var(--gold-bright); }
.gd-card-note { color: var(--text-dim); line-height: 1.55; }
.gd-card-list { color: var(--text-faint); font-size: var(--fs-sm); line-height: 1.6; }
.gd-card-go { display: inline-flex; align-items: center; gap: var(--s2); margin-top: var(--s2); color: var(--gold-bright); font-weight: 600; font-size: var(--fs-sm); }

/* ── Jump links and the pager ───────────────────────────────────────── */
.gd-jump { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s6) 0 var(--s5); }
.gd-pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s4); margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--line-strong); }
.gd-pager-link { display: grid; gap: var(--s1); min-height: 44px; }
.gd-pager-link .display { font-size: 1.35rem; }
.gd-pager-link:hover .display { color: var(--gold-bright); }

/* ── Items ──────────────────────────────────────────────────────────── */
.gd-items { display: grid; gap: var(--s5); }
.gd-item {
    display: grid; gap: var(--s4); padding: var(--s5); background: var(--bg-1); border: 1px solid var(--line);
    border-left: 3px solid var(--line-strong); border-radius: var(--r-lg);
    scroll-margin-top: calc(var(--topbar-h) + var(--s4));
    transition: border-color var(--t-med) var(--ease), background var(--t-med) var(--ease);
}
.gd-item.is-selected { border-color: var(--gold); background: var(--bg-2); box-shadow: var(--glow); }
.gd-item.is-later { border-left-style: dashed; }
.gd-item-head { display: grid; gap: var(--s2); }
.gd-item-title { font-size: var(--fs-h2); line-height: 1.12; }
.gd-item-title:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: var(--r-sm); }
.gd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); font-size: var(--fs-sm); color: var(--text-dim); }
.gd-tag {
    padding: 2px var(--s3); border: 1px dashed var(--line-strong); border-radius: var(--r-pill);
    font-size: var(--fs-xs); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim);
}
.gd-when { font-weight: 600; color: var(--text); }
.gd-year { display: inline-flex; align-items: center; gap: var(--s1); min-height: 24px; color: var(--gold-bright); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.gd-year:hover { text-decoration-color: var(--gold); }
.gd-summary { max-width: 46rem; line-height: 1.7; text-wrap: pretty; }

.gd-points { display: grid; gap: 0; margin: 0; border-top: 1px solid var(--line); }
.gd-point { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: var(--s4); padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.gd-point dt { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint); padding-top: 3px; }
.gd-point dd { margin: 0; line-height: 1.6; text-wrap: pretty; }
.gd-point-refs { white-space: normal; font-size: var(--fs-sm); }
.gd-point-refs a, .gd-ref a, .gd-sep + a { color: var(--gold-bright); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.gd-point-refs a:hover, .gd-ref a:hover { text-decoration-color: var(--gold); }
.gd-sep { color: var(--text-faint); }

.gd-block { display: grid; gap: var(--s2); }
.gd-sub { font-family: var(--font-ui); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint); }
.gd-refs { list-style: none; margin: 0; padding: 0; }
.gd-ref-row { display: grid; gap: 2px; padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.gd-ref { font-weight: 600; min-height: 24px; }
.gd-preview { color: var(--text-dim); font-family: var(--font-scripture); font-size: var(--fs-sm); line-height: 1.55; min-height: 1.55em; }
.gd-preview:empty::before { content: '…'; color: var(--text-faint); }

/* ── The feasts: the Hebrew year ────────────────────────────────────── */
.gd-cal, .gd-plan-wrap { margin-bottom: var(--s5); }
.gd-cal-title { font-size: var(--fs-h3); margin-bottom: var(--s2); }
.gd-cal-note { color: var(--text-faint); font-size: var(--fs-sm); line-height: 1.55; max-width: 44rem; margin-bottom: var(--s4); text-wrap: pretty; }
.gd-weekly { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-bottom: var(--s4); }
.gd-weekly-label { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint); }
.gd-months { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s2); }
.gd-month {
    display: grid; align-content: start; gap: var(--s2); min-height: 6.5rem; padding: var(--s3);
    background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-md);
}
.gd-month.has-feast { border-color: var(--line-strong); }
.gd-m-head { display: flex; align-items: baseline; gap: var(--s2); }
.gd-m-n { font-family: var(--font-display); font-size: 1.5rem; line-height: 1; color: var(--gold-bright); font-variant-numeric: tabular-nums; }
.gd-m-name { font-size: var(--fs-sm); color: var(--text-dim); }
.gd-m-feasts { display: grid; gap: var(--s2); }
.gd-fchip {
    display: grid; gap: 1px; width: 100%; min-height: 44px; padding: var(--s2) var(--s3); text-align: left; cursor: pointer;
    background: var(--gold-soft); color: var(--text); border: 1px solid var(--gold); border-radius: var(--r-sm);
    transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.gd-fchip:hover { background: var(--bg-3); }
.gd-fchip[aria-pressed='true'] { background: var(--gold); color: var(--on-gold); }
.gd-fchip[aria-pressed='true'] .gd-fchip-days, .gd-fchip[aria-pressed='true'] .gd-fchip-later { color: var(--on-gold); }
.gd-fchip.is-later { background: transparent; border-style: dashed; border-color: var(--line-strong); }
.gd-fchip.is-later[aria-pressed='true'] { background: var(--gold); border-style: solid; border-color: var(--gold); }
.gd-fchip-name { font-weight: 600; font-size: var(--fs-sm); line-height: 1.25; }
.gd-fchip-days, .gd-fchip-later { font-size: var(--fs-xs); color: var(--text-dim); }
.gd-fchip-later { letter-spacing: .1em; text-transform: uppercase; }

/* ── The tabernacle: the plan ───────────────────────────────────────── */
.gd-plan-wrap { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: var(--s6); align-items: start; }
.gd-plan-fig { display: grid; gap: var(--s2); }
.gd-plan { width: 100%; height: auto; max-width: 22rem; background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-lg); font-family: var(--font-ui); }
.gd-court { fill: var(--gold-soft); stroke: var(--text-faint); stroke-width: 2; }
.gd-gate { stroke: var(--fam-blue); stroke-width: 5; }
.gd-tent { fill: var(--bg-3); stroke: var(--fam-violet); stroke-width: 2; }
.gd-veil { stroke: var(--fam-crimson); stroke-width: 4; }
.gd-lead { stroke: var(--text-faint); stroke-width: 1; }
.gd-furn { stroke: var(--text); stroke-width: 1.5; }
.gd-furn.is-gold { fill: var(--fam-gold); }
.gd-furn.is-brass { fill: var(--fam-amber); }
.gd-badge { fill: var(--text-dim); }
.gd-num { fill: var(--bg); font-size: 11px; font-weight: 700; pointer-events: none; }
.gd-num.is-on-shape { fill: #14110a; }
.gd-dir, .gd-room { fill: var(--text-faint); font-size: 10px; letter-spacing: .06em; pointer-events: none; }
.gd-room { font-size: 9px; }
.gd-part { cursor: pointer; outline: none; }
.gd-part:hover .gd-court, .gd-part:hover .gd-tent { stroke: var(--gold); }
.gd-part:hover .gd-furn, .gd-part:hover .gd-badge { stroke: var(--gold-bright); }
.gd-part:focus-visible .gd-court, .gd-part:focus-visible .gd-tent, .gd-part:focus-visible .gd-furn { stroke: var(--gold-bright); stroke-width: 3; }
.gd-part:focus-visible .gd-badge { stroke: var(--gold-bright); stroke-width: 3; }
.gd-part:focus-visible .gd-veil { stroke-width: 7; }
.gd-part[aria-pressed='true'] .gd-court, .gd-part[aria-pressed='true'] .gd-tent { stroke: var(--gold-bright); stroke-width: 3; }
.gd-part[aria-pressed='true'] .gd-furn { stroke: var(--gold-bright); stroke-width: 3.5; }
.gd-part[aria-pressed='true'] .gd-badge { fill: var(--gold); }
.gd-part[aria-pressed='true'] .gd-veil { stroke-width: 7; }
.gd-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s1); }
.gd-leg-btn {
    display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 44px; padding: var(--s2) var(--s3);
    text-align: left; cursor: pointer; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-1); color: var(--text);
}
.gd-leg-btn:hover { background: var(--bg-3); }
.gd-leg-btn[aria-pressed='true'] { border-color: var(--gold); background: var(--gold-soft); }
.gd-leg-n {
    flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
    background: var(--text-dim); color: var(--bg); font-size: var(--fs-xs); font-weight: 700;
}
.gd-leg-btn[aria-pressed='true'] .gd-leg-n { background: var(--gold); color: var(--on-gold); }
.gd-leg-n:empty { background: transparent; border: 1px dashed var(--line-strong); }

/* ── Phone ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .gd-plan-wrap { grid-template-columns: minmax(0, 1fr); }
    .gd-plan { margin: 0 auto; }
}
@media (max-width: 760px) {
    .gd-months { grid-template-columns: minmax(0, 1fr); }
    .gd-month { grid-template-columns: 6.5rem minmax(0, 1fr); align-items: start; min-height: 0; }
    .gd-month:not(.has-feast) { opacity: .75; }
    .gd-point { grid-template-columns: minmax(0, 1fr); gap: var(--s1); }
    .gd-item { padding: var(--s4); }
}
