/* EchoLust. Fraunces for display, Outfit for text. Both files are variable. */

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-roman.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("/assets/fonts/outfit.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #1c1412;
  --muted: #5c514a;
  --wine: #6e1c2b;
  --wine-deep: #4e121e;
  --ivory: #f3eee6;
  --paper: #fbf7f1;
  --brass: #e4c98a;
  --brass-ink: #7a5e28;
  --line: #e3d8cc;
  --measure: 68ch;
  --page: 72rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: "Outfit", sans-serif;
  font-weight: 430;
  font-size: 1.0625rem;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--wine);
}

a:hover {
  color: var(--wine-deep);
}

:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 3px;
}

::selection {
  background: var(--brass);
  color: var(--ink);
}

.skip-link,
.skip {
  position: absolute;
  left: 1rem;
  top: 0;
  transform: translateY(-140%);
  background: var(--wine);
  color: var(--ivory);
  text-decoration: none;
  padding: 0.65rem 1rem;
  z-index: 20;
  font-weight: 560;
}

.skip-link:focus,
.skip:focus {
  transform: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.rule-wine,
.rule-brass {
  display: block;
  border: 0;
  margin: 0;
}

.rule-wine {
  height: 6px;
  background: var(--wine);
}

.rule-brass {
  height: 2px;
  background: var(--brass);
}

.wrap {
  width: min(var(--page), calc(100% - 2.4rem));
  margin-inline: auto;
}

.site-header {
  background: var(--ivory);
}

.mast-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding: 1.15rem 0 0.95rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: block;
  line-height: 0;
}

.brand img {
  width: min(245px, 72vw);
  height: auto;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
  list-style: none;
  margin: 0;
  padding: 0 0 0.2rem;
}

.nav-list a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 520;
  font-size: 0.95rem;
  letter-spacing: 0.045em;
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  color: var(--wine);
  box-shadow: inset 0 -2px 0 var(--wine);
}

article h1 {
  max-width: min(18ch, 100%);
}

main {
  padding: 2.4rem 0 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem 2.5rem;
  align-items: end;
}

.issue {
  margin: 0;
  font-weight: 580;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.76rem;
  color: var(--brass-ink);
}

h1,
h2,
h3 {
  font-family: "Fraunces", serif;
  font-weight: 580;
  font-optical-sizing: auto;
  letter-spacing: -0.025em;
  line-height: 1.04;
  color: var(--ink);
}

h1 {
  margin: 0.4rem 0 0.85rem;
  font-size: clamp(2.7rem, 6.4vw, 4.9rem);
  max-width: 16ch;
}

.piece h1,
article h1 {
  max-width: 22ch;
  font-size: clamp(2.5rem, 5.4vw, 4.4rem);
}

/* Fallback guides that use an unclassed header still sit on the ivory page. */
body:has(> header:not([class])) {
  border-top: 6px solid var(--wine);
  box-shadow: inset 0 2px 0 var(--brass);
}

body > header:not([class]),
body > footer:not([class]) {
  width: min(68ch, calc(100% - 2.4rem));
  margin-inline: auto;
}

body > header:not([class]) {
  padding-top: 1.3rem;
}

body > header:not([class]) p {
  margin: 0.15rem 0;
}

body > header:not([class]) .publication,
body > header:not([class]) p:first-child {
  font-family: "Fraunces", serif;
  font-weight: 560;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
}

body:has(> header:not([class])) > main,
body:has(> header:not([class])) > article {
  width: min(68ch, calc(100% - 2.4rem));
  margin: 1.4rem auto 2.5rem;
}

body > footer:not([class]) {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 1rem 0 2rem;
}

.page-intro h1 {
  max-width: 18ch;
  font-size: clamp(2.4rem, 5vw, 4rem);
}

h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.8rem, 3vw, 2.45rem);
}

h3 {
  margin: 0.15rem 0 0.45rem;
  font-size: clamp(1.45rem, 2vw, 1.85rem);
  font-weight: 560;
}

