/*
Theme Name: Etched
Theme URI: https://etchedresources.com
Author: Robinson Lumontod III
Author URI: https://etchedresources.com
Description: A book and study-tools theme built for Etched — evidence-based study skills. Includes a blank-page recall demo, a spacing gap calculator, and the Study Habits Inventory as shortcodes.
Version: 5.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: etched
Tags: one-column, custom-menu, featured-images, threaded-comments, translation-ready, custom-logo, blog, education
*/

/* ============================================================
   TOKENS

   The book is about the difference between marks that wipe away
   and marks that are cut in. That contrast is the design: dense,
   saturated marks on a clean surface, nothing muddy between.

   Jade is oxidised copper, the colour of an engraving plate.
   Amber appears only where a reader has made progress or done
   something. It is never decoration.
   ============================================================ */
:root {
  --canvas:      #F5F8F7;
  --surface:     #FFFFFF;
  --sunken:      #EDF2F0;

  --ink:         #0D1B24;
  --ink-soft:    #33454F;
  --ink-mute:    #62727C;
  --ink-faint:   #97A4AC;

  --line:        #DDE5E2;
  --line-soft:   #EBF0EE;

  --jade:        #0E7C63;
  --jade-deep:   #095444;
  --jade-lift:   #14A183;
  --jade-wash:   #E2F1EC;

  --amber:       #E8A33D;
  --amber-deep:  #A96D14;
  --amber-wash:  #FCF2E1;

  --clay:        #C1553A;
  --clay-wash:   #FAEBE6;

  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans:  "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --t-xs:   0.75rem;
  --t-s:    0.875rem;
  --t-b:    1.0625rem;
  --t-m:    1.1875rem;
  --t-l:    1.5rem;
  --t-xl:   2rem;
  --t-2xl:  2.625rem;
  --t-3xl:  clamp(2.75rem, 7vw, 4.25rem);

  --gap:     1.5rem;
  --measure: 36rem;
  --shell:   72rem;

  --r-lg: 14px;
  --r:    8px;
  --r-sm: 5px;

  --lift:   0 1px 2px rgba(13, 27, 36, .04), 0 10px 30px -20px rgba(13, 27, 36, .35);
  --lift-2: 0 2px 4px rgba(13, 27, 36, .05), 0 24px 48px -28px rgba(13, 27, 36, .45);
}

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

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

html {
  scrollbar-width: thin;
  scrollbar-color: #C6D2CE transparent;
}
html::-webkit-scrollbar { width: 10px; height: 10px; }
html::-webkit-scrollbar-track { background: transparent; }
html::-webkit-scrollbar-thumb {
  background: #C6D2CE;
  border: 3px solid var(--canvas);
  border-radius: 99px;
}
html::-webkit-scrollbar-thumb:hover { background: var(--ink-faint); }

body {
  margin: 0;
  overflow-x: clip;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-b);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--jade-deep); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--jade); }

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

::selection { background: var(--jade-wash); color: var(--jade-deep); }

code, kbd, pre {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9em;
}
code { background: var(--sunken); padding: .1em .35em; border-radius: var(--r-sm); }
pre {
  background: var(--ink); color: #DCE6E3; padding: 1.2rem 1.4rem;
  border-radius: var(--r); overflow-x: auto; line-height: 1.6;
}
pre code { background: none; padding: 0; }

blockquote {
  margin: 2rem 0; padding-left: 1.4rem; border-left: 3px solid var(--jade);
  font-family: var(--serif); font-size: var(--t-m); font-style: italic; color: var(--ink-soft);
}

hr { border: 0; height: 1px; background: var(--line); margin: 2.5rem 0; }

