:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #111111;
  --muted: #666666;
  --border: #e5e5e5;
  --accent: #111111;
  --hover-accent: #333333;
  --soft: #f8f8f8;
  --radius: 10px;
  --radius-lg: 14px;
  --container: 1160px;
  --transition: all 0.2s ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body:not(.landing-gif-page) {
  background-color: #1d1f24;
  background-image:
    radial-gradient(circle at 74% 34%, rgba(255, 255, 255, 0.16) 0%, rgba(148, 152, 159, 0.12) 20%, rgba(74, 77, 84, 0.5) 48%, rgba(30, 33, 38, 0.95) 100%),
    repeating-linear-gradient(101deg, rgba(255, 255, 255, 0.045) 0, rgba(255, 255, 255, 0.045) 4px, rgba(0, 0, 0, 0) 4px, rgba(0, 0, 0, 0) 42px),
    linear-gradient(112deg, #1e2025 0%, #2b2d33 46%, #3a3d44 100%);
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}

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

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

h1,
h2,
h3,
h4 {
  margin: 0 0 0.75rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-family: "Helvetica Neue", "Helvetica Neue LT Std", "Helvetica Neue Light", Helvetica, Arial, sans-serif;
  font-weight: 300;
  text-transform: capitalize;
}

h1 {
  font-size: 32px;
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 20px;
}

p {
  margin: 0 0 1rem;
}

small,
.meta,
.tag,
.badge,
.inline-link,
.eyebrow,
.field-help,
.side-label {
  font-size: 13px;
}

.container {
  width: min(var(--container), calc(100% - 2.2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
}

body:not(.landing-gif-page) .site-header {
  border-bottom: 0;
  background: transparent;
  backdrop-filter: none;
}

.header-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand-name {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300;
  font-size: 1.2rem;
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.site-nav a {
  position: relative;
  color: var(--muted);
  transition: var(--transition);
  padding-bottom: 0.1rem;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.36rem;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: var(--transition);
}

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

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

body:not(.landing-gif-page) .brand-name {
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

body:not(.landing-gif-page) .site-nav a {
  color: rgba(233, 233, 233, 0.9);
}

body:not(.landing-gif-page) .site-nav a::after {
  background: rgba(255, 255, 255, 0.95);
}

body:not(.landing-gif-page) .site-nav a:hover,
body:not(.landing-gif-page) .site-nav a.active {
  color: #ffffff;
}

body:not(.landing-gif-page) .nav-toggle {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(6, 6, 6, 0.42);
}

body:not(.landing-gif-page) .nav-toggle span:not(.sr-only) {
  background: #ffffff;
}

body:not(.landing-gif-page) .page-intro h1,
body:not(.landing-gif-page) .page-intro p,
body:not(.landing-gif-page) .page-intro .eyebrow {
  color: #f1f1f1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

body:not(.landing-gif-page) .section {
  border-top-color: rgba(255, 255, 255, 0.2);
}

body:not(.landing-gif-page) .card,
body:not(.landing-gif-page) .stat-card,
body:not(.landing-gif-page) .side-panel,
body:not(.landing-gif-page) .ai-panel,
body:not(.landing-gif-page) .source-card {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(14, 18, 24, 0.72);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #f1f3f6;
}

body:not(.landing-gif-page) .card:hover,
body:not(.landing-gif-page) .source-card:hover {
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
}

body:not(.landing-gif-page) .meta,
body:not(.landing-gif-page) .stat-label,
body:not(.landing-gif-page) .case-summary,
body:not(.landing-gif-page) .note-summary,
body:not(.landing-gif-page) .resource-summary,
body:not(.landing-gif-page) .source-summary,
body:not(.landing-gif-page) .markdown-content p {
  color: #d7dce5;
}

body:not(.landing-gif-page) .page,
body:not(.landing-gif-page) .detail-main,
body:not(.landing-gif-page) .detail-section,
body:not(.landing-gif-page) .markdown-content {
  color: #e8edf6;
}

body:not(.landing-gif-page) h1,
body:not(.landing-gif-page) h2,
body:not(.landing-gif-page) h3,
body:not(.landing-gif-page) h4,
body:not(.landing-gif-page) .markdown-content h1,
body:not(.landing-gif-page) .markdown-content h2,
body:not(.landing-gif-page) .markdown-content h3 {
  color: #f5f8ff;
}

body:not(.landing-gif-page) .detail-section p,
body:not(.landing-gif-page) .detail-section li,
body:not(.landing-gif-page) .markdown-content li,
body:not(.landing-gif-page) .about-profile-copy p,
body:not(.landing-gif-page) .about-volunteer-copy p,
body:not(.landing-gif-page) .volunteer-item-text p {
  color: #dee4ee;
  line-height: 1.72;
}

body:not(.landing-gif-page) .side-label,
body:not(.landing-gif-page) .case-number,
body:not(.landing-gif-page) .footer-inner p,
body:not(.landing-gif-page) .footer-links a,
body:not(.landing-gif-page) .source-link,
body:not(.landing-gif-page) .field-help {
  color: #c8d0dc;
}

body:not(.landing-gif-page) .footer-links a:hover,
body:not(.landing-gif-page) .source-link:hover {
  color: #f5f8ff;
}

body:not(.landing-gif-page) .side-list li,
body:not(.landing-gif-page) .app-entry + .app-entry,
body:not(.landing-gif-page) .volunteer-item + .volunteer-item,
body:not(.landing-gif-page) .site-footer {
  border-color: rgba(255, 255, 255, 0.18);
}

body:not(.landing-gif-page) .markdown-content code {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: #f2f6fd;
}

body:not(.landing-gif-page) .markdown-content video {
  border-color: rgba(255, 255, 255, 0.22);
}

body:not(.landing-gif-page) .inline-link,
body:not(.landing-gif-page) .markdown-content a {
  color: #eef2f8;
}

body:not(.landing-gif-page) .tag,
body:not(.landing-gif-page) .badge {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #e7ebf2;
}

body:not(.landing-gif-page) .cover,
body:not(.landing-gif-page) .visual,
body:not(.landing-gif-page) .pdf-preview,
body:not(.landing-gif-page) .markdown-content .markdown-figure {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.06);
}

body:not(.landing-gif-page) .cover.contain img,
body:not(.landing-gif-page) .visual.contain img {
  background: rgba(14, 17, 23, 0.6);
}

body:not(.landing-gif-page) .cover-label,
body:not(.landing-gif-page) .visual-label {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(14, 18, 24, 0.62);
  color: #dfe4ed;
}

body:not(.landing-gif-page) .button.ghost {
  color: #eef2f8;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.36);
}

body:not(.landing-gif-page) .button.ghost:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.16);
}

.local-only {
  display: none !important;
}

body.is-local .local-only {
  display: inline-flex !important;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}

.nav-toggle span:not(.sr-only) {
  width: 16px;
  height: 1.5px;
  background: var(--text);
  transition: var(--transition);
}

body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

body.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

.page {
  opacity: 1;
  transform: none;
  transition: var(--transition);
}

.js .page {
  opacity: 0;
  transform: translateY(8px);
}

body.page-loaded .page {
  opacity: 1;
  transform: translateY(0);
}

body.page-exit .page {
  opacity: 0;
  transform: translateY(4px);
}

.hero,
.page-intro {
  padding-top: 3.4rem;
}

.section {
  margin-top: 2.8rem;
  padding-top: 1.7rem;
  border-top: 1px solid var(--border);
}

.section:last-of-type {
  margin-bottom: 4.6rem;
}

.eyebrow {
  margin-bottom: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.page-intro p,
.hero-copy p,
.section-head p {
  color: var(--muted);
}

.section-head {
  margin-bottom: 1rem;
}

.landing-gif-page {
  min-height: 100vh;
  color: #ffffff;
  background: #000000;
  overflow-x: hidden;
}

.landing-screen {
  position: relative;
  min-height: 100vh;
  padding: clamp(1rem, 2.2vw, 2.2rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  isolation: isolate;
}

.landing-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  background: #000000;
}

.landing-bg img,
.landing-bg video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(112%) brightness(0.52);
}

.landing-overlay {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 72% 34%, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.36) 45%),
    linear-gradient(112deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.28));
}

