@font-face { font-family: 'Taviraj'; font-style: italic; font-weight: 100; font-display: swap; src: url("/assets/fonts/taviraj-latin-100-italic.woff2") format("woff2"); }
@font-face { font-family: 'Taviraj'; font-style: normal; font-weight: 100; font-display: swap; src: url("/assets/fonts/taviraj-latin-100-normal.woff2") format("woff2"); }
@font-face { font-family: 'Taviraj'; font-style: italic; font-weight: 200; font-display: swap; src: url("/assets/fonts/taviraj-latin-200-italic.woff2") format("woff2"); }
@font-face { font-family: 'Taviraj'; font-style: normal; font-weight: 200; font-display: swap; src: url("/assets/fonts/taviraj-latin-200-normal.woff2") format("woff2"); }
@font-face { font-family: 'Taviraj'; font-style: italic; font-weight: 300; font-display: swap; src: url("/assets/fonts/taviraj-latin-300-italic.woff2") format("woff2"); }
@font-face { font-family: 'Taviraj'; font-style: normal; font-weight: 300; font-display: swap; src: url("/assets/fonts/taviraj-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: 'Taviraj'; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/fonts/taviraj-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: 'Taviraj'; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/taviraj-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: 'Taviraj'; font-style: italic; font-weight: 500; font-display: swap; src: url("/assets/fonts/taviraj-latin-500-italic.woff2") format("woff2"); }
@font-face { font-family: 'Taviraj'; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/taviraj-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: 'Taviraj'; font-style: italic; font-weight: 600; font-display: swap; src: url("/assets/fonts/taviraj-latin-600-italic.woff2") format("woff2"); }
@font-face { font-family: 'Taviraj'; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/taviraj-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: 'Taviraj'; font-style: italic; font-weight: 700; font-display: swap; src: url("/assets/fonts/taviraj-latin-700-italic.woff2") format("woff2"); }
@font-face { font-family: 'Taviraj'; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/taviraj-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: 'Taviraj'; font-style: italic; font-weight: 800; font-display: swap; src: url("/assets/fonts/taviraj-latin-800-italic.woff2") format("woff2"); }
@font-face { font-family: 'Taviraj'; font-style: normal; font-weight: 800; font-display: swap; src: url("/assets/fonts/taviraj-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: 'Taviraj'; font-style: italic; font-weight: 900; font-display: swap; src: url("/assets/fonts/taviraj-latin-900-italic.woff2") format("woff2"); }
@font-face { font-family: 'Taviraj'; font-style: normal; font-weight: 900; font-display: swap; src: url("/assets/fonts/taviraj-latin-900-normal.woff2") format("woff2"); }
@font-face { font-family: 'Lato'; font-style: italic; font-weight: 100; font-display: swap; src: url("/assets/fonts/lato-latin-100-italic.woff2") format("woff2"); }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 100; font-display: swap; src: url("/assets/fonts/lato-latin-100-normal.woff2") format("woff2"); }
@font-face { font-family: 'Lato'; font-style: italic; font-weight: 300; font-display: swap; src: url("/assets/fonts/lato-latin-300-italic.woff2") format("woff2"); }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 300; font-display: swap; src: url("/assets/fonts/lato-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: 'Lato'; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/fonts/lato-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/lato-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: 'Lato'; font-style: italic; font-weight: 700; font-display: swap; src: url("/assets/fonts/lato-latin-700-italic.woff2") format("woff2"); }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/lato-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: 'Lato'; font-style: italic; font-weight: 900; font-display: swap; src: url("/assets/fonts/lato-latin-900-italic.woff2") format("woff2"); }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 900; font-display: swap; src: url("/assets/fonts/lato-latin-900-normal.woff2") format("woff2"); }
:root {
  --bg-light-base: #f4eee2;
  --fg-light-base-body: #2b2420;
  --fg-light-base-heading: #2b2420;
  --fg-light-base-muted: #5f554c;
  --fg-light-base-link: #7b2d76;
  --fg-light-base-inverse: #2b2420;
  --bg-light-card: #faf6ee;
  --fg-light-card-body: #2b2420;
  --fg-light-card-heading: #2b2420;
  --fg-light-card-muted: #5f554c;
  --fg-light-card-link: #7b2d76;
  --fg-light-card-inverse: #2b2420;
  --bg-light-elevated: #ebe3d2;
  --fg-light-elevated-body: #2b2420;
  --fg-light-elevated-heading: #2b2420;
  --fg-light-elevated-muted: #5f554c;
  --fg-light-elevated-link: #7b2d76;
  --fg-light-elevated-inverse: #2b2420;
  --brand-light-accent: #7b2d76;
  --brand-light-accent-hover: #591c59;
  --brand-light-on-accent: #fbf7f0;
  --focus-light-ring: #7b2d76;
  --border-light-default: #7d7064;
  --border-light-subtle: #d8cdb9;
}
.bg-surface-base { background: var(--bg-light-base); --fg-body: var(--fg-light-base-body); --fg-heading: var(--fg-light-base-heading); --fg-muted: var(--fg-light-base-muted); --fg-link: var(--fg-light-base-link); --fg-inverse: var(--fg-light-base-inverse); }
.bg-surface-card { background: var(--bg-light-card); --fg-body: var(--fg-light-card-body); --fg-heading: var(--fg-light-card-heading); --fg-muted: var(--fg-light-card-muted); --fg-link: var(--fg-light-card-link); --fg-inverse: var(--fg-light-card-inverse); }
.bg-surface-elevated { background: var(--bg-light-elevated); --fg-body: var(--fg-light-elevated-body); --fg-heading: var(--fg-light-elevated-heading); --fg-muted: var(--fg-light-elevated-muted); --fg-link: var(--fg-light-elevated-link); --fg-inverse: var(--fg-light-elevated-inverse); }
.text-role-body { color: var(--fg-body); overflow-wrap: anywhere; }
.text-role-heading { color: var(--fg-heading); overflow-wrap: anywhere; }
.text-role-muted { color: var(--fg-muted); }
.text-role-link { color: var(--fg-link); }
.text-role-inverse { color: var(--fg-inverse); }
.text-role-link { text-decoration: underline; }
.text-role-link:hover { color: var(--brand-light-accent-hover); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--focus-light-ring); outline-offset: 2px; }
img { max-width: 100%; height: auto; }
.site-logo { max-width: 100%; height: auto; }
.site-menu > summary { list-style: none; cursor: pointer; }
.site-menu > summary::-webkit-details-marker { display: none; }
:where(section[data-section][style]) { background-size: cover; background-position: center; padding: clamp(1.5rem, 4vw, 3rem); }
:where(section[data-section][style] > .bg-surface-card) { padding: clamp(1rem, 3vw, 2rem); }
:where(section[data-section][style] > .bg-surface-card > :first-child) { margin-top: 0; }
:where(section[data-section][style] > .bg-surface-card > :last-child) { margin-bottom: 0; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { position: static; padding: 0.25rem 0.5rem; outline: 2px solid var(--focus-light-ring); }

/* Elk Grove Foot Notes: clinical field notebook */

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 9rem; }

body.notebook {
  margin: 0;
  font-family: 'Lato', Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
}

h1, h2, h3, h4 {
  font-family: 'Taviraj', Georgia, serif;
  font-weight: 500;
  line-height: 1.2;
  margin: 0;
}

a.text-role-link {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a.text-role-link:hover { text-decoration-thickness: 2px; }

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

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border-light-default);
}

.masthead {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.85rem 1rem 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand .site-logo { width: 18rem; height: auto; display: block; }

.nav-bar {
  border-top: 1px solid var(--border-light-subtle);
}

.nav-bar .site-nav { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }

.nav-bar .site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.75rem;
}

.nav-bar .site-nav a {
  display: inline-block;
  padding: 0.5rem 0;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.nav-bar .site-nav a:hover { border-bottom-color: var(--brand-light-accent); }

/* collapsed toggle: phones only */
.site-menu { position: relative; }

.site-menu > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border-light-default);
  border-radius: 2px;
  font-size: 0.9375rem;
  white-space: nowrap;
}

.site-menu .menu-icon {
  width: 1rem;
  height: 0.75rem;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  position: relative;
}

.site-menu .menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 2px solid currentColor;
  transform: translateY(-50%);
}

