@font-face { font-family: 'El Messiri'; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/el-messiri-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: 'El Messiri'; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/el-messiri-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: 'El Messiri'; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/el-messiri-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: 'El Messiri'; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/el-messiri-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: 'Rufina'; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/rufina-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: 'Rufina'; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/rufina-latin-700-normal.woff2") format("woff2"); }
:root {
  --bg-light-base: #eef2f5;
  --fg-light-base-body: #1d2125;
  --fg-light-base-heading: #1d2125;
  --fg-light-base-muted: #454d55;
  --fg-light-base-link: #a3195f;
  --fg-light-base-inverse: #2b3137;
  --bg-light-card: #f8fafb;
  --fg-light-card-body: #1d2125;
  --fg-light-card-heading: #1d2125;
  --fg-light-card-muted: #454d55;
  --fg-light-card-link: #a3195f;
  --fg-light-card-inverse: #2b3137;
  --bg-light-elevated: #f4dfe8;
  --fg-light-elevated-body: #1d2125;
  --fg-light-elevated-heading: #1d2125;
  --fg-light-elevated-muted: #454d55;
  --fg-light-elevated-link: #a3195f;
  --fg-light-elevated-inverse: #2b3137;
  --brand-light-accent: #a3195f;
  --brand-light-accent-hover: #7d1249;
  --brand-light-on-accent: #f8fafb;
  --focus-light-ring: #a3195f;
  --border-light-default: #5d6770;
  --border-light-subtle: #bcc6ce;
}
.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; }
html:has(:focus-visible) :is(details.site-menu, details.site-nav-group)[open]:not(:focus-within) > ul { visibility: hidden; }
: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); }

:root {
  --display: 'El Messiri', Georgia, serif;
  --text: 'Rufina', Georgia, serif;
  --charcoal: var(--fg-light-base-heading);
  --hot: var(--brand-light-accent);
  --frost: var(--bg-light-card);
  --glow: var(--bg-light-elevated);
  --gutter: clamp(1rem, 4vw, 2.75rem);
  --wide: 74rem;
  --measure: 40rem;
}

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

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

body {
  margin: 0;
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.72;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Header: static, collapsed toggle at every width */
.site-header { position: static; }
.site-header__bar {
  position: relative;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0.85rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  text-decoration: none;
}
.site-brand .site-logo { display: block; width: auto; height: 2.75rem; }

.thermal-band {
  height: 0.5rem;
  background: linear-gradient(90deg, var(--charcoal) 0 50%, var(--hot) 50% 100%);
}
.thermal-band--low { height: 0.875rem; }

details.site-menu > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
  padding: 0.35rem 0.9rem;
  border: 2px solid var(--charcoal);
  border-radius: 999px;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  white-space: nowrap;
}
details.site-menu .menu-icon {
  position: relative;
  width: 0.5rem;
  height: 1.15rem;
  border-radius: 0.25rem;
  background: linear-gradient(var(--hot) 0 50%, var(--charcoal) 50% 100%);
}
details.site-menu[open] > summary { background: var(--charcoal); color: var(--frost); }
details.site-menu[open] .menu-icon { background: linear-gradient(var(--frost) 0 50%, var(--hot) 50% 100%); }

details.site-menu > ul {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 30;
  min-height: calc(100vh - 4.5rem);
  margin: 0;
  padding: clamp(1.5rem, 5vw, 3.5rem) var(--gutter) 3rem;
  list-style: none;
  background: linear-gradient(90deg, var(--frost) 0 calc(100% - 0.75rem), var(--hot) calc(100% - 0.75rem) 100%);
  border-top: 0.5rem solid var(--charcoal);
}
details.site-menu > ul > li { max-width: var(--wide); margin: 0 auto; }
details.site-menu > ul a {
  display: block;
  padding: 0.7rem 0;
  font-family: var(--display);
  font-size: clamp(1.7rem, 5vw, 2.8rem);
  font-weight: 600;
  line-height: 1.15;
  text-decoration: none;
  border-bottom: 1px solid var(--border-light-subtle);
}
details.site-menu > ul a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
details.site-menu > ul ul { list-style: none; margin: 0; padding: 0 0 0 1.25rem; }
details.site-menu > ul ul a { font-size: clamp(1.15rem, 3vw, 1.5rem); }

@media (max-width: 480px) {
  .site-brand .site-logo { height: 2.25rem; }
  details.site-menu > summary { padding: 0.35rem 0.75rem; }
  details.site-menu .menu-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* Frame */
.page-frame {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(3rem, 8vw, 6rem);
}
.breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 1.25rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.6rem;
  font-size: 0.9rem;
}
.breadcrumbs li + li::before { content: "/"; margin-right: 0.6rem; color: var(--border-light-default); }

