/* ============================================================================
   PAGES — layout for page-specific compositions. All values are semantic tokens.
   ============================================================================ */

/* ----------------------------------------------------------------------------
   INTERIOR PAGE HERO (text-only, no art) — about / contact / offers header band
   -------------------------------------------------------------------------- */
/* Inheritable page header — canonical .page-hero; .band and .hero--page alias to it.
   Keeps 58svh for all interior pages so UI flow does not break when pages change.
   Home hero (.hero without --page) stays 92svh as landing exception. */
.page-hero,
.band,
.hero--page {
  position: relative;
  min-block-size: 58svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--color-text-inverted);
  overflow: hidden;
  isolation: isolate;
}

.band__wash {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 90% at 85% -10%, rgba(194, 163, 106, 0.22), transparent 55%),
    linear-gradient(180deg, var(--color-surface-inverted-raised), var(--color-surface-inverted));
}

.band__art {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.band__art img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: center 35%;
  filter: brightness(0.86) contrast(1.05) saturate(0.98);
}

.band__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(7, 28, 28, 0.52) 0%, rgba(7, 28, 28, 0.30) 38%, rgba(7, 28, 28, 0.76) 72%, rgba(7, 28, 28, 0.88) 100%),
    radial-gradient(120% 78% at 50% 100%, rgba(0, 0, 0, 0.38), transparent 72%);
}

.band--image,
.page-hero--image {
  min-block-size: 58svh;
}

.band--image .band__title,
.band--image .band__lede {
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.48), 0 1px 3px rgba(0, 0, 0, 0.65);
}

.band--image .eyebrow--inverted {
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.58), 0 1px 1px rgba(0, 0, 0, 0.7);
}

.band__content,
.page-hero__content,
.hero__content {
  padding: calc(var(--space-4xl) + var(--space-sm)) var(--gutter) var(--space-xl);
  display: grid;
  gap: var(--space-md);
  container-type: inline-size;
}

.band__title,
.page-hero__title,
.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 500;
  line-height: 1.02;
  text-wrap: pretty;
}

.band__lede,
.page-hero__lede,
.hero__lede {
  max-inline-size: 34rem;
  color: var(--color-text-inverted-muted);
  font-size: var(--text-lg);
  line-height: 1.6;
}

/* Inheritable page-hero — canonical naming; old .band/.hero--page alias above.
   Use: <section class="page-hero page-hero--image"> with .page-hero__media img + __scrim + __content
   or  <section class="page-hero page-hero--wash">  with .page-hero__wash + __content
   All interior pages should migrate to this; existing .band/.hero--page remain aliased. */
.page-hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.page-hero__media img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: center 35%;
  filter: brightness(0.86) contrast(1.05) saturate(0.98);
}

/* Portrait royals photo — lower the visible window toward the subjects */
.page-hero--royals .page-hero__media img {
  object-position: center 55%;
}

.page-hero__wash {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 90% at 85% -10%, rgba(194, 163, 106, 0.22), transparent 55%),
    linear-gradient(180deg, var(--color-surface-inverted-raised), var(--color-surface-inverted));
}

.page-hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(7, 28, 28, 0.52) 0%, rgba(7, 28, 28, 0.30) 38%, rgba(7, 28, 28, 0.76) 72%, rgba(7, 28, 28, 0.88) 100%),
    radial-gradient(120% 78% at 50% 100%, rgba(0, 0, 0, 0.38), transparent 72%);
}

.page-hero--wash .page-hero__title,
.page-hero--wash .page-hero__lede,
.band:not(.band--image) .band__title,
.band:not(.band--image) .band__lede {
  text-shadow: none;
}

.page-hero--image .page-hero__title,
.page-hero--image .page-hero__lede,
.band--image .band__title,
.band--image .band__lede,
.hero--page .hero__title,
.hero--page .hero__lede {
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.48), 0 1px 3px rgba(0, 0, 0, 0.65);
}

.page-hero--image .eyebrow--inverted,
.band--image .eyebrow--inverted,
.hero--page .eyebrow--inverted {
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.58), 0 1px 1px rgba(0, 0, 0, 0.7);
}

