/* ------------------------------------------------------------------
   Panel House — tokens, base and components.

   Soft editorial: warm canvas, paper and mist surfaces, serif headlines,
   no borders and no dividers (space and soft fills separate things),
   text in #000 or #fff only, one focus ring (2px black, 3px off).

   Cascade: the same layer order Tailwind v4 declares, so Tailwind's
   utilities can adjust any component here (a class on the element wins),
   while preflight never overrides a component. `properties` is listed too:
   in CDN mode this file loads before Tailwind's runtime sheet, and an
   unlisted layer would land last and reset the --tw-* values of utilities.
   ------------------------------------------------------------------ */

@layer properties, theme, base, components, utilities;

:root {
  --ph-canvas: #f5f2ec;
  --ph-paper: #fbfaf7;
  --ph-sand: #ebe5dc;
  --ph-stone: #e3dccf;
  --ph-mist: #efebe4;
  --ph-ink: #1c1a17;
  --ph-ink-hover: #34302b;

  --ph-font-sans: "Geist", "Noto Sans Georgian", ui-sans-serif, system-ui, sans-serif;
  --ph-font-serif: "Noto Serif Georgian", ui-serif, Georgia, serif;

  --ph-ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --ph-ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ph-drawer-in: cubic-bezier(0.32, 0.72, 0, 1);
  --ph-drawer-out: cubic-bezier(0.4, 0, 0.9, 0.4);
  --ph-shadow-float: 0 40px 120px -24px rgb(0 0 0 / 0.18);

  --header-h: 4rem;
}

@media (width >= 48rem) {
  :root {
    --header-h: 4.5rem;
  }
}

/* ============================== Base ============================== */

