* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body, 'Space Grotesk', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  color: var(--text);
  background: var(--body-bg, var(--bg));
  min-height: 100vh;
}

html[data-theme='modern'] {
  --motion-duration-fast: 180ms;
  --motion-duration-base: 240ms;
  --motion-duration-slow: 320ms;
  --motion-ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --motion-ease-emphasis: cubic-bezier(0.22, 1, 0.36, 1);
  --motion-lift-y: -4px;
  --motion-press-y: 1px;
  --shadow-hover-soft: 0 20px 36px rgba(17, 24, 39, 0.16);
  --shadow-hover-feature: 0 26px 52px rgba(17, 24, 39, 0.2);
  --shadow-button-rest: 0 16px 30px rgba(83, 105, 255, 0.2);
  --shadow-button-hover: 0 20px 34px rgba(83, 105, 255, 0.26);
  --shadow-button-press: 0 10px 20px rgba(83, 105, 255, 0.18);
}

.aurora {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: var(--aurora-bg, transparent);
  filter: blur(70px);
  z-index: -1;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: var(--grid-image, none);
  background-size: 120px 120px;
  opacity: var(--grid-opacity, 0);
  z-index: -2;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(0.7rem, 1.4vw, 1.4rem);
  padding: 0.85rem clamp(1rem, 3vw, 3rem);
  position: sticky;
  top: 0;
  backdrop-filter: blur(14px);
  background: var(--header-bg, rgba(244, 241, 234, 0.9));
  border-bottom: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  z-index: 10;
}

.site-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 10px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.11), rgba(15, 23, 42, 0));
  opacity: 0.32;
}

.brand-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1 1 0;
  min-width: 0;
  padding-inline-end: clamp(0.45rem, 1.4vw, 1.2rem);
}

.brand {
  font-weight: 800;
  letter-spacing: 0.012em;
  font-size: clamp(1.12rem, 1.45vw, 1.35rem);
  line-height: 1.05;
  text-decoration: none;
  color: var(--text);
}

.brand-tagline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

nav {
  display: flex;
  gap: clamp(0.4rem, 1.1vw, 0.8rem);
  align-items: center;
  justify-content: center;
  flex: 0 1 auto;
  padding-inline: clamp(0.3rem, 0.8vw, 0.75rem);
}


.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  border: 1px solid color-mix(in srgb, var(--border) 86%, transparent);
  border-radius: 999px;
  padding: 0.22rem;
  margin-left: auto;
  background: color-mix(in srgb, var(--card) 86%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.theme-toggle span {
  font-size: 0.66rem;
  color: var(--muted);
  font-weight: 600;
  margin-inline: 0.25rem 0.1rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.theme-toggle button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.69rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.theme-toggle button[aria-pressed='true'] {
  border-color: color-mix(in srgb, var(--accent-2) 60%, transparent);
  color: var(--accent-2);
  background: color-mix(in srgb, var(--accent-2) 13%, transparent);
}

nav a {
  text-decoration: none;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

h1 a, h2 a, h3 a {
  color: inherit;
  text-decoration-style: dotted;
  text-decoration-color: var(--muted);
}

article.card > a {
  text-decoration: none;
}

.gorilla-link {
  font-size: 1.3rem;
  line-height: 1;
  padding: 0.2rem 0.3rem;
  border-radius: 6px;
  transition: transform 0.15s ease, opacity 0.15s ease;
  opacity: 0.85;
}

.gorilla-link:hover {
  transform: scale(1.2);
  opacity: 1;
}

nav a {
  position: relative;
  font-size: 0.9rem;
  font-weight: 520;
  color: color-mix(in srgb, var(--text) 80%, var(--muted) 20%);
  padding: 0.28rem 0.48rem;
  border-radius: 999px;
  transition: color 0.22s ease, background-color 0.22s ease, transform 0.22s ease;
}

nav a[aria-current='page'] {
  color: var(--accent-2);
  font-weight: 680;
  background: color-mix(in srgb, var(--accent-2) 12%, transparent);
}

nav a:hover,
nav a:focus-visible {
  color: var(--accent-2);
  background: color-mix(in srgb, var(--accent-2) 10%, transparent);
}

html[data-theme='modern'] nav a {
  transition:
    color var(--motion-duration-fast, 180ms) var(--motion-ease-standard, ease),
    background-color var(--motion-duration-fast, 180ms) var(--motion-ease-standard, ease),
    transform var(--motion-duration-fast, 180ms) var(--motion-ease-emphasis, ease),
    text-decoration-color var(--motion-duration-base, 240ms) var(--motion-ease-standard, ease);
}


.theme-toggle:hover,
.theme-toggle:focus-within {
  border-color: color-mix(in srgb, var(--accent-2) 26%, var(--border) 74%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 0 0 1px rgba(83, 105, 255, 0.12);
}

.theme-toggle button:hover,
.theme-toggle button:focus-visible {
  color: var(--accent-2);
  background: color-mix(in srgb, var(--accent-2) 10%, transparent);
}

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 3vw, 3rem) 4rem;
}

.section {
  margin: 0;
}

.section + .section {
  margin-top: clamp(0.85rem, 1.6vw, 1.3rem);
}

.section--tight {
  margin-top: clamp(0.75rem, 1.6vw, 1.2rem) !important;
}

.section--tight.card {
  padding: 0.6rem clamp(0.75rem, 1.5vw, 1rem);
}

.section--loose {
  margin-top: clamp(1.8rem, 3.6vw, 3.2rem) !important;
}

.section--band {
  padding: clamp(1rem, 2vw, 1.4rem);
  border-radius: 22px;
  background: var(--card);
  border: 1px solid rgba(83, 105, 255, 0.16);
}

.section--divider-top {
  position: relative;
  padding-top: clamp(1.1rem, 2vw, 1.6rem);
}

.section--divider-top::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: min(180px, 32%);
  height: 1px;
  background: linear-gradient(90deg, var(--accent-2), rgba(83, 105, 255, 0));
}

.card {
  border-radius: 20px;
  padding: clamp(1rem, 2vw, 1.5rem);
}

.card--soft {
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-rest, 0 16px 32px rgba(17, 24, 39, 0.1));
}