/* Read-more clamp for long lede — JS adds .is-clamped when overflow */
.page-hero__lede.is-clamped,
.band__lede.is-clamped,
.hero__lede.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-hero__more {
  justify-self: start;
  margin-block-start: calc(var(--space-xs) * -0.5);
  padding: 0;
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: var(--tracking-medium);
  text-transform: uppercase;
  color: var(--color-text-inverted-accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.page-hero__more:hover { color: var(--color-accent); }
.page-hero__more[hidden] { display: none !important; }

/* In-depth description modal — opened by Read more */
.desc-modal {
  position: fixed;
  inset: 0;
  margin: auto;
  border: 0;
  padding: 0;
  background: transparent;
  inline-size: min(92vw, 36rem);
  block-size: fit-content;
  max-block-size: 88vh;
  max-block-size: 88dvh;
  overflow: visible;
  z-index: var(--z-overlay);
}

.desc-modal::backdrop {
  background: rgba(7, 24, 24, 0.62);
  backdrop-filter: blur(2px);
}

.desc-modal__frame {
  background: var(--color-surface-raised);
  border-radius: var(--radius-m);
  overflow: hidden;
  box-shadow: var(--shadow-floating);
  display: grid;
}

.desc-modal__head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-lg) var(--space-lg) 0;
}

.desc-modal__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  line-height: 1.1;
  color: var(--color-text-primary);
  text-wrap: pretty;
}

.desc-modal__close {
  inline-size: 40px;
  block-size: 40px;
  flex: 0 0 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text-muted);
  font-size: 1.1rem;
  cursor: pointer;
}

.desc-modal__close:hover,
.desc-modal__close:focus-visible {
  background: var(--color-surface-inverted);
  color: var(--color-text-inverted);
  border-color: var(--color-border-inverted-strong);
}

.desc-modal__body {
  padding: var(--space-md) var(--space-lg) var(--space-lg);
  color: var(--color-text-secondary);
  font-size: var(--text-md);
  line-height: 1.7;
  max-block-size: 60vh;
  overflow: auto;
}

.desc-modal__body p + p { margin-block-start: var(--space-sm); }

/* ----------------------------------------------------------------------------
   COLLECTION PAGE — filter + grid + comparison facts
   -------------------------------------------------------------------------- */
.collection-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-block-end: var(--space-md);
}

.collection-count {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.compare-panel {
  background: var(--color-surface);
  border: var(--hairline);
  border-radius: var(--radius-s);
  padding: var(--space-md);
  overflow-x: auto;
}

.compare-table {
  inline-size: 100%;
  min-inline-size: 40rem;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.compare-table th,
.compare-table td {
  text-align: start;
  padding: var(--space-sm);
  border-block-end: 1px solid var(--color-border-subtle);
  vertical-align: top;
}

.compare-table th {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.compare-table td:first-child {
  color: var(--color-text-muted);
  font-weight: 600;
}

/* ----------------------------------------------------------------------------
   TOWN FACTS — fact column, highlight grid (renamed from hotel-facts/amenity)
   .hotel-facts / .amenity-grid / .amenity kept as aliases for back-compat
   -------------------------------------------------------------------------- */
.town-facts,
.hotel-facts {
  display: grid;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .town-facts,
  .hotel-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.town-facts .tile,
.hotel-facts .tile {
  border: 0;
  border-block-end: var(--hairline);
  border-radius: 0;
  background: transparent;
  padding-block: var(--space-md);
}

.highlight-grid,
.amenity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-xs);
}

@media (min-width: 700px) {
  .highlight-grid,
  .amenity-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.highlight,
.amenity {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm);
  border: var(--hairline);
  border-radius: var(--radius-s);
  background: var(--color-surface);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.highlight::before,
.amenity::before {
  content: "◇";
  color: var(--color-accent);
  font-size: var(--text-xs);
}

/* ----------------------------------------------------------------------------
   SPOTLIGHT — featured civic story (town-agnostic, no longer suite-only)
   -------------------------------------------------------------------------- */
.spotlight {
  position: relative;
  border-radius: var(--radius-m);
  overflow: hidden;
}

.spotlight__art {
  aspect-ratio: 16 / 10;
}

.spotlight__art img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.spotlight__body {
  padding: var(--space-lg);
  display: grid;
  gap: var(--space-sm);
  background: var(--color-surface-inverted);
  color: var(--color-text-inverted);
}

.spotlight__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 500;
}

.spotlight__price {
  color: var(--color-text-inverted-accent);
  font-family: var(--font-display);
  font-size: var(--text-xl);
}

@media (min-width: 900px) {
  .spotlight {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    align-items: stretch;
  }
  .spotlight__art {
    aspect-ratio: auto;
    min-block-size: 100%;
  }
}

/* ----------------------------------------------------------------------------
   DINING / EXPERIENCES — alternating editorial rows
   -------------------------------------------------------------------------- */
.edit-row {
  display: grid;
  gap: var(--space-md);
  padding-block: var(--space-xl);
  border-block-end: var(--hairline);
}

.edit-row:first-child {
  padding-block-start: 0;
}

.edit-row:last-child {
  border-block-end: 0;
}

.edit-row__art {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-s);
  overflow: hidden;
}

.edit-row__art img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.edit-row__body {
  display: grid;
  gap: var(--space-sm);
  align-content: center;
}

.edit-row__index {
  font-family: var(--font-display);
  color: var(--color-text-accent);
  font-size: var(--text-xl);
}

.edit-row__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 500;
  line-height: 1.08;
}