.landing-header {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  z-index: 2;
  width: 100%;
  padding: 0.25rem 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
  color: #ffffff;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.1;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.landing-nav {
  display: inline-flex;
  align-items: center;
  gap: 1.4rem;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.landing-nav a {
  padding: 0.14rem 0;
  color: #dddddd;
  opacity: 0.9;
}

.landing-nav a::after {
  background: rgba(255, 255, 255, 0.95);
  bottom: -0.24rem;
}

.landing-nav a:hover,
.landing-nav a.active {
  color: #ffffff;
  opacity: 1;
}

.landing-copy {
  width: min(680px, 100%);
  margin-bottom: clamp(1.1rem, 3vh, 2.3rem);
  padding: clamp(1.1rem, 2.6vw, 1.85rem);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 10, 10, 0.45);
  backdrop-filter: blur(5px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.14);
}

.landing-kicker {
  margin: 0 0 0.85rem;
  color: #e0e0e0;
  font-size: clamp(12px, 0.74rem + 0.2vw, 14px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
}

.landing-copy h1 {
  margin-bottom: 1rem;
  color: #ffffff;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  font-weight: 600;
  max-width: 16ch;
  text-wrap: balance;
}

.landing-copy p {
  max-width: 56ch;
  color: #e3e3e3;
  font-size: clamp(1rem, 0.96rem + 0.35vw, 1.2rem);
  line-height: 1.58;
}

.landing-actions {
  margin-top: 1.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.landing-gif-page .button {
  background: #ffffff;
  border-color: #ffffff;
  color: #111111;
}

.landing-gif-page .button:hover {
  background: #e4e4e4;
  border-color: #e4e4e4;
}

.landing-gif-page .button.ghost {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.56);
  color: #ffffff;
}

.landing-gif-page .button.ghost:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.82);
}

