/* site.css - the look of desecretizat.ro ("Raftul").
   Top to bottom on the first page: logo / archive size over a plain yellow bar / search button / sort / shelf of covers / small sources line.
   A dossier opens as a column of pages scrolled like a PDF, under a bar with Original / Refăcut and Rezumat.
   The look: manila yellow on a dark desk, tall condensed numerals. The drawn pages themselves are styled in refacut.css. */

/* self-hosted UI fonts (Barlow, Barlow Condensed, IBM Plex Mono) */
@font-face{font-family:'Barlow';font-style:normal;font-weight:400;font-display:swap;src:url('/static/fonts/barlow_400_latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'Barlow';font-style:normal;font-weight:400;font-display:swap;src:url('/static/fonts/barlow_400_latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Barlow';font-style:normal;font-weight:500;font-display:swap;src:url('/static/fonts/barlow_500_latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'Barlow';font-style:normal;font-weight:500;font-display:swap;src:url('/static/fonts/barlow_500_latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Barlow';font-style:normal;font-weight:600;font-display:swap;src:url('/static/fonts/barlow_600_latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'Barlow';font-style:normal;font-weight:600;font-display:swap;src:url('/static/fonts/barlow_600_latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Barlow Condensed';font-style:normal;font-weight:500;font-display:swap;src:url('/static/fonts/barlow_condensed_500_latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'Barlow Condensed';font-style:normal;font-weight:500;font-display:swap;src:url('/static/fonts/barlow_condensed_500_latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Barlow Condensed';font-style:normal;font-weight:600;font-display:swap;src:url('/static/fonts/barlow_condensed_600_latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'Barlow Condensed';font-style:normal;font-weight:600;font-display:swap;src:url('/static/fonts/barlow_condensed_600_latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Barlow Condensed';font-style:normal;font-weight:700;font-display:swap;src:url('/static/fonts/barlow_condensed_700_latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'Barlow Condensed';font-style:normal;font-weight:700;font-display:swap;src:url('/static/fonts/barlow_condensed_700_latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:400;font-display:swap;src:url('/static/fonts/ibm_plex_mono_400_latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:400;font-display:swap;src:url('/static/fonts/ibm_plex_mono_400_latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:500;font-display:swap;src:url('/static/fonts/ibm_plex_mono_500_latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:500;font-display:swap;src:url('/static/fonts/ibm_plex_mono_500_latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}

:root {
  --bg: #1b1f1a; --surface: #242922; --surface-2: #2f352c; --fg: #ece8dc; --muted: #a9a695; --line: #3d4338;
  --accent: #e2b866; --accent-fg: #1f1a0c; --accent-soft: #3a3422; --warn: #e8935d; --paper: #cbbf9f;
  --folder-back: #b98d2c; --desk: #121511;
  --radius: 3px; --radius-s: 2px; --shadow: 0 12px 40px rgba(0, 0, 0, .5);
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --gut-l: max(16px, env(safe-area-inset-left, 0px)); --gut-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 16px; line-height: 1.5; }
[hidden] { display: none !important; }
:where(button, input, select, textarea) { font: inherit; color: inherit; }
:where(a) { color: inherit; text-decoration: none; }
:where(h1, h2, h3, h4, p, ul, ol, blockquote, figure) { margin: 0; padding: 0; }
:where(ul, ol) { list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; }

/* ---------- small shared pieces ---------- */
.k-ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.k-thumb { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; object-position: top center; background-color: var(--paper); border-radius: 2px; box-shadow: 0 0 0 1px var(--line); flex: none; }
.k-note { font-size: .85em; color: var(--muted); }
.k-empty { color: var(--muted); padding-block: 1.5rem; }
.k-lead { font-size: 1.06em; line-height: 1.6; max-width: 68ch; }

/* chip: a person or a place, touchable */
.k-chip { display: inline-flex; align-items: center; gap: .3em; max-width: 100%; padding: .1em .55em .1em .4em; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--fg); font-size: .92em; line-height: 1.4; cursor: pointer; vertical-align: baseline; text-align: left; transition: border-color .12s, background .12s; }
.k-chip .k-ic { color: var(--accent); }
.k-chip-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.k-chip-x { color: var(--muted); font-size: .88em; font-variant-numeric: tabular-nums; }
.k-chip:hover { border-color: var(--accent); background: var(--accent-soft); }

/* icon button, two-way switch */
.k-ib { display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; flex: none; border: 1px solid transparent; border-radius: var(--radius-s); background: none; cursor: pointer; color: var(--muted); }
.k-ib:hover { background: var(--surface-2); color: var(--fg); }
.k-seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; background: var(--surface); }
.k-seg-b { border: 0; background: none; padding: .42rem .8rem; cursor: pointer; color: var(--muted); }

/* a document inside a dossier */
.k-sec { display: flex; gap: .8rem; align-items: baseline; padding: .55rem 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.k-sec-p { flex: none; width: 5.2rem; font-family: var(--font-mono); font-size: .8em; color: var(--muted); font-variant-numeric: tabular-nums; }
.k-sec-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.k-sec-t { line-height: 1.35; overflow-wrap: anywhere; }
.k-sec:hover .k-sec-t { color: var(--accent); }
.k-sec-m { font-size: .82em; color: var(--muted); }

/* "show more", list of findings */
.k-more > summary { cursor: pointer; color: var(--accent); padding-block: .5rem; width: fit-content; }
.k-more > p { line-height: 1.6; max-width: 70ch; margin-top: .3rem; }
.k-find { display: grid; gap: .55rem; margin-top: .8rem; }
.k-find li { padding-left: 1.1rem; position: relative; line-height: 1.5; max-width: 72ch; }
.k-find li::before { content: ""; position: absolute; left: 0; top: .62em; width: .45rem; height: .45rem; border-radius: 1px; background: var(--accent); }

/* a dossier as a cover */
.k-tile { display: grid; gap: .35rem; align-content: start; cursor: pointer; min-width: 0; padding: 10px 5px 0 2px; margin: -10px -5px 0 -2px; }
.k-tile-w { position: relative; display: block; isolation: isolate; }
/* stacked pages peeking slightly behind the cover */
.k-tile-w::before {
  content: ""; position: absolute; inset: 3px -3px -3px 4px; z-index: 0;
  border-radius: 3px 8px 8px 3px;
  background: linear-gradient(180deg, #b8ad90 0%, #8c826a 100%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .45), 0 4px 10px rgba(0, 0, 0, .4);
  transition: transform .26s cubic-bezier(.22, 1, .36, 1), opacity .26s ease;
  opacity: .88;
}
/* subtle left binding crease & top paper sheen layered over the cover */
.k-tile-w::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  border-radius: 3px 8px 8px 3px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .24) 0%, rgba(255, 255, 255, .14) 3.5%, rgba(0, 0, 0, .10) 6.5%, transparent 11%),
    linear-gradient(180deg, rgba(255, 255, 255, .14) 0%, transparent 18%);
  box-shadow: inset 0 0 0 1px rgba(255, 250, 236, .16);
  transition: transform .26s cubic-bezier(.22, 1, .36, 1), box-shadow .26s cubic-bezier(.22, 1, .36, 1);
}
.k-tile-th {
  position: relative; z-index: 1;
  border-radius: 3px 8px 8px 3px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .55), 0 6px 16px rgba(0, 0, 0, .42);
  transition: transform .26s cubic-bezier(.22, 1, .36, 1), box-shadow .26s cubic-bezier(.22, 1, .36, 1);
}
.k-tile:hover .k-tile-th,
.k-tile:focus-visible .k-tile-th {
  transform: translateY(-7px) rotate(-.6deg);
  box-shadow: 0 0 0 1px rgba(226, 184, 102, .55), 0 14px 28px rgba(0, 0, 0, .58);
}
.k-tile:hover .k-tile-w::after,
.k-tile:focus-visible .k-tile-w::after {
  transform: translateY(-7px) rotate(-.6deg);
  box-shadow: inset 0 0 0 1px rgba(226, 184, 102, .45);
}
.k-tile:hover .k-tile-w::before,
.k-tile:focus-visible .k-tile-w::before {
  transform: translate(2px, -2px) rotate(1.1deg);
  opacity: 1;
}
.k-tile:active .k-tile-th,
.k-tile:active .k-tile-w::after {
  transform: translateY(-2px) scale(.985);
  transition-duration: .08s;
}
.k-tile b { font-weight: 500; font-size: .92rem; line-height: 1.25; overflow-wrap: anywhere; margin-top: .35rem; transition: color .18s ease; }
.k-tile:hover b, .k-tile:focus-visible b { color: var(--accent); }
.k-tile > span:last-child { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); }

/* ---------- page frame ---------- */
.r-app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); color: var(--fg); font-size: 1.02rem; }
#r-view { flex: 1; padding-bottom: 3rem; }
.r-wrap { width: 100%; max-width: 66rem; margin-inline: auto; padding-left: var(--gut-l); padding-right: var(--gut-r); }
#r-view > .r-wrap { padding-top: 1.1rem; }

/* header: logo and a quiet link to the project page */
.r-top { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
.r-top-in { display: flex; align-items: center; gap: 1.2rem; min-height: 3.3rem; }
.r-logo { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; letter-spacing: .05em; text-transform: uppercase; color: var(--fg); }
.r-logo-i { width: 2rem; height: auto; flex: none; }
.r-logo-back { fill: var(--folder-back); }
.r-logo-front { fill: var(--accent); }
.r-logo-line { fill: none; stroke: var(--accent-fg); stroke-width: 1.8; stroke-linecap: round; opacity: .5; }
.r-about { margin-left: auto; padding: .35rem 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); font-size: .9rem; white-space: nowrap; }
.r-about:hover { color: var(--accent); }
/* sources: small, at the very bottom of every page */
.r-srcs { border-top: 1px solid var(--line); padding-block: 1rem 1.4rem; font-size: .76rem; line-height: 1.7; color: var(--muted); }
.r-srcs b { color: var(--fg); font-weight: 600; margin-right: .2rem; }
.r-srcs span { white-space: nowrap; }
.r-srcs a { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--line); }
.r-srcs a:hover { color: var(--accent); }

/* archive size, then the search button */
.r-hero { padding-block: 1.2rem .4rem; }
.r-tot { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.7rem, 7vw, 2.9rem); line-height: 1; letter-spacing: .01em; }
.r-tot b { color: var(--accent); font-weight: 700; }
.r-tot i { font-style: normal; color: var(--muted); margin-inline: .15em; }
.r-rule { height: .5rem; margin-top: .8rem; background: var(--accent); border-radius: var(--radius); }
.r-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin-top: 1rem; max-width: 46rem; }
.r-two:has(> :only-child) { grid-template-columns: minmax(0, 1fr); max-width: 23rem; }
.r-btn { display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3.5rem; padding: .6rem .7rem; border: 2px solid var(--accent); border-radius: var(--radius); background: var(--accent); color: var(--accent-fg); cursor: pointer; text-align: left; }
.r-btn + .r-btn { background: none; color: var(--accent); }
.r-btn .k-ic { width: 1.3rem; height: 1.3rem; }
.r-btn span { display: grid; gap: .1rem; min-width: 0; }
.r-btn b { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: .03em; text-transform: uppercase; line-height: 1; white-space: nowrap; }
.r-btn small { display: none; font-size: .82rem; line-height: 1.25; opacity: .85; }
.r-btn[aria-current="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.r-panel { margin-top: .7rem; max-width: 46rem; }
.r-sbox { display: flex; align-items: center; border: 2px solid var(--accent); border-radius: var(--radius); background: var(--surface); }
.r-sbox input { flex: 1; min-width: 0; border: 0; background: none; padding: .95rem 1rem; font-size: 1.1rem; outline: none; }
.r-sbox input::-webkit-search-cancel-button { display: none; }
.r-sbox .k-ib { margin-right: .3rem; }

/* sort + shelf */
.r-arr { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem 1rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
.r-arr-l { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; letter-spacing: .02em; text-transform: uppercase; }
.r-arr-b { display: flex; flex-wrap: wrap; gap: .4rem; }
.r-arr-b a { border: 1px solid var(--line); border-radius: 999px; padding: .5rem 1rem; font-weight: 500; }
.r-arr-b a:hover { border-color: var(--accent); }
.r-arr-b a[aria-current="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); font-weight: 600; }
.r-find { display: grid; gap: .6rem; margin-top: 1.1rem; }
.r-find input { width: 100%; max-width: 28rem; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-size: 1rem; }
.r-found { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.r-found-top { margin-bottom: 1rem; }
.r-grp { padding-top: 1.5rem; margin-top: 1.6rem; border-top: 3px solid var(--fg); }
.r-grp:first-of-type { border-top: 0; margin-top: 0; padding-top: 1.3rem; }
.r-grp-h { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .2rem 1.1rem; margin-bottom: 1rem; }
.r-grp-h p { color: var(--muted); padding-bottom: .3rem; }
.r-grp-h p b { color: var(--fg); font-weight: 600; }
.r-big { font-family: var(--font-display); font-weight: 700; font-size: clamp(3rem, 13vw, 6.2rem); line-height: .82; color: var(--accent); letter-spacing: -.01em; }
.r-name { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.9rem, 6.5vw, 3.1rem); line-height: .96; text-transform: uppercase; color: var(--accent); overflow-wrap: anywhere; }
.r-name-xl { font-size: clamp(2.3rem, 9vw, 4.6rem); }
.r-strip { display: flex; gap: .95rem; overflow-x: auto; scroll-snap-type: x proximity; padding-top: 10px; margin-top: -10px; padding-bottom: .9rem; padding-left: 2px; margin-left: -2px; margin-right: calc(-1 * var(--gut-r)); padding-right: var(--gut-r); scrollbar-width: thin; }
.r-strip .k-tile { flex: none; width: 9.4rem; scroll-snap-align: start; }
.r-all { flex: none; width: 9.4rem; aspect-ratio: 3 / 4; align-self: flex-start; display: grid; align-content: center; justify-items: start; gap: .4rem; padding: 1rem; border: 1px dashed var(--line); border-radius: 3px 8px 8px 3px; text-align: left; transition: border-color .2s, transform .26s cubic-bezier(.22, 1, .36, 1), background .2s; }
.r-all:hover { border-color: var(--accent); background: rgba(226, 184, 102, .05); transform: translateY(-5px); }
.r-all b { font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; line-height: 1.05; color: var(--accent); }
.r-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.6rem, 1fr)); gap: 1.4rem .9rem; }
.r-grid .k-tile { content-visibility: auto; contain-intrinsic-size: 150px 250px; }
.r-more { margin-top: 1.2rem; }
.r-more > .r-grid { margin-top: .8rem; }

