/*
 * Pearl Nzuri design system (#81).
 *
 * Brand colours come from the logo (docs/brand/pearl-nzuri-logo.pdf):
 * purple #50276A and gold #F8BE13. Gold is a fill colour only: gold text on
 * white fails contrast, so text on gold is always the dark purple.
 * Type is Nunito (SIL OFL, fonts/OFL.txt), self-hosted, whose rounded
 * terminals match the logo's lettering.
 *
 * Page templates keep small page-specific rules in their own <style> block;
 * everything shared lives here.
 */

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("../fonts/nunito-latin.166202cc391c.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("../fonts/nunito-latin-ext.ffdc8b0c86fb.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/fraunces-latin.eb2486760f75.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/fraunces-latin-ext.9cab501e1829.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/plex-mono-latin-500.b1c8a895f5fd.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/plex-mono-latin-ext-500.fa8d8838b94a.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --pn-purple: #50276a;
  --pn-purple-700: #3f1e55;
  --pn-purple-900: #26112f;
  --pn-purple-100: #ece3f2;
  --pn-purple-50: #f7f3fa;
  --pn-gold: #f8be13;
  --pn-gold-600: #e0a800;
  --pn-gold-100: #fdf0c4;
  --pn-gold-50: #fff9e6;

  --pn-ink: #1f1a24;
  --pn-muted: #625a6b;
  --pn-faint: #8d8596;
  --pn-line: #e6e0ec;
  --pn-surface: #ffffff;
  --pn-bg: #fbf9fc;

  --pn-success: #17734a;
  --pn-success-bg: #e6f4ed;
  --pn-danger: #b3261e;
  --pn-danger-bg: #fcebea;

  --pn-radius: 14px;
  --pn-radius-sm: 10px;
  --pn-shadow-sm: 0 1px 2px rgba(38, 17, 47, 0.06), 0 1px 3px rgba(38, 17, 47, 0.06);
  --pn-shadow: 0 4px 14px rgba(38, 17, 47, 0.08), 0 1px 3px rgba(38, 17, 47, 0.06);
  --pn-shadow-lg: 0 18px 40px rgba(38, 17, 47, 0.14);
  --pn-focus: 0 0 0 3px rgba(248, 190, 19, 0.6);
  --pn-font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Display serif for headings and figures; mono for labels, badges and
     coordinates (#88). Nunito stays the body face. */
  --pn-font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --pn-font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --pn-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* --- Base --------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
/* The hidden attribute must win over component display rules (.button,
   flex cards), or scripts that toggle `hidden` leave elements on screen. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--pn-font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--pn-ink);
  background: var(--pn-bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.15; color: var(--pn-purple-900); letter-spacing: -0.01em; }
h1, h2, .display { font-family: var(--pn-font-display); font-optical-sizing: auto; letter-spacing: -0.02em; }
/* Even line lengths, so a heading never ends on one stranded word. */
h1, h2, h3 { text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.75rem); font-weight: 700; margin: 0 0 0.75rem; }
h2 { font-size: 1.45rem; font-weight: 650; }
h3 { font-size: 1.1rem; font-weight: 800; }
a { color: var(--pn-purple); text-underline-offset: 0.15em; text-decoration-thickness: 1px; }
a:hover { color: var(--pn-purple-700); text-decoration-thickness: 2px; }
:focus-visible { outline: none; box-shadow: var(--pn-focus); border-radius: 6px; }
strong { font-weight: 800; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: 74rem; margin: 0 auto; padding: 0 1.25rem; }

main { flex: 1 0 auto; width: 100%; max-width: 32rem; margin: 2.5rem auto 3.5rem; padding: 0 1.25rem; }
main.full { max-width: none; margin: 0; padding: 0; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--pn-line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; }
.site-header .brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.site-header .brand img { height: 2.75rem; width: auto; display: block; }
.site-nav { display: flex; align-items: center; gap: 0.35rem; }
.site-nav a, .site-nav .link-button {
  color: var(--pn-ink);
  font-weight: 700;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
}
.site-nav a:hover, .site-nav .link-button:hover { background: var(--pn-purple-50); color: var(--pn-purple); }
.site-nav a[aria-current="page"] { color: var(--pn-purple); background: var(--pn-purple-50); }
.site-nav .nav-cta, .site-nav .nav-cta:hover { background: var(--pn-gold); color: var(--pn-purple-900); margin-left: 0.35rem; }
.site-nav .nav-cta:hover { background: var(--pn-gold-600); }
.site-nav form { margin: 0; }
.site-nav .signed-in { color: var(--pn-muted); font-size: 0.9rem; padding: 0 0.5rem; white-space: nowrap; }
.nav-toggle { display: none; }

@media (max-width: 52rem) {
  .js .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1.5px solid var(--pn-line);
    background: var(--pn-surface);
    color: var(--pn-purple-900);
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
  }
  .nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after { display: block; width: 1.1rem; height: 2px; background: currentColor; border-radius: 2px; position: relative; content: ""; }
  .nav-toggle .bars::before { position: absolute; top: -6px; }
  .nav-toggle .bars::after { position: absolute; top: 6px; }
  .site-header .container { flex-wrap: wrap; }
  .site-nav { flex-wrap: wrap; width: 100%; padding: 0 0 0.75rem; }
  .js .site-nav { display: none; }
  .js .site-header.open .site-nav { display: flex; flex-direction: column; align-items: stretch; gap: 0.15rem; }
  .js .site-header.open .site-nav .nav-cta { margin: 0.5rem 0 0; text-align: center; }
  .site-nav .signed-in { padding: 0.5rem 0.75rem; }
  .site-header .brand img { height: 2.35rem; }
}

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