.card--hero {
  background: linear-gradient(145deg, var(--card), rgba(83, 105, 255, 0.07));
  border: 1px solid rgba(83, 105, 255, 0.2);
  box-shadow: var(--shadow-feature, 0 24px 50px rgba(17, 24, 39, 0.14));
}

html[data-theme='modern'] a.card,
html[data-theme='modern'] button.card,
html[data-theme='modern'] .compact-item,
html[data-theme='modern'] .card[data-interactive='true'] {
  transition:
    transform var(--motion-duration-base, 240ms) var(--motion-ease-emphasis, ease),
    box-shadow var(--motion-duration-base, 240ms) var(--motion-ease-standard, ease),
    border-color var(--motion-duration-fast, 180ms) var(--motion-ease-standard, ease),
    background-color var(--motion-duration-fast, 180ms) var(--motion-ease-standard, ease);
  will-change: transform;
}

html[data-theme='modern'] a.card.card--soft:hover,
html[data-theme='modern'] a.card.card--hero:hover,
html[data-theme='modern'] button.card.card--soft:hover,
html[data-theme='modern'] button.card.card--hero:hover,
html[data-theme='modern'] .compact-item:hover,
html[data-theme='modern'] a.card.card--soft:focus-visible,
html[data-theme='modern'] a.card.card--hero:focus-visible,
html[data-theme='modern'] button.card.card--soft:focus-visible,
html[data-theme='modern'] button.card.card--hero:focus-visible,
html[data-theme='modern'] .compact-item:focus-visible,
html[data-theme='modern'] .card[data-interactive='true']:hover,
html[data-theme='modern'] .card[data-interactive='true']:focus-visible {
  transform: translateY(var(--motion-lift-y, -4px));
}

html[data-theme='modern'] a.card.card--soft:hover,
html[data-theme='modern'] a.card.card--soft:focus-visible,
html[data-theme='modern'] button.card.card--soft:hover,
html[data-theme='modern'] button.card.card--soft:focus-visible {
  box-shadow: var(--shadow-hover-soft, 0 20px 36px rgba(17, 24, 39, 0.16));
}

html[data-theme='modern'] a.card.card--hero:hover,
html[data-theme='modern'] a.card.card--hero:focus-visible,
html[data-theme='modern'] button.card.card--hero:hover,
html[data-theme='modern'] button.card.card--hero:focus-visible {
  box-shadow: var(--shadow-hover-feature, 0 26px 52px rgba(17, 24, 39, 0.2));
}