@layer base {
  html {
    background-color: var(--ph-canvas);
    -webkit-text-size-adjust: 100%;
    /* The scrollbar's room stays reserved, so locking the page for the drawer never shifts it. */
    scrollbar-gutter: stable;
  }

  body {
    margin: 0;
    background-color: var(--ph-canvas);
    color: #000;
    font-family: var(--ph-font-sans);
    font-feature-settings: "ss01", "cv11";
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
  }

  ::selection {
    background: var(--ph-ink);
    color: #fff;
  }

  /* The one ring allowed on screen: 2px black, 3px off the element (follows its radius).
     `:root` lifts it above preflight's Firefox `:-moz-focusring { outline: auto }`, which shares
     this layer and, in CDN mode, comes later in the page. */
  :root :focus-visible {
    outline: 2px solid #000;
    outline-offset: 3px;
  }

  :root [data-scroll-target]:focus,
  :root main:focus {
    outline: none;
  }

  /* WordPress core, blocks and plugins hide helper text with this class (shown again on focus). */
  .screen-reader-text:not(:focus, :focus-within) {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  [hidden]:not([hidden="until-found"]) {
    display: none !important;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  button:not(:disabled),
  [role="button"] {
    cursor: pointer;
  }

  /* Keyboard focus never lands under the sticky header. */
  main :where(a, button, input, textarea, select, summary, [tabindex]:not([tabindex="-1"])) {
    scroll-margin-top: calc(var(--header-h) + 0.5rem);
  }

  @media (prefers-reduced-motion: reduce) {
    :where(*:not(.ph-drawer__panel, .ph-drawer__overlay)),
    :where(*:not(.ph-drawer__panel, .ph-drawer__overlay))::before,
    :where(*:not(.ph-drawer__panel, .ph-drawer__overlay))::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      transition-delay: 0s !important;
      scroll-behavior: auto !important;
    }
  }
}

/* Page lock while the drawer is open (Lenis, when running, is stopped as well). */
html.ph-locked {
  overflow: hidden;
}

/* ========================== Scroll reveals ==========================
   Hidden only when JavaScript runs (html.js, set before the first paint),
   motion is allowed, and the motion script did not fail (html.motion-fallback
   after 3.5 s). theme.js animates each [data-reveal] in and marks it
   [data-revealed], after which these rules no longer apply. */
@media (prefers-reduced-motion: no-preference) {
  html.js:not(.motion-fallback) [data-reveal]:not([data-revealed]) {
    opacity: 0;
  }
  /* Never hide what has keyboard focus. */
  html.js:not(.motion-fallback) [data-reveal]:not([data-revealed]):focus-within {
    opacity: 1;
  }
}

/* Without JavaScript the slider cannot move, so its controls stay hidden. Unlayered on purpose:
   the controls carry Tailwind's `flex`, and utilities outrank every rule in the components layer. */
html:not(.js) [data-hero-controls] {
  display: none;
}

/* Core's block styles are unlayered (`:where(figure) { margin: 0 0 1em }` and the like), and an
   unlayered rule beats every layer, so the prose rhythm for figures (image, table, gallery, embed,
   video, audio, pullquote) is unlayered as well. The last block leaves no trailing gap. */
.ph-prose > * + figure {
  margin-top: 1em;
}
.ph-prose > :last-child {
  margin-bottom: 0;
}
/* Editor alignments (classic images and captions, embeds, tables, pullquotes), unlayered for the
   same reason: core's figure margin would otherwise leave a float with no gap beside the text. */
.ph-prose .alignleft {
  float: left;
  margin: 0.25em 1.5em 1em 0;
}
.ph-prose .alignright {
  float: right;
  margin: 0.25em 0 1em 1.5em;
}
.ph-prose .aligncenter {
  margin-inline: auto;
}
/* A floated block that follows another keeps the 1em rhythm above it. */
.ph-prose > * + :is(.alignleft, .alignright) {
  margin-top: 1em;
}

/* lenis.css gives every [data-lenis-prevent] `overscroll-behavior: contain`, unlayered. The catalog
   tree takes the wheel only while it overflows; at either end the wheel must pass on to the page
   instead of stopping dead over the sidebar, so this is unlayered too. */
.lenis .ph-tree[data-lenis-prevent] {
  overscroll-behavior: auto;
}

/* =========================== Components =========================== */

@layer components {
  /* ---------- Skip link ---------- */
  .ph-skip {
    position: absolute;
    top: 0.75rem;
    left: 1rem;
    z-index: 60;
    translate: 0 -300%;
    border-radius: 9999px;
    background: var(--ph-ink);
    padding: 0.5rem 1rem;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 500;
  }
  .ph-skip:focus {
    translate: 0 0;
  }

  /* ---------- Header ----------
     Solid canvas, no rule. Scrolled: a 32px canvas fade grows beneath it.
     Scrolling down past 200px slides it away; any scroll up brings it back. */
  .ph-header {
    position: sticky;
    top: 0;
    z-index: 40;
    height: var(--header-h);
    background: var(--ph-canvas);
    transition: translate 600ms var(--ph-ease-in-out);
  }
  .ph-header::after {
    content: "";
    pointer-events: none;
    position: absolute;
    inset-inline: 0;
    top: 100%;
    height: 2rem;
    background: linear-gradient(to bottom, var(--ph-canvas), transparent);
    opacity: 0;
    transition: opacity 500ms var(--ph-ease-soft);
  }
  .ph-header[data-scrolled]:not([data-hidden])::after {
    opacity: 1;
  }
  .ph-header[data-hidden] {
    translate: 0 -100%;
  }
  /* Logged in: the WordPress toolbar is fixed above everything from 601px; sit below it. */
  @media screen and (width >= 37.5625rem) {
    .admin-bar .ph-header,
    .admin-bar .ph-drawer {
      top: var(--wp-admin--admin-bar--height, 32px);
    }
  }

  /* Soft pills, no lines: the current item sits on mist, hover tints any item. */
  .ph-nav-pill {
    display: inline-flex;
    height: 2.5rem;
    align-items: center;
    gap: 0.5rem;
    border-radius: 9999px;
    padding-inline: 0.875rem;
    color: #000;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color 400ms var(--ph-ease-soft);
  }
  .ph-nav-pill:hover {
    background: color-mix(in srgb, var(--ph-mist) 70%, transparent);
  }
  .ph-nav-pill[aria-current] {
    background: var(--ph-mist);
  }

  /* ---------- Buttons ----------
     Pills, no borders, no shadows; colour changes glide. A trailing icon
     marked data-icon="inline-end" nudges right on hover, data-icon="down"
     nudges down. Disabled is a flat mist pill with black text. */
  .ph-btn,
  .post-password-form input[type="submit"] {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    user-select: none;
    transition:
      background-color 400ms var(--ph-ease-soft),
      color 400ms var(--ph-ease-soft),
      scale 400ms var(--ph-ease-soft);
  }
  .ph-btn svg {
    flex-shrink: 0;
    pointer-events: none;
    transition: translate 500ms var(--ph-ease-soft);
  }
  .ph-btn:hover svg[data-icon="inline-end"] {
    translate: 3px 0;
  }
  .ph-btn:hover svg[data-icon="down"] {
    translate: 0 2px;
  }
  .ph-btn--ink,
  .post-password-form input[type="submit"] {
    background: var(--ph-ink);
    color: #fff;
  }
  .ph-btn--ink:hover,
  .post-password-form input[type="submit"]:hover {
    background: var(--ph-ink-hover);
  }
  .ph-btn--ink:active,
  .post-password-form input[type="submit"]:active {
    scale: 0.98;
  }
  .ph-btn--mist {
    background: var(--ph-mist);
    color: #000;
  }
  .ph-btn--mist:hover {
    background: var(--ph-sand);
  }
  .ph-btn--paper {
    background: var(--ph-paper);
    color: #000;
  }
  .ph-btn--paper:hover {
    background: #fff;
  }
  .ph-btn:disabled,
  .ph-btn[aria-disabled="true"] {
    pointer-events: none;
    background: var(--ph-mist);
    color: #000;
  }

  /* Over photos a black ring would vanish on the scrim: white there. */
  .ph-on-image:focus-visible,
  .ph-hero-dot:focus-visible {
    outline-color: #fff;
  }

  /* ---------- Quiet text links: a 1px underline draws in from the left on hover ---------- */
  .ph-draw-line,
  .ph-card-action {
    background: linear-gradient(currentColor, currentColor) 100% 100% / 0% 1px no-repeat;
    padding-bottom: 0.125rem;
    transition: background-size 700ms var(--ph-ease-soft);
  }
  .ph-draw-line:hover,
  .ph-draw-line:focus-visible,
  a:hover .ph-card-action,
  a:focus-visible .ph-card-action {
    background-position: 0 100%;
    background-size: 100% 1px;
  }

  /* ---------- Breadcrumbs ---------- */
  .ph-crumb {
    display: inline-flex;
    height: 2.25rem;
    max-width: 100%;
    min-width: 0;
    align-items: center;
    border-radius: 9999px;
    padding-inline: 0.375rem;
    color: #000;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    transition: background-color 400ms var(--ph-ease-soft);
  }
  .ph-crumb:hover {
    background: var(--ph-mist);
  }
  /* A trail too long for the line: home keeps its width; the nearest crumb gives way first, down to
     a stub that still shows its first letters (chevron + padding + 1.875rem of text); only then do
     the crumbs between share the cut, never below their chevron and an ellipsis. The last crumb's
     shrink weight is high enough that the others lose not even a fraction of a pixel before it. */
  .ph-crumbs > li {
    min-width: 0;
  }
  .ph-crumbs > li:first-child {
    flex-shrink: 0;
  }
  .ph-crumbs > li:not(:first-child, :last-child) {
    min-width: 2.5rem;
  }
  .ph-crumbs > li:last-child:not(:first-child) {
    min-width: 3.5rem;
    flex-shrink: 100000;
  }
  @media (width >= 40rem) {
    .ph-crumb {
      padding-inline: 0.625rem;
    }
    .ph-crumbs > li:not(:first-child, :last-child) {
      min-width: 3.25rem;
    }
    .ph-crumbs > li:last-child:not(:first-child) {
      min-width: 4.25rem;
    }
  }

  /* ---------- Hero slider ---------- */
  .ph-hero-scrim {
    background: linear-gradient(
      to top,
      rgb(28 26 23 / 0.6) 0%,
      rgb(28 26 23 / 0.26) 34%,
      rgb(28 26 23 / 0) 62%
    );
  }
  /* Before (or without) the script: the first slide only. GSAP's inline opacity wins later. */
  .ph-slide:not(:first-child) {
    opacity: 0;
  }
  .ph-slide-name {
    background: linear-gradient(currentColor, currentColor) 0 100% / 0% 1px no-repeat;
    padding-bottom: 0.25rem;
    transition: background-size 700ms var(--ph-ease-soft);
  }
  [data-slide-link]:hover .ph-slide-name {
    background-size: 100% 1px;
  }
  /* The slide link's focus ring is drawn around the whole well. */
  .ph-hero-stage:has([data-slide-link]:focus-visible) {
    outline: 2px solid #000;
    outline-offset: 3px;
  }

  .ph-hero-dot {
    display: flex;
    height: 1.5rem;
    align-items: center;
    border-radius: 9999px;
    padding-inline: 0.25rem;
  }
  .ph-hero-dot__track {
    position: relative;
    display: block;
    height: 0.375rem;
    width: 1.25rem;
    overflow: hidden;
    border-radius: 9999px;
    background: color-mix(in srgb, var(--ph-mist) 45%, transparent);
    transition: background-color 400ms var(--ph-ease-soft);
  }
  .ph-hero-dot:hover .ph-hero-dot__track {
    background: color-mix(in srgb, var(--ph-mist) 75%, transparent);
  }
  .ph-hero-dot[aria-current] .ph-hero-dot__track {
    background: var(--ph-mist);
  }
  .ph-hero-dot__fill {
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    background: var(--ph-ink);
    transform: scaleX(0);
    transform-origin: 0 50%;
  }
  @media (width >= 40rem) {
    .ph-hero-dot__track {
      width: 1.5rem;
    }
  }
  @media (width >= 48rem) {
    .ph-hero-dot__track {
      width: 2rem;
    }
  }
  [data-hero-toggle] [data-when="paused"],
  [data-hero-toggle][data-paused] [data-when="playing"] {
    display: none;
  }
  [data-hero-toggle][data-paused] [data-when="paused"] {
    display: block;
  }

  /* ---------- Category pills ----------
     A mist track of pill links; the current one is ink. On phones and
     tablets the row scrolls inside itself, bleeding to the screen edge and
     fading out under the gutters (px, like the gutters themselves). */
  .ph-pills {
    margin-inline: -20px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-inline: 20px;
    scrollbar-width: none;
    mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent);
  }
  .ph-pills::-webkit-scrollbar {
    display: none;
  }
  @media (width >= 48rem) {
    .ph-pills {
      margin-inline: -32px;
      padding-inline: 32px;
      mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent);
    }
  }
  @media (width >= 80rem) {
    .ph-pills {
      margin-inline: 0;
      padding-inline: 0;
      mask-image: none;
    }
  }
  .ph-pills__track {
    display: flex;
    width: max-content;
    margin: 0;
    padding: 0.375rem;
    list-style: none;
    border-radius: 9999px;
    background: var(--ph-mist);
  }
  .ph-pill {
    position: relative;
    display: inline-flex;
    height: 2.5rem;
    flex-shrink: 0;
    align-items: center;
    gap: 0.5rem;
    border-radius: 9999px;
    padding-inline: 1rem;
    color: #000;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    transition:
      background-color 400ms var(--ph-ease-soft),
      color 400ms var(--ph-ease-soft);
  }
  .ph-pill:hover {
    background: var(--ph-sand);
  }
  .ph-pill[data-active] {
    background: var(--ph-ink);
    color: #fff;
  }
  /* Inside a subcategory: its top-level category is the open branch, a paper chip on the track. */
  .ph-pill[data-trail] {
    background: var(--ph-paper);
  }
  /* The subcategory rows: smaller pills straight on the canvas, mist on hover. A row has no
     track to hold the focus mark (2px, 3px off) inside its scroll box, so the box takes that
     room as padding and gives it back as margin: the rows still sit 0.5rem apart. */
  .ph-pills--sub {
    margin-block: 0.125rem -0.375rem;
    padding-block: 0.375rem;
  }
  .ph-pill--quiet {
    height: 2.25rem;
    padding-inline: 0.875rem;
    font-size: 0.8125rem;
  }
  .ph-pill--quiet:not([data-active]):hover,
  .ph-pill--quiet[data-trail] {
    background: var(--ph-mist);
  }

  /* ---------- Category tree (catalog pages, from lg) ----------
     A quiet list beside the grid: top-level categories in the serif, subcategories in the
     sans, indented under their parent; the counts in small figures on the right. Hover tints
     a row; the categories above the page sit on mist; the page itself is an ink pill.
     It keeps its place below the header while the grid scrolls, and only when it is taller
     than the screen does it scroll inside itself (the padding keeps focus marks unclipped). */
  .ph-tree {
    --ph-tree-top: calc(var(--header-h) + var(--wp-admin--admin-bar--height, 0px) + 2rem);
    position: sticky;
    top: var(--ph-tree-top);
    max-height: calc(100dvh - var(--ph-tree-top) - 2rem);
    margin: -0.375rem;
    overflow-y: auto;
    padding: 0.375rem;
    scroll-padding-block: 0.375rem;
    scrollbar-width: thin;
    scrollbar-color: var(--ph-stone) transparent;
  }
  .ph-tree :where(ul) {
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .ph-tree :where(li + li) {
    margin-top: 0.25rem;
  }
  .ph-tree__all {
    margin-bottom: 0.875rem;
  }
  .ph-tree__sub {
    margin-block: 0.25rem 0.5rem;
    margin-inline-start: 1rem;
  }
  .ph-tree__link {
    display: flex;
    min-height: 2.75rem;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border-radius: 1.375rem;
    padding: 0.5rem 0.875rem;
    color: #000;
    font-family: var(--ph-font-serif);
    font-size: 1rem;
    font-weight: 450;
    line-height: 1.3;
    letter-spacing: -0.01em;
    text-wrap: pretty;
    overflow-wrap: anywhere;
    transition:
      background-color 400ms var(--ph-ease-soft),
      color 400ms var(--ph-ease-soft);
  }
  @media (width >= 80rem) {
    .ph-tree__link {
      gap: 1rem;
      padding-inline: 1rem;
      font-size: 1.0625rem;
    }
  }
  .ph-tree__sub .ph-tree__link {
    min-height: 2.5rem;
    padding-block: 0.4375rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0;
  }
  .ph-tree__count {
    flex-shrink: 0;
  }
  .ph-tree__link:hover {
    background: color-mix(in srgb, var(--ph-mist) 70%, transparent);
  }
  .ph-tree__link[data-trail] {
    background: var(--ph-mist);
  }
  .ph-tree__link[data-trail]:hover {
    background: var(--ph-sand);
  }
  .ph-tree__link[aria-current] {
    background: var(--ph-ink);
    color: #fff;
  }
  .ph-tree__link[aria-current]:hover {
    background: var(--ph-ink-hover);
  }

  /* ---------- Pagination ----------
     List pages (paginate_links: .page-numbers) and a split post's parts (wp_link_pages:
     .post-page-numbers). One pill row; on a narrow phone it wraps into a rounded track
     (radius = half the 52px row) instead of running off the screen. */
  .ph-pages {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
    margin: 0;
    padding: 0.375rem;
    list-style: none;
    border-radius: 1.625rem;
    background: var(--ph-mist);
  }
  .ph-pages :is(.page-numbers, .post-page-numbers) {
    display: inline-flex;
    height: 2.5rem;
    min-width: 2.5rem;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    padding-inline: 0.75rem;
    color: #000;
    font-size: 14px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    transition: background-color 400ms var(--ph-ease-soft);
  }
  .ph-pages a:is(.page-numbers, .post-page-numbers):hover {
    background: var(--ph-sand);
  }
  .ph-pages :is(.page-numbers, .post-page-numbers).current {
    background: var(--ph-ink);
    color: #fff;
  }
  .ph-pages svg {
    width: 1rem;
    height: 1rem;
  }

  /* ---------- Panel page ---------- */
  .ph-spec {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1.5rem;
    padding-block: 0.75rem;
    font-size: 13px;
  }
  .ph-spec dt {
    font-weight: 400;
    overflow-wrap: anywhere;
  }
  .ph-spec dd {
    margin: 0;
    text-align: right;
    font-weight: 500;
    text-wrap: pretty;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
  }
  @media (width >= 64rem) {
    .ph-spec {
      font-size: 15px;
    }
  }

  /* From lg the gallery stays beside the details, under the header (and the WordPress toolbar).
     Its photo well is never taller than the screen leaves room for, so the whole gallery, view
     tiles included, is in view on arrival: screen − header − toolbar − the trail above it (5.25rem)
     − the tiles (6.5rem) − 1.25rem of air. On a short screen the well keeps its column's width,
     grows wider than its ratio and the photo is cropped to fill it (object-fit: cover); the
     explicit width stops the cap from narrowing the well through its aspect ratio. */
  @media (width >= 64rem) {
    .ph-gallery {
      position: sticky;
      top: calc(var(--header-h) + var(--wp-admin--admin-bar--height, 0px) + 1.25rem);
    }
    .ph-gallery__well {
      width: 100%;
      max-height: max(22rem, calc(100dvh - var(--header-h) - var(--wp-admin--admin-bar--height, 0px) - 13rem));
    }
    .ph-gallery:not(:has([data-gallery-thumb])) .ph-gallery__well {
      max-height: max(22rem, calc(100dvh - var(--header-h) - var(--wp-admin--admin-bar--height, 0px) - 6.5rem));
    }
  }
  .ph-gallery__frame {
    opacity: 0;
    transition: opacity 700ms var(--ph-ease-soft);
  }
  .ph-gallery__frame[data-active] {
    opacity: 1;
  }
  .ph-thumb {
    position: relative;
    width: 4.5rem;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 14px;
    background: var(--ph-sand);
  }
  .ph-thumb img {
    opacity: 0.55;
    transition: opacity 400ms var(--ph-ease-soft);
  }
  .ph-thumb:hover img {
    opacity: 0.85;
  }
  .ph-thumb[aria-pressed="true"] img {
    opacity: 1;
  }
  @media (width >= 48rem) {
    .ph-thumb {
      width: 5.5rem;
    }
  }

  /* Editor content (panel descriptions, pages). */
  .ph-prose {
    max-width: 40rem;
    color: #000;
    font-size: 15px;
    line-height: 1.65;
  }
  .ph-prose > * + * {
    margin-top: 1em;
  }
  .ph-prose :where(h2, h3, h4) {
    margin-top: 1.6em;
    font-family: var(--ph-font-serif);
    font-weight: 350;
    line-height: 1.2;
    letter-spacing: -0.015em;
  }
  .ph-prose h2 {
    font-size: 1.75rem;
  }
  .ph-prose h3 {
    font-size: 1.375rem;
  }
  .ph-prose a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
  }
  .ph-prose :where(ul, ol) {
    padding-left: 1.25em;
  }
  .ph-prose ul {
    list-style: disc;
  }
  .ph-prose ol {
    list-style: decimal;
  }
  .ph-prose img {
    border-radius: 20px;
  }
  /* Floated images stay inside (a clearfix, not flow-root: the first heading's top margin keeps
     collapsing into the gap under the page title). */
  .ph-prose::after {
    content: "";
    display: table;
    clear: both;
  }

  /* ---------- Footer ---------- */
  .ph-footer-link {
    display: inline-flex;
    height: 2.25rem;
    align-items: center;
    border-radius: 9999px;
    padding-inline: 0.625rem;
    color: #000;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    transition: background-color 400ms var(--ph-ease-soft);
  }
  .ph-footer-link:hover {
    background: var(--ph-mist);
  }

  /* ---------- Form fields ----------
     Filled mist, no border, 14px radius. Hover deepens the fill, focus
     brightens it to paper with the ring. Invalid: a deeper stone fill while
     not focused — no red, no ring; the message under the field says why.
     16px on phones (no iOS focus zoom). WordPress core's password form
     (protected pages and panels) wears the same field and the ink button. */
  .ph-field,
  .post-password-form input[type="password"] {
    width: 100%;
    min-width: 0;
    height: 3rem;
    border-radius: 14px;
    background: var(--ph-mist);
    padding-inline: 1rem;
    color: #000;
    font: inherit;
    font-size: 1rem;
    font-weight: 500;
    outline: none;
    transition: background-color 400ms var(--ph-ease-soft);
  }
  .ph-field::placeholder {
    color: #000;
    font-weight: 400;
  }
  .ph-field:hover,
  .post-password-form input[type="password"]:hover {
    background: var(--ph-sand);
  }
  .ph-field:focus-visible,
  .post-password-form input[type="password"]:focus-visible {
    background: var(--ph-paper);
    outline: 2px solid #000;
    outline-offset: 3px;
  }
  .ph-field[aria-invalid="true"]:not(:focus-visible) {
    background: var(--ph-stone);
  }
  .ph-field--area {
    height: auto;
    min-height: 7.5rem;
    max-height: 18rem;
    padding-block: 0.75rem;
    line-height: 1.5;
    resize: vertical;
  }
  @media (width >= 48rem) {
    .ph-field,
    .post-password-form input[type="password"] {
      font-size: 15px;
    }
  }
  .post-password-form > * + * {
    margin-top: 1rem;
  }
  .post-password-form label {
    display: grid;
    max-width: 22rem;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
  }
  .post-password-form input[type="submit"] {
    height: 3rem;
    margin-top: 0.75rem;
    padding-inline: 1.5rem;
    cursor: pointer;
  }
  .ph-field-error,
  .ph-form-error {
    display: flex;
    gap: 0.5rem;
    margin: 0;
    color: #000;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
  }
  .ph-field-error::before,
  .ph-form-error::before {
    content: "";
    flex-shrink: 0;
    width: 0.375rem;
    height: 0.375rem;
    margin-top: 0.42em;
    border-radius: 9999px;
    background: var(--ph-ink);
  }
  .ph-honeypot {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  /* ---------- Quote drawer ----------
     Phones: full screen. From sm: a floating paper panel 12px off the
     viewport edges, 28px radius, one diffuse shadow. Opens in 750ms on a
     curve that moves at once and settles long; closes in 480ms with a gentle
     accelerate. The warm overlay (ink 20% + 6px blur) fades with it. Blocks
     marked data-sheet-item rise in, staggered, as the panel arrives.
     Reduced motion: a 150ms fade only. */
  .ph-drawer {
    position: fixed;
    inset: 0;
    z-index: 50;
    visibility: hidden;
    pointer-events: none;
  }
  .ph-drawer[data-state="open"],
  html:not(.js) .ph-drawer:target {
    visibility: visible;
    pointer-events: auto;
  }
  .ph-drawer[data-state="closing"] {
    visibility: visible;
  }

  .ph-drawer__overlay {
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--ph-ink) 20%, transparent);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 420ms ease-out;
  }
  .ph-drawer[data-state="open"] .ph-drawer__overlay,
  html:not(.js) .ph-drawer:target .ph-drawer__overlay {
    opacity: 1;
    transition: opacity 750ms var(--ph-drawer-in);
  }

  .ph-drawer__panel {
    position: absolute;
    inset-block: 0;
    right: 0;
    display: flex;
    width: 100%;
    flex-direction: column;
    overflow: hidden;
    background: var(--ph-paper);
    color: #000;
    font-size: 15px;
    box-shadow: var(--ph-shadow-float);
    outline: none;
    translate: 100% 0;
    transition: translate 480ms var(--ph-drawer-out);
  }
  .ph-drawer[data-state="open"] .ph-drawer__panel,
  html:not(.js) .ph-drawer:target .ph-drawer__panel {
    translate: 0 0;
    transition: translate 750ms var(--ph-drawer-in);
  }
  @media (width >= 40rem) {
    .ph-drawer__panel {
      inset-block: 12px;
      right: 12px;
      width: calc(100% - 24px);
      max-width: 28rem;
      border-radius: 28px;
      translate: calc(100% + 12px) 0;
    }
  }

  .ph-drawer__scroll {
    position: relative;
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  /* Pinned actions on paper; a 32px fade above lets the scrolling form dissolve under them. */
  .ph-drawer__foot {
    position: relative;
    display: flex;
    flex-shrink: 0;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: auto;
    background: var(--ph-paper);
    padding: 0.75rem 1.25rem max(1.25rem, env(safe-area-inset-bottom));
  }
  .ph-drawer__foot::before {
    content: "";
    pointer-events: none;
    position: absolute;
    inset-inline: 0;
    bottom: 100%;
    height: 2rem;
    background: linear-gradient(to top, var(--ph-paper), transparent);
  }
  @media (width >= 40rem) {
    .ph-drawer__foot {
      padding: 1rem 2rem 2rem;
    }
  }

  .ph-drawer[data-state="open"] [data-sheet-item] {
    animation: ph-rise-in 600ms var(--ph-ease-soft) backwards;
    animation-delay: calc(180ms + var(--sheet-i, 0) * 70ms);
  }
  :where([data-sheet-item]:nth-child(2)) { --sheet-i: 1; }
  :where([data-sheet-item]:nth-child(3)) { --sheet-i: 2; }
  :where([data-sheet-item]:nth-child(4)) { --sheet-i: 3; }
  :where([data-sheet-item]:nth-child(5)) { --sheet-i: 4; }
  :where([data-sheet-item]:nth-child(n + 6)) { --sheet-i: 5; }

  /* Confirmation: a mist disc whose check draws itself. */
  .ph-success-mark {
    display: inline-flex;
    width: 4rem;
    height: 4rem;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: var(--ph-mist);
    color: #000;
  }
  .ph-success-mark svg {
    width: 1.75rem;
    height: 1.75rem;
  }
  .ph-success-mark path {
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
  }
  [data-quote-view="success"]:not([hidden]) .ph-success-mark {
    animation: ph-pop 600ms var(--ph-ease-soft) 60ms backwards;
  }
  [data-quote-view="success"]:not([hidden]) .ph-success-mark path {
    animation: ph-draw 700ms var(--ph-ease-soft) 220ms backwards;
  }

  @media (prefers-reduced-motion: reduce) {
    .ph-drawer__panel,
    .ph-drawer[data-state="open"] .ph-drawer__panel {
      translate: none;
      opacity: 0;
      transition: opacity 150ms linear;
    }
    .ph-drawer[data-state="open"] .ph-drawer__panel,
    html:not(.js) .ph-drawer:target .ph-drawer__panel {
      opacity: 1;
    }
    .ph-drawer__overlay,
    .ph-drawer[data-state="open"] .ph-drawer__overlay {
      transition: opacity 150ms linear;
    }
    .ph-drawer [data-sheet-item],
    .ph-success-mark,
    .ph-success-mark path {
      animation: none !important;
    }
  }
}

@keyframes ph-rise-in {
  from {
    opacity: 0;
    translate: 0 12px;
  }
}

@keyframes ph-pop {
  from {
    opacity: 0;
    scale: 0.6;
  }
}

@keyframes ph-draw {
  from {
    stroke-dashoffset: 1;
  }
}

@media print {
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
  .ph-header,
  .ph-drawer {
    display: none !important;
  }
}