.site-footer { flex-shrink: 0; background: var(--pn-purple-900); color: #e9e1ef; margin-top: auto; }
.site-footer .container { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); padding-top: 3rem; padding-bottom: 2rem; }
.site-footer .footer-brand img { height: 5.5rem; width: auto; display: block; margin-bottom: 1rem; }
.site-footer p { margin: 0 0 0.5rem; color: #cfc3d8; max-width: 22rem; }
.site-footer h2 { color: var(--pn-gold); font-family: var(--pn-font-mono); font-weight: 500; font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; margin: 0.4rem 0 0.9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.5rem; }
.site-footer a { color: #fff; text-decoration: none; font-weight: 600; }
.site-footer a:hover { color: var(--pn-gold); text-decoration: underline; }
.site-footer .footer-bottom { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 1.25rem; font-size: 0.85rem; color: #a99bb5; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; }
@media (max-width: 40rem) { .site-footer .container { grid-template-columns: 1fr 1fr; } .site-footer .footer-brand { grid-column: 1 / -1; } }

/* --- Buttons ------------------------------------------------------------ */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.75rem 1.35rem;
  border: 0;
  border-radius: 999px;
  background: var(--pn-purple);
  color: #fff;
  font: inherit;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(38, 17, 47, 0.18);
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.button:hover { background: var(--pn-purple-700); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 14px rgba(80, 39, 106, 0.25); }
.button:active { transform: translateY(0); }
.button.gold, .button.gold:hover { background: var(--pn-gold); color: var(--pn-purple-900); }
.button.gold:hover { background: var(--pn-gold-600); }
.button.ghost { background: transparent; color: var(--pn-purple); box-shadow: inset 0 0 0 2px var(--pn-purple-100); }
.button.ghost:hover { background: var(--pn-purple-50); box-shadow: inset 0 0 0 2px var(--pn-purple); }
.button.large { padding: 0.95rem 1.75rem; font-size: 1.05rem; }
.button.block { display: flex; width: 100%; }
.link-button { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--pn-purple); text-decoration: underline; text-underline-offset: 0.15em; cursor: pointer; }
.link-button:hover { color: var(--pn-purple-700); }

/* --- Forms -------------------------------------------------------------- */

.form-row { margin-bottom: 1.1rem; }
.form-row label, .form-row .label { display: block; font-weight: 800; margin-bottom: 0.35rem; color: var(--pn-purple-900); }
.form-row .optional { font-weight: 600; color: var(--pn-faint); font-size: 0.85rem; }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]),
select,
textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--pn-line);
  border-radius: var(--pn-radius-sm);
  background: var(--pn-surface);
  color: var(--pn-ink);
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:not([type="checkbox"]):not([type="radio"]):hover, select:hover, textarea:hover { border-color: #cfc4da; }
input:not([type="checkbox"]):not([type="radio"]):focus, select:focus, textarea:focus { outline: none; border-color: var(--pn-purple); box-shadow: 0 0 0 3px rgba(80, 39, 106, 0.15); }
input[type="file"] { border-style: dashed !important; background: var(--pn-purple-50) !important; cursor: pointer; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--pn-purple); width: 1.1rem; height: 1.1rem; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2350276a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.9rem center; padding-right: 2.4rem !important; }
.helptext, .form-row .helptext ul { font-size: 0.85rem; color: var(--pn-muted); margin-top: 0.3rem; }
.errorlist { list-style: none; color: var(--pn-danger); padding: 0; margin: 0.35rem 0 0; font-size: 0.9rem; font-weight: 700; }
.has-error input, .has-error textarea, .has-error select { border-color: var(--pn-danger) !important; }
.radio-group { display: grid; gap: 0.5rem; }
.radio-option { display: flex; align-items: center; gap: 0.6rem; font-weight: 600 !important; border: 1.5px solid var(--pn-line); border-radius: var(--pn-radius-sm); padding: 0.7rem 0.9rem; cursor: pointer; background: var(--pn-surface); margin: 0 !important; }
.radio-option:hover { border-color: var(--pn-purple-100); background: var(--pn-purple-50); }
.radio-option:has(input:checked) { border-color: var(--pn-purple); background: var(--pn-purple-50); }
.radio-option input { width: auto; margin: 0; }
.form-alert { background: var(--pn-danger-bg); color: var(--pn-danger); border-radius: var(--pn-radius-sm); padding: 0.8rem 1rem; margin-bottom: 1.5rem; font-weight: 700; }