/* ============================================================
   TYPE
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -.018em;
  color: var(--ink);
  margin: 0 0 .6rem;
  text-wrap: balance;
}
h1 { font-size: var(--t-2xl); }
h2 { font-size: var(--t-xl); margin-top: 2.8rem; }
h3 { font-size: var(--t-l); margin-top: 2rem; }
h4 { font-size: var(--t-m); margin-top: 1.6rem; }

.flow > h2:first-child, .flow > h3:first-child { margin-top: 0; }

p { margin: 0 0 1.15rem; max-width: var(--measure); }
ul, ol { max-width: var(--measure); padding-left: 1.3rem; }
li { margin-bottom: .35rem; }
strong { font-weight: 600; }

.incised, .incised-dark { font-weight: 600; letter-spacing: -.03em; color: var(--ink); }

/* a rule that reads as a cut: a short saturated segment, then a hairline */
.cut-rule {
  border: 0; height: 3px; margin: 2.2rem 0; max-width: var(--measure); border-radius: 2px;
  background:
    linear-gradient(to right, var(--jade) 0 3.5rem, transparent 3.5rem) no-repeat,
    linear-gradient(to bottom, transparent 1px, var(--line) 1px 2px, transparent 2px);
}

.notice { font-size: var(--t-s); color: var(--ink-mute); line-height: 1.6; max-width: var(--measure); }

/* ============================================================
   LAYOUT
   ============================================================ */
.wrap { width: min(100% - 2.5rem, var(--shell)); margin-inline: auto; }
.reading { width: min(100% - 2.5rem, 46rem); margin-inline: auto; }
.section { padding: 4.5rem 0; }
.section--lift { background: var(--surface); border-block: 1px solid var(--line); }
.section__title { margin-top: 0; }
.measure { max-width: var(--measure); }

/* ============================================================
   HEADER
   ============================================================ */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: rgba(245, 248, 247, .82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-head__inner { display: flex; align-items: center; gap: var(--gap); min-height: 4.25rem; }

.brand {
  font-family: var(--serif); font-size: var(--t-m); font-weight: 600;
  letter-spacing: -.02em; color: var(--ink); text-decoration: none;
}
.brand:hover { color: var(--jade-deep); }
.custom-logo-link img { max-height: 2.2rem; width: auto; }

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 1.6rem; list-style: none; margin: 0; padding: 0; max-width: none; flex-wrap: wrap; }
.site-nav li { margin: 0; }
.site-nav a {
  font-size: var(--t-s); font-weight: 500; color: var(--ink-soft);
  text-decoration: none; padding: .3rem 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--jade); }
.site-nav .current-menu-item > a { color: var(--ink); border-bottom-color: var(--jade); }

@media (max-width: 44rem) {
  .site-head__inner { flex-wrap: wrap; padding-block: .8rem; }
  .site-nav { margin-left: 0; width: 100%; }
  .site-nav ul { gap: 1.1rem; }
}

.skip-link:focus {
  position: fixed; top: .6rem; left: .6rem; z-index: 100;
  width: auto; height: auto; clip: auto; clip-path: none;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: var(--r-sm);
}

/* ============================================================
   PAGE HEAD — a banded title so interior pages read as a site
   rather than a sheet of paper floating on a desk
   ============================================================ */
.page-head {
  padding: 3.25rem 0 2.75rem;
  background:
    linear-gradient(to bottom, var(--jade-wash), rgba(226, 241, 236, 0)) ,
    var(--canvas);
  border-bottom: 1px solid var(--line);
}
.page-head__title { font-size: var(--t-2xl); margin: 0; max-width: 22ch; }
.page-head__sub {
  font-family: var(--serif);
  font-size: var(--t-m);
  font-style: italic;
  color: var(--jade-deep);
  margin: .7rem 0 0;
  max-width: 42ch;
}
.page-head__meta { font-size: var(--t-s); color: var(--ink-mute); margin: 0 0 .5rem; }
.page-head__title::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 3px;
  margin-top: 1.2rem;
  border-radius: 2px;
  background: linear-gradient(to right, var(--jade), var(--amber));
}

.page-body {
  background: var(--surface);
  padding: 3.5rem 0 4.5rem;
  border-bottom: 1px solid var(--line);
}
.page-body > .reading > *:first-child { margin-top: 0; }

@media (max-width: 44rem) {
  .page-head { padding: 2.25rem 0 2rem; }
  .page-body { padding: 2.5rem 0 3rem; }
}

/* ============================================================
   HERO — the one bold place
   ============================================================ */