/* Shared prose */
.routine, .modality__body, .writeup__prose, .logbook__entries, .claim-desk__intro, .cooldown__block { overflow-wrap: break-word; }
:is(.routine, .modality__body, .writeup__prose, .logbook__entries, .claim-desk__intro, .cooldown__block) > * { margin: 0 0 1.15rem; }
:is(.routine, .modality__body, .writeup__prose, .logbook__entries, .claim-desk__intro, .cooldown__block) h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.2rem);
  margin: 2.6rem 0 0.9rem;
}
:is(.routine, .modality__body, .writeup__prose, .logbook__entries) h3 { font-size: 1.35rem; margin: 1.8rem 0 0.6rem; }
:is(.routine, .modality__body, .writeup__prose, .logbook__entries, .claim-desk__intro, .cooldown__block) a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
:is(.routine, .modality__body, .writeup__prose, .logbook__entries, .claim-desk__intro, .cooldown__block) li { margin-bottom: 0.5rem; }
:is(.routine, .modality__body, .writeup__prose, .logbook__entries, .claim-desk__intro, .cooldown__block) li::marker { color: var(--hot); }
blockquote {
  margin: 1.8rem 0;
  padding: 0.4rem 0 0.4rem 1.2rem;
  border-left: 4px solid var(--hot);
}
figure { margin: 2rem 0; }
figure img { display: block; width: 100%; }
figcaption { font-size: 0.9rem; margin-top: 0.5rem; }
.photo-hero img { aspect-ratio: 16 / 9; object-fit: cover; }

/* Home: hot-cold split, then routine timeline */
.thermal-split {
  display: grid;
  margin-top: clamp(1rem, 3vw, 2rem);
  border: 3px solid var(--charcoal);
}
.thermal-split__cold {
  padding: clamp(1.75rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 3.5rem);
  border-bottom: 3px solid var(--charcoal);
}
.thermal-split__cold h1 {
  font-size: clamp(2.4rem, 7.4vw, 5.4rem);
  font-weight: 700;
  line-height: 1.02;
  max-width: 14ch;
}
.thermal-split__warm {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1rem;
  padding: clamp(1.5rem, 5vw, 3.5rem) clamp(1.25rem, 4vw, 3rem);
  background-image: radial-gradient(circle at 100% 0%, var(--hot) 0 0.9rem, transparent 0.95rem);
}
.thermal-split__warm .display-line { margin: 0; font-size: 1.12rem; max-width: 30rem; }
.thermal-split__warm .display-line + .display-line { padding-top: 1rem; border-top: 2px solid var(--charcoal); }
@media (min-width: 860px) {
  .thermal-split { grid-template-columns: 1.45fr 1fr; }
  .thermal-split__cold { border-bottom: 0; border-right: 3px solid var(--charcoal); }
}

.routine {
  position: relative;
  max-width: 46rem;
  margin: clamp(2.5rem, 6vw, 4rem) auto 0;
  padding-left: 2.75rem;
}
.routine::before {
  content: "";
  position: absolute;
  left: 0.75rem;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(var(--hot), var(--charcoal));
}
.routine > .photo-hero { margin: 0 0 2.25rem -2.75rem; border: 3px solid var(--charcoal); }
.routine > p:first-of-type { font-size: 1.28rem; line-height: 1.55; }
.routine h2 { position: relative; }
.routine h2::before {
  content: "";
  position: absolute;
  left: -2.65rem;
  top: 0.35em;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  border: 4px solid var(--charcoal);
  background: var(--frost);
}
.routine h2:nth-of-type(odd)::before { background: var(--hot); }

/* Topic hub: stepped modality blocks */
.modality__head {
  margin-top: clamp(1rem, 3vw, 2rem);
  padding: clamp(2rem, 6vw, 4rem) clamp(1.25rem, 4vw, 3rem);
  border-left: 1rem solid var(--charcoal);
}
.modality__head h1 { font-size: clamp(2.3rem, 6.4vw, 4.4rem); max-width: 18ch; }
.modality__body { max-width: var(--measure); margin: clamp(2rem, 5vw, 3rem) 0 0; }
.modality__body > p:first-of-type { font-size: 1.22rem; line-height: 1.6; }
.modality__index ul {
  list-style: none;
  margin: clamp(2rem, 5vw, 3rem) 0 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}