/* search results */
.r-res { margin-bottom: 1rem; color: var(--muted); }
.r-res b { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--accent); }
.r-hits { margin-top: 2.2rem; padding-top: 1.4rem; border-top: 3px solid var(--fg); max-width: 50rem; }
.r-hits h2 { display: flex; align-items: baseline; gap: .6rem; margin-bottom: .4rem; font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; letter-spacing: .02em; text-transform: uppercase; }
.r-hits h2 span { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); letter-spacing: 0; text-transform: none; }
.r-hit { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .15rem .8rem; align-items: baseline; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.r-hit b { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.r-hit span { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); white-space: nowrap; }
.r-hit p { grid-column: 1 / -1; font-size: .94rem; line-height: 1.5; opacity: .88; overflow-wrap: anywhere; }
.r-hit mark { background: var(--accent); color: var(--accent-fg); padding: 0 .15em; border-radius: 2px; }
.r-hit:hover b { color: var(--accent); }

/* group and project pages */
.r-back { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem 0; color: var(--muted); font-size: .95rem; text-align: left; }
.r-back:hover { color: var(--accent); }
.r-ghead { display: grid; gap: .5rem; padding-block: .8rem 1.4rem; }
.r-gsub { color: var(--muted); }
.r-gsub b { color: var(--fg); }
.r-gnote { max-width: 60ch; line-height: 1.5; }
.r-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.r-sec { padding-top: 1.5rem; margin-top: 1.5rem; border-top: 1px solid var(--line); display: grid; gap: .7rem; }
.r-sec h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; letter-spacing: .02em; text-transform: uppercase; }
.r-about-p { max-width: 46rem; }
.r-about-p p { line-height: 1.6; max-width: 64ch; }
.r-about-p :where(p, li) a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.r-src { display: grid; gap: .5rem; }
.r-src li { padding-left: 1.1rem; position: relative; line-height: 1.5; max-width: 64ch; }
.r-src li::before { content: ""; position: absolute; left: 0; top: .62em; width: .45rem; height: .45rem; background: var(--accent); border-radius: 1px; }