.hero {
  padding: 4.5rem 0 4rem;
  background: radial-gradient(60rem 30rem at 12% -10%, var(--jade-wash) 0%, transparent 62%), var(--canvas);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  gap: 3.5rem;
  align-items: start;
}
@media (max-width: 60rem) {
  .hero { padding: 3rem 0; }
  .hero__grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

.hero__title { font-size: var(--t-3xl); line-height: 1.02; letter-spacing: -.035em; margin: 0 0 .35rem; }
.hero__sub {
  font-family: var(--serif); font-size: var(--t-l); font-weight: 400; font-style: italic;
  color: var(--jade-deep); line-height: 1.3; margin: 0 0 1.6rem; max-width: 26rem;
}
.hero__sub::after {
  content: ""; display: block; width: 4.5rem; height: 3px;
  margin-top: 1.4rem; border-radius: 2px;
  background: linear-gradient(to right, var(--jade), var(--amber));
}
.hero__lede { font-size: var(--t-m); color: var(--ink-soft); line-height: 1.6; max-width: 30rem; }
.hero__byline { font-size: var(--t-s); font-weight: 500; color: var(--ink-mute); margin-bottom: 1.8rem; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--sans); font-size: var(--t-s); font-weight: 500; line-height: 1;
  padding: .72rem 1.25rem; border-radius: var(--r-sm);
  border: 1px solid var(--ink); background: var(--ink); color: #fff;
  text-decoration: none; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .08s ease;
}
.btn:hover { background: var(--jade-deep); border-color: var(--jade-deep); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .4; cursor: not-allowed; }

.btn--quiet { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn--quiet:hover { background: var(--jade-wash); color: var(--jade-deep); border-color: var(--jade); }

.btn--onink {
  background: var(--jade); border-color: var(--jade); color: #fff;
  font-size: var(--t-b); padding: .85rem 1.6rem;
}
.btn--onink:hover { background: var(--jade-lift); border-color: var(--jade-lift); }

/* ============================================================
   FORM CONTROLS
   ============================================================ */
input[type="text"], input[type="email"], input[type="url"],
input[type="date"], input[type="search"], input[type="password"],
textarea, select {
  width: 100%; font-family: var(--sans); font-size: var(--t-s); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: .68rem .8rem; transition: border-color .15s ease, box-shadow .15s ease;
}
input:hover, textarea:hover, select:hover { border-color: var(--ink-faint); }
input:focus, textarea:focus, select:focus {
  border-color: var(--jade); box-shadow: 0 0 0 3px var(--jade-wash); outline: none;
}
::placeholder { color: var(--ink-faint); }

label { display: block; font-size: var(--t-s); font-weight: 500; color: var(--ink-soft); margin-bottom: .4rem; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--jade); }

/* ============================================================
   TOOL SHELL
   ============================================================ */
.tool, .blankpage {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1.75rem; box-shadow: var(--lift); max-width: none;
}
.tool > h2, .blankpage > h2 { margin-top: 0; font-size: var(--t-l); }
.tool p, .blankpage p { max-width: none; }

.tool__row { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: 1.2rem; }
.tool__row > div { flex: 1 1 11rem; min-width: 0; }
.tool__row > .btn { flex: 0 0 auto; }

/* ---- how-to brief ---- */
.howto { margin: 0 0 1.5rem; padding: 1rem 1.2rem; background: var(--jade-wash); border-radius: var(--r); }
.howto__what {
  font-family: var(--serif); font-size: var(--t-m); font-weight: 500;
  color: var(--jade-deep); line-height: 1.4; margin: 0 0 .75rem; max-width: none;
}
.howto__mins { font-family: var(--sans); font-size: var(--t-xs); font-weight: 500; color: var(--jade); white-space: nowrap; }
.howto__mins::before { content: "· "; }
.howto__steps { font-size: var(--t-s); color: var(--ink-soft); margin: 0 0 .8rem; padding-left: 1.15rem; max-width: none; }
.howto__steps li { margin-bottom: .25rem; }
.howto__steps li::marker { color: var(--jade); font-weight: 600; }
.howto__why {
  font-size: var(--t-xs); color: var(--ink-mute); line-height: 1.6; margin: 0;
  padding-top: .75rem; border-top: 1px solid rgba(14, 124, 99, .18); max-width: none;
}

