/* ============================================================
   THE QUIET FILE — stylesheet
   No external fonts or libraries. Works offline.
   ============================================================ */

:root {
  --bg:        #0b0d10;
  --bg-2:      #12161b;
  --panel:     #171c22;
  --panel-2:   #1d232b;
  --line:      #2a313a;
  --text:      #e9e6df;
  --muted:     #9aa1a9;
  --gold:      #d2a75a;
  --gold-soft: #e3c48d;
  --button-bg: #d8dce2;
  --button-hover: #eef1f4;
  --red:       #b4544c;
  --shadow:    0 18px 50px rgba(0, 0, 0, .45);
  --max:       1120px;
  --radius:    14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 .6em;
  letter-spacing: -.01em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.3rem; }
p  { margin: 0 0 1.1em; }

a { color: var(--gold-soft); text-decoration: none; }
a:hover { color: #fff; text-decoration: underline; }

img { max-width: 100%; display: block; }

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.narrow { max-width: 760px; margin-inline: auto; }

.eyebrow {
  font-size: .74rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: .8rem;
}

.muted { color: var(--muted); }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 13, 16, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { text-decoration: none; color: var(--text); }

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  overflow: hidden;
  flex: none;
  display: block;
}
.brand-mark img { display: block; width: 100%; height: 100%; }

.brand-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav a {
  color: var(--muted);
  font-size: .93rem;
  text-decoration: none;
}
.nav a:hover { color: var(--text); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 1rem;
  cursor: pointer;
}

/* ---------- more languages (Google Translate) ---------- */

.lang-label {
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}



.header-inner .brand { order: 1; }
.header-inner .nav { order: 2; }
.header-inner .translate-wrap { order: 3; margin: 0; flex: none; flex-wrap: nowrap; }
.header-inner .nav-toggle { order: 4; }

.translate-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
}

#site-lang-select {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 9px;
  font-size: .85rem;
  font-family: inherit;
  max-width: 180px;
  cursor: pointer;
}
#site-lang-select:focus { outline: 2px solid var(--gold); outline-offset: 1px; }

/* Google's engine stays hidden. Readers only see our English menu. */
#google_translate_element {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

/* Hide Google's translate bar. Our own menu already offers "Show original" via English. */
iframe[id^=":"],
.goog-te-banner-frame { display: none !important; }
body { top: 0 !important; }

/* Google adds a hover tooltip after translating. Hide its original-text/copy controls. */
#goog-gt-tt,
#goog-gt-vt,
.goog-tooltip,
.goog-te-balloon,
.VIpgJd-yAWNEb-L7lbkb,
.VIpgJd-yAWNEb-hvhgNd {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Google also highlights translated text on hover. Keep it visually calm. */
html.translated-ltr font,
html.translated-rtl font,
.VIpgJd-yAWNEb-VIpgJd-fmcmS-sn54Q {
  background-color: transparent !important;
  box-shadow: none !important;
  position: static !important;
}

/* ---------- app buttons ---------- */

.app-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 26px;
}

.app-actions .btn { width: auto; }

/* ---------- new story banner ---------- */