/* --- Surfaces ----------------------------------------------------------- */

.card { background: var(--pn-surface); border: 1px solid var(--pn-line); border-radius: var(--pn-radius); box-shadow: var(--pn-shadow-sm); padding: 1.5rem; }
.page-header { margin-bottom: 1.75rem; }
.page-header h1 { margin-bottom: 0.35rem; }
.page-header p, .intro, .lead { color: var(--pn-muted); margin-top: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--pn-font-mono); font-size: 0.74rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--pn-purple); margin-bottom: 0.6rem; }
.eyebrow::before { content: ""; width: 1.4rem; height: 1.5px; background: currentColor; opacity: 0.8; }
.back { display: inline-flex; align-items: center; gap: 0.35rem; margin-bottom: 1.25rem; font-weight: 700; text-decoration: none; color: var(--pn-muted); }
.back:hover { color: var(--pn-purple); }
.key { font-size: 0.9rem; color: var(--pn-muted); }

.notice { border-radius: var(--pn-radius-sm); padding: 0.75rem 1rem; font-size: 0.95rem; margin: 0 0 1rem; border: 1px solid transparent; }
.notice.success { background: var(--pn-success-bg); border-color: #b9e0cb; color: #0f5537; }
.notice.error { background: var(--pn-danger-bg); border-color: #f3c3bf; color: #8a1c15; }
.notice.info { background: var(--pn-purple-50); border-color: var(--pn-purple-100); color: var(--pn-purple-900); }

.badge { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.78rem; font-weight: 800; border-radius: 999px; padding: 0.2rem 0.65rem; background: #f1eef4; color: var(--pn-muted); white-space: nowrap; line-height: 1.4; }
.badge.verified { background: var(--pn-purple-50); color: var(--pn-purple); }
.badge.verified::before { content: ""; width: 0.8rem; height: 0.8rem; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%2350276a'/%3E%3Cpath d='M4.5 8.3l2.2 2.2 4.8-5' fill='none' stroke='%23f8be13' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.badge.gold { background: var(--pn-gold); color: var(--pn-purple-900); }
.badge.paid, .badge.billable { background: var(--pn-success-bg); color: var(--pn-success); }
.badge.due { background: var(--pn-gold-100); color: #7a5600; }

/* Stat tiles (owner report and statements). */
.totals { display: grid; gap: 0.85rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); list-style: none; padding: 0; margin: 1.25rem 0 2rem; }
.totals li { background: var(--pn-surface); border: 1px solid var(--pn-line); border-radius: var(--pn-radius); padding: 1rem 1.1rem; color: var(--pn-muted); font-size: 0.9rem; box-shadow: var(--pn-shadow-sm); border-top: 4px solid var(--pn-purple-100); }
.totals li:first-child { border-top-color: var(--pn-gold); }
.totals strong { display: block; font-family: var(--pn-font-display); font-size: 1.75rem; font-weight: 700; color: var(--pn-purple-900); font-variant-numeric: tabular-nums; line-height: 1.2; margin-bottom: 0.15rem; }

/* Tables. */
.table-wrap { overflow-x: auto; background: var(--pn-surface); border: 1px solid var(--pn-line); border-radius: var(--pn-radius); box-shadow: var(--pn-shadow-sm); margin-bottom: 1rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--pn-line); text-align: left; vertical-align: top; }
thead th { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--pn-muted); background: var(--pn-purple-50); white-space: nowrap; }

/* Sticky table headings (#100). A box with overflow-x: auto is a scroll
   container, which would pin the headings inside that box instead of to the
   page. So: on phones, a tall table scrolls within its own box and the
   headings stick to the top of it; on wider screens, where the tables fit,
   the box only clips its rounded corners (overflow: clip is not a scroll
   container) and the headings stick just under the sticky site header. */
.table-wrap thead { position: sticky; top: 0; z-index: 3; background: var(--pn-purple-50); }  /* background: no slivers between heading rows */
/* Collapsed borders don't travel with sticky cells (they leave a see-through
   hairline), so heading cells have none and the lines are drawn as shadows. */
.table-wrap thead th { border-bottom: 0; box-shadow: inset 0 -1px 0 var(--pn-line); }
@media (max-width: 63.99rem) { .table-wrap { max-height: 78vh; overflow: auto; } }
/* Phones: on pages with these tables, the site header scrolls away instead
   of sticking, so it can't sit on top of a table's own sticky headings. */
@media (max-width: 52rem) { body:has(.table-wrap thead) .site-header { position: static; } }
@media (min-width: 64rem) {
  .table-wrap { overflow: clip; }
  .table-wrap thead { top: calc(4.5rem + 1px); }  /* the site header's height and border */
  /* Long labels wrap so the table fits its box. */
  .table-wrap thead th { white-space: normal; }
  /* Safety net (table-tools.js): a table that still doesn't fit scrolls
     sideways rather than being cut off; its headings then stop sticking. */
  .table-wrap.is-wide { overflow-x: auto; }
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fcfbfd; }
tfoot td, tfoot th { font-weight: 800; border-top: 2px solid var(--pn-purple-100); border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.zero { color: #c5bccd; }

/* Empty states. */
.empty-state { text-align: center; padding: 3rem 1.5rem; background: var(--pn-surface); border: 1.5px dashed var(--pn-line); border-radius: var(--pn-radius); color: var(--pn-muted); }
.empty-state img { width: 4rem; height: auto; margin-bottom: 0.75rem; opacity: 0.9; }
.empty-state h2 { margin: 0 0 0.35rem; }
.empty-state p { margin: 0 auto 1.25rem; max-width: 28rem; }

/* Auth pages: a centred card under the brand symbol. */
.auth-card { text-align: left; }
.auth-card .auth-mark { display: block; width: 3.5rem; height: auto; margin: 0 auto 1rem; }
.auth-card h1 { text-align: center; font-size: 1.75rem; }
.auth-card .auth-forgot { text-align: center; margin: 1rem 0 0; font-size: 0.95rem; }
.auth-card .lead { text-align: center; }
.auth-card .button { width: 100%; margin-top: 0.5rem; }
.auth-switch { text-align: center; color: var(--pn-muted); margin-top: 1.25rem; }

/* ===================================================================== *
 * Design pass (#88): verification motif, icons and purposeful motion.   *
 * ===================================================================== */

::selection { background: var(--pn-gold); color: var(--pn-purple-900); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* Line icons from the sprite in base.html: <svg class="icon"><use href="#i-pin"/></svg> */
.icon { width: 1.15em; height: 1.15em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }

/* Monospace details: GPS coordinates and small technical labels. */
.mono, .coords { font-family: var(--pn-font-mono); font-weight: 500; letter-spacing: 0.02em; }
.coords { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; color: var(--pn-muted); }
.coords .icon { color: var(--pn-gold-600); }
.badge { font-family: var(--pn-font-mono); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.7rem; }
thead th { font-family: var(--pn-font-mono); font-weight: 500; }

/* Inspection frame: gold corner brackets, like an inspector's viewfinder.
   Put <span class="inspect-frame" aria-hidden="true"></span> inside a
   position:relative photo. Hidden until hover/focus unless .is-on. */
.inspect-frame {
  --c: var(--pn-gold); --l: 1.35rem; --t: 3px;
  position: absolute; inset: 0.7rem; pointer-events: none; z-index: 2;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) var(--t),
    linear-gradient(var(--c), var(--c)) top left / var(--t) var(--l),
    linear-gradient(var(--c), var(--c)) top right / var(--l) var(--t),
    linear-gradient(var(--c), var(--c)) top right / var(--t) var(--l),
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) var(--t),
    linear-gradient(var(--c), var(--c)) bottom left / var(--t) var(--l),
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) var(--t),
    linear-gradient(var(--c), var(--c)) bottom right / var(--t) var(--l);
  background-repeat: no-repeat;
  opacity: 0; transform: scale(1.08);
  transition: opacity 0.35s var(--pn-ease), transform 0.45s var(--pn-ease);
  filter: drop-shadow(0 1px 2px rgba(38, 17, 47, 0.45));
}
.inspect-frame.is-on,
a:hover .inspect-frame, a:focus-visible .inspect-frame { opacity: 1; transform: scale(1); }

/* Topographic contour texture (core/img/contours.svg), on dark surfaces. */
.contours { position: relative; isolation: isolate; }
.contours::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("../img/contours.49f234ca2a4b.svg") center bottom / 100% 100% no-repeat;
  opacity: 0.14;
}
.site-footer.contours::before { opacity: 0.08; }

/* Header gains depth once the page scrolls (site.js adds .scrolled). */
.site-header { transition: box-shadow 0.25s ease, background-color 0.25s ease; }
.site-header.scrolled { box-shadow: 0 6px 24px rgba(38, 17, 47, 0.08); background: rgba(255, 255, 255, 0.98); }

/* Verified seal (detail booking card, empty states). */
.seal { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--pn-font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pn-purple); }
.seal .icon { width: 1.5rem; height: 1.5rem; color: var(--pn-gold-600); }