/* ---------- a dossier: toolbar, then its pages one under another ---------- */
.v-bar { position: sticky; top: 0; z-index: 60; background: var(--bg); border-bottom: 1px solid var(--line); }
.v-bar-in { display: flex; align-items: center; gap: .5rem; min-height: 3.4rem; padding-left: calc(var(--gut-l) - .4rem); padding-right: var(--gut-r); }
.v-tog { flex: none; border-color: var(--line); margin-right: auto; }
.v-tog .k-seg-b { padding: .5rem .7rem; font-weight: 500; }
.v-tog .k-seg-b[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); font-weight: 600; }
.v-title { display: none; flex: 1; min-width: 0; padding-left: .6rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v-btn { flex: none; display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .75rem; border: 2px solid var(--accent); border-radius: var(--radius); background: none; color: var(--accent); font-weight: 600; cursor: pointer; }
.v-btn:hover { background: var(--accent-soft); }
.v-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); }
.v-doc { flex: 1; background: var(--desk); padding: 1.2rem var(--gut-r) 3rem var(--gut-l); display: grid; gap: 1rem; justify-items: center; align-content: start; min-height: calc(100vh - 3.4rem); }
.v-head { width: 100%; max-width: 50rem; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.3rem, 4.8vw, 1.9rem); line-height: 1.08; text-wrap: balance; overflow-wrap: anywhere; }
.v-page { position: relative; width: 100%; max-width: 50rem; margin: 0; background: var(--paper); box-shadow: 0 2px 14px rgba(0, 0, 0, .55); overflow: hidden; scroll-margin-top: 4.2rem; user-select: text; contain: layout style paint; }
.v-page figcaption { position: absolute; right: .4rem; bottom: .4rem; z-index: 50; padding: .1rem .45rem; border-radius: 999px; background: rgba(15, 17, 14, .72); color: var(--fg); font-family: var(--font-mono); font-size: .7rem; pointer-events: none; user-select: none; }
/* the plain text of the page, shown until the page is drawn */
.v-text { position: absolute; inset: 0; overflow: hidden; padding: 7% 8%; color: #2a251c; font-family: var(--font-mono); font-size: .78rem; line-height: 1.5; }
.v-text p { margin-bottom: .5em; overflow-wrap: anywhere; }

/* Rezumat: a sheet from the bottom on phones, a panel on the right on wide screens */
.v-sum { position: fixed; left: 0; right: 0; bottom: 0; height: 86%; z-index: 70; display: flex; flex-direction: column; background: var(--surface); color: var(--fg); font-size: 1.02rem; border-top: 2px solid var(--accent); border-radius: 14px 14px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .55); }
.v-sum-h { flex: none; display: flex; align-items: center; justify-content: space-between; padding: .5rem calc(var(--gut-r) - .4rem) .5rem var(--gut-l); border-bottom: 1px solid var(--line); }
.v-sum-h b, .v-sec h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; letter-spacing: .02em; text-transform: uppercase; }
.v-sum-b { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 1rem var(--gut-r) 2.5rem var(--gut-l); display: flex; flex-direction: column; gap: .8rem; }
.v-sum-b > * { flex: none; }
.v-sum-b h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.55rem; line-height: 1.08; overflow-wrap: anywhere; }
.v-info { font-size: .86rem; color: var(--muted); overflow-wrap: anywhere; }
.v-sec { display: grid; gap: .6rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.v-sec h3 { display: flex; align-items: baseline; gap: .6rem; }
.v-sec h3 span { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); letter-spacing: 0; text-transform: none; }
.v-src { padding-top: 1rem; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.v-src a { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--line); }
.v-src a:hover { color: var(--accent); }