.site-menu > ul {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 14rem;
  margin: 0;
  padding: 0.5rem 0;
  list-style: none;
  background: var(--bg-light-card);
  border: 1px solid var(--border-light-default);
}

.site-menu > ul a {
  display: block;
  padding: 0.6rem 1rem;
  text-decoration: none;
}

.site-menu ul ul { list-style: none; padding-left: 1rem; }

@media (min-width: 48rem) {
  .menu-toggle { display: none; }
}

@media (max-width: 47.99rem) {
  html { scroll-padding-top: 5.5rem; }
  .nav-bar { display: none; }
  .brand .site-logo { width: 11rem; }
}

/* ---------- Page frame ---------- */

.page {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
}

.breadcrumbs ol {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: var(--border-light-default);
}

main p, main li { max-width: 66ch; }

main ul { padding-left: 1.2rem; }

main li + li { margin-top: 0.5rem; }

main li::marker { color: var(--brand-light-accent); }

main h2 { font-size: 1.6rem; margin: 2.5rem 0 0.75rem; }

main h3 { font-size: 1.25rem; margin: 1.75rem 0 0.5rem; }

.photo-hero, .photo-inline { margin: 0 0 2rem; }

.photo-hero img, .photo-inline img {
  display: block;
  width: 100%;
  border: 1px solid var(--border-light-default);
  padding: 0.4rem;
  background: var(--bg-light-card);
}