/* Animated verification journey (home "How it works"). */
.journey { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; position: relative; }
.journey li { position: relative; text-align: center; padding: 0 0.75rem; }
.journey .node {
  position: relative; z-index: 1; width: 4.25rem; height: 4.25rem; margin: 0 auto 1rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--pn-surface); color: var(--pn-purple);
  border: 2px solid var(--pn-purple-100); box-shadow: var(--pn-shadow-sm);
  transition: transform 0.3s var(--pn-ease), border-color 0.3s ease, box-shadow 0.3s ease;
}
.journey .node .icon { width: 1.75rem; height: 1.75rem; }
.journey li:hover .node { transform: translateY(-4px); border-color: var(--pn-gold); box-shadow: var(--pn-shadow); }
.journey li.is-verified .node { background: var(--pn-purple); color: var(--pn-gold); border-color: var(--pn-gold); box-shadow: 0 0 0 8px rgba(248, 190, 19, 0.15); }
.journey .step { font-family: var(--pn-font-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--pn-gold-600); }
.journey h3 { margin: 0.25rem 0 0.35rem; font-size: 1.1rem; }
.journey p { margin: 0 auto; color: var(--pn-muted); font-size: 0.93rem; max-width: 15rem; }
/* Flowing gold dashes between the nodes. */
.journey li + li::before {
  content: ""; position: absolute; top: 2.1rem; right: calc(50% + 2.4rem); width: calc(100% - 4.8rem); height: 2px;
  background-image: repeating-linear-gradient(90deg, var(--pn-gold-600) 0 7px, transparent 7px 15px);
  background-size: 15px 2px;
}
@media (max-width: 48rem) {
  .journey { grid-template-columns: 1fr; gap: 1.75rem; }
  .journey li { display: grid; grid-template-columns: 4.25rem 1fr; gap: 0 1rem; text-align: left; padding: 0; }
  .journey .node { margin: 0; grid-row: span 3; }
  .journey p { margin: 0; max-width: none; }
  .journey li + li::before { top: auto; bottom: calc(100% + 0.15rem); left: 2.05rem; right: auto; width: 2px; height: 1.5rem; background-image: repeating-linear-gradient(180deg, var(--pn-gold-600) 0 7px, transparent 7px 15px); background-size: 2px 15px; }
}