.card--outline {
  background: transparent;
  border: 1px solid var(--border);
  box-shadow: none;
}

.card--flat {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.hero {
  display: grid;
  gap: clamp(1.5rem, 3vw, 3rem);
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.85fr);
  align-items: stretch;
}

.hero-panel {
  display: grid;
  gap: 1.25rem;
  align-content: center;
  min-width: 0;
}

.hero h1 {
  font-size: clamp(1.75rem, 3.6vw, 3rem);
  margin: 0;
  line-height: 1.05;
}

.hero-copy {
  margin: 0;
  max-width: none;
  white-space: normal;
  font-size: clamp(0.82rem, 0.95vw, 0.95rem);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.hero-visual {
  margin: 0;
  width: min(100%, 75%);
  justify-self: end;
  aspect-ratio: 10 / 11;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(255, 106, 61, 0.15), rgba(83, 105, 255, 0.15));
}

.hero-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

p {
  color: var(--muted);
  line-height: 1.45;
}

.text-block {
  max-width: 66ch;
}

.idea-stack {
  display: grid;
  gap: clamp(0.7rem, 1.5vw, 1rem);
}

.lead {
  margin: 0;
  color: var(--text);
  font-size: clamp(1rem, 1.2vw, 1.12rem);
  line-height: 1.35;
  font-weight: 700;
}

.key-points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
}

.key-points li {
  margin: 0;
  padding-left: 1rem;
  position: relative;
  color: var(--muted);
  line-height: 1.42;
}

.key-points li::before {
  content: '✦';
  position: absolute;
  left: 0;
  top: 0.04rem;
  color: var(--accent-2);
  font-size: 0.75rem;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.meta-row .chip {
  cursor: default;
  padding: 0.28rem 0.62rem;
  font-size: 0.72rem;
}

details {
  margin: 0;
}

details summary {
  display: inline-block;
  cursor: pointer;
  font-weight: 700;
  color: var(--accent-2);
  text-underline-offset: 0.16em;
}

details[open] summary {
  margin-bottom: 0.45rem;
}

details p {
  margin: 0;
}

details p + p {
  margin-top: 0.5rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  font-size: 0.75rem;
  font-weight: 700;
  margin: 0;
}

.button {
  display: inline-block;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  padding: 0.65rem 1rem;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  border: none;
  box-shadow: 0 16px 30px rgba(83, 105, 255, 0.2);
  text-decoration: none;
}

html[data-theme='modern'] .button,
html[data-theme='modern'] .button-secondary {
  transition:
    transform var(--motion-duration-fast, 180ms) var(--motion-ease-emphasis, ease),
    box-shadow var(--motion-duration-fast, 180ms) var(--motion-ease-standard, ease),
    background-color var(--motion-duration-fast, 180ms) var(--motion-ease-standard, ease),
    border-color var(--motion-duration-fast, 180ms) var(--motion-ease-standard, ease),
    color var(--motion-duration-fast, 180ms) var(--motion-ease-standard, ease);
}

html[data-theme='modern'] .button {
  box-shadow: var(--shadow-button-rest, 0 16px 30px rgba(83, 105, 255, 0.2));
}

html[data-theme='modern'] .button:hover,
html[data-theme='modern'] .button:focus-visible {
  transform: translateY(calc(var(--motion-lift-y, -4px) * 0.5));
  box-shadow: var(--shadow-button-hover, 0 20px 34px rgba(83, 105, 255, 0.26));
}

html[data-theme='modern'] .button:active,
html[data-theme='modern'] .button-secondary:active {
  transform: translateY(var(--motion-press-y, 1px));
}

html[data-theme='modern'] .button:active {
  box-shadow: var(--shadow-button-press, 0 10px 20px rgba(83, 105, 255, 0.18));
}

html[data-theme='modern'] .button-secondary:hover,
html[data-theme='modern'] .button-secondary:focus-visible {
  transform: translateY(calc(var(--motion-lift-y, -4px) * 0.25));
  background: color-mix(in srgb, var(--accent-2) 9%, transparent);
}

.button-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: none;
}

.hero-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.hero-actions .button {
  font-size: 0.92rem;
  padding: 0.58rem 0.92rem;
}