.landing-gif-page .nav-toggle {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(6, 6, 6, 0.42);
}

.landing-gif-page .nav-toggle span:not(.sr-only) {
  background: #ffffff;
}

.hero-landing {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 2rem;
  isolation: isolate;
}

.hero-landing::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/ui/leveling-rv01.gif") center / cover no-repeat;
  opacity: 0.1;
  filter: grayscale(100%) contrast(112%);
  pointer-events: none;
}

.hero-landing::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(17, 17, 17, 0.035) 0, rgba(17, 17, 17, 0.035) 1px, transparent 1px, transparent 88px),
    repeating-linear-gradient(90deg, rgba(17, 17, 17, 0.03) 0, rgba(17, 17, 17, 0.03) 1px, transparent 1px, transparent 84px);
  pointer-events: none;
}

.home-mono {
  background: transparent;
}

.home-mono .site-header {
  background: transparent;
  border-bottom: 0;
  backdrop-filter: none;
}

.home-mono .header-inner {
  min-height: 84px;
}

.home-mono .site-nav a {
  color: #4f4f4f;
}

.home-mono .site-nav a:hover,
.home-mono .site-nav a.active {
  color: #111111;
}

.welcome-hero {
  display: grid;
  grid-template-columns: minmax(330px, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  min-height: min(82vh, 760px);
  padding-top: 0.6rem;
}

.welcome-photo-panel {
  position: relative;
  min-height: 100%;
  display: flex;
  align-items: stretch;
}

.welcome-photo-panel::before {
  content: "";
  position: absolute;
  left: -4%;
  top: -4%;
  width: 54%;
  height: 108%;
  background: #d9d9d9;
  border-radius: 18px;
  transform: skewY(-8deg);
}

.welcome-photo {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  height: min(82vh, 770px);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid #1f1f1f;
  background: #0f0f0f;
}

.welcome-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(108%);
}

.welcome-copy {
  max-width: 610px;
}

.welcome-kicker {
  margin: 0 0 1rem;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: #666666;
  text-transform: uppercase;
  font-weight: 700;
}

.welcome-copy h1 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.welcome-copy p {
  margin: 0;
  color: #4f4f4f;
  max-width: 54ch;
}

.welcome-actions {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.welcome-actions .button {
  min-width: 190px;
}

.quick-rail {
  position: fixed;
  right: 1.3rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 65;
  display: grid;
  gap: 0.8rem;
}

.quick-rail a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #d2d2d2;
  background: #f6f6f6;
  color: #404040;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  transition: var(--transition);
}

.quick-rail a:hover,
.quick-rail a:focus-visible {
  transform: translateY(-2px);
  background: #ffffff;
  color: #111111;
  border-color: #bfbfbf;
}