/* ---- Motion. Everything below only runs with JavaScript (html.js) and
   without the reduced-motion preference, so content is never hidden from
   people or browsers that can't or don't want to animate. ---- */
@keyframes pn-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes pn-dash-x { to { background-position: 15px 0; } }
@keyframes pn-dash-y { to { background-position: 0 15px; } }
@keyframes pn-ring { 0% { box-shadow: 0 0 0 0 rgba(248, 190, 19, 0.45); } 100% { box-shadow: 0 0 0 16px rgba(248, 190, 19, 0); } }

@media (prefers-reduced-motion: no-preference) {
  /* Scroll reveal: site.js adds .in; --i staggers siblings. */
  .js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.75s var(--pn-ease), transform 0.75s var(--pn-ease); transition-delay: calc(var(--i, 0) * 90ms); }
  .js .reveal.in { opacity: 1; transform: none; }
  /* Page-load entrance: children of .rise-in come up one after another. */
  .js .rise-in > * { animation: pn-rise 0.8s var(--pn-ease) both; }
  .js .rise-in > *:nth-child(2) { animation-delay: 0.08s; }
  .js .rise-in > *:nth-child(3) { animation-delay: 0.16s; }
  .js .rise-in > *:nth-child(4) { animation-delay: 0.26s; }
  .js .rise-in > *:nth-child(5) { animation-delay: 0.36s; }
  .js .rise-in > *:nth-child(n+6) { animation-delay: 0.44s; }
  .journey li + li::before { animation: pn-dash-x 0.9s linear infinite; }
  .journey li.is-verified .node { animation: pn-ring 2.4s ease-out infinite; }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 48rem) {
  .journey li + li::before { animation-name: pn-dash-y; }
}