.story-banner {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 200;
  width: min(620px, calc(100% - 28px));
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel-2);
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 13px 16px;
  box-shadow: var(--shadow);
  font-size: .92rem;
}
.story-banner[hidden] { display: none; }
.story-banner span { flex: 1; }
.story-banner a { color: var(--gold-soft); font-weight: 700; white-space: nowrap; }
.story-banner button {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary { background: var(--button-bg); color: #14100a; }
.btn-primary:hover { background: var(--button-hover); color: #14100a; }
a.btn-primary, .nav a.btn-primary { color: #14100a; }
a.btn-primary:hover, .nav a.btn-primary:hover { color: #14100a; }

.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-soft); }

.btn-small { padding: 8px 16px; font-size: .85rem; }

/* ---------- hero ---------- */

.hero {
  padding: clamp(64px, 11vw, 120px) 0 clamp(56px, 8vw, 90px);
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(210, 167, 90, .10), transparent 70%),
    radial-gradient(700px 400px at 5% 20%, rgba(180, 84, 76, .08), transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: clamp(30px, 6vw, 70px);
  align-items: center;
}

.hero h1 { max-width: 16ch; }

.hero-lead {
  font-size: 1.14rem;
  color: var(--muted);
  max-width: 60ch;
  margin-bottom: 1.8rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.file-card {
  background: linear-gradient(155deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.file-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--red), transparent);
}
.file-card .stamp {
  display: inline-block;
  border: 1px solid var(--red);
  color: var(--red);
  padding: 3px 10px;
  border-radius: 4px;
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  transform: rotate(-3deg);
  margin-bottom: 22px;
}
.file-card dl { margin: 0; }
.file-card dt {
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 16px;
}
.file-card dd {
  margin: 2px 0 0;
  font-family: Georgia, serif;
  font-size: 1.05rem;
}

/* ---------- sections ---------- */

section.block { padding: clamp(56px, 8vw, 90px) 0; }
section.block + section.block { border-top: 1px solid var(--line); }

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}
.section-head p { color: var(--muted); max-width: 52ch; margin: 0; }

/* ---------- search ---------- */

.search-row {
  display: flex;
  gap: 10px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.search-row input {
  flex: 1 1 260px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: .95rem;
  font-family: inherit;
}
.search-row input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.search-note { color: var(--muted); font-size: .85rem; align-self: center; }

/* ---------- cards ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  text-decoration: none;
  color: var(--text);
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  background: var(--panel-2);
  text-decoration: none;
  color: var(--text);
}
.card .meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 14px;
}
.card .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--line); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .95rem; margin-bottom: 18px; }
.card .lesson {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  font-size: .85rem;
  color: var(--gold-soft);
}
.card .read { font-size: .82rem; color: var(--muted); margin-top: 8px; }

/* ---------- steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  counter-reset: step;
}
.step {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  counter-increment: step;
}
.step::before {
  content: "0" counter(step);
  display: block;
  font-family: Georgia, serif;
  color: var(--gold);
  font-size: 1.5rem;
  margin-bottom: 10px;
}
.step h3 { font-size: 1.1rem; }
.step p { color: var(--muted); margin: 0; font-size: .95rem; }

/* ---------- subscribe ---------- */

.subscribe {
  background: linear-gradient(135deg, #191b1f, #12161b);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(30px, 5vw, 52px);
  text-align: center;
  box-shadow: var(--shadow);
}
.subscribe h2 { max-width: 20ch; margin-inline: auto; }
.subscribe p { color: var(--muted); max-width: 55ch; margin-inline: auto 1.5rem; }
.sub-embed-wrap { display: flex; justify-content: center; margin-top: 22px; }
.sub-embed {
  width: 100%;
  max-width: 480px;
  height: 320px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.sub-fallback { font-size: .85rem; margin-top: 14px; }
.sub-fallback a { color: var(--gold-soft); }

/* ---------- article ---------- */

.article-head {
  padding: clamp(48px, 7vw, 80px) 0 34px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(700px 300px at 70% 0%, rgba(210,167,90,.07), transparent 70%);
}
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 24px; }
.breadcrumb a { color: var(--muted); }
.article-head h1 { max-width: 22ch; }
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  color: var(--muted);
  font-size: .88rem;
  margin-top: 20px;
}
.article-meta span { display: inline-flex; align-items: center; gap: 7px; }

.article-body { padding: clamp(40px, 6vw, 64px) 0; }
.article-body p, .article-body li { color: #d7d5d0; }
.article-body h2 { margin-top: 2.2em; font-size: 1.65rem; }
.article-body h3 { margin-top: 1.8em; }
.article-body ul, .article-body ol { padding-left: 1.3em; }
.article-body li { margin-bottom: .5em; }

.note {
  background: var(--panel);
  border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0;
  padding: 18px 22px;
  margin: 2em 0;
  color: var(--muted);
  font-size: .95rem;
}

.quick-facts {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 2em 0;
}
.quick-facts .eyebrow { margin-bottom: .8rem; }
.quick-facts dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px 24px;
}
.quick-facts dt {
  color: var(--gold);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.quick-facts dd { margin: 0; color: #d7d5d0; font-size: .94rem; }

.faq { border-top: 1px solid var(--line); margin-top: 1.2em; }
.faq h3 { margin-bottom: .35em; font-family: Georgia, serif; }
.faq p { margin-bottom: 1.2em; }

.lesson-box {
  background: linear-gradient(135deg, rgba(210,167,90,.13), rgba(180,84,76,.08));
  border: 1px solid rgba(210,167,90,.4);
  border-radius: var(--radius);
  padding: 28px 30px;
  margin: 2.6em 0;
}
.lesson-box .eyebrow { margin-bottom: .5rem; }
.lesson-box p { font-family: Georgia, serif; font-size: 1.25rem; margin: 0; }

.sources {
  border-top: 1px solid var(--line);
  margin-top: 3em;
  padding-top: 22px;
  font-size: .88rem;
  color: var(--muted);
}
.sources ul { padding-left: 1.2em; }

.article-foot {
  border-top: 1px solid var(--line);
  padding: 30px 0 60px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- page intro (about / disclaimer) ---------- */

.page-intro {
  padding: clamp(52px, 8vw, 86px) 0 0;
}
.page-intro h1 { max-width: 18ch; }
.page-intro .lead { color: var(--muted); font-size: 1.12rem; max-width: 62ch; }
.page-content { padding: 26px 0 80px; }
.page-content h2 { margin-top: 2em; }

.fact-list {
  list-style: none;
  padding: 0;
  margin: 26px 0;
  display: grid;
  gap: 12px;
}
.fact-list li {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  color: var(--muted);
}
.fact-list strong { color: var(--text); }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 42px 0 30px;
  font-size: .88rem;
  color: var(--muted);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); }
.footer-note { margin-top: 24px; font-size: .8rem; max-width: 70ch; }

/* ---------- responsive ---------- */

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .file-card { max-width: 480px; }
  .nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    padding: 18px 20px 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .nav.open { display: flex; }
  .nav-toggle { display: inline-block; }
  .header-inner .translate-wrap { order: 2; }
  .header-inner .nav-toggle { order: 3; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { width: min(var(--max), calc(100% - 28px)); }
  .card, .step, .subscribe { padding: 22px; }
  .btn { width: 100%; }
  .hero-actions .btn { width: 100%; }
  .brand-name { display: none; }
  .header-inner { gap: 8px; }
  .header-inner .lang-label { display: none; }
  #site-lang-select { max-width: 104px; font-size: .8rem; }
  .hero h1 { font-size: 2rem; }
  .file-card { padding: 22px; }
  .app-actions { flex-direction: column; }
  .app-actions .btn { width: 100%; }
  .story-banner { flex-wrap: wrap; font-size: .85rem; bottom: 10px; }
  .story-banner span { flex-basis: 100%; }
}

/* ---------- print ---------- */

@media print {
  .site-header, .site-footer, .subscribe, .search-row, .hero-actions { display: none; }
  body { background: #fff; color: #111; }
  .article-body p, .article-body li { color: #222; }
}