.home-mono #case-grid {
  margin-top: 1.2rem;
  padding-bottom: 2rem;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: 1.2rem;
}

.hero-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.stats-grid,
.grid-4,
.grid-3,
.grid-2,
.download-grid,
.related-grid,
.resource-source-grid,
.ai-tool-layout {
  display: grid;
  gap: 1rem;
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.grid-3,
.resource-source-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.case-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.case-stack .case-card {
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.case-stack .case-card .cover {
  height: 100%;
  min-height: 210px;
  margin-bottom: 0;
}

.case-stack .case-card .cover img {
  height: 100%;
}

.case-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.55rem;
}

.case-card-body p {
  margin: 0;
}

.case-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.case-link:focus-visible {
  outline: 2px solid #8a8a8a;
  outline-offset: 2px;
}

.ai-tool-layout {
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.45fr) minmax(250px, 0.85fr);
  align-items: start;
}

.card,
.stat-card,
.side-panel,
.ai-panel,
.source-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.card,
.source-card {
  padding: 1.1rem;
  transition: var(--transition);
}

.card:hover,
.source-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  border-color: #d9d9d9;
}

.pressable.is-pressed {
  transform: scale(0.997);
}

.stat-card {
  padding: 24px;
}

.stat-value {
  margin: 0;
  font-size: 34px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
}

.stat-label {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  font-family: inherit;
}

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

.button.ghost {
  color: var(--accent);
  background: #ffffff;
  border-color: var(--border);
}

.button.ghost:hover {
  color: var(--hover-accent);
  border-color: #d1d1d1;
  background: #fafafa;
}

.button.small {
  padding: 0.4rem 0.72rem;
  font-size: 0.84rem;
}

.tag,
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid #d9d9d9;
  background: #fafafa;
  color: #4f4f4f;
}

.badge-row,
.chip-row,
.meta-strip,
.action-row,
.check-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.inline-link {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  margin-top: 0.75rem;
  color: #2a2a2a;
  font-weight: 500;
}

.inline-link::after {
  content: "→";
  transition: var(--transition);
}

.card:hover .inline-link::after,
.source-card:hover .inline-link::after {
  transform: translateX(2px);
}

.cover,
.visual,
.pdf-preview {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  border: 1px dashed #d8d8d8;
  background: #f7f7f7;
}

.cover {
  height: 158px;
  margin-bottom: 0.95rem;
}

.cover img,
.visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover.contain img,
.visual.contain img {
  object-fit: contain;
  background: #ffffff;
}

.cover-label,
.visual-label {
  position: absolute;
  left: 0.5rem;
  bottom: 0.5rem;
  padding: 0.16rem 0.45rem;
  border: 1px solid #d8d8d8;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  font-size: 12px;
}

.case-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

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

.case-number {
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-summary,
.note-summary,
.resource-summary,
.source-summary {
  color: #454545;
  margin-bottom: 0;
}

.case-card .badge-row {
  margin-top: auto;
}

.case-card .button,
.case-card .inline-link {
  margin-top: 0.75rem;
}

.note-card,
.resource-card {
  display: block;
}

.note-link {
  color: inherit;
  text-decoration: none;
}

.note-link:focus-visible {
  outline: 2px solid #8a8a8a;
  outline-offset: 2px;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3 {
  margin-top: 1.2rem;
  margin-bottom: 0.65rem;
}

.markdown-content h1:first-child,
.markdown-content h2:first-child,
.markdown-content h3:first-child {
  margin-top: 0;
}

.markdown-content p {
  color: #2b2b2b;
}

.markdown-content code {
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #f7f7f7;
  padding: 0.08rem 0.36rem;
  font-size: 0.86em;
}

.markdown-content .markdown-figure {
  margin: 0.9rem 0;
  border: 1px dashed #d8d8d8;
  border-radius: 10px;
  overflow: hidden;
  background: #f7f7f7;
}

.markdown-content .markdown-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.markdown-content video {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  background: #0c0c0c;
}

.markdown-content a {
  color: #1f1f1f;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.resource-group {
  margin-bottom: 2rem;
}

.pdf-preview {
  margin-top: 0.65rem;
  margin-bottom: 0.55rem;
  aspect-ratio: 3 / 4;
}

.pdf-preview iframe {
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
  background: #ffffff;
}

.pdf-preview::after {
  content: "PDF Önizleme · Sayfa 1";
  position: absolute;
  left: 0.45rem;
  bottom: 0.45rem;
  border: 1px solid #d9d9d9;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  color: #555555;
  font-size: 12px;
  padding: 0.12rem 0.42rem;
}

.footer-cta {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fafafa;
  padding: 1.6rem;
}

.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
}

.footer-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.footer-inner p {
  margin: 0;
  color: var(--muted);
}

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

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--text);
}

