:root,
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f4ee;
  --bg-elevated: #fdfcf9;
  --bg-subtle: #efeae0;
  --bg-inset: #e6dfd2;
  --header-bg: rgba(247, 244, 238, 0.88);
  --text: #14171a;
  --text-secondary: #2f363f;
  --muted: #525b66;
  --line: #dfd9cc;
  --line-strong: #c5bdb0;
  --accent: #9e3a12;
  --accent-hover: #7e2c0b;
  --on-accent: #fdfcf9;
  --accent-soft: rgba(158, 58, 18, 0.09);
  --accent-soft-strong: rgba(158, 58, 18, 0.16);
  --accent-border: rgba(158, 58, 18, 0.28);
  --shadow-sm: 0 1px 2px rgba(20, 23, 26, 0.04);
  --shadow-md: 0 12px 32px -6px rgba(20, 23, 26, 0.07), 0 2px 6px rgba(20, 23, 26, 0.03);
  --shadow-lg: 0 24px 56px -12px rgba(20, 23, 26, 0.18);
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Consolas, monospace;
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --section-py: clamp(2.25rem, 4.5vw, 3.5rem);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1013;
  --bg-elevated: #15181d;
  --bg-subtle: #1b1f26;
  --bg-inset: #232831;
  --header-bg: rgba(14, 16, 19, 0.86);
  --text: #f2efe9;
  --text-secondary: #cfd4dc;
  --muted: #96a0ad;
  --line: #252b33;
  --line-strong: #3a4350;
  --accent: #e88751;
  --accent-hover: #f39f6f;
  --on-accent: #121417;
  --accent-soft: rgba(232, 135, 81, 0.13);
  --accent-soft-strong: rgba(232, 135, 81, 0.22);
  --accent-border: rgba(232, 135, 81, 0.34);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 14px 36px -6px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  --shadow-lg: 0 28px 64px -10px rgba(0, 0, 0, 0.65);
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body:has(dialog[open]) {
  overflow: hidden;
}

::selection {
  background: var(--accent-soft-strong);
  color: var(--text);
}

h1, h2, h3, p, ul, ol, dl, dd, figure {
  margin: 0;
}

h1, h2, h3 {
  text-wrap: balance;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-underline-offset: 0.24em;
}

button, select {
  font: inherit;
}

:where(a, button, select):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

.skip-link {
  position: absolute;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.55rem 0.9rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  text-decoration: none;
  transform: translateY(-220%);
  transition: transform 0.15s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.wrap {
  width: min(100% - 3rem, 71rem);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 3.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  min-width: 0;
}

.monogram {
  display: inline-grid;
  place-items: center;
  width: 2.15rem;
  height: 2rem;
  flex: none;
  border-radius: 0.42rem;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--serif);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  box-shadow: inset 0 0 0 1.5px rgba(253, 252, 249, 0.22);
  transition: transform 0.18s ease, background 0.15s ease;
}

.brand:hover .monogram {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.brand-text {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.brand-name {
  font-weight: 600;
  font-size: 0.94rem;
  letter-spacing: -0.015em;
}

.brand-sep {
  color: var(--accent);
  font-weight: 400;
  margin-inline: 0.08rem;
}

.brand-sub {
  font-family: var(--mono);
  font-size: 0.71rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  min-width: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0 clamp(0.9rem, 1.8vw, 1.5rem);
}

.site-nav a {
  position: relative;
  font-size: 0.855rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding-block: 0.35rem;
  transition: color 0.15s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.15rem;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--text);
}

.site-nav a.is-active {
  font-weight: 600;
}

.site-nav a.is-active::after {
  transform: scaleX(1);
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.05rem;
  height: 2.05rem;
  border-radius: 0.42rem;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

:root[data-theme="light"] .icon-sun,
:root[data-theme="dark"] .icon-moon {
  display: none;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
}

.mobile-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-block: 0.2rem;
}

.mobile-nav-inner::-webkit-scrollbar {
  display: none;
}

.mobile-nav a {
  flex: none;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 0.45rem 0.35rem;
  border-radius: 0.34rem;
}

.mobile-nav a.is-active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
  overflow: hidden;
}