/* ---------- Home: opening spread + logbook ---------- */

.spread {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: end;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-light-default);
  margin-bottom: 2rem;
}

.study { margin: 0; }

.study svg { display: block; width: 100%; height: auto; }

.study-skin { fill: none; stroke: var(--fg-heading); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }

.study-bone { fill: none; stroke: var(--brand-light-accent); stroke-width: 1.1; }

.study-ground line { stroke: var(--border-light-default); stroke-width: 1; }

.study-leader line { stroke: var(--border-light-default); stroke-width: 0.8; stroke-dasharray: 2 3; }

.study-label text { font-family: 'Taviraj', Georgia, serif; font-style: italic; font-size: 13px; fill: var(--fg-muted); }

.cover-title h1 {
  font-weight: 300;
  font-size: clamp(2.2rem, 4.4vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.display-lines {
  margin-top: 1.5rem;
  padding-left: 1rem;
  border-left: 2px solid var(--brand-light-accent);
}

.display-lines .display-line {
  margin: 0 0 0.6rem;
  font-size: 1.125rem;
}

.display-lines .display-line:last-child { margin-bottom: 0; }

/* logbook rows: h2 in the margin, entry text beside it */
.logbook {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  column-gap: 2.5rem;
}

.logbook > * { grid-column: 2; }

.logbook > .photo-hero { grid-column: 1 / -1; }

.logbook > h2 {
  grid-column: 1;
  margin: 0;
  padding-top: 1.1rem;
  font-size: 1.2rem;
  font-style: italic;
  font-weight: 400;
  border-top: 1px solid var(--border-light-default);
}

.logbook > h2 + * {
  padding-top: 1.1rem;
  border-top: 1px solid var(--border-light-default);
}

.logbook > p:first-child, .logbook > .photo-hero + p {
  font-size: 1.2rem;
  margin-top: 0;
}

.logbook > p { margin: 0 0 1rem; }

.logbook > :is(p, ul):last-child { margin-bottom: 0; }

@media (max-width: 47.99rem) {
  .spread { grid-template-columns: 1fr; gap: 1.5rem; }
  .study { order: 2; }
  .logbook { display: block; }
  .logbook > h2 { margin-top: 2rem; padding-top: 0.9rem; }
  .logbook > h2 + * { border-top: 0; padding-top: 0; margin-top: 0.5rem; }
}

/* ---------- Article: reading column with numbered margin glosses ---------- */

.article { max-width: 46rem; margin: 0 auto; }

.entry-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: end;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light-default);
  margin-bottom: 2rem;
}

.entry-title h1 { font-size: clamp(2rem, 3.6vw, 2.8rem); font-weight: 400; }

.sketch { margin: 0; width: 10rem; }

.sketch svg { display: block; width: 100%; height: auto; }

.sketch-skin { fill: none; stroke: var(--fg-heading); stroke-width: 1.4; stroke-linejoin: round; }

.sketch-bone { fill: none; stroke: var(--brand-light-accent); stroke-width: 1.2; }

.sketch-ground { stroke: var(--border-light-default); stroke-width: 1; }

.reading { counter-reset: gloss; }

.reading > p { line-height: 1.75; }

.reading > h2 {
  counter-increment: gloss;
  position: relative;
  font-size: 1.5rem;
}

.reading > h2::before {
  content: counter(gloss);
  display: inline-block;
  min-width: 2rem;
  margin-right: 0.5rem;
  font-style: italic;
  font-weight: 300;
  color: var(--brand-light-accent);
  border-right: 1px solid var(--border-light-default);
  padding-right: 0.5rem;
  text-align: right;
}

@media (min-width: 64rem) {
  .reading > h2::before {
    position: absolute;
    right: 100%;
    margin-right: 1.25rem;
    top: 0.1em;
  }
}