.project-hero h1 {
  margin: 0;
}

.feature-list {
  margin: 0.7rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  display: grid;
  gap: 0.45rem;
}

.feature-list li {
  line-height: 1.45;
}

.download-card {
  text-align: center;
}

.download-card h2 {
  margin-top: 0.35rem;
}

.button[disabled] {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
  filter: saturate(70%);
}

.split-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.compact-list {
  display: grid;
  gap: 0.45rem;
}

.project-list .compact-item,
.project-list .compact-item-static {
  min-width: 0;
}

.project-list .compact-main {
  flex: 1 1 auto;
  min-width: 0;
}

.project-list .compact-main h2,
.project-list .compact-main p {
  overflow-wrap: anywhere;
}

.project-list .compact-main p {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.compact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.85rem;
  padding-left: 1rem;
  border-radius: 12px;
  border: 1px solid transparent;
  position: relative;
  --item-accent: var(--accent-2);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.compact-item:hover {
  background: rgba(83, 105, 255, 0.08);
  border-color: rgba(83, 105, 255, 0.22);
}

.compact-item:focus-visible,
.button:focus-visible,
.button-secondary:focus-visible,
.chip:focus-visible,
nav a:focus-visible,
a:focus-visible,
.menu-button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 10px;
}

.compact-item-static {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
}

.compact-item-static::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 4px;
  border-radius: 999px;
  background: var(--item-accent);
  opacity: 0.95;
}

.compact-item-static:hover {
  transform: translateY(-1px);
}

.compact-main {
  min-width: 0;
}

.compact-main h2,
.compact-main h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
}

.compact-main p {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-title-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.15rem;
}

.item-icon {
  display: inline-grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  font-size: 0.85rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--item-accent) 18%, white);
}

.item-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: color-mix(in srgb, var(--item-accent) 68%, black);
  border: 1px solid color-mix(in srgb, var(--item-accent) 36%, transparent);
  background: color-mix(in srgb, var(--item-accent) 12%, white);
  border-radius: 999px;
  padding: 0.15rem 0.42rem;
}