.scroll-progress-bar {
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

/* Author Strip */
.author-intro {
  border-bottom: 1px solid var(--line);
}

.author-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  padding-block: 0.75rem;
}

.author-inner p {
  color: var(--muted);
  font-size: 0.875rem;
}

/* Shared Typography & Controls */
.mono-label {
  font-family: var(--mono);
  font-size: 0.71rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: color 0.15s ease;
}

.text-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.62rem 1.1rem;
  border-radius: 0.46rem;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.button.primary {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(20, 23, 26, 0.12);
}

.button.primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.button.secondary {
  background: var(--bg-elevated);
  border-color: var(--line-strong);
  color: var(--text);
}

.button.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Sections */
.section {
  padding-block: var(--section-py);
  border-bottom: 1px solid var(--line);
}

.section-tinted {
  background: var(--bg-subtle);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}

.section-heading h2 {
  margin-top: 0.3rem;
  font-family: var(--serif);
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 400;
  font-optical-sizing: auto;
  line-height: 1.13;
  letter-spacing: -0.022em;
}

.section-aside {
  max-width: 44ch;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Masthead */
.masthead {
  padding-block: clamp(2rem, 4vw, 3.25rem);
}

.masthead-copy {
  max-width: 46rem;
}

.masthead-copy h1 {
  margin-top: 0.45rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.15rem);
  font-weight: 400;
  font-optical-sizing: auto;
  line-height: 1.07;
  letter-spacing: -0.026em;
}

.lede {
  margin-top: 0.9rem;
  color: var(--text-secondary);
  font-size: 1.02rem;
  max-width: 60ch;
}

.masthead-strip {
  display: grid;
  grid-template-columns: 1.35fr 1fr 0.9fr;
  gap: 1rem;
  margin-top: 2rem;
}

.strip-frame {
  display: flex;
  flex-direction: column;
  padding: 0;
  text-align: left;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.strip-frame:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.strip-media {
  display: block;
  width: 100%;
  height: 16rem;
  overflow: hidden;
  background: var(--bg-subtle);
}

.strip-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.strip-frame:hover .strip-media img {
  transform: scale(1.02);
}

.strip-cap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-top: 1px solid var(--line);
  background: var(--bg-elevated);
}

.cap-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
}

.cap-meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  white-space: nowrap;
}

/* Filter Tabs & Sort */
.sort-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

#review-sort {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--line-strong);
  border-radius: 0.42rem;
  padding: 0.42rem 0.75rem;
  cursor: pointer;
}

#review-sort:hover {
  border-color: var(--accent);
}

.filter-tabs-row {
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.4rem;
}

.filter-tabs {
  display: inline-flex;
  align-items: center;
  gap: 1.35rem;
  margin-bottom: -1px;
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.25rem;
  padding: 0.3rem 0.1rem 0.6rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.filter-tab:hover {
  color: var(--text);
  border-bottom-color: var(--line-strong);
}

.filter-tab[aria-pressed="true"] {
  color: var(--text);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

.tab-count {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
}

.filter-tab[aria-pressed="true"] .tab-count {
  color: var(--accent);
}

/* Review Cards */
.review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.review-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.review-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.review-media {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  aspect-ratio: 16 / 10;
  background: var(--bg-subtle);
  overflow: hidden;
  cursor: pointer;
}

.review-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.review-card:hover .review-media img {
  transform: scale(1.02);
}

.review-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.15rem 1.25rem 1.25rem;
}

.review-meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.card-meta {
  font-family: var(--mono);
  font-size: 0.71rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.score-tag {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  white-space: nowrap;
}

.score-tag span {
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--muted);
}

.review-body h3 {
  margin-top: 0.4rem;
  font-family: var(--serif);
  font-size: 1.48rem;
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -0.018em;
}

.review-title-btn {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: color 0.15s ease;
}

.review-title-btn:hover {
  color: var(--accent);
}

.review-excerpt {
  margin-top: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.93rem;
}

.highlight-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin-top: 0.95rem;
}

