/* ============================================================================
   YOUTH STUDY BIBLE SKIN (mockup c2 "Marginalia Pop").
   Every rule is scoped under `.youth` (class on <html>, set before first paint).
   Without that class nothing here applies, so the classic C0 look is untouched.
   Highlighter colors are the brand: flat color blocks, 3px outlines, offset shadows.
   ============================================================================ */

/* ---- tokens: the C0 tokens remapped, so every C0 rule re-skins itself ---- */
:root.youth, :root.youth[data-texture='night'] {
  --ui-font: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --reading-font: 'Literata', Georgia, 'Times New Roman', serif;
  --title-font: var(--ui-font);
  --k: #111;
  --bg: #FFFBF0; --bg-panel: #fff; --bg-raised: #fff;
  --paper: none; --side-bg: none; --bg-texture: none;
  --ink: #111; --ink-soft: #333; --accent: #111; --link: #111;
  --line-color: #111; --line-strong: #111; --shadow: #111;
  --top-bg: #fff; --top-ink: #111; --top-gold: #111; --top-sub: #111;
  --btn-bg: #111; --btn-ink: #fff; --chip-on-bg: #111; --chip-on-ink: #fff;
  --rv-bg: var(--f); --rv-ink: #111; --rv-gold: #111; --rv-btn-bg: #fff; --rv-btn-ink: #111;
  --radius: 10px; --rule-gold: #111;
  --gold: var(--f); --gold-light: var(--f); --amber: var(--f);
  --accent-soft: var(--f); --selection: var(--f); --strip-bg: var(--f); --active-bg: var(--f); --hl-tint: var(--f);
  --drop-bg: var(--f); --drop-ink: #111;
  color-scheme: light;
}
:root.youth { --f: #FFD23F; }
:root.youth[data-route='notes'] { --f: #FF8C42; }
:root.youth[data-route='memorize'], :root.youth[data-route='memset'] { --f: #7FB2FF; }
:root.youth[data-route='plan'] { --f: #8FD694; }
:root.youth[data-route='teachings'], :root.youth[data-route='t'] { --f: #FF9EC4; }
:root.youth[data-route='settings'], :root.youth[data-route='profile'], :root.youth[data-route='about'], :root.youth[data-route='credits'] { --f: #C3A6FF; }

.youth body { background: var(--bg); color: #111; font-family: 'Literata', Georgia, serif; }
.youth h1, .youth h2, .youth h3, .youth h4 { text-wrap: balance; }
.youth :focus-visible { outline: 3px solid #111; outline-offset: 2px; }
.youth ::selection { background: var(--f); color: #111; }
.youth .youth-only { display: block; }
.youth-only { display: none; }

/* ---- top bar ---- */
.youth .topbar { background: #fff; color: #111; border-bottom: 3px solid #111; box-shadow: none; min-height: 64px; padding: 0 22px; gap: 14px; }
.youth .topbar::after { display: none; }
.youth #menuToggle { display: none; }
.youth .brandtext { font: 800 24px/1 'Bricolage Grotesque', sans-serif; letter-spacing: -.02em; color: #111; display: inline-flex; flex-direction: column; align-items: flex-start; gap: 3px; white-space: nowrap; }
.youth .brandtext small { display: block; font: 500 9px/1 'Bricolage Grotesque', sans-serif; letter-spacing: .14em; text-transform: uppercase; margin: 0; color: #111; }
.youth .brandmark { border-radius: 8px; box-shadow: none; }
.youth .topbar .pill { border: 2px solid #111; background: var(--f); color: #111; font: 800 12px 'Bricolage Grotesque', sans-serif; padding: 3px 12px; border-radius: 99px; box-shadow: 2px 2px 0 #111; }
.youth .topbar .iconbtn { color: #111; border: 2px solid transparent; border-radius: 99px; }
.youth .topbar .iconbtn:hover, .youth .topbar .iconbtn[aria-pressed='true'] { border-color: #111; background: var(--f); }
.youth .topbar .iconbtn[aria-pressed='true'] { box-shadow: 2px 2px 0 #111; }

/* ---- desktop tabs: the side menu becomes a row of outlined pills in the top bar ---- */
@media (min-width: 761px) {
  .youth .app { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'header' 'main'; }
  .youth .sidemenu, :root.youth[data-menu='collapsed'] .sidemenu {
    display: flex; grid-area: header; align-self: start; justify-self: start; position: sticky; top: 0; z-index: 31;
    height: 64px; width: auto; padding: 0; background: none; border: 0; overflow: visible; margin-left: 262px; pointer-events: none;
  }
  .youth .sidemenu nav { flex-direction: row; gap: 6px; align-items: center; height: 64px; pointer-events: auto; }
  .youth .sidemenu nav a[data-route='profile'], .youth .sidemenu nav a[data-route='settings'], .youth .sidemenu nav a[data-route='about'] { display: none; }
  .youth .sidemenu nav a { min-height: 44px; padding: 0 12px; border: 2px solid #111; border-radius: 99px; font: 700 12.5px 'Bricolage Grotesque', sans-serif; color: #111; white-space: nowrap; background: #fff; }
  .youth .sidemenu nav a [data-icon] { display: none; }
  .youth .sidemenu nav a:hover { background: var(--f); }
  .youth .sidemenu nav a.active { background: #111; color: #fff; box-shadow: none; }
  .youth .sidemenu .menu-foot { display: none; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .youth .brandtext small { display: none; }
  .youth .sidemenu, :root.youth[data-menu='collapsed'] .sidemenu { margin-left: 140px; }
  .youth .sidemenu nav a { padding: 0 9px; font-size: 12px; }
  .youth .topbar { padding: 0 14px; gap: 8px; }
}
@media (min-width: 761px) and (max-height: 500px) {
  .youth .topbar, .youth .sidemenu, .youth .sidemenu nav { min-height: 54px; height: 54px; }
}

/* ---- phone: bottom bar of outlined pills, the rest under More ---- */
.ybar { display: none; }
@media (max-width: 760px) {
  .youth .ybar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; height: 68px; gap: 4px;
    padding: 0 6px; align-items: center; background: #fff; border-top: 3px solid #111;
  }
  .youth .ybar a, .youth .ybar button {
    flex: 1; min-width: 0; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
    padding: 4px 2px; font: 700 10px 'Bricolage Grotesque', sans-serif; color: #111; background: #fff; border: 2px solid #111; border-radius: 12px; text-decoration: none; cursor: pointer;
  }
  .youth .ybar svg { width: 18px; height: 18px; }
  .youth .ybar .active { background: var(--f); box-shadow: 2px 2px 0 #111; }
  .youth .app { padding-bottom: 68px; }
  .youth .topbar { min-height: 54px; padding: 0 12px; gap: 4px; }
  .youth .brandtext small { display: none; }
  .youth .brandtext { font-size: 22px; }
  .youth .sidemenu.overlay { bottom: 68px; background: #fff; border-right: 3px solid #111; box-shadow: 6px 0 0 #111; }
  .youth .sidemenu nav a { border: 2px solid #111; border-radius: 99px; background: #fff; color: #111; font: 700 14px 'Bricolage Grotesque', sans-serif; margin-bottom: 6px; }
  .youth .sidemenu nav a.active { background: var(--f); box-shadow: 2px 2px 0 #111; }
  .youth .scrim { bottom: 68px; }
  .youth .overlay-handle { bottom: 68px; }
}
@media (max-width: 760px) and (max-height: 500px) {
  .youth .ybar { height: 48px; }
  .youth .ybar a, .youth .ybar button { flex-direction: row; gap: 6px; min-height: 40px; }
  .youth .app { padding-bottom: 48px; }
  .youth .sidemenu.overlay, .youth .scrim, .youth .overlay-handle { bottom: 48px; }
  .youth .topbar { min-height: 48px; }
}

/* ---- hero: the colored title block (left column on desktop, band on narrow) ---- */
.youth .main { position: relative; padding: 0; background: var(--bg); }
.youth .main::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 66px; background: var(--f); border-bottom: 3px solid #111; z-index: 0; }
.youth .main h1, .youth .r-where {
  position: absolute; left: 18px; top: 12px; right: 18px; z-index: 1; margin: 0; padding: 0; border: 0; box-shadow: none;
  font: 800 34px/1 'Bricolage Grotesque', sans-serif; letter-spacing: -.04em; color: #111; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  overflow-wrap: anywhere; text-wrap: balance; flex: none; max-width: none; background: none;
}
.youth .main h1::before, .youth .r-where::before {
  content: attr(data-kick); font: 700 12px 'Bricolage Grotesque', sans-serif; letter-spacing: .14em; text-transform: uppercase;
  background: #fff; border: 2px solid #111; padding: 1px 10px; border-radius: 99px; display: inline-block;
}
:root.youth[data-route='read'] .r-where::before { content: 'Read'; }
:root.youth[data-route='notes'] .main h1::before { content: 'Notebook'; }
:root.youth[data-route='memorize'] .main h1::before { content: 'Memorize'; }
:root.youth[data-route='plan'] .main h1::before { content: 'Plan'; }
:root.youth[data-route='teachings'] .main h1::before { content: 'Teachings'; }
:root.youth[data-route='settings'] .main h1::before { content: 'Settings'; }
:root.youth[data-route='profile'] .main h1::before { content: 'Profile'; }
:root.youth[data-route='about'] .main h1::before { content: 'About'; }
:root.youth[data-route='credits'] .main h1::before { content: 'About'; }
.youth .main { padding-top: 66px; }
@media (max-width: 760px) and (min-height: 501px) { .youth .main { padding-top: 104px; } .youth .main::before { height: 104px; } .youth .main h1, .youth .r-where { flex-direction: column; align-items: flex-start; gap: 6px; } }
.youth .reading-shell, .youth .main > .cols, .youth .main > .reading { padding-left: 0; }
.youth .main .m { padding: 16px; }
.youth .main .a { padding: 12px 16px 16px; }
.youth .reading-shell { padding: 14px 16px; }
.youth .main h1 .icon { display: none; }

@media (min-width: 1100px) {
  .youth .main { padding-top: 0; padding-left: 320px; min-height: calc(100vh - 64px); }
  .youth .main::before { right: auto; width: 320px; height: auto; bottom: 0; border-bottom: 0; border-right: 3px solid #111; }
  .youth .main h1, .youth .r-where {
    left: 24px; top: 26px; right: auto; width: 272px; display: block; font-size: 56px; line-height: .92; letter-spacing: -.04em; overflow-wrap: anywhere;
  }
  .youth .main h1::before, .youth .r-where::before { display: table; margin-bottom: 14px; }
  .youth .main .m { padding: 22px 26px; border-right: 3px solid #111; }
  .youth .main .a { padding: 18px; background: #F5ECD6; }
  .youth .main > .cols { gap: 0; align-items: stretch; min-height: calc(100vh - 64px); grid-template-columns: minmax(0, 1fr) 330px; }
  .youth .reading-shell { padding: 22px 26px; border-right: 3px solid #111; min-height: calc(100vh - 64px); }
  :root.youth[data-route='read'] .main { padding-right: 330px; }
  :root.youth[data-route='read'] .studyoverlay { top: 64px; right: 0; width: 330px; padding: 18px; background: #F5ECD6; box-shadow: none; }
}

/* ---- cards, headings, chips, buttons ---- */
.youth .card { background: #fff; border: 3px solid #111; box-shadow: 5px 5px 0 #111; border-radius: 10px; padding: 12px 14px; margin: 0 5px 16px 0; }
.youth .card h2, .youth .card h3, .youth .ov-sec-head, .youth .step h3 {
  font: 800 14px 'Bricolage Grotesque', sans-serif; letter-spacing: .02em; text-transform: uppercase; background: var(--f); color: #111;
  display: inline-block; padding: 0 8px; border: 2px solid #111; margin: 0 0 8px; transform: rotate(-1deg);
}
.youth .muted, .youth .mut { color: #333; font-size: 13px; }
.youth .btn { background: #111; color: #fff; border: 3px solid #111; border-radius: 99px; box-shadow: 3px 3px 0 #111; font: 800 12px 'Bricolage Grotesque', sans-serif; padding: 6px 14px; }
.youth .btn.secondary, .youth .btn.gold { background: #fff; color: #111; border: 3px solid #111; }
.youth .btn.big { background: var(--f); color: #111; font-size: 15px; padding: 12px 24px; box-shadow: 5px 5px 0 #111; }
.youth .btn:hover { filter: none; background: var(--f); color: #111; }
.youth .ch, .youth .mini-btn, .youth .mem-method, .youth .mem-mode, .youth .mem-pickchip, .youth .hl-chip, .youth .ref-chip {
  font: 700 12px 'Bricolage Grotesque', sans-serif; border: 2px solid #111; border-radius: 99px; background: #fff; color: #111;
}
.youth .ch.on, .youth .mini-btn.on, .youth .mem-method.on, .youth .mem-mode.on, .youth .mem-pickchip.on, .youth .ch[aria-pressed='true'] { background: #111; color: #fff; border-color: #111; }
.youth .chips { gap: 6px; }
.youth .tag { border: 2px solid #111; background: var(--f); color: #111; border-radius: 99px; font: 800 11px 'Bricolage Grotesque', sans-serif; padding: 1px 12px; }
.youth label { font-family: 'Bricolage Grotesque', sans-serif; color: #111; }
.youth select, .youth input[type=text], .youth input[type=email], .youth input[type=password], .youth input[type=number], .youth input[type=date], .youth textarea, .youth .srch {
  background: #fff; border: 2px solid #111; border-radius: 99px; color: #111; font-family: 'Literata', serif;
}
.youth textarea { border-radius: 8px; }
.youth input[type=checkbox], .youth input[type=radio] { accent-color: #111; }
.youth .notice { background: #fff; border: 3px solid #111; border-left-width: 3px; border-radius: 10px; box-shadow: 4px 4px 0 #111; }
.youth blockquote, .youth .verse-chip { background: #fff; border: 3px solid #111; box-shadow: 4px 4px 0 #111; border-radius: 10px; padding: 10px 14px; margin: 12px 4px 12px 0; font: italic 16px/1.5 'Literata', serif; }
.youth .verse-chip .verse-ref, .youth blockquote cite { display: block; font: 700 11px 'Bricolage Grotesque', sans-serif; font-style: normal; text-transform: uppercase; margin-top: 4px; }
.youth .progress, .youth .mem-bar, .youth .dc-bar { height: 16px; border: 3px solid #111; border-radius: 99px; background: #fff; overflow: hidden; }
.youth .progress > i, .youth .mem-bar > span, .youth .dc-bar > i { background: var(--f); border-right: 3px solid #111; }
.youth .lnk { color: #111; }
.youth .main .lede, .youth .main .reading > .m > .card:first-child > p { font: 500 17px/1.45 'Literata', serif; }
.youth .cols > .a > .card:first-child { border-top: 3px solid #111; }
.youth .cols > .a .card h2 { font: 800 14px 'Bricolage Grotesque', sans-serif; color: #111; }

/* ---- reader page ---- */
.youth .page-viewport, .youth .page-viewport[data-cols='1'], .youth .page-viewport[data-cols='2'] { background: none; box-shadow: none; border: 0; }
.youth .page-viewport .seam { display: none; }
.youth .page-body { font: 400 16px/1.55 'Literata', serif; }
.youth .page-body[data-ch]::before { display: none; }
.youth .page-head { border-bottom: 0; display: flex; align-items: center; gap: 8px; justify-content: flex-start; }
.youth .page-head .ph-ref { font: 800 12px 'Bricolage Grotesque', sans-serif; text-transform: uppercase; letter-spacing: .1em; color: #111; }
.youth .page-head .ph-trans { font: 700 10px 'Bricolage Grotesque', sans-serif; border: 2px solid #111; border-radius: 99px; padding: 0 7px; color: #111; letter-spacing: 0; }
.youth .verse .vnum, .youth sup.vnum { font: 800 10px 'Bricolage Grotesque', sans-serif; color: #111; }
.youth .verse.hl-yellow, .youth .verse[class*='hl-'], .youth .hl-yellow { background: linear-gradient(transparent 12%, var(--f) 12%, var(--f) 92%, transparent 92%); border-radius: 3px; }
.youth .page-info { font: 400 12px 'Literata', serif; color: #333; }
.youth .reader-toolbar { gap: 6px; }
.youth .reader-substrip { font-family: 'Bricolage Grotesque', sans-serif; }
.youth #r-today .notice, .youth .reading-shell #r-today > div { background: var(--f); font: 600 13px 'Bricolage Grotesque', sans-serif; border: 3px solid #111; }
.youth #r-today a, .youth .daily-countdown a { color: #111; font-weight: 700; text-decoration: underline; padding: 15px 3px; margin: -15px 0; }

/* study overlay */
.youth .overlay-handle, .youth .overlay-panel { background: #fff; border: 3px solid #111; box-shadow: 4px 4px 0 #111; }
.youth .overlay-handle .oh-label { color: #111; }
@media (min-width: 1100px) {
  :root.youth[data-route='read'] .overlay-top, :root.youth[data-route='read'] .ov-sec { background: #fff; border: 3px solid #111; box-shadow: 5px 5px 0 #111; border-radius: 10px; margin: 0 5px 16px 0; }
  :root.youth[data-route='read'] .overlay-panel { border: 0; box-shadow: none; background: none; }
  :root.youth[data-route='read'] .ov-sec-head { font: 800 14px 'Bricolage Grotesque', sans-serif; color: #111; }
}

/* ---- notebook ---- */
.youth .mk { background: #fff; border: 3px solid #111; box-shadow: 4px 4px 0 #111; border-radius: 10px; padding: 10px 14px; margin: 0 4px 14px 0; }
.youth .mk .tag { background: var(--c, var(--f)); border: 2px solid #111; }
.youth .mk .mk-act, .youth .mk .lnk { font: 600 11px 'Bricolage Grotesque', sans-serif; color: #111; }
.youth .srch { border-radius: 99px; }
.youth .card .srch { border-radius: 6px; }

/* ---- memorize ---- */
.youth .mem-preview { background: var(--f); color: #111; border: 3px solid #111; box-shadow: 4px 4px 0 #111; border-radius: 10px; padding: 12px 16px; margin: 10px 4px 0 0; }
.youth .mem-preview small { color: #111; font: 700 11px 'Bricolage Grotesque', sans-serif; }
.youth .mem-preview strong { font: 800 26px 'Bricolage Grotesque', sans-serif; }
.youth .mem-preview .mp-cue { font: 500 20px 'Literata', serif; letter-spacing: .14em; color: #111; }
.youth .mem-preview .btn.gold { background: #fff; color: #111; }

/* ---- plan ---- */
.youth .plan { background: #fff; border: 3px solid #111; box-shadow: 5px 5px 0 #111; border-radius: 10px; padding: 16px 18px; margin: 0 5px 14px 0; }
.youth .plan > h2:only-of-type { font: 800 42px/1 'Bricolage Grotesque', sans-serif; letter-spacing: -.03em; background: none; border: 0; padding: 0; transform: none; text-transform: none; display: block; }
.youth .step { background: #fff; border: 3px solid #111; border-radius: 8px; padding: 8px 12px; margin: 0 4px 10px 0; box-shadow: none; }
.youth .step h3 { transform: none; background: none; border: 0; padding: 0; font-size: 17px; text-transform: none; display: block; }
.youth .fl { font: 800 10.5px 'Bricolage Grotesque', sans-serif; text-transform: uppercase; letter-spacing: .12em; color: #111; }

@media (prefers-reduced-motion: reduce) { .youth * { transition: none !important; } }

/* ---- book intro card (youth only; the card is only ever rendered in youth mode) ---- */
.youth .intro-card { background: #fff; border: 3px solid #111; box-shadow: 5px 5px 0 #111; border-radius: 10px; padding: 12px 16px; margin: 0 5px 16px 0; max-width: 62ch; font: 400 15px/1.5 'Literata', serif; }
.youth .intro-card h2 { font: 800 18px 'Bricolage Grotesque', sans-serif; background: var(--f); border: 2px solid #111; display: inline-block; padding: 0 10px; margin: 0 0 8px; transform: rotate(-1deg); text-wrap: balance; }
.youth .intro-card p { margin: 0 0 8px; text-wrap: pretty; }
.youth .intro-card .ic-meta { font-size: 13px; }
.youth .intro-card .ic-key { background: var(--f); border: 2px solid #111; border-radius: 8px; padding: 8px 12px; }
.youth .intro-card cite { display: block; font: 700 11px 'Bricolage Grotesque', sans-serif; font-style: normal; text-transform: uppercase; margin-top: 3px; }
.youth .intro-card .ic-src { font-size: 12px; margin: 0; }
.youth .intro-card a { color: #111; text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 760px) {
  .youth .plan > h2:only-of-type { font-size: 30px; }
  .youth .btn.big { padding: 10px 18px; font-size: 14px; }
}

/* a card that only carries the page title (Memorize, signed-out screens) becomes plain flow so the hero h1 anchors to .main */
.youth .main .card:has(> h1), .youth .main .card:has(> .row > h1) { position: static; background: none; border: 0; box-shadow: none; padding: 0; margin: 0 0 12px; }
.youth .main .card:has(> .row > h1) > .row { justify-content: flex-start; }

/* phone header: brand, Youth, translation, music. Settings and Profile live in the More sheet. */
@media (max-width: 760px) {
  .youth #settingsBtn, .youth #accountBtn { display: none; }
}
@media (max-width: 380px) {
  .youth .topbar { padding: 0 8px; }
  .youth .brandtext { font-size: 19px; }
  .youth .brandtext small { display: none; }
}

/* a11y: 44px targets for the daily-reading links, AA contrast for tags */
.youth .tag, .youth .mk .tag { background: var(--f) !important; color: #111 !important; }

/* memorize: c2 .btn.big review button, note under it */
.youth #mem-review { background: var(--f); color: #111; font: 800 15px 'Bricolage Grotesque', sans-serif; padding: 12px 24px; border: 3px solid #111; border-radius: 99px; box-shadow: 5px 5px 0 #111; margin: 6px 0 0; }
.youth #mem-review svg { display: none; }
.youth .row:has(> #mem-review) { flex-direction: column; align-items: flex-start; gap: 8px; margin: 8px 0 12px; }
.youth .verse-chip p, .youth blockquote p { font: inherit; margin: 0; }
:root.youth[data-route='memorize'] .card > p.muted { font: 500 17px/1.45 'Literata', serif; color: #111; margin: 10px 0; }
.youth .mem-preview strong { margin: 2px 0; }
.youth .mem-preview { padding: 12px 16px; }

/* History pictures: outlined with offset shadow */
.youth .hist-fig { background: #fff; border: 3px solid #111; box-shadow: 5px 5px 0 #111; border-radius: 10px; padding: 8px; margin: 0 5px 16px 0; }
.youth .hist-fig img { border: 2px solid #111; border-radius: 6px; }
.youth .hist-fig figcaption { font-family: 'Literata', serif; color: #111; }
.youth .hf-cap { font-style: normal; font-weight: 600; }
.youth .hf-credit, .youth .hf-credit a { color: #111; }