/* ---- blank page ---- */
.blankpage textarea {
  min-height: 11rem; font-family: var(--serif); font-size: var(--t-b); line-height: 1.95;
  background: repeating-linear-gradient(to bottom, transparent 0 calc(1.95em - 1px), var(--line-soft) calc(1.95em - 1px) 1.95em);
  background-attachment: local; background-position: 0 .75rem; resize: vertical;
}
.blankpage__foot { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }
.blankpage__timer { font-size: var(--t-s); font-variant-numeric: tabular-nums; color: var(--ink-mute); margin-right: auto; }
.blankpage__result {
  margin-top: 1.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line);
  font-size: var(--t-s); color: var(--ink-soft);
}
.blankpage__result strong {
  font-family: var(--serif); font-size: var(--t-xl); font-weight: 600;
  color: var(--jade-deep); font-variant-numeric: tabular-nums;
}

/* ---- spacing schedule ---- */
.schedule { list-style: none; padding: 0; margin: 1.2rem 0 0; max-width: none; }
.schedule li { margin: 0; border-bottom: 1px solid var(--line-soft); }
.schedule li:last-child { border-bottom: 0; }

.schedule__link, .schedule li > span:only-child {
  display: grid; grid-template-columns: 5.5rem 1fr auto; gap: .9rem; align-items: baseline;
  padding: .7rem; margin: 0 -.7rem; border-radius: var(--r-sm);
  text-decoration: none; color: inherit; font-size: var(--t-s);
  transition: background .13s ease;
}
.schedule__link:hover, .schedule__link:focus-visible { background: var(--jade-wash); }
.schedule__date { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.schedule__link:hover .schedule__date { color: var(--jade-deep); }
.schedule__away { color: var(--ink-faint); font-size: var(--t-xs); }
.schedule li:last-child .schedule__date { color: var(--clay); }

@media (max-width: 30rem) {
  .schedule__link, .schedule li > span:only-child { grid-template-columns: 4.5rem 1fr; }
  .schedule__away { grid-column: 2; }
}

/* ---- keep the dates ---- */
.keep { margin-top: 1.6rem; padding: 1.3rem 1.4rem; background: var(--sunken); border-radius: var(--r); }
.keep h4 { margin: 0 0 .85rem; font-size: var(--t-m); }
.keep__row { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: .85rem; }
.keep__row input { flex: 1 1 14rem; min-width: 0; }
.keep__row .btn { flex: 0 0 auto; }
.keep__alt { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1.2rem 0 .7rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.keep .notice { margin-bottom: 0; }

/* ---- inventory ---- */
.inv__progress {
  position: sticky; top: 4.25rem; z-index: 20;
  display: flex; align-items: center; gap: .9rem;
  padding: .75rem 0; margin-bottom: .5rem; background: var(--surface);
}
.inv__progress-track { flex: 1; height: .4rem; background: var(--sunken); border-radius: 99px; overflow: hidden; }
.inv__progress-fill {
  height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(to right, var(--jade), var(--amber));
  transition: width .35s cubic-bezier(.22, .7, .3, 1);
}
.inv__progress-count {
  font-size: var(--t-xs); font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--ink-mute); white-space: nowrap;
}
.inv__progress-count.is-done { color: var(--jade); }

.inv__block { margin-bottom: 2rem; }
.inv__block h3 {
  font-size: var(--t-s); font-family: var(--sans); font-weight: 600; color: var(--jade-deep);
  margin: 0 0 .9rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line); letter-spacing: 0;
}

.inv__q {
  display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center;
  padding: .8rem 0; border-bottom: 1px solid var(--line-soft);
  font-size: var(--t-s); line-height: 1.5;
}
.inv__q:last-child { border-bottom: 0; }
.inv__q.is-answered { color: var(--ink-mute); }