.detail-layout {
  padding-top: 3rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1rem;
  align-items: start;
}

.detail-main {
  min-width: 0;
}

.detail-hero {
  margin-bottom: 1.4rem;
}

.detail-section {
  margin-bottom: 1.6rem;
}

.detail-section p,
.detail-section li {
  color: #2a2a2a;
}

.side-panel {
  position: sticky;
  top: 94px;
  padding: 1rem;
}

.side-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.62rem;
}

.side-list li {
  border-top: 1px solid #efefef;
  padding-top: 0.58rem;
}

.side-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.side-label {
  display: block;
  color: var(--muted);
  margin-bottom: 0.12rem;
}

.visual-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 0.9rem 0;
}

.visual {
  min-height: 190px;
}

.cover.large {
  min-height: 250px;
}

.ordered,
.clean-list {
  margin: 0.35rem 0 0;
  padding-left: 1.15rem;
}

.app-entry + .app-entry {
  margin-top: 0.95rem;
  padding-top: 0.95rem;
  border-top: 1px solid var(--border);
}

.app-entry-main {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}

.app-entry-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  padding: 0.35rem;
}

.app-entry-logo img {
  display: block;
  width: min(100%, 210px);
  height: auto;
  object-fit: contain;
}

.app-entry-text h3 {
  margin: 0 0 0.35rem;
}

.app-entry .action-row {
  margin-top: 0.65rem;
}

.app-entry-placeholder .app-entry-main {
  grid-template-columns: auto minmax(0, 1fr);
}

.app-entry-placeholder .app-entry-logo {
  justify-content: flex-start;
  min-height: auto;
  padding: 0;
}

.table-wrap {
  margin-top: 0.7rem;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
  border: 1px solid var(--border);
}

th,
td {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: left;
  padding: 0.58rem 0.65rem;
  font-size: 0.9rem;
}

th:last-child,
td:last-child {
  border-right: 0;
}

tr:last-child td {
  border-bottom: 0;
}

th {
  background: #fafafa;
}

.download-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.95rem;
  background: #ffffff;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.download-note {
  color: var(--muted);
}

.related-card {
  display: block;
}

.prose {
  max-width: 900px;
}

.about-profile {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.about-profile-photo {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #f3f3f3;
  min-height: 280px;
}

.about-profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(108%);
}

.about-profile-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-volunteer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1rem;
  align-items: stretch;
}

.about-volunteer-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.about-volunteer-copy h2 {
  margin-top: 0;
}

.about-volunteer-list {
  grid-template-columns: 1fr;
}

.volunteer-item + .volunteer-item {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.volunteer-item-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1rem;
  align-items: center;
}

.volunteer-item-text > :first-child {
  margin-top: 0;
}

.about-volunteer-photo {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #f3f3f3;
  min-height: 280px;
}

.about-volunteer-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.volunteer-item-media {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #f3f3f3;
}

.volunteer-item-media img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.source-card {
  padding: 1rem;
}

.source-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
}

