/* ==========================================================================
   EYES ONLY — brand tokens
   Background #050505 · Ivory #EDE6DA · Pure white (body copy) #FFFFFF
   Gold accent #C9A76A · Display: Lora · Body/UI: Liberation Sans (Arial fallback)
   ========================================================================== */

@font-face {
  font-family: 'Lora';
  src: local('Lora');
}

:root {
  --black: #050505;
  --panel: #0e0e0e;
  --panel-2: #151515;
  --hairline: #262320;
  --ivory: #EDE6DA;
  --white: #FFFFFF;
  --muted: #9c968c;
  --gold: #C9A76A;
  --gold-soft: rgba(201,167,106,0.4);
  --font-display: 'Lora', 'Playfair Display', Georgia, serif;
  --font-body: 'Liberation Sans', Arial, sans-serif;
  --radius: 2px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--black);
  color: var(--ivory);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  height: 100%;
}
button { font-family: inherit; cursor: pointer; }
.hidden { display: none !important; }
.tm { font-size: 0.4em; vertical-align: super; margin-left: 2px; }
.gold { color: var(--gold); }

/* ---------------- Age gate ---------------- */
.age-gate {
  position: fixed; inset: 0; z-index: 100;
  background: var(--black);
  display: flex; align-items: center; justify-content: center;
  padding: 32px 28px calc(28px + var(--safe-bottom));
}
.age-gate-inner { max-width: 420px; text-align: center; }
.age-gate-mark { width: 96px; height: auto; margin-bottom: 18px; }
.wordmark {
  font-family: var(--font-display);
  font-size: 2rem; letter-spacing: 0.12em;
  color: var(--ivory); margin: 0 0 6px;
  font-weight: 500;
}
.subline {
  font-family: var(--font-display);
  letter-spacing: 0.25em; font-size: 0.72rem; margin: 0 0 28px;
}
.age-gate-text {
  font-size: 0.95rem; line-height: 1.6; color: var(--ivory); opacity: 0.9;
  margin-bottom: 28px;
}
.age-gate-actions { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.btn {
  border: none; border-radius: var(--radius);
  padding: 14px 20px; font-size: 0.95rem; font-weight: 700;
  letter-spacing: 0.04em; font-family: var(--font-body);
}
.btn-gold { background: var(--gold); color: #1a1408; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--hairline); }
.age-gate-lang { display: flex; gap: 8px; justify-content: center; }
.lang-pill {
  background: transparent; border: 1px solid var(--hairline); color: var(--muted);
  padding: 6px 14px; border-radius: 20px; font-size: 0.78rem; letter-spacing: 0.05em;
}
.lang-pill.active { border-color: var(--gold); color: var(--gold); }

/* ---------------- App shell ---------------- */
.app { min-height: 100%; padding-bottom: calc(64px + var(--safe-bottom)); }

.masthead {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(12px + var(--safe-top)) 16px 12px;
  background: rgba(5,5,5,0.92); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--hairline);
}
.icon-btn {
  background: none; border: none; color: var(--ivory);
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
}
.masthead-brand { display: flex; align-items: center; gap: 8px; }
.masthead-mark { width: 26px; height: auto; }
.masthead-word {
  font-family: var(--font-display); font-size: 1.05rem; letter-spacing: 0.08em; color: var(--ivory);
}
.lang-toggle {
  background: transparent; border: 1px solid var(--hairline); color: var(--gold);
  font-size: 0.75rem; letter-spacing: 0.05em; padding: 6px 10px; border-radius: 14px;
  font-weight: 700;
}

/* ---------------- Drawer ---------------- */
.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: 82%; max-width: 320px;
  background: var(--panel); z-index: 41; transform: translateX(-105%);
  transition: transform 0.28s ease; padding-top: var(--safe-top);
  border-right: 1px solid var(--hairline);
  display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.scrim {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 40;
  opacity: 0; pointer-events: none; transition: opacity 0.28s ease;
}
.scrim.show { opacity: 1; pointer-events: auto; }
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; font-family: var(--font-display); letter-spacing: 0.08em;
  font-size: 1rem; border-bottom: 1px solid var(--hairline);
}
.dept-list { list-style: none; margin: 0; padding: 8px 0; flex: 1; overflow-y: auto; }
.dept-list li { border-bottom: 1px solid var(--hairline); }
.dept-list button {
  width: 100%; text-align: left; background: none; border: none; color: var(--ivory);
  padding: 15px 20px; font-size: 0.95rem; font-weight: 700; display: flex;
  align-items: center; gap: 12px;
}
.dept-list button .dept-ru { display: block; font-weight: 400; font-size: 0.76rem; color: var(--muted); margin-top: 2px; }
.dept-list button.active { color: var(--gold); }
.dept-icon { width: 8px; height: 8px; border-radius: 1px; background: var(--gold); transform: rotate(45deg); opacity: 0; flex-shrink: 0; }
.dept-list button.active .dept-icon { opacity: 1; }
.drawer-footer { padding: 14px 20px calc(20px + var(--safe-bottom)); border-top: 1px solid var(--hairline); }
.drawer-link {
  display: block; width: 100%; text-align: left; background: none; border: none;
  color: var(--muted); padding: 10px 0; font-size: 0.85rem;
}

/* ---------------- Issue hero ---------------- */
.issue-hero {
  padding: 28px 18px 10px; border-bottom: 1px solid var(--hairline); margin-bottom: 4px;
}
.issue-eyebrow {
  font-size: 0.7rem; letter-spacing: 0.18em; color: var(--gold); font-weight: 700; margin-bottom: 8px;
}
.issue-title {
  font-family: var(--font-display); font-size: 1.6rem; line-height: 1.25; color: var(--white); margin: 0 0 8px;
}
.issue-sub { font-size: 0.88rem; color: var(--muted); line-height: 1.5; }

