/* Kekri Site, Story page. Builds on kekri-core.css (fonts, tokens, reset, nav, footer). */

.kekri-root.kekri-story {
	--ks-gutter: 40px;
	--ks-max: 1360px;
	--ks-night: #16202A;
	--ks-ember: #2A1C14;
	--ks-teal: #121A1E;
	--ks-ink-text: #1B1712;
	--ks-ink-soft: #4A4033;
	--ks-hair-light: #C9BC9F;
}

/* ---------- Shared pieces ---------- */
.kekri-story .ks-wrap { max-width: var(--ks-max); margin: 0 auto; padding: 0 var(--ks-gutter); }
.kekri-story .ks-ch { position: relative; scroll-margin-top: 0; }
.kekri-story .ks-ch .ks-kicker { display: flex; align-items: baseline; gap: 14px; font-family: var(--k-mono); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--k-muted); margin-bottom: 22px; }
.kekri-story .ks-ch .ks-kicker--light { color: var(--k-rust); }
.kekri-story .ks-num { font-family: var(--k-display); font-size: 22px; letter-spacing: 0; color: inherit; }
.kekri-story .ks-h2 { font-family: var(--k-display); font-size: clamp(42px, 5vw, 76px); line-height: 0.98; letter-spacing: -0.012em; margin-bottom: 28px; }
.kekri-story .ks-h2 em { font-family: var(--k-serif); font-style: italic; font-weight: 400; }
.kekri-story .ks-label, .kekri-story .ks-ch .ks-label { font-family: var(--k-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: inherit; opacity: 0.75; margin-bottom: 16px; }
.kekri-story .ks-note, .kekri-story .ks-ch .ks-note { margin-top: 24px; padding-top: 16px; border-top: 1px solid currentColor; border-top-color: color-mix(in srgb, currentColor 25%, transparent); font-size: 14px; line-height: 1.55; opacity: 0.8; }
.kekri-story p + p { margin-top: 14px; }

.kekri-story .ks-fns { font-size: 0; vertical-align: super; line-height: 0; white-space: nowrap; margin-left: 3px; }
.kekri-story .ks-fn { display: inline-flex; align-items: center; justify-content: center; min-width: 17px; height: 17px; margin-left: 2px; padding: 0 3px; border: 1px solid currentColor; font-family: var(--k-mono); font-size: 9px; line-height: 1; opacity: 0.75; }
.kekri-story .ks-fn:hover, .kekri-story .ks-fn:focus-visible { opacity: 1; color: var(--k-amber); }
/* Bigger hit area for touch without changing the look. */
.kekri-story .ks-fn { position: relative; }
.kekri-story .ks-fn::after { content: ""; position: absolute; inset: -12px -6px; }

.kekri-story .ks-round { width: 44px; height: 44px; border-radius: 50%; border: 1px solid currentColor; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }
.kekri-story .ks-round:hover { color: var(--k-rust); }

.kekri-story .ks-ph { margin: 0; background: #3A2A1F; display: flex; align-items: flex-end; padding: 16px; }
.kekri-story .ks-ph span { font-family: var(--k-mono); font-size: 10px; line-height: 1.5; color: var(--k-muted); max-width: 260px; }

.kekri-story .ks-btn { min-height: 52px; padding: 0 26px; display: inline-flex; align-items: center; gap: 14px; border: 1px solid var(--k-muted); font-family: var(--k-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
.kekri-story .ks-btn--solid { background: var(--k-paper); color: var(--k-ink); border-color: var(--k-paper); }
.kekri-story .ks-btn--solid:hover { background: var(--k-amber); border-color: var(--k-amber); color: var(--k-ink); }

/* ---------- Chapter rail (desktop, JS only) ---------- */
.kekri-story .ks-rail { display: none; }
@media (min-width: 1200px) {
	.kekri-story.ks-js .ks-rail { display: block; position: fixed; left: 18px; top: 50%; transform: translateY(-50%); z-index: 20; opacity: 0; pointer-events: none; }
	.kekri-story.ks-js .ks-rail.is-visible { opacity: 1; pointer-events: auto; }
	.kekri-story .ks-rail ol { list-style: none; margin: 0; padding: 10px 0; display: flex; flex-direction: column; gap: 2px; border-left: 1px solid rgba(138, 124, 102, 0.6); }
	.kekri-story .ks-rail a { position: relative; display: flex; align-items: center; gap: 10px; min-height: 30px; padding-left: 12px; font-family: var(--k-mono); font-size: 10px; letter-spacing: 0.12em; color: #8A7C66; mix-blend-mode: difference; }
	.kekri-story .ks-rail a::before { content: ""; position: absolute; left: -3px; width: 5px; height: 5px; border-radius: 50%; background: transparent; }
	.kekri-story .ks-rail a.is-active { color: var(--k-amber); mix-blend-mode: normal; }
	.kekri-story .ks-rail a.is-active::before { background: var(--k-amber); }
	.kekri-story .ks-rail__name { opacity: 0; transform: translateX(-4px); white-space: nowrap; text-transform: uppercase; }
	.kekri-story .ks-rail:hover .ks-rail__name, .kekri-story .ks-rail a:focus-visible .ks-rail__name { opacity: 1; transform: none; }
	.kekri-story .ks-rail:hover ol { background: rgba(14, 13, 16, 0.92); }
	.kekri-story .ks-rail:hover a { mix-blend-mode: normal; color: var(--k-muted); padding-right: 14px; }
}

/* ---------- 01 Threshold ---------- */
.kekri-story .ks-threshold { min-height: max(700px, 100vh); min-height: max(700px, 100svh); display: flex; flex-direction: column; overflow: hidden; isolation: isolate; color: var(--k-paper); }
.kekri-story .ks-threshold .kekri-hero__scene { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.kekri-story .ks-threshold__body { flex: 1 0 auto; width: 100%; max-width: var(--ks-max); margin: 0 auto; padding: 48px var(--ks-gutter) 64px; display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); column-gap: 48px; align-items: end; }
.kekri-story .ks-threshold__main { padding-left: 56px; border-left: 1px solid var(--k-line); padding-bottom: 6px; }
.kekri-story .ks-threshold__title { font-family: var(--k-display); font-size: clamp(76px, 11.5vw, 188px); line-height: 0.86; letter-spacing: -0.02em; text-transform: none; }
.kekri-story .ks-threshold__sub { margin-top: 30px !important; font-family: var(--k-serif); font-style: italic; font-size: clamp(22px, 2vw, 30px); line-height: 1.3; color: #E7DCC6; max-width: 520px; }
.kekri-story .ks-threshold__side { padding: 28px 0 6px 28px; border-left: 1px solid var(--k-line); display: flex; flex-direction: column; gap: 22px; }
.kekri-story .ks-threshold__lede { font-size: 17px; line-height: 1.6; color: #D8CDB7; }
.kekri-story .ks-threshold__meta { font-family: var(--k-mono); font-size: 11px; letter-spacing: 0.12em; color: var(--k-muted); text-transform: uppercase; }
.kekri-story .ks-enter { display: inline-flex; align-items: center; gap: 14px; font-family: var(--k-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--k-muted); }
.kekri-story .ks-enter__ring { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--k-muted); display: inline-flex; align-items: center; justify-content: center; }
.kekri-story .ks-enter__ring span { width: 5px; height: 5px; border-radius: 50%; background: var(--k-amber); }

/* ---------- 02 The turning year ---------- */
.kekri-story .ks-year { background: var(--k-paper); color: var(--ks-ink-text); padding: 136px 0 128px; }
.kekri-story .ks-year__grid { display: grid; grid-template-columns: minmax(0, 3.4fr) minmax(0, 5fr) minmax(0, 3.2fr); column-gap: 56px; row-gap: 48px; align-items: center; }
.kekri-story .ks-year__intro p { font-size: 18px; color: var(--ks-ink-soft); }
.kekri-story .ks-ring { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.kekri-story .ks-ring__stage { position: relative; width: 100%; max-width: 480px; aspect-ratio: 1 / 1; }
.kekri-story .ks-ring__svg { width: 100%; height: 100%; }
.kekri-story .ks-ring__seg { cursor: pointer; stroke: transparent; stroke-width: 2.5; transition: stroke 0.2s ease; }
.kekri-story .ks-ring__seg:hover { stroke: #8A7C66; }
.kekri-story .ks-ring__seg.is-sel { stroke: var(--k-rust); stroke-width: 3; }
.kekri-story .ks-ring__label { font-family: var(--k-mono); font-size: 11px; letter-spacing: 0.1em; fill: #6B5E4B; }
.kekri-story .ks-ring__centre { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; text-align: center; }
.kekri-story .ks-ring__cm { font-family: var(--k-display); font-size: clamp(26px, 2.6vw, 38px); line-height: 1; }
.kekri-story .ks-ring__ch { margin-top: 8px; font-family: var(--k-mono); font-size: 12px; letter-spacing: 0.1em; color: #6B5E4B; }
.kekri-story .ks-months { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0; width: 100%; max-width: 520px; border-top: 1px solid var(--ks-ink-text); }
.kekri-story .ks-month-btn { min-height: 44px; font-family: var(--k-mono); font-size: 11px; letter-spacing: 0.04em; color: #6B5E4B; border-bottom: 2px solid transparent; }
.kekri-story .ks-month-btn abbr { text-decoration: none; border: 0; }
.kekri-story .ks-month-btn:hover { color: var(--ks-ink-text); }
.kekri-story .ks-month-btn[aria-pressed="true"] { color: var(--ks-ink-text); border-bottom-color: var(--k-rust); }
.kekri-story .ks-year__panel { align-self: stretch; display: flex; flex-direction: column; justify-content: center; padding-left: 32px; border-left: 1px solid var(--ks-hair-light); }
.kekri-story .ks-month + .ks-month { margin-top: 28px; }
.kekri-story.ks-js .ks-month:not([data-active]) { display: none; }
.kekri-story.ks-js .ks-month + .ks-month { margin-top: 0; }
.kekri-story .ks-month__name { font-family: var(--k-display); font-size: 40px; line-height: 1; margin-bottom: 10px; }
.kekri-story .ks-month__hours { font-family: var(--k-mono); font-size: 12px; color: #6B5E4B; }
.kekri-story .ks-chip { display: inline-block; margin-top: 16px !important; padding: 5px 10px; border: 1px solid #8A7C66; font-family: var(--k-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: #6B5E4B; }
.kekri-story .ks-chip--in { border-color: #B26F1F; color: #7A3A1E; background: rgba(227, 154, 53, 0.16); }
.kekri-story .ks-month__text { margin-top: 18px !important; font-size: 17px; line-height: 1.6; color: var(--ks-ink-soft); }
.kekri-story .ks-year__nav { display: none; gap: 10px; margin-top: 28px; }
.kekri-story.ks-js .ks-year__nav { display: flex; }

/* ---------- 03 The feast ---------- */
.kekri-story .ks-feast { background: var(--ks-ember); color: var(--k-paper); padding: 128px 0; }
.kekri-story .ks-feast__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: 80px; row-gap: 48px; align-items: start; }
.kekri-story .ks-feast .ks-h2 em { color: var(--k-muted); }
.kekri-story .ks-ph--tall { margin-top: 40px; aspect-ratio: 4 / 3; max-width: 520px; background: #3A2719; }
.kekri-story .ks-feast__panel { margin-top: 64px; }
.kekri-story .ks-tabs { display: flex; border-bottom: 1px solid var(--k-line); }
.kekri-story .ks-tabs [role="tab"] { flex: 1 1 0; min-height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 4px; font-family: var(--k-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--k-soft); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.kekri-story .ks-tabs .ks-num { font-size: 18px; }
.kekri-story .ks-tabs [role="tab"][aria-selected="true"] { color: var(--k-paper); border-bottom-color: var(--k-amber); }
.kekri-story .ks-tabs [role="tab"]:hover { color: var(--k-paper); }
.kekri-story .ks-pane { background: var(--k-paper); color: var(--ks-ink-text); padding: 40px 44px 44px; font-size: 19px; line-height: 1.65; }
.kekri-story .ks-pane + .ks-pane { margin-top: 2px; }
.kekri-story .ks-pane[hidden] { display: none; }
.kekri-story .ks-pane__title { font-family: var(--k-display); font-size: 30px; line-height: 1.1; margin-bottom: 16px; }
.kekri-story.ks-js .ks-pane__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 04 Masks ---------- */
.kekri-story .ks-masks { background: var(--k-paper-2); color: var(--ks-ink-text); padding: 128px 0 120px; }
.kekri-story .ks-masks__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 24px; }
.kekri-story .ks-masks__quote { margin: 40px 0 72px; padding: 56px 0; border-top: 1px solid var(--ks-ink-text); border-bottom: 1px solid var(--ks-hair-light); text-align: center; }
.kekri-story .ks-masks__quote p { font-family: var(--k-serif); font-style: italic; font-size: clamp(54px, 8.4vw, 132px); line-height: 1; letter-spacing: -0.02em; }
.kekri-story .ks-masks__quote footer { margin-top: 22px; font-family: var(--k-mono); font-size: 12px; letter-spacing: 0.08em; color: #6B5E4B; }
.kekri-story .ks-figures { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); column-gap: 72px; row-gap: 40px; align-items: center; }
.kekri-story .ks-figures__pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.kekri-story .ks-figure { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px 0 18px; color: #6B5E4B; }
.kekri-story .ks-figure__mark { width: min(220px, 100%); aspect-ratio: 1 / 1; border-radius: 50%; border: 1px solid #8A7C66; display: flex; align-items: center; justify-content: center; font-family: var(--k-display); font-size: 96px; line-height: 1; color: #B8AC94; transition: color 0.2s ease, border-color 0.2s ease; }
.kekri-story .ks-figure__name { font-family: var(--k-display); font-size: 30px; line-height: 1; color: var(--ks-ink-text); }
.kekri-story .ks-figure__en { font-family: var(--k-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.kekri-story .ks-figure[aria-pressed="true"] .ks-figure__mark { border-color: var(--ks-ink-text); color: var(--ks-ink-text); outline: 1px solid var(--k-rust); outline-offset: 8px; }
.kekri-story .ks-figure:hover .ks-figure__mark { border-color: var(--ks-ink-text); }
.kekri-story .ks-figures__text { font-size: 20px; line-height: 1.6; }
.kekri-story .ks-fig + .ks-fig { margin-top: 20px; }
.kekri-story.ks-js .ks-fig:not([data-active]) { display: none; }

/* ---------- 05 Names ---------- */
.kekri-story .ks-names { background: var(--ks-night); color: var(--k-paper); padding: 128px 0; }
.kekri-story .ks-names__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: 64px; row-gap: 40px; }
.kekri-story .ks-names__head { grid-row: span 2; }
.kekri-story .ks-words { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 36px; padding-bottom: 28px; border-bottom: 1px solid #2E3A46; }
.kekri-story .ks-word { min-height: 44px; font-family: var(--k-display); font-size: clamp(44px, 5.4vw, 88px); line-height: 1.05; color: #4E5A66; border-bottom: 2px solid transparent; transition: color 0.2s ease; }
.kekri-story .ks-word:hover { color: var(--k-muted); }
.kekri-story .ks-word[aria-pressed="true"] { color: var(--k-paper); border-bottom-color: var(--k-amber); }
.kekri-story .ks-names__detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 48px; row-gap: 12px; align-items: start; }
.kekri-story .ks-axis { grid-column: 1; display: flex; align-items: center; gap: 14px; font-family: var(--k-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--k-soft); }
.kekri-story .ks-axis__line { position: relative; flex: 1 1 auto; height: 1px; background: #5A6672; }
.kekri-story .ks-axis__dot { position: absolute; top: -7px; left: calc(50% - 7px); width: 14px; height: 14px; border-radius: 50%; background: var(--k-amber); transition: left 0.4s ease; }
.kekri-story .ks-axis__dot[data-pos="west"] { left: calc(12% - 7px); }
.kekri-story .ks-axis__dot[data-pos="east"] { left: calc(88% - 7px); }
.kekri-story .ks-axis__nurmes { position: absolute; right: 2%; top: 14px; font-size: 9px; color: var(--k-muted); }
.kekri-story .ks-axis__nurmes::before { content: ""; position: absolute; right: 7%; top: -17px; width: 1px; height: 9px; background: var(--k-muted); }
.kekri-story .ks-axis__caption { grid-column: 1; margin-top: 22px !important; font-family: var(--k-mono); font-size: 10px; letter-spacing: 0.08em; color: #8C96A0; }
.kekri-story .ks-word-text { grid-column: 2; grid-row: 1 / span 2; font-size: 19px; line-height: 1.6; color: #E2DACA; }
.kekri-story .ks-word-text + .ks-word-text { margin-top: 16px; }
.kekri-story.ks-js .ks-word-text:not([data-active]) { display: none; }
.kekri-story.ks-js .ks-word-text + .ks-word-text { margin-top: 0; }

/* ---------- 06 Timeline ---------- */
.kekri-story .ks-time { background: var(--k-sand); color: var(--ks-ink-text); padding: 128px 0 136px; }
.kekri-story .ks-tl { list-style: none; position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 40px; }
.kekri-story .ks-tl::before { content: ""; position: absolute; left: 0; right: 0; top: 22px; height: 1px; background: var(--ks-ink-text); }
.kekri-story .ks-tl__btn { position: relative; width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 16px 18px 0; text-align: left; color: var(--ks-ink-text); }
.kekri-story .ks-tl__dot { width: 17px; height: 17px; border-radius: 50%; background: var(--k-sand); border: 1px solid var(--ks-ink-text); margin-bottom: 14px; transition: background 0.2s ease; }
.kekri-story .ks-tl__year { font-family: var(--k-display); font-size: 30px; line-height: 1; }
.kekri-story .ks-tl__cap { font-family: var(--k-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: #6B5E4B; }
.kekri-story .ks-tl__btn:hover .ks-tl__dot { background: #B8AC94; }
.kekri-story .ks-tl__btn[aria-pressed="true"] .ks-tl__dot { background: var(--k-rust); border-color: var(--k-rust); }
.kekri-story .ks-tl__btn[aria-pressed="true"] .ks-tl__cap { color: var(--k-rust); }
.kekri-story .ks-tl__detail { font-size: 17px; line-height: 1.6; color: var(--ks-ink-soft); padding-right: 20px; }
.kekri-story .ks-tl__big { display: none; }
@media (min-width: 900px) {
	.kekri-story.ks-js .ks-tl { padding-bottom: 230px; }
	.kekri-story.ks-js .ks-tl__detail { position: absolute; left: 0; right: 0; top: 160px; display: none; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: 48px; align-items: start; padding: 40px 0 0; border-top: 1px solid var(--ks-hair-light); font-size: 22px; line-height: 1.55; color: var(--ks-ink-text); }
	.kekri-story.ks-js .ks-tl__detail[data-active] { display: grid; }
	.kekri-story.ks-js .ks-tl__big { display: block; font-family: var(--k-display); font-size: clamp(80px, 9vw, 140px); line-height: 0.85; color: #B8A47F; }
}

/* ---------- 07 Archive ---------- */
.kekri-story .ks-archive { background: var(--ks-teal); color: var(--k-paper); padding: 128px 0; }
.kekri-story .ks-archive__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: 72px; row-gap: 48px; align-items: start; }
.kekri-story .ks-archive__head > p { font-size: 17px; color: var(--k-soft); margin-bottom: 36px; }
.kekri-story .ks-terms { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.kekri-story .ks-terms a { min-height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid #3A4A52; font-family: var(--k-mono); font-size: 12px; }
.kekri-story .ks-terms a:hover { border-color: var(--k-amber); }
.kekri-story .ks-records { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); border-top: 1px solid var(--k-paper); }
.kekri-story .ks-record { padding: 28px 28px 32px 0; border-bottom: 1px solid #2E3A40; display: flex; flex-direction: column; gap: 12px; }
.kekri-story .ks-record + .ks-record { padding-left: 28px; border-left: 1px solid #2E3A40; }
.kekri-story .ks-record__type { font-family: var(--k-mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--k-amber); }
.kekri-story .ks-record__title { font-family: var(--k-serif); font-size: 24px; line-height: 1.2; }
.kekri-story .ks-record__desc { font-size: 15px; color: var(--k-soft); }
.kekri-story .ks-record__meta { margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; font-family: var(--k-mono); font-size: 11px; }
.kekri-story .ks-record__meta div { display: flex; gap: 12px; }
.kekri-story .ks-record__meta dt { width: 92px; flex: none; color: #7F8A90; text-transform: uppercase; letter-spacing: 0.1em; }
.kekri-story .ks-record__meta dd { margin: 0; color: var(--k-paper); }
.kekri-story .ks-record__link { margin-top: auto; padding-top: 12px; font-family: var(--k-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 4px; }
.kekri-story .ks-record.is-pending .ks-record__title { color: var(--k-soft); font-style: italic; }

/* ---------- 08 Close + sources ---------- */
.kekri-story .ks-close { background: var(--k-ink); color: var(--k-paper); padding: 136px 0 96px; }
.kekri-story .ks-close__title { font-family: var(--k-display); font-size: clamp(40px, 5.4vw, 84px); line-height: 1.02; letter-spacing: -0.012em; max-width: 1100px; }
.kekri-story .ks-close__title em { font-family: var(--k-serif); font-style: italic; color: var(--k-muted); }
.kekri-story .ks-close__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 48px; }
.kekri-story .ks-sources { margin-top: 120px; padding-top: 32px; border-top: 1px solid var(--k-line); }
.kekri-story .ks-sources__title { font-family: var(--k-mono); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--k-muted); margin-bottom: 24px; }
.kekri-story .ks-sources ol { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 56px; }
.kekri-story .ks-sources li { display: flex; gap: 18px; padding: 18px 0; border-bottom: 1px solid #262229; scroll-margin-top: 80px; }
.kekri-story .ks-sources li:target { background: rgba(227, 154, 53, 0.08); }
.kekri-story .ks-src__n { flex: none; width: 26px; height: 26px; border: 1px solid var(--k-line); display: inline-flex; align-items: center; justify-content: center; font-family: var(--k-mono); font-size: 11px; color: var(--k-muted); }
.kekri-story .ks-src__body { display: flex; flex-direction: column; gap: 4px; }
.kekri-story .ks-src__title { font-size: 18px; line-height: 1.3; text-decoration: underline; text-decoration-color: var(--k-line); text-underline-offset: 4px; }
.kekri-story .ks-src__by { font-family: var(--k-mono); font-size: 11px; color: var(--k-muted); }
.kekri-story .ks-src__note { font-size: 14px; color: #A89C86; }
.kekri-story .ks-src__checked { margin-top: 20px !important; font-family: var(--k-mono); font-size: 11px; color: #8A7C66; }

/* ---------- Source dialog ---------- */
.kekri-story .ks-dialog { width: min(520px, calc(100vw - 32px)); max-width: none; margin: auto; padding: 0; border: 1px solid var(--ks-ink-text); background: var(--k-paper); color: var(--ks-ink-text); }
.kekri-story .ks-dialog::backdrop { background: rgba(14, 13, 16, 0.6); }
.kekri-story .ks-dialog__inner { padding: 28px 28px 22px; }
.kekri-story .ks-dialog__body { display: flex; gap: 16px; }
.kekri-story .ks-dialog__body .ks-src__n { border-color: var(--ks-ink-text); color: var(--ks-ink-text); }
.kekri-story .ks-dialog__body .ks-src__title { color: var(--ks-ink-text); text-decoration-color: var(--k-rust); }
.kekri-story .ks-dialog__body .ks-src__by { color: #6B5E4B; }
.kekri-story .ks-dialog__body .ks-src__note { color: var(--ks-ink-soft); }
.kekri-story .ks-dialog__foot { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--ks-hair-light); font-family: var(--k-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }
.kekri-story .ks-dialog__all { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Reveal (JS + motion allowed only) ---------- */
@media (prefers-reduced-motion: no-preference) {
	.kekri-story.ks-js .ks-reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s ease, transform 0.8s ease; }
	.kekri-story.ks-js .ks-reveal.is-in { opacity: 1; transform: none; }
	.kekri-story .ks-rail { transition: opacity 0.3s ease; }
	.kekri-story .ks-rail__name { transition: opacity 0.2s ease, transform 0.2s ease; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
	.kekri-story .ks-year__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.kekri-story .ks-year__intro { grid-column: 1 / -1; max-width: 640px; }
	.kekri-story .ks-feast__grid, .kekri-story .ks-names__grid, .kekri-story .ks-archive__grid, .kekri-story .ks-figures { grid-template-columns: minmax(0, 1fr); }
	.kekri-story .ks-names__head { grid-row: auto; }
	.kekri-story .ks-feast__panel { margin-top: 0; }
}

@media (max-width: 899px) {
	.kekri-story .ks-tl { grid-template-columns: minmax(0, 1fr); padding-left: 28px; }
	.kekri-story .ks-tl::before { left: 8px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
	.kekri-story .ks-tl__item { position: relative; padding-bottom: 32px; }
	.kekri-story .ks-tl__btn { padding: 0; cursor: default; }
	.kekri-story .ks-tl__dot { position: absolute; left: -28px; top: 6px; margin: 0; }
	.kekri-story .ks-tl__detail { display: block !important; margin-top: 12px; padding: 0; }
}

/* ---------- Mobile (390 reference) ---------- */
@media (max-width: 760px) {
	.kekri-root.kekri-story { --ks-gutter: 20px; }
	.kekri-story .ks-h2 { font-size: 44px; }
	.kekri-story .ks-threshold__body { grid-template-columns: minmax(0, 1fr); row-gap: 36px; padding-top: 24px; padding-bottom: 40px; }
	.kekri-story .ks-threshold__main { padding-left: 20px; }
	.kekri-story .ks-threshold__title { font-size: 76px; }
	.kekri-story .ks-threshold__side { padding: 0 0 0 20px; }

	.kekri-story .ks-year, .kekri-story .ks-feast, .kekri-story .ks-masks, .kekri-story .ks-names, .kekri-story .ks-time, .kekri-story .ks-archive { padding: 88px 0; }
	.kekri-story .ks-year__grid { grid-template-columns: minmax(0, 1fr); row-gap: 32px; }
	.kekri-story .ks-ring__stage { max-width: 340px; }
	.kekri-story .ks-months { grid-template-columns: repeat(6, minmax(0, 1fr)); }
	.kekri-story .ks-year__panel { padding-left: 0; border-left: 0; padding-top: 24px; border-top: 1px solid var(--ks-hair-light); }

	.kekri-story .ks-tabs [role="tab"] { flex-direction: column; justify-content: center; align-items: flex-start; gap: 2px; font-size: 10px; letter-spacing: 0.1em; min-height: 64px; }
	.kekri-story .ks-pane { padding: 28px 22px 30px; font-size: 18px; }

	.kekri-story .ks-masks__quote { margin: 24px 0 48px; padding: 36px 0; }
	.kekri-story .ks-masks__quote p { font-size: 54px; }
	.kekri-story .ks-figure__mark { width: 136px; font-size: 64px; }
	.kekri-story .ks-figure__name { font-size: 24px; }
	.kekri-story .ks-figures__text { font-size: 18px; }

	.kekri-story .ks-words { gap: 0 22px; }
	.kekri-story .ks-word { font-size: 46px; }
	.kekri-story .ks-names__detail { grid-template-columns: minmax(0, 1fr); }
	.kekri-story .ks-word-text { grid-column: 1; grid-row: auto; margin-top: 24px; font-size: 18px; }


	.kekri-story .ks-record { padding: 24px 0 !important; border-left: 0 !important; }
	.kekri-story .ks-close { padding: 96px 0 72px; }
	.kekri-story .ks-close__title { font-size: 40px; }
	.kekri-story .ks-btn { width: 100%; justify-content: space-between; }
	.kekri-story .ks-sources ol { grid-template-columns: minmax(0, 1fr); }
}