.source-link {
  color: #2f2f2f;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.source-ai-output,
.ai-output {
  margin-top: 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfbfb;
  padding: 0.72rem;
  white-space: pre-wrap;
  color: #2a2a2a;
  min-height: 70px;
}

.source-ai-output:empty,
.ai-output:empty {
  display: none;
}

.ai-panel {
  padding: 1rem;
}

.ai-panel.sticky {
  position: sticky;
  top: 94px;
}

.form-grid {
  display: grid;
  gap: 0.8rem;
}

.form-field {
  display: grid;
  gap: 0.35rem;
}

.form-field label {
  font-size: 13px;
  color: #444444;
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  padding: 0.55rem 0.65rem;
  transition: var(--transition);
}

textarea {
  resize: vertical;
  min-height: 86px;
}

input:focus,
textarea:focus,
select:focus,
button:focus,
a:focus {
  outline: none;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid #8a8a8a;
  outline-offset: 2px;
}

.field-help {
  color: var(--muted);
}

.check-list {
  margin-top: 0.2rem;
  gap: 0.55rem;
}

.check-list label {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.26rem 0.62rem;
  font-size: 13px;
  color: #4f4f4f;
}

.check-list input {
  width: 14px;
  height: 14px;
  padding: 0;
}

.ai-preview {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #ffffff;
  padding: 1.2rem;
}

.ai-preview h1 {
  margin-bottom: 0.5rem;
}

.ai-meta {
  margin-bottom: 1rem;
}

.preview-section {
  margin-top: 1.05rem;
  padding-top: 1rem;
  border-top: 1px solid #efefef;
}

.preview-downloads {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.preview-download-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem;
  background: #fafafa;
}

.tool-stack {
  display: grid;
  gap: 0.6rem;
}

.tool-button {
  width: 100%;
  justify-content: flex-start;
}

.admin-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.admin-sidebar {
  position: sticky;
  top: 94px;
  max-height: calc(100vh - 112px);
  overflow: auto;
}

.admin-sidebar,
.admin-editor {
  padding: 1rem;
}

.admin-sidebar .form-grid.compact {
  gap: 0.65rem;
  margin-bottom: 0.8rem;
}

.admin-sidebar-actions .button {
  flex: 1;
}

.admin-item-list {
  display: grid;
  gap: 0.5rem;
}

.admin-item {
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  padding: 0.58rem 0.66rem;
  transition: var(--transition);
  cursor: pointer;
}

.admin-item:hover {
  border-color: #d3d3d3;
  background: #fafafa;
}

.admin-item.is-active {
  border-color: #bfbfbf;
  background: #f7f7f7;
}

.admin-item-title {
  display: block;
  font-weight: 600;
  color: #171717;
  line-height: 1.35;
}

.admin-item-meta {
  display: block;
  margin-top: 0.2rem;
  font-size: 12px;
  color: var(--muted);
}

.admin-editor {
  min-width: 0;
}

.admin-meta-grid textarea {
  min-height: 102px;
}

.admin-cover-actions {
  margin-top: 0.5rem;
}

.admin-cover-preview {
  margin-top: 0.55rem;
  border: 1px dashed #d8d8d8;
  border-radius: 10px;
  background: #f8f8f8;
  overflow: hidden;
  min-height: 120px;
}

.admin-cover-preview img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  display: block;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}

.editor-select {
  min-width: 116px;
  width: auto;
  padding: 0.42rem 0.5rem;
  font-size: 0.84rem;
}

.rich-editor {
  min-height: 340px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  padding: 0.75rem;
  overflow: auto;
  line-height: 1.6;
}

.rich-editor:focus-visible {
  outline: 2px solid #8a8a8a;
  outline-offset: 2px;
}

.rich-editor h1,
.rich-editor h2,
.rich-editor h3 {
  margin-top: 0.75rem;
  margin-bottom: 0.45rem;
}

.rich-editor p {
  margin: 0 0 0.75rem;
}

.rich-editor ul,
.rich-editor ol {
  margin: 0 0 0.75rem;
  padding-left: 1.2rem;
}

.rich-editor img,
.rich-editor video {
  max-width: 100%;
  border-radius: 8px;
}

.admin-live-preview {
  min-height: 180px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fcfcfc;
  padding: 0.8rem;
}

.admin-status {
  margin: 0.45rem 0 0;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 1px solid #e1e1e1;
  background: #fafafa;
  color: #4d4d4d;
  min-height: 42px;
}

.admin-status.is-success {
  border-color: #cbdfcb;
  background: #f4faf4;
  color: #2d622d;
}

.admin-status.is-error {
  border-color: #e4c9c9;
  background: #fcf4f4;
  color: #8b2d2d;
}