/* Listing result cards and pagination (search, theme and destination pages). */
.result-count { color: var(--pn-muted); font-weight: 700; margin: 0 0 1rem; }
.results { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.result { background: var(--pn-surface); border: 1px solid var(--pn-line); border-radius: 18px; overflow: hidden; box-shadow: var(--pn-shadow-sm); transition: transform 0.18s ease, box-shadow 0.18s ease; }
.result:hover, .result:focus-within { transform: translateY(-3px); box-shadow: var(--pn-shadow); }
.result-link { display: flex; flex-direction: column; color: inherit; text-decoration: none; height: 100%; }
.result-link:hover { color: inherit; }
.result-link:focus-visible { box-shadow: var(--pn-focus); border-radius: 18px; }
.result .photo { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: var(--pn-purple-50) url("../brand/mark.e7dd0158329d.svg") center / 3.5rem no-repeat; display: flex; align-items: flex-end; justify-content: center; color: var(--pn-muted); font-size: 0.85rem; font-weight: 700; padding-bottom: 1rem; }
.result .photo.has-photo { background: var(--pn-purple-50); padding: 0; }
.result .photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.result:hover .photo img { transform: scale(1.04); }
.result .photo .badge { position: absolute; left: 0.75rem; top: 0.75rem; box-shadow: var(--pn-shadow-sm); background: rgba(255, 255, 255, 0.95); }
.result .body { padding: 1rem 1.15rem 1.2rem; display: flex; flex-direction: column; gap: 0.2rem; flex: 1; }
.result h2 { font-size: 1.15rem; margin: 0; }
.result-link:hover h2 { color: var(--pn-purple); }
.result .meta, .result .capacity { color: var(--pn-muted); font-size: 0.9rem; margin: 0; display: flex; align-items: center; gap: 0.4rem; }
.result .meta .icon, .result .capacity .icon { color: var(--pn-purple); opacity: 0.75; }
.result .coords { margin-top: 0.35rem; }
.result .price { font-family: var(--pn-font-display); font-weight: 650; font-size: 1rem; color: var(--pn-purple-900); margin: auto 0 0; padding-top: 0.75rem; border-top: 1px dashed var(--pn-line); margin-top: 0.75rem; }
.result .price.none { font-family: var(--pn-font); font-weight: 600; font-size: 0.95rem; color: var(--pn-faint); }
.pagination { display: flex; gap: 1rem; justify-content: center; align-items: center; margin: 2.5rem 0 1rem; font-weight: 700; }
.pagination a { text-decoration: none; padding: 0.5rem 1rem; border-radius: 999px; background: var(--pn-surface); border: 1.5px solid var(--pn-line); }
.pagination a:hover { border-color: var(--pn-purple); }
.pagination span { color: var(--pn-muted); }

/* Sortable tables (#100, core/js/table-tools.js). */
th .sort-button { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 0.35rem; cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; border-radius: 6px; }
th.num .sort-button { justify-content: flex-end; }
th .sort-button:hover { color: var(--pn-purple); }
th .sort-button:focus-visible { box-shadow: var(--pn-focus); }
th .sort-arrow { width: 0.6rem; height: 0.6rem; flex-shrink: 0; opacity: 0.35; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M5 1 8 4H2zM5 9 2 6h6z' fill='%2350276a'/%3E%3C/svg%3E") center / contain no-repeat; }
th[aria-sort] .sort-arrow { opacity: 1; }
th[aria-sort="ascending"] .sort-arrow { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M5 2 9 7H1z' fill='%2350276a'/%3E%3C/svg%3E"); }
th[aria-sort="descending"] .sort-arrow { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M5 8 1 3h8z' fill='%2350276a'/%3E%3C/svg%3E"); }

/* Table search box (table-tools.js) */
.table-search { display: block; margin: 0 0 0.75rem; font-weight: 700; }
.table-search input { display: block; width: 100%; max-width: 24rem; margin-top: 0.25rem; padding: 0.55rem 0.75rem; font: inherit; border: 1px solid var(--pn-muted, #888); border-radius: 8px; }
.table-search-empty { color: var(--pn-muted); }