.byline {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.method-note {
  margin: 0.85rem 0 0;
  max-width: 42rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 1rem;
}

.deck {
  margin: 0;
  max-width: 40rem;
  font-family: "Fraunces", serif;
  font-style: italic;
  font-weight: 460;
  font-optical-sizing: auto;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  line-height: 1.35;
  color: var(--wine);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1.3rem;
  margin: 1.5rem 0 0;
}

.button {
  display: inline-block;
  background: var(--wine);
  color: var(--ivory);
  text-decoration: none;
  padding: 0.78rem 1.15rem;
  font-weight: 560;
  letter-spacing: 0.01em;
}

.button:hover {
  background: var(--wine-deep);
  color: var(--ivory);
}

.text-link {
  font-weight: 560;
  text-underline-offset: 0.2em;
}

.vol {
  margin: 0;
  text-align: right;
  color: var(--wine);
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-optical-sizing: auto;
  line-height: 0.85;
}

.vol span {
  display: block;
  font-size: clamp(5rem, 12vw, 8.2rem);
  font-weight: 560;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  list-style: none;
  margin: 2.4rem 0 0;
  padding: 0;
}

.facts li {
  background: var(--paper);
  padding: 1rem 1.1rem 1.15rem;
}

.facts strong {
  display: block;
  font-family: "Fraunces", serif;
  font-optical-sizing: auto;
  font-weight: 560;
  font-size: clamp(2rem, 4vw, 2.7rem);
  line-height: 1;
  color: var(--wine);
  margin-bottom: 0.35rem;
}

.facts span {
  color: var(--muted);
  font-size: 0.98rem;
}

.section {
  margin-top: 3.4rem;
}

.prose {
  max-width: var(--measure);
}

.prose p,
.prose li {
  font-size: 1.075rem;
}

.prose p {
  margin: 0 0 1rem;
}

.prose ul,
.prose ol {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.prose li + li {
  margin-top: 0.35rem;
}

.prose a {
  text-underline-offset: 0.16em;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(16rem, 0.8fr);
  gap: 1.5rem 2rem;
  align-items: start;
}

.panel {
  background: var(--wine);
  color: var(--ivory);
  padding: 1.35rem 1.3rem 1.45rem;
}

.panel h2,
.panel p,
.panel li {
  color: var(--ivory);
}

.panel a {
  color: var(--brass);
  font-weight: 560;
}

.panel ul {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
}

.guide-list {
  display: grid;
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-card,
.empty-state {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1.1rem 1.2rem 1.2rem;
}

.empty-state {
  margin: 0;
  max-width: 46rem;
}

.guide-card .kicker,
.kicker {
  margin: 0;
  color: var(--brass-ink);
  font-size: 0.82rem;
  font-weight: 580;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guide-card h3 a {
  color: inherit;
  text-decoration: none;
}

.guide-card h3 a:hover {
  color: var(--wine);
}

.guide-card p {
  margin: 0.35rem 0 0;
}

.meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.filter-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  gap: 0.35rem;
  margin: 1.6rem 0 0.4rem;
  padding: 0.85rem 0 0.9rem;
  background: color-mix(in srgb, var(--ivory) 92%, transparent);
  border-bottom: 1px solid var(--line);
}

.filter-label {
  font-weight: 580;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--brass-ink);
}

.filter-row {
  display: flex;
  gap: 0.6rem;
  align-items: end;
}

.filter-bar input[type="search"] {
  flex: 1;
  width: 100%;
  appearance: none;
  background: transparent;
  color: var(--ink);
  border: 0;
  border-bottom: 2px solid var(--ink);
  border-radius: 0;
  padding: 0.55rem 0.1rem 0.45rem;
  font: inherit;
  font-size: 1.2rem;
  font-weight: 460;
}

.filter-bar input[type="search"]:focus-visible {
  outline: none;
  border-bottom-color: var(--wine);
}

.filter-bar button {
  background: var(--ink);
  color: var(--ivory);
  border: 0;
  font: inherit;
  font-weight: 560;
  padding: 0.7rem 0.95rem;
  cursor: pointer;
}

.filter-bar button:hover {
  background: var(--wine);
}

#filter-status {
  margin: 0.2rem 0 0;
  color: var(--muted);
  min-height: 1.4em;
}

#filter-empty {
  margin: 1rem 0;
}

.niche-list {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
}

.niche-row {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr);
  gap: 0.4rem 1rem;
  align-items: baseline;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 7rem;
}

.niche-row[hidden] {
  display: none;
}

.rank {
  font-family: "Fraunces", serif;
  font-optical-sizing: auto;
  font-weight: 560;
  font-size: 1.35rem;
  color: var(--wine);
  font-variant-numeric: tabular-nums;
}