.highlight-tags li {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  padding: 0.16rem 0.48rem;
  border-radius: 0.28rem;
}

.review-footer {
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.photo-count {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
}

/* The Four Cats — Compact OSRS-Inspired Skill Cards */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.cat-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--line-strong);
  border-top: 3px solid var(--cat-accent, var(--accent));
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

:root[data-theme="dark"] .cat-card {
  --cat-accent-ink: color-mix(in srgb, var(--cat-accent, var(--accent)) 72%, #f2efe9);
  --osrs-gold: #e8b84b;
}

:root[data-theme="light"] .cat-card {
  --cat-accent-ink: var(--cat-accent, var(--accent));
  --osrs-gold: #8c5a08;
}

.cat-sheet-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.72rem 0.85rem;
  flex: 1;
}

.cat-avatar {
  flex: none;
  width: 4.1rem;
  height: 4.1rem;
  padding: 0;
  border-radius: 0.3rem;
  border: 1px solid var(--line-strong);
  background: var(--bg-subtle);
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: border-color 0.15s ease;
}

.cat-avatar:hover {
  border-color: var(--cat-accent-ink, var(--accent));
}

.cat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cat-identity {
  min-width: 0;
  flex: 1;
}

.cat-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.cat-name-group {
  display: inline-flex;
  align-items: baseline;
  gap: 0.42rem;
}

.cat-name-group h3 {
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 500;
  line-height: 1.08;
}

.cat-cb {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--osrs-gold);
}

.cat-class {
  font-family: var(--mono);
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cat-accent-ink, var(--accent));
  background: color-mix(in srgb, var(--cat-accent, var(--accent)) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--cat-accent, var(--accent)) 28%, var(--line));
  padding: 0.08rem 0.38rem;
  border-radius: 0.22rem;
}

.cat-meta {
  margin-top: 0.14rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
}

.cat-examine {
  margin-top: 0.32rem;
  font-size: 0.81rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.cat-examine span {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
}

/* OSRS 4-tile Skill Tab Row */
.cat-skills {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.48rem 0.85rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.skill-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.12rem;
  padding: 0.34rem 0.45rem;
  background: var(--bg-subtle);
  border: 1px solid var(--line-strong);
  border-radius: 0.25rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.skill-tile dt {
  font-family: var(--mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skill-tile dd {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  display: flex;
  align-items: baseline;
  gap: 0.08rem;
}

.lvl-cur {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.skill-tile.is-maxed .lvl-cur {
  color: var(--osrs-gold);
}

.lvl-sep,
.lvl-max {
  font-size: 0.65rem;
  color: var(--muted);
}

.cat-footer-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.62rem 0.85rem 0.7rem;
  background: var(--bg-subtle);
  flex: 1;
}

.cat-abilities {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
  flex: 1;
}

.cat-abilities > div {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  align-items: baseline;
  gap: 0.45rem;
}

.ab-tag {
  font-family: var(--mono);
  font-size: 0.59rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.06rem 0.22rem;
  border-radius: 0.2rem;
  border: 1px solid var(--line-strong);
  background: var(--bg-elevated);
  color: var(--muted);
}

.ab-tag.is-spec {
  color: var(--osrs-gold);
  border-color: color-mix(in srgb, var(--osrs-gold) 45%, var(--line));
}

.cat-abilities dd {
  font-size: 0.79rem;
  color: var(--text-secondary);
  line-height: 1.36;
}

.cat-abilities dd strong {
  color: var(--text);
  font-weight: 600;
}

.total-lvl {
  flex: none;
  align-self: flex-end;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  padding: 0.16rem 0.42rem;
  border: 1px solid var(--line);
  border-radius: 0.22rem;
  background: var(--bg-elevated);
  white-space: nowrap;
}

/* Photography Grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.photo-tile {
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-elevated);
  cursor: pointer;
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.photo-tile:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.photo-frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-subtle);
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.photo-tile:hover .photo-frame img {
  transform: scale(1.025);
}

.photo-caption {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  padding: 0.65rem 0.8rem;
  border-top: 1px solid var(--line);
}

.photo-caption strong {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.photo-caption span {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
}

/* About */
.about-split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.85fr);
  gap: 2rem 3rem;
  align-items: start;
}

.about-main h2 {
  margin-top: 0.35rem;
  margin-bottom: 0.9rem;
  font-family: var(--serif);
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 400;
  line-height: 1.13;
  letter-spacing: -0.022em;
}

.about-copy {
  color: var(--text-secondary);
  max-width: 60ch;
}

.about-copy + .about-copy {
  margin-top: 0.8rem;
}

.notes-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-sm);
}