/* ---------- wider screens ---------- */
@media (min-width: 620px) {
  .r-btn { justify-content: flex-start; padding-inline: 1.2rem; gap: .7rem; }
  .r-btn b { font-size: 1.45rem; }
  .r-btn small { display: block; }
}
@media (min-width: 800px) {
  .r-top-in { min-height: 3.4rem; }
  .r-logo { font-size: 1.6rem; }
  .r-hero { padding-top: 2rem; }
  .v-tog { margin-right: 0; }
  .v-title { display: block; }
  .v-head { display: none; }
}
@media (min-width: 1000px) {
  .v-sum { left: auto; top: 0; height: auto; width: 27rem; border-top: 0; border-left: 2px solid var(--accent); border-radius: 0; box-shadow: -10px 0 40px rgba(0, 0, 0, .45); }
  .v-sum-h, .v-sum-b { padding-left: 1.2rem; }
  .v-doc.has-sum { padding-right: calc(27rem + 1.2rem); }
}
/* ---------- phones ---------- */
@media (max-width: 560px) {
  .r-strip .k-tile, .r-all { width: 8.2rem; }
  .r-arr-b a { padding: .45rem .8rem; }
  .k-sec-p { width: 4.3rem; }
  .v-bar-in { gap: .35rem; font-size: .9rem; }
  .v-tog .k-seg-b { padding: .5rem .5rem; }
  .v-btn { padding: .5rem .55rem; }
  .v-btn .k-ic { display: none; }
  /* home + back + the two buttons have to fit a phone: narrower arrows, and "Întreabă" as its sign only */
  .v-bar .k-ib { width: 1.9rem; }
  .v-bar .k-ib + .k-ib { margin-left: -.2rem; }
  .v-aibtn .k-ic { display: inline-block; }
  .v-aibtn span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .k-tile-th, .k-tile-w::before, .k-tile-w::after, .k-tile b, .r-all, .k-chip { transition: none; }
  .k-tile:hover .k-tile-th, .k-tile:hover .k-tile-w::before, .k-tile:hover .k-tile-w::after, .r-all:hover { transform: none; }
}