[data-reveal] {
  opacity: 1;
  transform: none;
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: var(--transition);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.meta {
  color: var(--muted);
  margin-top: 0.55rem;
  margin-bottom: 0;
}

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

@media (max-width: 1160px) {
  .about-profile {
    grid-template-columns: 1fr;
  }

  .about-volunteer {
    grid-template-columns: 1fr;
  }

  .volunteer-item-layout {
    grid-template-columns: 1fr;
  }

  .about-profile-photo {
    max-width: 360px;
    min-height: 320px;
  }

  .about-volunteer-photo {
    max-width: 420px;
    min-height: 280px;
    justify-self: end;
  }

  .volunteer-item-media {
    max-width: 420px;
    justify-self: center;
  }

  .welcome-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .welcome-photo {
    height: min(62vh, 640px);
  }

  .quick-rail {
    right: 0.8rem;
  }

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

  .resource-source-grid,
  .grid-3,
  .stats-grid,
  .ai-tool-layout,
  .detail-layout,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .ai-panel.sticky,
  .side-panel,
  .admin-sidebar {
    position: static;
    max-height: none;
  }
}

@media (max-width: 920px) {
  .case-stack .case-card {
    grid-template-columns: 1fr;
  }

  .case-stack .case-card .cover {
    min-height: 180px;
  }

  .landing-header {
    flex-direction: row;
    justify-content: space-between;
    padding: 0.15rem 0;
  }

  .landing-nav {
    gap: 0.75rem;
    text-shadow: none;
  }

  .landing-brand {
    font-size: 1.35rem;
    text-shadow: none;
  }

  .home-mono .site-header {
    background: transparent;
    border-bottom: 0;
    backdrop-filter: none;
  }

  .welcome-hero {
    gap: 1.4rem;
  }

  .welcome-photo-panel::before {
    width: 45%;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 0.9rem 1.1rem 1rem;
    background: #ffffff;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  body.nav-open .site-nav {
    display: flex;
  }

  .landing-gif-page .site-nav {
    top: calc(100% + 0.5rem);
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0.65rem 0;
    backdrop-filter: none;
  }

  .landing-gif-page .site-nav a {
    color: #ebebeb;
    opacity: 1;
    padding: 0.2rem 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
  }

  .landing-gif-page .site-nav a::after {
    display: none;
  }

  .landing-gif-page .site-nav a:hover,
  .landing-gif-page .site-nav a.active {
    color: #ffffff;
  }

  body:not(.landing-gif-page) .site-nav {
    top: calc(100% + 0.5rem);
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0.65rem 0;
    backdrop-filter: none;
  }

  body:not(.landing-gif-page) .site-nav a {
    color: #ebebeb;
    opacity: 1;
    padding: 0.2rem 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
  }

  body:not(.landing-gif-page) .site-nav a::after {
    display: none;
  }

  body:not(.landing-gif-page) .site-nav a:hover,
  body:not(.landing-gif-page) .site-nav a.active {
    color: #ffffff;
  }

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

@media (max-width: 720px) {
  .landing-screen {
    padding: 0.75rem;
  }

  .landing-copy {
    margin-bottom: 0.6rem;
  }

  .landing-actions {
    justify-content: flex-start;
  }

  .landing-actions .button {
    width: auto;
  }

  .welcome-photo {
    height: min(54vh, 520px);
    border-radius: 22px;
  }

  .welcome-actions {
    flex-direction: column;
  }

  .welcome-actions .button {
    width: 100%;
  }

  .quick-rail {
    display: none;
  }

  .container {
    width: min(var(--container), calc(100% - 1.4rem));
  }

  h1 {
    font-size: 30px;
  }

  h2 {
    font-size: 22px;
  }

  h3 {
    font-size: 18px;
  }

  .hero-landing {
    padding: 1.35rem 1rem;
  }

  .grid-2,
  .download-grid,
  .related-grid,
  .preview-downloads,
  .visual-row {
    grid-template-columns: 1fr;
  }

  .about-volunteer-photo {
    max-width: none;
    justify-self: stretch;
  }

  .volunteer-item-media {
    max-width: none;
    justify-self: stretch;
  }

  .app-entry-main {
    grid-template-columns: 1fr;
  }

  .app-entry-logo {
    justify-content: flex-start;
    min-height: 80px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .page,
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .hero-landing::before,
  .hero-landing::after {
    display: none !important;
  }

  .landing-bg img,
  .landing-bg video {
    animation: none !important;
  }
}