/* ---------- Topic hub: index-card tiles ---------- */

.hub-head { margin-bottom: 1.75rem; }

.hub-title h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 400; max-width: 22ch; }

.index-cards > ul {
  list-style: none;
  margin: 0 0 3rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1.25rem;
}

.index-cards > ul > li {
  margin: 0;
  max-width: none;
  min-height: 10rem;
  border: 1px solid var(--border-light-default);
  background-color: var(--bg-light-card);
  /* index-card ruling under the header */
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(1.6rem - 1px), var(--border-light-subtle) calc(1.6rem - 1px), var(--border-light-subtle) 1.6rem);
}

.index-cards > ul > li > a {
  display: block;
  padding: 0.85rem 1rem 0.7rem;
  background: var(--bg-light-card);
  border-bottom: 1px solid var(--brand-light-accent);
  font-family: 'Taviraj', Georgia, serif;
  font-size: 1.2rem;
  line-height: 1.35;
  text-decoration: none;
}

.index-cards > ul > li > a:hover { text-decoration: underline; }

.hub-body { max-width: 46rem; }

/* ---------- About: preface column ---------- */

.preface { max-width: 38rem; margin: 0 auto; }

.preface-title h1 { font-size: clamp(2rem, 3.8vw, 2.9rem); font-weight: 300; margin-bottom: 2rem; }

.preface-body > p { line-height: 1.75; }

.preface-body > p:first-child {
  font-family: 'Taviraj', Georgia, serif;
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.5;
  padding: 0.5rem 0 0.5rem 1.25rem;
  border-left: 2px solid var(--brand-light-accent);
}

@media (min-width: 80rem) {
  .preface { position: relative; }
  .preface-body > p:first-child {
    position: absolute;
    left: calc(100% + 3rem);
    top: 0;
    width: 16rem;
    font-size: 1.15rem;
    margin: 0;
  }
}

/* ---------- Contact: note beside ruled form ---------- */

.contact-title h1 { font-size: clamp(2rem, 3.8vw, 2.9rem); font-weight: 400; margin-bottom: 2rem; }

.contact-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}

.contact-note > :first-child { margin-top: 0; }

.ruled-form {
  border: 1px solid var(--border-light-default);
  padding: 1.5rem;
}

.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field { margin: 0 0 1.25rem; max-width: none; }

.field label {
  display: block;
  font-size: 0.9375rem;
  font-style: italic;
  font-family: 'Taviraj', Georgia, serif;
  margin-bottom: 0.25rem;
}

.field input, .field textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border-light-default);
  border-radius: 0;
  padding: 0.4rem 0;
}

.field textarea {
  resize: vertical;
  line-height: 1.65rem;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(1.65rem - 1px), var(--border-light-subtle) calc(1.65rem - 1px), var(--border-light-subtle) 1.65rem);
  background-attachment: local;
}

.field input:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--brand-light-accent);
  outline-offset: 2px;
  border-bottom-color: var(--brand-light-accent);
}

.form-actions { margin: 0.5rem 0 0; }

.ask {
  font: inherit;
  font-weight: 700;
  min-height: 44px;
  padding: 0.55rem 1.25rem;
  background: transparent;
  border: 1px solid var(--brand-light-accent);
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
}

.ask:hover { border-width: 2px; padding: calc(0.55rem - 1px) calc(1.25rem - 1px); }

.ask:focus-visible { outline: 2px solid var(--brand-light-accent); outline-offset: 2px; }

@media (max-width: 47.99rem) {
  .contact-columns { grid-template-columns: 1fr; gap: 2rem; }
  .field-pair { grid-template-columns: 1fr; gap: 0; }
}

/* ---------- Thank you: one quiet column ---------- */

.closing { max-width: 36rem; margin: 0 auto; }

.closing-title h1 { font-size: clamp(2rem, 3.6vw, 2.7rem); font-weight: 300; font-style: italic; }

.pen-stroke {
  display: block;
  width: 15rem;
  height: auto;
  margin: 0.5rem 0 2rem;
}

.pen-stroke path { fill: none; stroke: var(--brand-light-accent); stroke-width: 1.8; stroke-linecap: round; }

.closing-return {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light-default);
}

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--border-light-default); }

.footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
}

.footer-name { margin: 0; font-family: 'Taviraj', Georgia, serif; font-size: 1.15rem; }

.footer-line { margin: 0; font-size: 0.9375rem; max-width: 46ch; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
