/* ==========================================================================
   Absinthe Kits — "The Green Hour"
   Parchment ground, Belle Epoque serif setting, deep leaf-green rules.
   Evolved from the original site's own stylesheet (/c/absinthe.css, 2013):
   Georgia serif, #060 headings and links, a 2px green rule under every h2,
   and a 266px left rail beside a narrow measure of text.
   ========================================================================== */

:root {
  --paper:        #f6f1e4;
  --paper-deep:   #ece4d0;
  --panel:        #fffdf7;
  --ink:          #20201a;
  --ink-soft:     #3c3a30;
  --muted:        #6f6b5b;
  --rule:         #d8cfb6;

  --absinthe:      #41692c;
  --absinthe-deep: #2b4a1c;
  --absinthe-lift: #5c8a41;
  --louche:        #dfe9c4;
  --brass:         #a07b2a;
  --oxblood:       #6f231c;

  --measure: 43rem;
  --rail: 15rem;

  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Lora", Georgia, "Times New Roman", serif;
}

/* --- base ---------------------------------------------------------------- */

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    repeating-linear-gradient(0deg, rgba(120, 105, 70, .035) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(120, 105, 70, .025) 0 1px, transparent 1px 4px);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.72;
  overflow-x: hidden;
}

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

a {
  color: var(--absinthe-deep);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover, a:focus { color: var(--oxblood); text-decoration: none; }

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

/* Safeguard: content is never hidden waiting on JS. Any reveal animation
   is progressive enhancement only. */
[data-aos] { opacity: 1 !important; transform: none !important; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--absinthe-deep); color: #fff;
  padding: .6rem 1rem; z-index: 100;
}
.skip-link:focus { left: .5rem; top: .5rem; color: #fff; }

/* --- masthead + nav ------------------------------------------------------ */

.masthead {
  position: static;
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(180deg, var(--panel) 0%, var(--paper) 100%);
}

.masthead-inner {
  max-width: 76rem;
  margin: 0 auto;
  padding: 1.6rem 1.25rem 0;
}

.wordmark {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: .045em;
  line-height: 1.05;
  color: var(--absinthe-deep);
  text-decoration: none;
  text-transform: uppercase;
}
.wordmark:hover { color: var(--absinthe-deep); }

.wordmark .amp {
  display: block;
  font-family: var(--font-body);
  font-size: .6rem;
  letter-spacing: .34em;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: .45rem;
}

/* Wrapping text nav — echoes the original pipe-separated #nv strip.
   flex-wrap + min-width:0 so links can never be pushed past the viewport. */
.sitenav {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  gap: .1rem 0;
  margin: 1.15rem 0 0;
  padding: 0 0 1.05rem;
  list-style: none;
}
.sitenav li { min-width: 0; display: flex; align-items: center; }
.sitenav li + li::before {
  content: "";
  width: 1px; height: .85em;
  margin: 0 .72rem;
  background: var(--rule);
}
.sitenav a,
.sitenav span[aria-current] {
  font-family: var(--font-body);
  font-size: .8125rem;
  letter-spacing: .11em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  padding: .18rem 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.sitenav a:hover { color: var(--absinthe-deep); border-bottom-color: var(--absinthe); }
.sitenav span[aria-current] { color: var(--absinthe-deep); border-bottom-color: var(--absinthe); font-weight: 600; }

/* --- layout -------------------------------------------------------------- */

.layout {
  max-width: 76rem;
  margin: 0 auto;
  padding: 2.6rem 1.25rem 3rem;
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: 3.25rem;
  align-items: start;
}

.rail { min-width: 0; }

@media (min-width: 62em) {
  .rail { position: sticky; top: 1.5rem; }
}

.rail-title {
  font-family: var(--font-body);
  font-size: .6875rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .85rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--rule);
}

.rail-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.rail-list li { margin: 0 0 .42rem; }
.rail-list a {
  font-size: .9375rem;
  text-decoration: none;
  color: var(--ink-soft);
  border-left: 2px solid transparent;
  padding-left: .6rem;
  display: block;
}
.rail-list a:hover { color: var(--absinthe-deep); border-left-color: var(--absinthe); }
.rail-list a[aria-current] {
  color: var(--absinthe-deep);
  font-weight: 600;
  border-left-color: var(--absinthe);
}

.rail-note {
  font-size: .84rem;
  line-height: 1.62;
  color: var(--muted);
  font-style: italic;
  border-top: 1px solid var(--rule);
  padding-top: .9rem;
}

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

.article { min-width: 0; max-width: var(--measure); }

.article h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.25rem, 6vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -.005em;
  color: var(--absinthe-deep);
  margin: 0 0 1.4rem;
}