.edit-row__meta {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.edit-row__history {
  border-inline-start: var(--hairline);
  padding-inline-start: var(--space-sm);
  margin-block-start: var(--space-2xs);
  display: grid;
  gap: var(--space-3xs);
}

.edit-row__history-label {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-accent);
}

.edit-row__history-text {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.7;
}

.edit-row__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  margin-block-start: var(--space-3xs);
}

@media (min-width: 860px) {
  .edit-row {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: var(--space-3xl);
  }
  .edit-row:nth-child(even) .edit-row__art {
    order: 2;
  }
}

/* ----------------------------------------------------------------------------
   EVENT CARD — civic gatherings (renamed from offer-card; .offer-card kept alias)
   -------------------------------------------------------------------------- */
.event-card,
.offer-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-md);
  border: var(--hairline);
  border-radius: var(--radius-s);
  background: var(--color-surface-raised);
  overflow: hidden;
}

.event-card__art,
.offer-card__art {
  aspect-ratio: 16 / 9;
}

.event-card__art img,
.offer-card__art img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.event-card__body,
.offer-card__body {
  padding: var(--space-md);
  display: grid;
  gap: var(--space-sm);
  align-content: start;
}

.event-card__title,
.offer-card__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
}

@media (min-width: 700px) {
  .event-card,
  .offer-card {
    grid-template-columns: 280px 1fr;
    align-items: stretch;
  }
  .event-card__art,
  .offer-card__art {
    aspect-ratio: auto;
    block-size: 100%;
  }
}

.event-card__foot,
.offer-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-block-start: auto;
  border-block-start: var(--hairline);
  padding-block-start: var(--space-sm);
}

/* ----------------------------------------------------------------------------
   ABOUT — timeline + value tiles
   -------------------------------------------------------------------------- */
.timeline {
  position: relative;
  display: grid;
  gap: var(--space-lg);
  padding-inline-start: var(--space-lg);
}

.timeline::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 4px;
  inline-size: 1px;
  background: var(--color-border-subtle);
}

.timeline__item {
  position: relative;
}

.timeline__item::before {
  content: "";
  position: absolute;
  inset-inline-start: calc(-1 * var(--space-lg) + 1px);
  inset-block-start: var(--space-xs);
  inline-size: 9px;
  block-size: 9px;
  border-radius: 50%;
  background: var(--color-surface-inverted);
  border: 2px solid var(--color-accent);
}

.timeline__year {
  font-family: var(--font-display);
  color: var(--color-text-accent);
  font-size: var(--text-xl);
}

.timeline__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
}

.timeline__text {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* ----------------------------------------------------------------------------
   CONTACT — enquiry form + accordion
   -------------------------------------------------------------------------- */
.enquiry-grid {
  display: grid;
  gap: var(--space-xl);
}

@media (min-width: 900px) {
  .enquiry-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: var(--space-3xl);
  }
}

.contact-card {
  padding: var(--space-md);
  border: var(--hairline);
  border-radius: var(--radius-s);
  background: var(--color-surface);
  display: grid;
  gap: var(--space-2xs);
}

.contact-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
}

.contact-card a {
  color: var(--color-text-accent);
  text-decoration: none;
  font-weight: 600;
}

.form-stack {
  display: grid;
  gap: var(--space-md);
}

.accordion {
  display: grid;
  gap: var(--space-xs);
}

.accordion details {
  border: var(--hairline);
  border-radius: var(--radius-s);
  background: var(--color-surface);
}

.accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  min-height: 48px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary::after {
  content: "+";
  font-size: var(--text-xl);
  color: var(--color-accent);
  transition: transform var(--motion-base) var(--ease-out);
}

.accordion details[open] summary::after {
  transform: rotate(45deg);
}

.accordion .accordion__body {
  padding: 0 var(--space-md) var(--space-md);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.accordion__item--dark {
  background: var(--color-surface-inverted-raised);
  border-color: var(--color-border-inverted-subtle);
}

.accordion__item--dark summary,
.accordion__item--dark p {
  color: var(--color-text-inverted);
}

.accordion__item--dark p {
  color: var(--color-text-inverted-muted);
}

.enquiry-form {
  display: grid;
  gap: var(--space-md);
}

.prose-list {
  display: grid;
  gap: var(--space-sm);
  padding-inline-start: 0;
  list-style: none;
  margin-block-start: var(--space-md);
}

.prose-list li {
  display: grid;
  gap: var(--space-2xs);
}

/* ----------------------------------------------------------------------------
   HOME — collection carousel → grid, values strip
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
  .home-track {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-md);
  }
}

.value-row {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 700px) {
  .value-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* dining teaser pairs art on home */
.dine-teaser {
  display: grid;
  gap: var(--space-md);
}

@media (min-width: 860px) {
  .dine-teaser {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3xl);
  }
}

/* ============================ royalty.html — The Royal House ============================ */

/* Tall portrait of the king frames toward the face inside the hero band */
.page-hero--royalty .page-hero__media img {
  object-position: center 28%;
}

/* Profile portrait — quiet gold-rule frame on a chamber surface */
.royalty-portrait {
  margin: 0;
}

.royalty-portrait img {
  display: block;
  inline-size: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 25%;
  background: var(--color-surface-soft-accent);
  border: 1px solid var(--color-border-subtle);
  border-block-start: 2px solid var(--color-accent);
}

.royalty-portrait figcaption {
  margin-block-start: var(--space-2xs);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
  text-wrap: balance;
}

/* Portrait too tall at full mobile width — shorten the window, keep the face */
@media (max-width: 767px) {
  .royalty-portrait img {
    aspect-ratio: 3 / 2;
    object-position: center 20%;
  }
}

/* Memorial tablet — show full, uncropped on all viewports (mobile fix) */
.royalty-portrait--tablet img {
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
  background: transparent;
  padding: 0;
  max-block-size: 520px;
  inline-size: 100%;
  block-size: auto;
  border: 0;
}
@media (max-width: 767px) {
  .royalty-portrait--tablet img {
    aspect-ratio: auto;
    object-fit: contain;
    max-block-size: none;
    block-size: auto;
  }
  .royalty-portrait--tablet {
    margin-inline: calc(-1 * var(--gutter));
  }
}

/* Current King — mobile preview cropped, expands on tap */
.royalty-portrait--king .royalty-portrait__trigger {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  inline-size: 100%;
  cursor: zoom-in;
  position: relative;
  border: 1px solid var(--color-border-subtle);
  border-block-start: 2px solid var(--color-accent);
  overflow: hidden;
}
.royalty-portrait--king .royalty-portrait__trigger:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.royalty-portrait--king img {
  transition: max-height 0.35s ease, object-fit 0.35s ease;
}
.royalty-portrait__hint {
  position: absolute;
  inset-block-end: var(--space-xs);
  inset-inline-end: var(--space-xs);
  background: rgba(0,0,0,0.62);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  padding: 0.28rem 0.5rem;
  border-radius: var(--radius-s);
  pointer-events: none;
}
@media (max-width: 767px) {
  .royalty-portrait--king img {
    max-height: 340px;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    object-position: center 12%;
  }
  .royalty-portrait--king.is-expanded img {
    max-height: none;
    block-size: auto;
    aspect-ratio: auto;
    object-fit: contain;
    cursor: zoom-out;
  }
  .royalty-portrait--king.is-expanded .royalty-portrait__trigger {
    cursor: zoom-out;
  }
  .royalty-portrait--king.is-expanded .royalty-portrait__hint {
    display: none;
  }
}
@media (min-width: 768px) {
  .royalty-portrait__hint {
    display: none;
  }
}

/* Fact strip — label/value pairs for stool, office, enstoolment */
.royalty-facts {
  margin: 0 0 var(--space-lg);
  border-block-start: 1px solid var(--color-border-subtle);
}