/* ---------------- Feed ---------------- */
.feed { padding: 6px 16px 30px; }
.dept-heading {
  font-family: var(--font-display); font-size: 1.1rem; letter-spacing: 0.03em;
  color: var(--ivory); margin: 22px 0 12px; display: flex; align-items: baseline; gap: 10px;
}
.dept-heading .ru { font-size: 0.72rem; color: var(--muted); font-family: var(--font-body); letter-spacing: 0.06em; }

.card {
  background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--radius);
  margin-bottom: 14px; overflow: hidden;
}
.card-media { width: 100%; background: var(--panel-2); position: relative; overflow: hidden; }
.card-media img, .card-media video { width: 100%; height: auto; display: block; }
.card-media .card-badge {
  position: absolute; top: 10px; left: 10px; background: rgba(5,5,5,0.75); color: var(--gold);
  font-size: 0.65rem; letter-spacing: 0.1em; padding: 4px 8px; border-radius: 12px; font-weight: 700;
}
.card-body { padding: 14px 16px 16px; }
.card-title { font-family: var(--font-display); font-size: 1.05rem; color: var(--white); margin: 0 0 6px; line-height: 1.3; }
.card-excerpt { font-size: 0.85rem; color: var(--muted); line-height: 1.5; margin: 0 0 10px; }
.card-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.72rem; color: var(--muted); }
.card-meta .byline { color: var(--gold); }

/* ---------------- Gallery (multi-image pictorials) ---------------- */
.article-gallery img { width: 100%; height: auto; display: block; margin-bottom: 10px; }
.article-gallery img:last-child { margin-bottom: 0; }

/* ---------------- Article view ---------------- */
.article-view {
  position: fixed; inset: 0; z-index: 60; background: var(--black); overflow-y: auto;
  padding-top: var(--safe-top);
}
.article-close {
  position: sticky; top: calc(8px + var(--safe-top)); left: 8px; margin: 8px; z-index: 5;
  background: rgba(15,15,15,0.8); border-radius: 50%;
}
.article-content { padding: 0 20px 60px; max-width: 640px; margin: 0 auto; }
.article-content .card-media { margin: 0 -20px 20px; width: calc(100% + 40px); border-radius: 0; border: none; }
.article-eyebrow { color: var(--gold); font-size: 0.72rem; letter-spacing: 0.14em; font-weight: 700; margin-bottom: 10px; }
.article-title { font-family: var(--font-display); font-size: 1.7rem; line-height: 1.3; color: var(--white); margin: 0 0 12px; }
.article-byline { font-size: 0.8rem; color: var(--muted); margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--hairline); }
.article-body { font-size: 1rem; line-height: 1.75; color: var(--ivory); }
.article-body p { margin: 0 0 1.2em; }
.advertise-mail { color: var(--gold); font-weight: 700; font-size: 1.05rem; text-decoration: none; }

/* ---------------- Account overlay ---------------- */
.account-content { max-width: 560px; margin: 0 auto; padding: 24px 20px 60px; }
.account-pitch { color: var(--muted); line-height: 1.65; font-size: 0.92rem; margin: 12px 0 24px; }
.acct-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.acct-tab {
  flex: 1; background: none; border: 1px solid var(--hairline); color: var(--muted);
  padding: 10px; border-radius: 3px; font-weight: 700; font-size: 0.85rem;
}
.acct-tab.active { border-color: var(--gold); color: var(--gold); }
.acct-pane label { display: block; margin-bottom: 14px; font-size: 0.8rem; color: var(--muted); }
.acct-pane input {
  display: block; width: 100%; margin-top: 6px; background: var(--panel-2);
  border: 1px solid var(--hairline); color: var(--ivory); padding: 11px 12px;
  border-radius: 3px; font-size: 1rem;
}
.acct-pane .btn-gold { width: 100%; margin-top: 6px; }
.article-topbar { padding: 14px 16px 0; }

/* ---------------- Comments ---------------- */
.comments-section { max-width: 680px; margin: 0 auto; padding: 8px 20px 70px; border-top: 1px solid var(--hairline); }
.comments-heading { font-family: var(--font-display); color: var(--gold); font-size: 1rem; letter-spacing: 0.06em; margin: 22px 0 14px; }
.comment { padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.comment-author { color: var(--gold); font-size: 0.78rem; font-weight: 700; margin-bottom: 4px; }
.comment-text { color: var(--ivory); font-size: 0.92rem; line-height: 1.55; white-space: pre-wrap; }
.comment-empty { color: var(--muted); font-size: 0.88rem; }
.comment-composer { margin-top: 16px; }
.comment-composer textarea {
  width: 100%; background: var(--panel-2); border: 1px solid var(--hairline);
  color: var(--ivory); padding: 11px 12px; border-radius: 3px; font-size: 0.95rem;
  font-family: inherit; resize: vertical;
}
.comment-composer .btn-gold { margin-top: 10px; }
.comment-nudge { margin-top: 16px; }
.link-gold { background: none; border: none; color: var(--gold); font-weight: 700; font-size: 0.9rem; text-decoration: underline; padding: 0; }

/* ---------------- Tab bar ---------------- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  display: flex; background: rgba(5,5,5,0.96); backdrop-filter: blur(6px);
  border-top: 1px solid var(--hairline); padding-bottom: var(--safe-bottom);
}
.tab {
  flex: 1; background: none; border: none; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 4px 8px; font-size: 0.62rem; letter-spacing: 0.03em;
}
.tab.active { color: var(--gold); }

/* ---------------- Misc ---------------- */
@media (min-width: 720px) {
  .feed { max-width: 640px; margin: 0 auto; }
  .issue-hero { max-width: 640px; margin: 0 auto; }
}
