/* ============================================================================
   screen.css — online help site chrome (layered on fonts.css + brand.css)
   ========================================================================== */
:root { --sidebar: 300px; --topbar: 60px; --maxread: 46rem; }

html { scroll-behavior: smooth; }
body.site { background: #fff; color: var(--ink); }

/* ---- Top bar ------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar);
  display: flex; align-items: center; gap: 1rem;
  padding: 0 1.25rem;
  background: var(--ink);
  color: #fff;
}
.topbar__brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-sub); font-weight: 600; color: #fff; text-decoration: none; }
.topbar__brand img { height: 26px; }
.topbar__brand .series { color: var(--orange); font-weight: 700; letter-spacing: 0.04em; }
.topbar__search { margin-left: auto; position: relative; }
.topbar__search input {
  font-family: var(--font-sub); font-size: 0.9rem;
  width: 240px; max-width: 46vw;
  padding: 0.45rem 0.8rem;
  border: 1px solid #3a3d47; border-radius: 8px;
  background: #1c1e24; color: #fff;
}
.topbar__search input::placeholder { color: #8a8d97; }
.search__results {
  position: absolute; right: 0; top: 110%;
  width: 380px; max-width: 80vw;
  background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 30px rgba(36,38,45,0.18);
  max-height: 60vh; overflow: auto; display: none; padding: 0.4rem;
}
.search__results.open { display: block; }
.search__hit { display: block; padding: 0.55rem 0.7rem; border-radius: 7px; text-decoration: none; color: var(--ink); }
.search__hit:hover { background: var(--neutral); }
.search__hit .h { font-family: var(--font-sub); font-weight: 600; }
.search__hit .c { font-size: 0.82rem; color: var(--gray); }
.search__hit .g { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--orange-d); font-weight: 700; }
.search__empty { padding: 0.8rem; color: var(--gray); font-family: var(--font-sub); font-size: 0.9rem; }

/* ---- Layout -------------------------------------------------------------- */
.layout { display: grid; grid-template-columns: var(--sidebar) 1fr; align-items: start; }
.sidebar {
  position: sticky; top: var(--topbar);
  height: calc(100vh - var(--topbar));
  overflow: auto;
  border-right: 1px solid var(--line);
  padding: 1.5rem 1rem 3rem 1.5rem;
  background: #FBFBF9;
}
.sidebar__guide { font-family: var(--font-serif); font-weight: 700; font-size: 1.05rem; margin: 0 0 0.2rem; }
.sidebar__part {
  font-family: var(--font-sub); font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--olive-d);
  margin: 1.3rem 0 0.4rem;
}
.sidebar__link {
  display: flex; gap: 0.5rem; align-items: baseline;
  font-family: var(--font-sub); font-size: 0.9rem;
  text-decoration: none; color: var(--gray);
  padding: 0.28rem 0.5rem; border-radius: 6px; margin-left: -0.5rem;
}
.sidebar__link .n { color: var(--orange-d); font-weight: 700; min-width: 1.7em; }
.sidebar__link:hover { background: var(--neutral); color: var(--ink); }
.sidebar__link.is-active { background: #FBEFE4; color: var(--ink); font-weight: 600; }

.content { padding: 2.5rem clamp(1.25rem, 5vw, 4rem); min-width: 0; }
.content .doc { max-width: var(--maxread); }
.breadcrumb {
  font-family: var(--font-sub); font-size: 0.8rem; color: var(--gray);
  margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--olive-d); text-decoration: none; }

/* prev / next */
.pager {
  display: flex; justify-content: space-between; gap: 1rem;
  margin: 3rem 0 1rem; max-width: var(--maxread);
  border-top: 1px solid var(--line); padding-top: 1.5rem;
}
.pager a {
  flex: 1; text-decoration: none; padding: 0.9rem 1.1rem;
  border: 1px solid var(--line); border-radius: 10px;
  font-family: var(--font-sub);
}
.pager a:hover { border-color: var(--orange); }
.pager .dir { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--orange-d); font-weight: 700; }
.pager .t { display: block; font-weight: 600; color: var(--ink); margin-top: 0.15rem; }
.pager .next { text-align: right; }

/* ---- Landing page -------------------------------------------------------- */
.hero {
  background: var(--ink); color: #fff; position: relative; overflow: hidden;
  padding: 3.5rem clamp(1.5rem,6vw,5rem) 8rem;
}
.hero__art { position: absolute; left: 0; right: 0; bottom: 0; height: 200px; width: 100%; }
.hero__kicker { font-family: var(--font-sub); font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--orange); font-size: 0.85rem; }
.hero__title { font-family: var(--font-serif); font-weight: 700; font-size: clamp(2.2rem,5vw,3.4rem); margin: 0.4rem 0 0.5rem; line-height: 1.05; }
.hero__sub { font-family: var(--font-sub); font-size: 1.1rem; color: #D8D5CB; max-width: 34rem; position: relative; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; max-width: 60rem; margin: -4rem auto 4rem; padding: 0 1.5rem; position: relative; z-index: 2; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 1.6rem 1.6rem 1.8rem; text-decoration: none; color: var(--ink);
  box-shadow: 0 8px 24px rgba(36,38,45,0.08);
  display: flex; flex-direction: column;
}
.card:hover { border-color: var(--orange); }
.card__tag { font-family: var(--font-sub); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--orange-d); }
.card__title { font-family: var(--font-serif); font-weight: 700; font-size: 1.5rem; margin: 0.3rem 0 0.5rem; }
.card__desc { font-size: 0.95rem; color: var(--gray); }
.card__go { font-family: var(--font-sub); font-weight: 700; color: var(--olive-d); margin-top: 1rem; }
.landing-meta { max-width: 60rem; margin: 0 auto 4rem; padding: 0 1.5rem; font-family: var(--font-sub); font-size: 0.85rem; color: var(--gray); }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .cards { grid-template-columns: 1fr; }
  .qref, .twins { grid-template-columns: 1fr; }
}

/* On screen, print-only page furniture is hidden */
.cover, .divider, .toc { display: none; }