.royalty-facts > div {
  display: grid;
  gap: 0.15rem;
  padding-block: var(--space-2xs);
  border-block-end: 1px solid var(--color-border-subtle);
}

.royalty-facts dt {
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-accent);
}

.royalty-facts dd {
  margin: 0;
  color: var(--color-text-primary);
}

@media (min-width: 700px) {
  .royalty-facts > div {
    grid-template-columns: 12rem minmax(0, 1fr);
    align-items: baseline;
    column-gap: var(--space-md);
  }
}

/* Small print for palace-confirmed detail */
.royalty-note {
  max-width: 46ch;
  margin-block-start: var(--space-md);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ----------------------------------------------------------------------------
   Lineage registers — the three town records (Kings, Abusua, Tufohyenle).
   Wide tables scroll inside .lineage__scroll so the page never scrolls sideways.
   -------------------------------------------------------------------------- */

.lineage {
  display: grid;
  gap: var(--space-3xl);
  margin-block-start: var(--space-xl);
}

.lineage__block {
  display: grid;
  gap: var(--space-sm);
}

.lineage__heading {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  line-height: 1.12;
}

.lineage__intro {
  max-width: 64ch;
  color: var(--color-text-secondary);
}

.lineage__scroll {
  overflow-x: auto;
  border-block-start: var(--hairline);
}

.lineage__table {
  inline-size: 100%;
  min-inline-size: 46rem;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.lineage__table th,
.lineage__table td {
  padding-block: var(--space-xs);
  padding-inline: var(--space-sm) var(--space-md);
  text-align: start;
  vertical-align: baseline;
  border-block-end: var(--hairline);
}

.lineage__table th:first-child,
.lineage__table td:first-child {
  padding-inline-start: 0;
  inline-size: 3rem;
}

.lineage__table thead th {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-accent);
  border-block-end-color: var(--color-border-strong);
  white-space: nowrap;
}

.lineage__table tbody tr:hover {
  background: var(--color-surface-soft-accent);
}

.lineage__cell-num {
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
}

.lineage__name {
  font-weight: 600;
  color: var(--color-text-primary);
}

.lineage__alias,
.lineage__years {
  color: var(--color-text-muted);
}

.lineage__row--tbi td {
  font-style: italic;
  color: var(--color-text-muted);
}

.lineage__status {
  display: inline-block;
  padding-block: var(--space-3xs);
  padding-inline: var(--space-2xs);
  border: var(--hairline);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-medium);
  text-transform: uppercase;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.lineage__status--concluded {
  border-color: var(--color-accent);
  color: var(--color-text-accent);
}

.lineage__source {
  max-width: 64ch;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.lineage__row--clickable { cursor: pointer; transition: background 0.15s ease; }
.lineage__row--clickable:hover { background: var(--color-surface-soft-accent); }
.lineage__row--clickable:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -2px; }
.king-modal__alias, .king-modal__reign, .king-modal__status { font-size: var(--text-sm); color: var(--color-text-muted); margin-block-start: var(--space-xs); }
.king-modal__reign { font-weight: 600; color: var(--color-text); }
.king-modal__status { font-style: italic; }
.king-modal__art img { inline-size: 100%; block-size: auto; display: block; }

/* Person cards on the roll of honour — role, then schooling line */
.tile__sub {
  margin-block-start: var(--space-2xs);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.tile__school {
  margin-block-start: var(--space-xs);
  font-size: var(--text-sm);
  color: var(--color-text-accent);
}

/* Officer cards — image-topped, portrait media window */
.media-card--portrait .media-card__art {
  aspect-ratio: 4 / 5;
}

/* Heritage — the 1932 survey sheet, held as a document not decoration */
.heritage-figure {
  display: grid;
  gap: var(--space-2xs);
  margin: 0;
}

.heritage-figure img {
  inline-size: 100%;
  block-size: auto;
  border: var(--hairline);
  border-radius: var(--radius-s);
  background: var(--color-surface-raised);
}

.heritage-figure__trigger {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  inline-size: 100%;
  display: block;
  cursor: pointer;
  border-radius: var(--radius-s);
  overflow: hidden;
}
.heritage-figure__trigger:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.heritage-figure__trigger:hover img { opacity: 0.92; }

.heritage-figure figcaption {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.media-card__title--sm {
  font-size: var(--text-xl);
}