.modality__index li {
  min-height: 7.5rem;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem 1.4rem 1.4rem 2.6rem;
  background: var(--frost);
  border: 2px solid var(--charcoal);
  box-shadow: inset 1.2rem 0 0 var(--charcoal);
}
.modality__index li:nth-child(even) { background: var(--glow); box-shadow: inset 1.2rem 0 0 var(--hot); }
.modality__index a {
  font-family: var(--display);
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  font-weight: 600;
  line-height: 1.2;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
@media (min-width: 860px) {
  .modality__index li { max-width: 46rem; }
  .modality__index li:nth-child(4n + 2) { margin-left: 4rem; }
  .modality__index li:nth-child(4n + 3) { margin-left: 8rem; }
  .modality__index li:nth-child(4n + 4) { margin-left: 12rem; }
}

/* Article: temperature scale margin + write-up */
.writeup {
  display: grid;
  gap: 1.5rem;
  padding-top: clamp(1.5rem, 4vw, 3rem);
}
.writeup__scale {
  height: 0.75rem;
  background:
    repeating-linear-gradient(90deg, var(--charcoal) 0 2px, transparent 2px 1.5rem),
    linear-gradient(90deg, var(--hot), var(--glow) 55%, var(--frost));
  border: 2px solid var(--charcoal);
}
.writeup__main { max-width: 44rem; }
.writeup__head h1 { font-size: clamp(2.1rem, 5.6vw, 3.8rem); margin-bottom: 1.8rem; }
.writeup__prose { counter-reset: step; }
.writeup__prose > p:first-of-type { font-size: 1.2rem; line-height: 1.6; }
.writeup__prose h2 { counter-increment: step; position: relative; padding-top: 1.1rem; border-top: 2px solid var(--charcoal); }
.writeup__prose h2::before {
  content: counter(step);
  position: absolute;
  top: -0.85rem;
  left: 0;
  min-width: 1.7rem;
  padding: 0 0.4rem;
  font-family: var(--text);
  font-size: 0.95rem;
  line-height: 1.7rem;
  text-align: center;
  background: var(--hot);
  color: var(--brand-light-on-accent);
}
@media (min-width: 960px) {
  .writeup { grid-template-columns: 4.5rem minmax(0, 44rem); gap: clamp(2rem, 5vw, 4.5rem); }
  .writeup__scale {
    position: sticky;
    top: 1.5rem;
    align-self: start;
    width: 1.1rem;
    height: calc(100vh - 3rem);
    justify-self: center;
    border-radius: 0.6rem;
    background:
      repeating-linear-gradient(var(--charcoal) 0 2px, transparent 2px 1.75rem),
      linear-gradient(var(--hot), var(--glow) 55%, var(--frost));
  }
  .writeup__prose h2::before { left: -5.4rem; top: 1.05rem; }
}

/* About: log entries */
.logbook { max-width: 46rem; margin: 0 auto; }
.logbook__head {
  margin-top: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(1.75rem, 5vw, 3rem) clamp(1.25rem, 4vw, 2.5rem);
  border-top: 0.75rem solid var(--charcoal);
}
.logbook__head h1 { font-size: clamp(2.2rem, 6vw, 4rem); }
.logbook__entries { margin-top: 2rem; }
.logbook__entries > p:first-of-type { font-size: 1.2rem; line-height: 1.6; }
.logbook__entries h2 {
  padding: 0.25rem 0 0.25rem 1rem;
  border-left: 0.5rem solid var(--hot);
}
.logbook__entries h2:nth-of-type(even) { border-left-color: var(--charcoal); }
.logbook__entries h2 ~ p { padding-left: 1.5rem; }

/* Contact: framed panel form */
.claim-desk { max-width: 48rem; margin: 0 auto; padding-top: clamp(1.5rem, 4vw, 3rem); }
.claim-desk__head h1 { font-size: clamp(2.4rem, 7vw, 4.4rem); margin-bottom: 1.4rem; }
.claim-desk__intro > p:first-of-type { font-size: 1.2rem; line-height: 1.6; }
.claim-form {
  margin-top: 2.25rem;
  padding: clamp(1.4rem, 4vw, 2.5rem);
  border: 3px solid var(--charcoal);
  border-top-width: 1rem;
}
.claim-form__grid { display: grid; gap: 1.25rem; }
@media (min-width: 640px) {
  .claim-form__grid { grid-template-columns: 1fr 1fr; gap: 1.25rem 1.5rem; }
  .claim-field--wide { grid-column: 1 / -1; }
}
.claim-field label { display: block; font-family: var(--display); font-weight: 600; font-size: 1.05rem; margin-bottom: 0.35rem; }
.claim-field input, .claim-field textarea {
  width: 100%;
  font: inherit;
  color: inherit;
  background: var(--frost);
  border: 2px solid var(--charcoal);
  border-radius: 0;
  padding: 0.7rem 0.8rem;
}
.claim-field textarea { resize: vertical; min-height: 10rem; }
.claim-field input:focus-visible, .claim-field textarea:focus-visible {
  outline: 3px solid var(--focus-light-ring);
  outline-offset: 2px;
}
.claim-form__send {
  margin-top: 1.75rem;
  min-height: 48px;
  padding: 0.7rem 1.8rem;
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--brand-light-on-accent);
  background: var(--brand-light-accent);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.claim-form__send:hover { background: var(--brand-light-accent-hover); }

/* Thank you: cool-down block */
.cooldown { max-width: 44rem; margin: 0 auto; padding-top: clamp(2rem, 6vw, 4rem); }
.cooldown__block {
  padding: clamp(1.75rem, 5vw, 3.25rem);
  border: 3px solid var(--charcoal);
  box-shadow: 0.75rem 0.75rem 0 var(--hot);
}
.cooldown__head h1 { font-size: clamp(2.2rem, 6.5vw, 4rem); margin-bottom: 1.25rem; }

/* Footer */
.site-footer { margin-top: clamp(2rem, 6vw, 4rem); }
.site-footer__inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 2rem var(--gutter) 2.6rem;
}
.site-footer p { margin: 0; }
.site-footer__name { font-family: var(--display); font-size: 1.5rem; font-weight: 600; }
.site-footer__line { margin-top: 0.4rem; font-size: 0.95rem; max-width: 40rem; }

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