.category-games-and-recreation { --item-accent: #6b7dff; }
.category-websites { --item-accent: #2f8e6b; }
.category-tools { --item-accent: #a9762f; }
.category-other-media { --item-accent: #8a58bd; }
.category-discontinued { --item-accent: #7c8895; }
.category-art { --item-accent: #b658a5; }
.category-learning-and-libraries { --item-accent: #4f74c9; }
.category-ai-tools { --item-accent: #4f9d57; }
.category-uncategorizable { --item-accent: #8d7b66; }
.category-miscellaneous-referral-links { --item-accent: #b86f35; }
.category-writing { --item-accent: #7f5bd7; }
.category-science-fiction-fantasy-and-speculative-fiction { --item-accent: #5369ff; }
.category-horror-and-supernatural { --item-accent: #9b4f6b; }
.category-literary-fiction-and-classics { --item-accent: #6a4ba6; }
.category-history-society-and-biography { --item-accent: #8a6f3e; }
.category-psychology-and-self-development { --item-accent: #2f8d88; }
.category-philosophy { --item-accent: #6e6b9f; }
.category-markets-risk-and-decision-making { --item-accent: #2d8b67; }

.compact-meta {
  font-size: 0.8rem;
  color: var(--accent-2);
  font-weight: 700;
  white-space: nowrap;
}

.compact-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mini-link {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-2);
  border: 1px solid rgba(83, 105, 255, 0.3);
  background: rgba(83, 105, 255, 0.06);
  border-radius: 999px;
  padding: 0.28rem 0.62rem;
  text-decoration: none;
}

.mini-link.secondary {
  color: #1c7b67;
  border-color: rgba(47, 191, 155, 0.35);
  background: rgba(47, 191, 155, 0.08);
}

.mini-link.tertiary {
  color: #8a5d1f;
  border-color: rgba(166, 115, 46, 0.35);
  background: rgba(166, 115, 46, 0.08);
}

.category-stack {
  display: grid;
  gap: 1rem;
}

.category-stack .compact-section {
  display: grid;
  gap: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.45);
  padding: 0.85rem;
}

.category-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
}

.category-stack .compact-section h2 {
  margin: 0;
  font-size: 1rem;
}

.category-count {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.category-content {
  display: grid;
  gap: 0.75rem;
}

.category-stack .compact-main {
  flex: 1 1 0;
  min-width: 0;
}

.category-stack .compact-main h3,
.category-stack .compact-main p {
  overflow-wrap: anywhere;
}

.category-stack .compact-main p {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

#bookGrid .compact-main,
#linkGrid .compact-main,
#projectGrid .compact-main {
  flex: 1 1 0;
  min-width: 0;
}

#bookGrid .compact-main p,
#linkGrid .compact-main p,
#projectGrid .compact-main p {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}

#bookGrid .compact-actions,
#linkGrid .compact-actions,
#projectGrid .compact-actions {
  flex: 0 0 auto;
}

#bookGrid .mini-link,
#linkGrid .mini-link,
#projectGrid .mini-link {
  white-space: nowrap;
}

.book-controls {
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem clamp(0.75rem, 1.5vw, 1rem);
}

.book-search-wrap {
  display: grid;
  gap: 0.45rem;
}

.book-search-wrap label {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.book-search-wrap input:focus-visible {
  outline: none;
  outline-offset: 0;
  border-color: var(--accent-2);
  box-shadow: inset 0 0 0 2px var(--accent-2);
}

.book-tools {
  display: grid;
  gap: 0.5rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.45);
  color: var(--text);
  border-radius: 999px;
  padding: 0.34rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.chip--linked {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.chip[aria-pressed='true'] {
  border-color: var(--accent-2);
  background: rgba(83, 105, 255, 0.13);
  color: var(--accent-2);
}

.book-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.book-actions .note {
  margin: 0;
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--muted);
}

.book-actions .button {
  font-size: 0.86rem;
  padding: 0.52rem 0.85rem;
}

#bookResultMeta {
  margin: 0;
}

.book-spotlight {
  display: grid;
  gap: 0.7rem;
  border: 1px dashed rgba(83, 105, 255, 0.45);
  background: linear-gradient(120deg, rgba(83, 105, 255, 0.1), rgba(255, 106, 61, 0.06));
  box-shadow: var(--shadow-feature, 0 24px 50px rgba(17, 24, 39, 0.14));
}

.book-spotlight[hidden] {
  display: none;
}

.book-spotlight-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.book-spotlight-title {
  margin: 0;
  font-size: 1.12rem;
}

.book-spotlight-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.book-spotlight-copy {
  margin: 0;
}

.book-spotlight .compact-actions {
  justify-content: flex-start;
}

.book-card-picked {
  border-color: var(--accent-2);
  background: rgba(83, 105, 255, 0.12);
  box-shadow: var(--shadow-feature, 0 24px 50px rgba(17, 24, 39, 0.14)), 0 0 0 2px rgba(83, 105, 255, 0.26);
  animation: book-picked-pulse 1.15s ease-out;
}

@keyframes book-picked-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(83, 105, 255, 0.42);
  }

  100% {
    box-shadow: 0 0 0 8px rgba(83, 105, 255, 0);
  }
}

.subcategory-block {
  display: grid;
  gap: 0.45rem;
  border-left: 3px solid rgba(83, 105, 255, 0.3);
  padding-left: 0.7rem;
}

.subcategory-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.contact-form {
  display: grid;
  gap: 0.6rem;
}

input,
textarea {
  width: 100%;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
}

.note {
  font-size: 0.9rem;
}

.challenge-manifesto {
  position: relative;
  overflow: hidden;
}

.challenge-manifesto::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent-2);
}

.challenge-manifesto h2 {
  margin-top: 0.35rem;
  margin-bottom: 0.9rem;
}

.stoic-trigger {
  color: var(--accent-2);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 2px;
}

.stoic-trigger:hover,
.stoic-trigger:focus-visible {
  color: var(--accent);
}

.challenge-manifesto-hero {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  align-items: start;
}

.challenge-manifesto blockquote {
  margin: 0;
  padding: 0.15rem 0 0.15rem 1rem;
  border-left: 3px solid var(--accent-2);
  max-width: 68ch;
}

.challenge-manifesto-rail {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.75rem;
  align-self: stretch;
}

.challenge-manifesto-visual {
  margin: 0;
  justify-self: stretch;
  width: 100%;
  padding: 0.5rem;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 42%, rgba(83, 105, 255, 0.2), rgba(83, 105, 255, 0) 68%);
}

.challenge-manifesto-visual img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 18px 28px rgba(33, 30, 45, 0.28));
}

.challenge-manifesto-meta {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.42);
  padding: 0.75rem;
  display: grid;
  align-content: center;
}

.challenge-manifesto blockquote p {
  margin: 0;
  color: var(--text);
  font-size: clamp(1rem, 1.04vw, 1.08rem);
  line-height: 1.55;
}

.challenge-manifesto blockquote p + p {
  margin-top: 0.75rem;
}

.challenge-manifesto cite {
  display: block;
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-style: normal;
  font-weight: 700;
}

.challenge-manifesto-source {
  max-width: 68ch;
  margin: 0.9rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.challenge-manifesto-source a {
  color: var(--accent-2);
  font-weight: 700;
}

.challenge-manifesto-commentary {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.45;
}

.challenge-recruitment {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(170px, 230px) minmax(0, 1fr);
  align-items: start;
}

/* Restore grid when tone-pro class overrides display: block */
html[data-theme='modern'] .tone-pro.challenge-recruitment,
html[data-pro] .tone-pro.challenge-recruitment {
  display: grid;
}

.challenge-recruitment-copy {
  display: grid;
  gap: 0.9rem;
  min-width: 0;
}

.challenge-recruitment-copy h2 {
  margin: 0;
  line-height: 1.15;
}

.challenge-prelude,
.challenge-lede,
.challenge-kicker {
  margin: 0;
}

.challenge-lede,
.challenge-kicker {
  color: var(--text);
  line-height: 1.5;
}

.challenge-hype-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.challenge-hype-list li {
  padding: 0.5rem 0.65rem;
  border-left: 3px solid var(--accent-2);
  background: rgba(83, 105, 255, 0.08);
  color: var(--muted);
  line-height: 1.45;
}

.challenge-claims {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
}

.challenge-claims li {
  line-height: 1.45;
}

.challenge-recruitment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.challenge-recruitment-poster {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.2);
  width: 100%;
}

.challenge-recruitment-poster img {
  display: block;
  width: 100%;
  height: auto;
}

.challenge-recruitment-poster figcaption {
  margin: 0;
  padding: 0.55rem 0.7rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
}

.challenge-recruitment-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  overflow: visible;
  font-size: clamp(3.5rem, 10vw, 6rem);
  line-height: 1;
  padding: 1rem 0;
  align-self: center;
}

.stoic-popup {
  width: min(760px, calc(100vw - 2rem));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 0;
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
}

.stoic-popup::backdrop {
  background: rgba(5, 8, 20, 0.62);
  backdrop-filter: blur(2px);
}

.stoic-popup-body {
  display: grid;
  gap: 0.85rem;
  padding: clamp(1rem, 2.1vw, 1.3rem);
}

.stoic-popup h3 {
  margin: 0;
  line-height: 1.2;
}

.stoic-popup p {
  margin: 0;
}

.stoic-popup-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.2rem;
}

html[data-theme='dos'] .challenge-manifesto-hero,
html[data-theme='nes'] .challenge-manifesto-hero {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
}

html[data-theme='dos'] .challenge-manifesto-meta,
html[data-theme='nes'] .challenge-manifesto-meta {
  border-radius: 0;
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme='dos'] .stoic-popup,
html[data-theme='nes'] .stoic-popup {
  border-radius: 0;
  box-shadow: none;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1rem clamp(1rem, 3vw, 3rem) 2rem;
}

.menu-button {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .category-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-visual {
    width: min(100%, 420px);
    justify-self: center;
    order: -1;
  }

  .challenge-manifesto-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .challenge-manifesto-rail {
    width: min(100%, 300px);
    justify-self: center;
  }

  .challenge-manifesto-visual {
    width: 100%;
  }

  .challenge-recruitment-actions .button {
    width: auto;
  }

  .challenge-recruitment {
    grid-template-columns: 1fr;
  }

  .challenge-recruitment-poster {
    width: min(100%, 260px);
    justify-self: center;
  }

  .compact-item,
  .compact-item-static {
    align-items: flex-start;
    flex-direction: column;
  }

  .compact-main p {
    white-space: normal;
  }

  .book-actions .button {
    width: auto;
  }
}

@media (max-width: 760px) {
  .site-header {
    flex-wrap: nowrap;
    align-items: center;
    row-gap: 0;
    column-gap: 0.3rem;
    padding: 0.58rem 0.7rem;
  }

  .brand-wrap {
    max-width: min(50vw, 170px);
    min-width: 0;
    align-items: flex-start;
    gap: 0.18rem;
    padding-inline-end: 0.28rem;
    flex: 1 1 auto;
  }

  .brand {
    display: block;
    max-width: 6.4ch;
    line-height: 1.02;
    white-space: normal;
  }

  .brand-tagline {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.08rem;
    line-height: 1.25;
    white-space: nowrap;
  }

  .menu-button {
    display: inline-block;
    order: 3;
    flex-shrink: 0;
  }

  nav {
    display: none;
    position: absolute;
    right: 1rem;
    top: 64px;
    flex-direction: column;
    padding: 0.9rem;
    background: var(--header-bg, rgba(249, 245, 239, 0.97));
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.15);
  }

  .theme-toggle {
    order: 2;
    width: auto;
    margin-left: auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 0.12rem;
    padding: 0.12rem;
  }

  .theme-toggle span {
    display: none;
  }

  .theme-toggle button {
    font-size: 0.64rem;
    padding: 0.13rem 0.28rem;
  }

  nav.show {
    display: flex;
  }
}

/* Tone-aware content swap: modern = professional, dos/nes = playful */
/* Both class selectors and [class*=] substring selectors for curly-quote resilience */
.tone-pro, [class*='tone-pro'] { display: none; }
html[data-theme='modern'] .tone-playful,
html[data-theme='modern'] [class*='tone-playful'] { display: none; }
html[data-theme='modern'] .tone-pro,
html[data-theme='modern'] [class*='tone-pro'] { display: block; }
html[data-theme='modern'] span.tone-pro,
html[data-theme='modern'] span[class*='tone-pro'] { display: inline; }
/* Force pro tone on pro.geraldnorby.com regardless of theme */
html[data-pro] .tone-playful,
html[data-pro] [class*='tone-playful'] { display: none; }
html[data-pro] .tone-pro,
html[data-pro] [class*='tone-pro'] { display: block; }
html[data-pro] span.tone-pro,
html[data-pro] span[class*='tone-pro'] { display: inline; }

@media (prefers-reduced-motion: reduce) {
  html[data-theme='modern'] .button,
  html[data-theme='modern'] .button-secondary,
  html[data-theme='modern'] nav a,
  html[data-theme='modern'] a.card,
  html[data-theme='modern'] button.card,
  html[data-theme='modern'] .compact-item,
  html[data-theme='modern'] .card[data-interactive='true'] {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  html[data-theme='modern'] .button:hover,
  html[data-theme='modern'] .button:focus-visible,
  html[data-theme='modern'] .button:active,
  html[data-theme='modern'] .button-secondary:hover,
  html[data-theme='modern'] .button-secondary:focus-visible,
  html[data-theme='modern'] .button-secondary:active,
  html[data-theme='modern'] .compact-item:hover,
  html[data-theme='modern'] .compact-item:focus-visible,
  html[data-theme='modern'] a.card.card--soft:hover,
  html[data-theme='modern'] a.card.card--hero:hover,
  html[data-theme='modern'] a.card.card--soft:focus-visible,
  html[data-theme='modern'] a.card.card--hero:focus-visible,
  html[data-theme='modern'] button.card.card--soft:hover,
  html[data-theme='modern'] button.card.card--hero:hover,
  html[data-theme='modern'] button.card.card--soft:focus-visible,
  html[data-theme='modern'] button.card.card--hero:focus-visible,
  html[data-theme='modern'] .card[data-interactive='true']:hover,
  html[data-theme='modern'] .card[data-interactive='true']:focus-visible {
    transform: none;
  }

}

.about-specs-box {
  background: rgba(83, 105, 255, 0.07);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem 0.9rem;
  margin-bottom: 0.65rem;
}

.about-specs-box ul {
  margin: 0;
  padding-left: 1.1rem;
}

.about-specs-box li {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.about-headshot {
  float: left;
  margin: 0.25rem 1.25rem 0.75rem 0;
  width: 270px;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}
.about-headshot img {
  width: 100%;
  display: block;
}