.niche-title {
  margin: 0;
  font-family: "Fraunces", serif;
  font-optical-sizing: auto;
  font-weight: 560;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.niche-title a {
  color: inherit;
  text-decoration: none;
}

.niche-title a:hover {
  color: var(--wine);
}

.niche-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.8rem;
  align-items: baseline;
  margin: 0.28rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.niche-name {
  color: var(--ink);
  font-weight: 560;
}

code {
  font-family: "Outfit", sans-serif;
  font-weight: 520;
  font-size: 0.95em;
  overflow-wrap: anywhere;
}

.status {
  font-size: 0.72rem;
  font-weight: 640;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.status-live {
  color: var(--wine);
}

.template-banner {
  background: var(--wine);
  color: var(--ivory);
  padding: 0.7rem 0;
  font-weight: 560;
}

.template-banner p {
  margin: 0;
}

.site-footer {
  border-top: 6px solid var(--wine);
  background: var(--paper);
  padding: 1.6rem 0 2rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem 1.2rem;
  align-items: start;
}

.footer-mark {
  width: 36px;
  height: 36px;
}

.site-footer p {
  margin: 0 0 0.45rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
}

.footer-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 520;
}

.footer-nav a:hover {
  color: var(--wine);
}

.site-footer .colophon {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Guides use this header and footer. Shell pages use the same classes. */

.echo-rule {
  height: 6px;
  background: var(--wine);
  box-shadow: 0 2px 0 var(--brass);
}

.mast {
  background: var(--ivory);
  border-bottom: 1px solid var(--line);
}

.mast-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding: 1.15rem 0 0.95rem;
}

.brand-lockup {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1.15rem;
}

.tagline,
.age {
  margin: 0;
  color: var(--brass-ink);
  font-size: 0.76rem;
  font-weight: 580;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mast .nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  padding-bottom: 0.15rem;
}

.mast .nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 520;
  letter-spacing: 0.04em;
}

.mast .nav a[aria-current="page"] {
  color: var(--wine);
  box-shadow: inset 0 -2px 0 var(--wine);
}

.piece-head {
  padding-bottom: 0.4rem;
}

.byline,
.method-note {
  margin: 0.7rem 0 0;
  max-width: 46rem;
  color: var(--muted);
}

.method-note {
  font-size: 0.98rem;
}

.lede {
  font-size: 1.22rem;
}

.prose h2 {
  margin-top: 2.4rem;
}

.prose h3 {
  margin-top: 1.7rem;
  font-size: 1.45rem;
}

.prose blockquote {
  margin: 1.5rem 0;
  padding: 0.15rem 0 0.15rem 1.1rem;
  border-left: 3px solid var(--wine);
}

.prose blockquote p {
  margin: 0;
  font-family: "Fraunces", serif;
  font-style: italic;
  font-weight: 480;
  font-optical-sizing: auto;
  font-size: 1.4rem;
  line-height: 1.35;
  color: var(--wine);
}

footer.colophon {
  border-top: 6px solid var(--wine);
  background: var(--paper);
  color: var(--ink);
  font-size: 1.02rem;
  padding: 1.7rem 0 2.1rem;
}

.colophon-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) auto auto;
  gap: 1.2rem 2rem;
  align-items: start;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  text-decoration: none;
}

.footer-word {
  font-family: "Fraunces", serif;
  font-weight: 560;
  font-optical-sizing: auto;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.footer-word i {
  font-style: italic;
  color: var(--wine);
}

.fine {
  color: var(--muted);
  font-size: 0.95rem;
}

.fine p {
  margin: 0 0 0.35rem;
}

@media (max-width: 800px) {
  .hero-grid,
  .split,
  .facts,
  .footer-inner,
  .colophon-grid {
    grid-template-columns: 1fr;
  }

  .vol {
    text-align: left;
    order: -1;
  }

  .vol span {
    font-size: 4.2rem;
  }

  h1,
  article h1 {
    max-width: none;
  }

  .nav-list a {
    padding: 0.45rem 0;
  }
}

@media (max-width: 520px) {
  .wrap {
    width: min(var(--page), calc(100% - 1.4rem));
  }

  .filter-row {
    flex-direction: column;
    align-items: stretch;
  }

  .niche-row {
    grid-template-columns: 2.4rem minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media print {
  .skip-link,
  .skip,
  .filter-bar,
  .hero-actions,
  .site-header nav,
  .site-footer nav,
  .mast .nav {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  .panel {
    background: #fff;
    color: #000;
    border: 1px solid #000;
  }

  .panel h2,
  .panel p,
  .panel li,
  .panel a,
  .deck,
  .facts strong,
  .rank {
    color: #000;
  }

  a {
    text-decoration: underline;
  }
}