.inv__scale { display: flex; gap: .3rem; }
.inv__scale input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.inv__scale label {
  display: grid; place-items: center; width: 2.1rem; height: 2.1rem; margin: 0;
  border: 1px solid var(--line); border-radius: 50%;
  font-size: var(--t-xs); font-weight: 500; color: var(--ink-faint);
  background: var(--surface); cursor: pointer;
  transition: background .13s ease, border-color .13s ease, color .13s ease;
}
.inv__scale label:hover { border-color: var(--jade); color: var(--jade-deep); }
.inv__scale input:checked + label { background: var(--jade); border-color: var(--jade); color: #fff; font-weight: 600; }
.inv__scale input:focus-visible + label { outline: 2px solid var(--jade); outline-offset: 2px; }

@media (max-width: 34rem) {
  .inv__q { grid-template-columns: 1fr; gap: .6rem; }
  .inv__scale label { width: 2.4rem; height: 2.4rem; }
}

.inv__result { margin-top: 2rem; padding: 1.75rem; background: var(--sunken); border-radius: var(--r); }
.inv__score {
  font-family: var(--serif); font-size: var(--t-2xl); font-weight: 600; line-height: 1.05;
  letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; margin-bottom: .2rem;
}
.inv__bars { margin: 1.5rem 0; display: grid; gap: .8rem; }
.inv__bar { display: grid; grid-template-columns: 9.5rem 1fr 2.2rem; gap: .8rem; align-items: center; font-size: var(--t-xs); }
.inv__bar-track { height: .55rem; background: var(--surface); border-radius: 99px; overflow: hidden; }
.inv__bar-fill { height: 100%; width: 0; border-radius: 99px; background: var(--jade); transition: width .8s cubic-bezier(.22, .7, .3, 1); }
.inv__bar--top .inv__bar-fill { background: var(--amber); }
.inv__bar--top { font-weight: 600; color: var(--amber-deep); }
@media (max-width: 34rem) {
  .inv__bar { grid-template-columns: 1fr 2.2rem; }
  .inv__bar-track { grid-column: 1 / -1; grid-row: 2; }
}

/* ---- signup ---- */
.signup {
  margin-top: 1.75rem; padding: 1.4rem 1.5rem; background: var(--surface);
  border: 1px solid var(--jade); border-radius: var(--r);
}
.signup h3 { margin: 0 0 .5rem; font-size: var(--t-m); }
.signup__row { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1rem 0 .85rem; }
.signup__row input { flex: 1 1 14rem; min-width: 0; }
.signup__row .btn { flex: 0 0 auto; }
.signup__consent {
  display: flex; gap: .6rem; align-items: flex-start;
  font-size: var(--t-xs); font-weight: 400; color: var(--ink-mute); line-height: 1.55; margin: 0;
}
.signup__consent input { margin-top: .2rem; flex: 0 0 auto; }
.signup__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.signup__msg { font-size: var(--t-s); color: var(--jade-deep); margin: .9rem 0 0; max-width: none; }
.signup__msg:empty { margin: 0; }

/* ============================================================
   FRONT PAGE — parts list
   ============================================================ */
.parts { list-style: none; padding: 0; margin: 2rem 0 0; max-width: none; }
.parts li {
  display: grid; grid-template-columns: 2.75rem 1fr; gap: 1.2rem;
  padding: 1.1rem 0; border-top: 1px solid var(--line); margin: 0;
}
.parts li:last-child { border-bottom: 1px solid var(--line); }
.parts__n { font-family: var(--serif); font-size: var(--t-m); font-weight: 600; color: var(--jade); line-height: 1.5; }
.parts__t {
  display: block; font-family: var(--serif); font-size: var(--t-m); font-weight: 600;
  color: var(--ink); line-height: 1.35; margin-bottom: .15rem;
}
.parts__d { display: block; font-size: var(--t-s); color: var(--ink-mute); line-height: 1.55; }

/* ============================================================
   POSTS
   ============================================================ */
.post-list { list-style: none; padding: 0; margin: 2rem 0 0; max-width: none; }
.post-list > li { padding: 1.5rem 0; border-top: 1px solid var(--line); margin: 0; }
.post-list > li:last-child { border-bottom: 1px solid var(--line); }

.entry__meta { font-size: var(--t-xs); color: var(--ink-faint); margin-bottom: .3rem; }
.entry__title { margin: 0 0 .4rem; font-size: var(--t-l); }
.entry__title a { color: var(--ink); text-decoration: none; }
.entry__title a:hover { color: var(--jade-deep); text-decoration: underline; text-underline-offset: .2em; }
.entry__media { margin: 0 0 2rem; border-radius: var(--r); overflow: hidden; }
.entry__terms { margin-top: 2.5rem; }
.archive__intro { color: var(--ink-soft); max-width: var(--measure); }

/* ============================================================
   PAGINATION & POST NAV
   ============================================================ */
.pagination, .page-links, .post-navigation {
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: var(--t-s);
}
.pagination .nav-links, .post-navigation .nav-links {
  display: flex; gap: 2rem; flex-wrap: wrap; justify-content: space-between;
}
.post-navigation .nav-links > div { max-width: 20rem; }
.post-navigation a { font-family: var(--serif); font-size: var(--t-m); text-decoration: none; }
.post-navigation a:hover { text-decoration: underline; }
.post-navigation .entry__meta { display: block; }
.pagination .page-numbers {
  display: inline-block; padding: .35rem .7rem; color: var(--ink-mute);
  text-decoration: none; border-radius: var(--r-sm);
}
.pagination .page-numbers:hover { background: var(--jade-wash); color: var(--jade-deep); }
.pagination .page-numbers.current { background: var(--ink); color: #fff; }
.page-links a { padding: 0 .35rem; }

/* ============================================================
   COMMENTS
   ============================================================ */
.comments { margin-top: 3.5rem; }
.comments__title { font-size: var(--t-l); }
.comment-list, .comment-list .children { list-style: none; padding: 0; margin: 0; max-width: none; }
.comment-list .children { margin-left: 1.5rem; padding-left: 1.2rem; border-left: 2px solid var(--line); }
.comment-list li { margin-bottom: 1.75rem; }
.comment-body { max-width: var(--measure); }
.comment-meta, .comment-metadata, .reply { font-size: var(--t-xs); color: var(--ink-faint); }
.comment-metadata a, .reply a { color: var(--ink-mute); text-decoration: none; }
.comment-metadata a:hover, .reply a:hover { color: var(--jade); }
.comment-author .fn { font-size: var(--t-s); font-weight: 600; color: var(--ink); font-style: normal; }
.comment-author img { border-radius: 50%; margin-right: .5rem; vertical-align: middle; }
.comment-respond { margin-top: 2.5rem; }
.comment-form input[type="text"], .comment-form input[type="email"],
.comment-form input[type="url"], .comment-form textarea { max-width: var(--measure); }
.comment-form textarea { min-height: 8rem; line-height: 1.7; }
.comment-form .comment-form-cookies-consent { display: flex; gap: .6rem; align-items: flex-start; }
.comment-form .comment-form-cookies-consent label { font-size: var(--t-xs); font-weight: 400; }
.comment-form p { margin-bottom: 1.1rem; }
.bypostauthor > .comment-body .fn::after {
  content: ""; display: inline-block; width: .4rem; height: .4rem; margin-left: .4rem;
  border-radius: 50%; background: var(--jade); vertical-align: .12em;
}

/* ============================================================
   FOOTER — the one dark surface
   ============================================================ */
.site-foot {
  background: var(--ink);
  color: #93A3AC;
  padding: 3.5rem 0 2rem;
  margin-top: 5rem;
  font-size: var(--t-s);
}
.site-foot__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem 3rem;
  align-items: start;
  padding-bottom: 2.5rem;
}
@media (max-width: 54rem) {
  .site-foot { padding-top: 2.5rem; margin-top: 3rem; }
  .site-foot__grid { grid-template-columns: 1fr 1fr; gap: 2rem; padding-bottom: 2rem; }
  .site-foot__brand { grid-column: 1 / -1; }
}
@media (max-width: 30rem) {
  .site-foot__grid { grid-template-columns: 1fr; }
}

.site-foot p { margin: 0 0 .5rem; max-width: none; }
.site-foot a { color: #DCE6E3; text-decoration: none; }
.site-foot a:hover { color: var(--amber); }

.site-foot__name {
  font-family: var(--serif);
  font-size: var(--t-m);
  font-weight: 600;
  letter-spacing: -.015em;
  color: #FFFFFF;
  margin-bottom: .5rem !important;
}
.site-foot__blurb { color: #7D8D96; line-height: 1.55; max-width: 22rem !important; }
.site-foot__mail { margin-top: .9rem !important; }
.site-foot__mail a { border-bottom: 1px solid rgba(232, 163, 61, .45); padding-bottom: 1px; }

.site-foot__heading {
  font-family: var(--sans);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #62737D;
  margin: 0 0 .9rem;
}
.site-foot__col ul,
.site-foot__widgets ul {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: none;
  display: grid;
  gap: .55rem;
}
.site-foot__col li, .site-foot__widgets li { margin: 0; }
.site-foot__col a { font-weight: 500; line-height: 1.35; }

.site-foot__widgets {
  padding-bottom: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.5rem;
}
.site-foot .widget { margin: 0; }
.site-foot .widget-title {
  font-family: var(--sans);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #62737D;
  margin: 0 0 .7rem;
}

.site-foot__base {
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(220, 230, 227, .12);
  font-size: var(--t-xs);
  color: #62737D;
}
.site-foot__base p { margin: 0; }
.site-foot__fine { color: #62737D; }

/* ============================================================
   WORDPRESS CORE
   ============================================================ */
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute; word-wrap: normal !important;
}
.alignleft { float: left; margin: .3rem 1.5rem 1rem 0; }
.alignright { float: right; margin: .3rem 0 1rem 1.5rem; }
.aligncenter { display: block; margin-inline: auto; }
.alignwide { width: min(100% - 3rem, 62rem); margin-inline: auto; max-width: none; }
.alignfull {
  width: auto;
  margin-inline: calc(50% - 50vw);
  max-width: none;
}
/* signup honeypot sits off-canvas; clip keeps it from widening the page */
.signup__hp { left: 0; transform: translateX(-9999px); }
.wp-caption-text, .wp-element-caption { font-size: var(--t-xs); color: var(--ink-faint); margin-top: .5rem; }
.sticky .entry__title::before { content: "\2605 "; color: var(--amber); }
.widget { margin-bottom: 1.5rem; }

/* ============================================================
   MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .site-head, .site-foot, .howto, .keep, .signup, .btn { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .tool, .blankpage { border: 0; box-shadow: none; padding: 0; }
  a { text-decoration: none; color: #000; }
}

/* ============================================================
   DOWNLOADS
   ============================================================ */
.dl { margin-top: 2rem; }
.dl__all {
  background: var(--jade-wash);
  border-radius: var(--r);
  padding: 1.5rem 1.6rem;
  margin-bottom: 2.5rem;
}
.dl__all h3 { margin: 0 0 .3rem; font-size: var(--t-m); color: var(--jade-deep); }
.dl__all .notice { margin-bottom: 1.1rem; }
.dl__btns { display: flex; gap: .6rem; flex-wrap: wrap; margin: 0; max-width: none; }

.dl__list { list-style: none; padding: 0; margin: 0; max-width: none; }
.dl__list li {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  margin: 0;
}
.dl__list li:last-child { border-bottom: 1px solid var(--line); }
.dl__meta { flex: 1 1 18rem; min-width: 0; }
.dl__title {
  display: block;
  font-family: var(--serif);
  font-size: var(--t-m);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}
.dl__blurb { display: block; font-size: var(--t-s); color: var(--ink-mute); line-height: 1.5; margin-top: .15rem; }
.dl__links { display: flex; gap: .45rem; flex: 0 0 auto; }
.dl__links a {
  font-size: var(--t-xs);
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: .4rem .8rem;
  background: var(--surface);
  transition: background .13s ease, border-color .13s ease, color .13s ease;
}
.dl__links a:hover { background: var(--jade-wash); border-color: var(--jade); color: var(--jade-deep); }

.dl__pick .dl__title::after {
  content: "";
  display: inline-block;
  width: .4rem; height: .4rem;
  margin-left: .5rem;
  border-radius: 50%;
  background: var(--amber);
  vertical-align: .18em;
}

/* ============================================================
   RESEARCH NOTES INDEX
   ============================================================ */
.rnotes { list-style: none; padding: 0; margin: 2rem 0; max-width: none; }
.rnotes li {
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
  margin: 0;
}
.rnotes li:last-child { border-bottom: 1px solid var(--line); }
.rnotes__title {
  display: block;
  font-family: var(--serif);
  font-size: var(--t-m);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.3;
  margin-bottom: .25rem;
}
.rnotes__title:hover { color: var(--jade-deep); text-decoration: underline; text-underline-offset: .2em; }
.rnotes__blurb {
  display: block;
  font-size: var(--t-s);
  color: var(--ink-mute);
  line-height: 1.55;
  max-width: var(--measure);
}

/* ---- parent link in the page header ---- */
.page-head__up { font-size: var(--t-s); margin: 0 0 .5rem; }
.page-head__up a {
  color: var(--jade-deep);
  text-decoration: none;
  font-weight: 500;
}
.page-head__up a::before { content: "\2190"; margin-right: .4rem; }
.page-head__up a:hover { text-decoration: underline; text-underline-offset: .2em; }

/* ---- sibling notes at the end of a research note ---- */
.rnotes-more {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.rnotes-more h2 {
  margin-top: 0;
  font-size: var(--t-m);
  font-family: var(--sans);
  font-weight: 600;
  color: var(--ink-mute);
}
.rnotes-more .rnotes { margin-top: 1rem; }

/* ============================================================
   NAV SUBMENUS
   ============================================================ */
.site-nav li { position: relative; }
.site-nav .sub-menu {
  position: absolute;
  top: calc(100% + .6rem);
  left: -.9rem;
  z-index: 50;
  display: grid;
  gap: 0;
  min-width: 17rem;
  padding: .4rem;
  margin: 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--lift-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .14s ease, transform .14s ease, visibility .14s;
}
.site-nav li:hover > .sub-menu,
.site-nav li:focus-within > .sub-menu,
.site-nav li.is-open > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.site-nav .sub-menu a {
  display: block;
  padding: .5rem .7rem;
  border-bottom: 0;
  border-radius: var(--r-sm);
  font-weight: 400;
  line-height: 1.35;
  color: var(--ink-soft);
}
.site-nav .sub-menu a:hover,
.site-nav .sub-menu a:focus-visible {
  background: var(--jade-wash);
  color: var(--jade-deep);
  border-bottom: 0;
}
.site-nav .menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: .32rem;
  height: .32rem;
  margin-left: .4rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  opacity: .55;
}

@media (max-width: 44rem) {
  .site-nav .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    background: transparent;
    min-width: 0;
    padding: .2rem 0 .4rem .9rem;
    border-left: 2px solid var(--line);
    margin-top: .4rem;
  }
  .site-nav ul { display: block; }
  .site-nav > ul > li { margin-bottom: .5rem; }
  .site-nav .menu-item-has-children > a::after { display: none; }
}

/* ============================================================
   BOOK COVER
   ============================================================ */
.cover {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: 2.25rem;
  align-items: center;
  margin: 0 0 2.5rem;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--lift);
}
.cover--plain {
  grid-template-columns: 1fr;
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
  max-width: 15rem;
}
.cover__art { margin: 0; }
.cover__art img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(13, 27, 36, .18), 0 22px 40px -22px rgba(13, 27, 36, .65);
}
.cover__side p { max-width: none; }
.cover__where {
  font-family: var(--serif);
  font-size: var(--t-l);
  font-weight: 600;
  letter-spacing: -.015em;
  color: var(--ink);
  margin-bottom: .3rem;
}
.cover__formats { font-size: var(--t-s); color: var(--ink-mute); margin-bottom: 1.2rem; }
.cover__note {
  font-size: var(--t-xs);
  color: var(--ink-mute);
  line-height: 1.55;
  margin: 1.2rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line-soft);
}
@media (max-width: 40rem) {
  .cover { grid-template-columns: 1fr; gap: 1.5rem; padding: 1.25rem; }
  .cover__art { max-width: 13rem; }
}

/* ---- cover in the hero ---- */
.hero__book {
  display: flex;
  gap: 1.1rem;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  max-width: 30rem;
}
.hero__cover { flex: 0 0 auto; display: block; width: 3.25rem; }
.hero__cover img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(13, 27, 36, .16), 0 6px 14px -9px rgba(13, 27, 36, .55);
  transition: transform .18s ease;
}
a.hero__cover:hover img { transform: translateY(-2px); }

.hero__book-meta { min-width: 0; }
.hero__book-meta p { max-width: none; }
.hero__book .hero__byline {
  font-size: var(--t-s);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: .1rem;
}
.hero__where {
  font-size: var(--t-xs);
  color: var(--ink-mute);
  margin-bottom: .7rem;
  line-height: 1.4;
}
.hero__book .btn { padding: .5rem .95rem; font-size: var(--t-xs); }

@media (max-width: 30rem) {
  .hero__book { gap: .9rem; margin-top: 1.6rem; }
  .hero__cover { width: 3rem; }
}