.notes-panel h3 {
  margin-top: 0.4rem;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 500;
}

.notes-panel p {
  margin-top: 0.45rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.series-list {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
  border-top: 1px solid var(--line);
}

.series-list li {
  border-bottom: 1px solid var(--line);
}

.series-list a {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  padding: 0.6rem 0.15rem;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text);
  transition: color 0.15s ease;
}

.series-list a span {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
}

.series-list a:hover {
  color: var(--accent);
}

/* Footer */
.site-footer {
  background: var(--bg-subtle);
  padding-block: 2.25rem 1.75rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem 2rem;
  flex-wrap: wrap;
}

.footer-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.018em;
}

.footer-title span {
  color: var(--accent);
  font-weight: 400;
}

.footer-meta {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.footer-colophon {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.colophon-link {
  color: var(--muted);
  text-decoration: none;
}

.colophon-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Dialogs */
dialog::backdrop {
  background: rgba(14, 16, 19, 0.72);
  backdrop-filter: blur(5px);
}

.reader-dialog {
  width: min(100% - 2rem, 54rem);
  max-height: 90vh;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}

.dialog-top {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.4rem;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.dialog-top-actions {
  display: flex;
  align-items: center;
  flex: none;
  gap: 0.4rem;
}

.dialog-close,
.lightbox-nav {
  border: 1px solid var(--line-strong);
  background: var(--bg-elevated);
  color: var(--muted);
  height: 1.9rem;
  padding: 0 0.6rem;
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.dialog-close:hover,
.lightbox-nav:hover {
  color: var(--text);
  border-color: var(--accent);
}

.lightbox-nav.is-copied {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dialog-article {
  padding: clamp(1.5rem, 3.5vw, 2.5rem) clamp(1.25rem, 4vw, 2.75rem) 2.5rem;
}

.reader-header {
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--line);
}

.reader-header h2 {
  margin-top: 0.4rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.85rem);
  font-weight: 400;
  font-optical-sizing: auto;
  line-height: 1.08;
  letter-spacing: -0.024em;
}

.reader-dek {
  margin-top: 0.75rem;
  max-width: 60ch;
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.6;
}

.reader-ledger {
  margin-top: 1.35rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.8fr);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.ledger-cell {
  padding: 0.7rem 0.85rem;
  border-right: 1px solid var(--line);
}

.ledger-cell:last-child {
  border-right: 0;
}

.ledger-cell dt {
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.ledger-cell dd {
  margin-top: 0.2rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.ledger-cell.is-accent dd {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  font-size: 0.96rem;
}

.ledger-cell.is-accent dd span {
  font-weight: 400;
  font-size: 0.76rem;
  color: var(--muted);
}

.reader-flow {
  display: grid;
  gap: 2.25rem;
  margin-top: 2rem;
}

.reader-section {
  display: grid;
  gap: 1.15rem;
}

.reader-prose {
  max-width: 60ch;
}

.reader-section-num {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.reader-prose h3 {
  margin-top: 0.15rem;
  margin-bottom: 0.55rem;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.015em;
}

.reader-prose p {
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.7;
}

.reader-prose p + p {
  margin-top: 0.75rem;
}

.reader-figures {
  display: grid;
  gap: 0.85rem;
}

.reader-figures.is-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.reader-figure {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.reader-figure button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--bg-subtle);
  cursor: zoom-in;
  overflow: hidden;
}

.reader-figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.reader-figures.is-pair .reader-figure img {
  aspect-ratio: 4 / 3;
}

.reader-figure button:hover img {
  transform: scale(1.015);
}

.reader-figure figcaption {
  padding: 0.55rem 0.8rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.73rem;
  color: var(--muted);
  line-height: 1.45;
}

.reader-verdict {
  margin-top: 2.25rem;
  padding: 1.15rem 1.3rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
}

.verdict-score {
  display: flex;
  flex-direction: column;
  flex: none;
  gap: 0.15rem;
  padding-right: 1.25rem;
  border-right: 1px solid var(--line);
}

.verdict-score strong {
  font-family: var(--mono);
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.verdict-score strong span {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
}

.reader-verdict p {
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.6;
}

.reader-pager {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.pager-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 0.8rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease;
}

.pager-btn.is-next {
  align-items: flex-end;
  text-align: right;
}

.pager-btn strong {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 500;
}

.pager-btn:hover {
  border-color: var(--accent);
}

.lightbox-dialog {
  width: min(94vw, 62rem);
  max-height: 92vh;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}

.lightbox-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--line);
}

.lightbox-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.lightbox-figure {
  display: flex;
  flex-direction: column;
}

.lightbox-figure img {
  max-height: 76vh;
  width: auto;
  max-width: 100%;
  margin-inline: auto;
  background: var(--bg-subtle);
}

.lightbox-figure figcaption {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
}

/* Responsive */
@media (max-width: 60rem) {
  .about-split {
    grid-template-columns: 1fr;
  }

  .masthead-strip {
    grid-template-columns: 1fr 1fr;
  }

  .masthead-strip .strip-frame:first-child {
    grid-column: 1 / -1;
  }

  .cat-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 44rem) {
  .wrap {
    width: min(100% - 2rem, 71rem);
  }

  .site-nav {
    display: none;
  }

  .mobile-nav {
    display: block;
  }

  .masthead-strip,
  .review-grid,
  .photo-grid {
    grid-template-columns: 1fr;
  }

  .cat-card.has-photo {
    grid-template-columns: 1fr;
  }

  .cat-photo {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    aspect-ratio: 16 / 10;
  }

  .cat-skills {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cat-footer-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
  }

  .reader-dialog {
    width: min(100% - 1rem, 54rem);
  }

  .dialog-top {
    padding: 0.65rem 0.9rem;
    gap: 0.5rem;
  }

  #dialog-crumb {
    display: none;
  }

  .dialog-top-actions {
    width: 100%;
    justify-content: flex-end;
  }

  #dialog-copy {
    margin-right: auto;
  }

  .reader-ledger {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ledger-cell {
    border-bottom: 1px solid var(--line);
  }

  .ledger-cell:nth-child(2n) {
    border-right: 0;
  }

  .ledger-cell:nth-child(3),
  .ledger-cell.is-wide {
    grid-column: 1 / -1;
    border-right: 0;
  }

  .ledger-cell.is-wide {
    border-bottom: 0;
  }

  .reader-figures.is-pair,
  .reader-pager {
    grid-template-columns: 1fr;
  }

  .reader-verdict {
    flex-direction: column;
    gap: 0.65rem;
  }

  .verdict-score {
    padding-right: 0;
    padding-bottom: 0.55rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    width: 100%;
  }

  .pager-btn.is-next {
    align-items: flex-start;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