.article h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.4vw, 1.95rem);
  line-height: 1.25;
  color: var(--absinthe-deep);
  margin: 2.6rem 0 .95rem;
  padding-bottom: .38rem;
  border-bottom: 2px solid var(--absinthe);
}

.article h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.28rem;
  color: var(--ink);
  margin: 1.9rem 0 .5rem;
}

.article p { margin: 0 0 1.15rem; }

.article ul, .article ol { margin: 0 0 1.3rem; padding-left: 1.3rem; }
.article li { margin-bottom: .5rem; }
.article ul { list-style: none; padding-left: 1.35rem; }
.article ul li { position: relative; }
.article ul li::before {
  content: "";
  position: absolute;
  left: -1.15rem; top: .72em;
  width: .42rem; height: .42rem;
  border: 1px solid var(--absinthe);
  border-width: 1px 1px 0 0;
  transform: rotate(45deg);
}
.article ol { list-style: decimal; }

.article dl { margin: 0 0 1.6rem; }
.article dt {
  font-family: var(--font-display);
  font-size: 1.16rem;
  color: var(--absinthe-deep);
  margin-top: 1.1rem;
}
.article dt strong { font-weight: 600; }
.article dd { margin: .15rem 0 0; padding-left: 1.1rem; border-left: 2px solid var(--rule); color: var(--ink-soft); }

.article em { font-style: italic; }
.article strong { font-weight: 600; }

/* drop cap on the opening paragraph */
.article > p:first-of-type::first-letter,
.article .lede::first-letter {
  float: left;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3.85em;
  line-height: .82;
  color: var(--absinthe);
  padding: .06em .1em 0 0;
}

.standfirst {
  font-style: italic;
  color: var(--muted);
  border-left: 3px solid var(--louche);
  padding: .1rem 0 .1rem 1.1rem;
  margin: 0 0 1.7rem !important;
}
.standfirst::first-letter { float: none; font-size: inherit; color: inherit; padding: 0; font-weight: inherit; }

/* --- figures ------------------------------------------------------------- */

.figure {
  margin: 0 0 2.1rem;
  background: var(--panel);
  padding: .55rem .55rem .1rem;
  border: 1px solid var(--rule);
  box-shadow: 0 1px 0 rgba(90, 78, 45, .06);
}
.figure img { display: block; width: 100%; }
.figure figcaption {
  font-size: .8125rem;
  line-height: 1.5;
  color: var(--muted);
  padding: .6rem .35rem .7rem;
  font-style: italic;
}

.figure--inline { margin: 2rem 0 2.1rem; }

@media (min-width: 55em) {
  .figure--inline {
    float: right;
    width: 17.5rem;
    margin: .35rem 0 1.4rem 2rem;
  }
}

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

.pagefoot {
  clear: both;
  margin-top: 3rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
  font-size: .75rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
}

.sitefoot {
  border-top: 1px solid var(--rule);
  background: var(--paper-deep);
  margin-top: 1rem;
}
.sitefoot-inner {
  max-width: 76rem;
  margin: 0 auto;
  padding: 2.4rem 1.25rem 2.8rem;
}
.foot-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1.8rem 2.5rem;
}
.foot-cols .foot-h {
  font-family: var(--font-body);
  font-size: .6875rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .7rem;
}
.foot-cols ul { list-style: none; margin: 0; padding: 0; }
.foot-cols li { margin-bottom: .35rem; }
.foot-cols a { font-size: .9rem; text-decoration: none; color: var(--ink-soft); }
.foot-cols a:hover { color: var(--absinthe-deep); text-decoration: underline; }
.foot-cols p { font-size: .875rem; color: var(--muted); margin: 0 0 .7rem; line-height: 1.6; }

.colophon {
  margin-top: 2.2rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
  font-size: .72rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --- 404 ----------------------------------------------------------------- */

.notfound { text-align: center; padding: 4rem 0 2rem; }
.notfound .glyph {
  font-family: var(--font-display);
  font-size: clamp(5rem, 18vw, 9rem);
  line-height: 1;
  color: var(--louche);
  margin: 0;
}

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

@media (max-width: 61.99em) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.2rem;
  }
  .rail { order: 2; border-top: 1px solid var(--rule); padding-top: 1.6rem; }
  .article { order: 1; max-width: none; }
}

@media (max-width: 34em) {
  body { font-size: 1.02rem; }
  .sitenav li + li::before { margin: 0 .5rem; }
  .article > p:first-of-type::first-letter { font-size: 3.1em; }
}

/* CSS-only entrance: ends in the visible state, so content shows even if the
   animation never runs (fill-mode both, no JS involvement anywhere). */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .article h1 { animation: riseIn .5s ease-out both; }
  .figure     { animation: riseIn .6s ease-out .05s both; }
}
