:root {
  --blue: #0b4b8f;
  --blue-deep: #06386d;
  --blue-soft: #eaf3fb;
  --cream: #fffaf0;
  --paper: #ffffff;
  --ink: #142033;
  --muted: #5d6877;
  --line: #dce3ea;
  --focus: #0b67c2;
  --radius: 1.1rem;
  --shadow: 0 12px 32px rgba(9, 44, 78, .08);
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: #f6f8fa;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: var(--blue); text-underline-offset: .16em; }
a:hover { color: var(--blue-deep); }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 1000;
  background: var(--ink);
  color: #fff;
  padding: .7rem 1rem;
  border-radius: .7rem;
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 250, 240, .96);
  border-bottom: 1px solid rgba(11, 75, 143, .14);
  backdrop-filter: blur(12px);
}
.header-inner {
  width: min(var(--max), calc(100% - 2rem));
  min-height: 76px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.brand-link { display: inline-flex; align-items: center; flex: 0 0 auto; }
.brand-link img { width: 235px; height: auto; }
.nav-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: .8rem;
  padding: .6rem .8rem;
  min-width: 48px;
  min-height: 48px;
  cursor: pointer;
}
.primary-nav { margin-left: auto; }
.primary-nav ul { list-style: none; display: flex; align-items: center; gap: .1rem; padding: 0; margin: 0; }
.primary-nav a {
  display: block;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  padding: .72rem .78rem;
  border-radius: .7rem;
  white-space: nowrap;
}
.primary-nav a:hover,
.primary-nav a[aria-current="page"] { background: var(--blue-soft); color: var(--blue-deep); }

main { min-height: 62vh; }
.container { width: min(var(--max), calc(100% - 2rem)); margin-inline: auto; }

.hero {
  background: linear-gradient(180deg, var(--cream), #f6f8fa 92%);
}
.hero-simple { padding: clamp(3rem, 7vw, 6.5rem) 0 clamp(2.8rem, 5vw, 4.5rem); }
.hero-simple .hero-copy { max-width: var(--max); margin-inline: auto; }
.hero-simple .hero-copy h1 { max-width: 900px; }
.eyebrow {
  margin: 0 0 .6rem;
  color: var(--blue);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .78rem;
}
.eyebrow.plain-case { text-transform: none; letter-spacing: 0; font-size: .95rem; }
h1, h2, h3 { line-height: 1.08; margin: 0 0 .8rem; }
h1 { font-size: clamp(2.6rem, 7vw, 5.7rem); letter-spacing: -.045em; }
h2 { font-size: clamp(1.75rem, 4vw, 3.1rem); letter-spacing: -.025em; }
h3 { font-size: 1.22rem; }
.lead {
  font-size: clamp(1.12rem, 2.2vw, 1.42rem);
  color: #344254;
  max-width: 44rem;
  margin: 0 0 1.5rem;
}
.actions { display: flex; gap: .7rem; flex-wrap: wrap; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .72rem 1rem;
  border-radius: .85rem;
  text-decoration: none;
  font-weight: 800;
  border: 1px solid var(--blue);
}
.button.primary { background: var(--blue); color: #fff; }
.button.primary:hover { background: var(--blue-deep); color: #fff; }
.button.secondary { background: #fff; color: var(--blue); }
.button.secondary:hover { background: var(--blue-soft); }

.section { padding: clamp(2.8rem, 6vw, 5rem) 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.section-head p { margin: 0; color: var(--muted); max-width: 42rem; }

.featured-section { background: #f6f8fa; }
.featured-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.featured-grid[data-count="1"] { grid-template-columns: minmax(0, 760px); }
.project-card,
.directory-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(20,32,51,.035);
}
.project-card { padding: 1.25rem; }
.project-card-top { display: flex; align-items: start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.project-icon {
  width: 68px;
  height: 68px;
  object-fit: contain;
  border-radius: 1rem;
  flex: 0 0 auto;
  background: #fff;
}
.project-icon-large { width: 82px; height: 82px; }
.status {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  color: var(--muted);
  font-size: .83rem;
  font-weight: 700;
  white-space: nowrap;
}
.status::before { content: ""; width: .52rem; height: .52rem; border-radius: 50%; background: var(--blue); }
.project-card p,
.directory-card p { color: var(--muted); margin: 0 0 1rem; }
.card-link { font-weight: 800; text-decoration: none; }

.definition-section { background: var(--cream); border-block: 1px solid rgba(11,75,143,.11); }
.definition-layout {
  display: grid;
  grid-template-columns: minmax(150px, 240px) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}
.definition-art {
  border: 1px solid rgba(11,75,143,.14);
  border-radius: 1.8rem;
  background: rgba(255,255,255,.42);
  padding: clamp(1rem, 3vw, 1.6rem);
}
.definition-art img { width: 100%; max-width: 220px; margin: auto; }
.definition-lockup { display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap; margin-bottom: .7rem; }
.definition-lockup strong { font-size: clamp(1.45rem, 3vw, 2rem); color: var(--blue-deep); }
.definition-lockup span { font-size: .9rem; color: var(--muted); font-style: italic; }
.definition-text { font-size: clamp(1.2rem, 2.4vw, 1.55rem); line-height: 1.5; max-width: 46rem; margin: 0 0 1rem; color: #2f3e50; }

.workshop-section { background: #f6f8fa; }
.workshop-list { display: grid; gap: .7rem; }
.workshop-item {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: .9rem;
  align-items: center;
  padding: .78rem .9rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: .95rem;
  text-decoration: none;
  color: var(--ink);
}
.workshop-item:hover { border-color: rgba(11,75,143,.45); color: var(--ink); }
.workshop-item img { width: 48px; height: 48px; border-radius: .75rem; object-fit: contain; background: #fff; }
.workshop-item strong { display: block; }
.workshop-item small { color: var(--muted); }

.support-strip { padding-top: 2.4rem; }
.support-strip-inner {
  background: var(--blue-soft);
  border: 1px solid rgba(11,75,143,.14);
  border-radius: 1.25rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}
.support-strip h2 { font-size: clamp(1.65rem, 3vw, 2.3rem); }
.support-strip p:not(.eyebrow) { margin: 0; max-width: 48rem; color: #405064; }
.support-strip .button { flex: 0 0 auto; }

.page-hero { padding: 3.2rem 0 2rem; background: var(--cream); border-bottom: 1px solid rgba(11,75,143,.12); }
.page-hero .container { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; }
.page-hero .brand-badge { width: 120px; height: auto; background: transparent; border: 0; border-radius: 0; padding: 0; }
.page-hero p { max-width: 47rem; color: #405064; font-size: 1.12rem; margin: 0; }
.about-hero h1 { margin-bottom: 1.2rem; }
.definition-inline {
  max-width: 760px;
  border-left: 4px solid var(--blue);
  padding: .9rem 1.1rem;
  background: rgba(255,255,255,.45);
  border-radius: .35rem .9rem .9rem .35rem;
}
.definition-inline p { font-size: 1.17rem; line-height: 1.55; }

.prose { max-width: 820px; }
.prose p, .prose li { color: #3e4b5c; }
.prose h2 { margin-top: 2.55rem; }
.about-copy > p:first-child { font-size: 1.12rem; }
.prose blockquote {
  margin: 1.35rem 0;
  border-left: 4px solid var(--blue);
  padding: .55rem 1rem;
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--ink);
}
.question-stack { margin: 1.1rem 0 1.5rem; padding-left: 1rem; border-left: 2px solid var(--line); }
.question-stack p { margin: .35rem 0; color: var(--ink); }
.notice {
  border-left: 4px solid var(--blue);
  background: var(--blue-soft);
  padding: 1rem 1.1rem;
  border-radius: .5rem .9rem .9rem .5rem;
  margin: 1.2rem 0;
}
.notice strong { color: var(--blue-deep); }

.directory-intro { max-width: 760px; margin-bottom: 1.35rem; color: var(--muted); }
.directory-intro p { margin: 0; }
.project-directory-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem; }
.directory-card {
  padding: 1.05rem;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
}
.directory-card .project-icon { margin-bottom: 1rem; }
.directory-card h2 { font-size: 1.35rem; margin-bottom: .45rem; }
.directory-card .status { margin-bottom: .5rem; }
.directory-card p { flex: 1 1 auto; }
.project-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: .55rem .8rem;
  border-radius: .78rem;
  background: var(--blue-soft);
  color: var(--blue-deep);
  font-size: .84rem;
  font-weight: 800;
}

.site-footer { background: #102235; color: #eaf0f5; margin-top: 3rem; }
.footer-inner { width: min(var(--max), calc(100% - 2rem)); margin: auto; padding: 1.6rem 0; }
.footer-top { display: flex; justify-content: space-between; gap: 2rem; align-items: center; }
.footer-brand { width: 150px; height: auto; background: transparent; border: 0; border-radius: 0; padding: 0; }
.footer-links { display: flex; gap: .65rem 1rem; flex-wrap: wrap; justify-content: flex-end; }
.footer-links a,
.footer-links button { color: #eef5fb; background: none; border: 0; padding: 0; text-decoration: none; cursor: pointer; }
.footer-links a:hover,
.footer-links button:hover { text-decoration: underline; }
.footer-meta {
  margin-top: 1.2rem;
  padding-top: .9rem;
  border-top: 1px solid rgba(255,255,255,.14);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  flex-wrap: wrap;
  font-size: .86rem;
  color: #bdc8d2;
}

.dialog { border: 0; border-radius: 1rem; padding: 0; width: min(560px, calc(100% - 2rem)); box-shadow: 0 24px 80px rgba(0,0,0,.3); }
.dialog::backdrop { background: rgba(8,20,34,.68); }
.dialog-inner { padding: 1.25rem; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.dialog-head h2 { font-size: 1.5rem; margin: 0; }
.icon-button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.update-state { min-height: 1.5rem; color: var(--muted); margin-top: .7rem; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

@media (max-width: 900px) {
  .section-head { display: block; }
  .section-head > p { margin-top: .45rem; }
  .header-inner { min-height: 70px; }
  .brand-link img { width: 205px; }
  .nav-toggle { display: inline-grid; place-items: center; }
  .primary-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    padding: .6rem 1rem 1rem;
    box-shadow: 0 14px 24px rgba(20,32,51,.08);
  }
  .primary-nav.open { display: block; }
  .primary-nav ul { display: grid; gap: .15rem; }
  .project-directory-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .definition-layout { grid-template-columns: 180px minmax(0,1fr); }
}

@media (max-width: 620px) {
  .container, .header-inner, .footer-inner { width: min(100% - 1.2rem, var(--max)); }
  .brand-link img { width: 170px; }
  .hero-simple { padding-top: 2.35rem; }
  .hero-simple h1 { font-size: clamp(2.6rem, 13vw, 4rem); }
  .actions { display: grid; }
  .actions .button { width: 100%; }
  .featured-grid,
  .project-directory-grid { grid-template-columns: 1fr; }
  .project-card { padding: 1rem; }
  .project-icon { width: 62px; height: 62px; border-radius: .9rem; }
  .project-icon-large { width: 74px; height: 74px; }
  .definition-layout { grid-template-columns: 1fr; }
  .definition-art { max-width: 210px; }
  .definition-text { font-size: 1.17rem; }
  .support-strip-inner { display: grid; }
  .support-strip .button { width: 100%; }
  .page-hero .container { grid-template-columns: 1fr; }
  .page-hero .brand-badge { width: 96px; }
  .footer-top { display: grid; }
  .footer-brand { width: 132px; }
  .footer-links { justify-content: flex-start; }
  .footer-meta { display: grid; gap: .3rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* v0.3.0 project framework */
.status-live { color: #335f45; }
.status-live::before { background: #2f7d4a; }
.project-state-link { text-decoration: none; }
.project-state-link:hover { background: #dcecf9; color: var(--blue-deep); }

.promo-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #eef2f5;
  margin: .25rem 0 1rem;
  cursor: pointer;
}
.promo-media img,
.promo-media video { width: 100%; height: 100%; object-fit: cover; }
.promo-media video { background: #0f1824; }

.support-copy { margin-bottom: 1.5rem; }
.support-project-list { display: grid; gap: 1rem; }
.support-project-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(20,32,51,.035);
}
.support-project-card h2 { font-size: 1.25rem; margin: 0 0 .3rem; }
.support-project-card p { margin: 0; color: var(--muted); }
.support-project-card .support-meta { margin-top: .45rem; font-weight: 800; color: var(--ink); }

.project-detail-section { padding-top: clamp(2.2rem, 5vw, 4rem); }
.project-detail { max-width: 920px; }
.project-detail-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
  padding: clamp(1.15rem, 3vw, 1.8rem);
  background: var(--cream);
  border: 1px solid rgba(11,75,143,.14);
  border-radius: 1.4rem;
}
.project-detail-icon { width: 112px; height: 112px; border-radius: 1.25rem; }
.project-detail-hero h1 { margin: .35rem 0 .45rem; font-size: clamp(2.1rem, 6vw, 3.7rem); line-height: 1.02; }
.project-lead { margin: 0; max-width: 47rem; color: #405064; }
.project-detail > .promo-media { margin: 1.25rem 0 0; }
.project-detail-copy { max-width: 760px; padding-top: 1.6rem; }
.project-detail-copy > p:first-child { font-size: 1.12rem; color: #334256; }
.project-detail-copy h2 { margin-top: 2.1rem; }
.project-primary-action { margin-top: .7rem; }
.project-support-panel {
  margin-top: 2.5rem;
  padding: 1.1rem 1.2rem;
  background: var(--blue-soft);
  border: 1px solid rgba(11,75,143,.14);
  border-radius: 1rem;
}
.project-support-panel h2 { margin-top: 0; }
.project-support-panel p { color: #405064; }
.project-support-panel .support-meta { font-weight: 800; color: var(--blue-deep); }
.project-back { display: inline-block; margin-top: 2rem; }

@media (max-width: 620px) {
  .support-project-card { grid-template-columns: auto minmax(0,1fr); }
  .support-project-card > .button,
  .support-project-card > .project-state { grid-column: 1 / -1; width: 100%; }
  .project-detail-hero { grid-template-columns: 1fr; }
  .project-detail-icon { width: 92px; height: 92px; }
}

/* v0.4.0 admin preview marker */
.admin-preview-banner {
  width: 100%;
  padding: .5rem .8rem;
  background: #173b60;
  color: #fff;
  text-align: center;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .01em;
}
.admin-preview-banner[hidden] { display: none; }

/* v0.5.0 optional project-specific Fourthwall block */
.project-fourthwall-panel { margin-top:2rem; padding:1rem; border:1px solid var(--line); border-radius:1rem; background:#fffdf8; }
.project-fourthwall-panel h2 { margin-top:0; }
.project-fourthwall-panel p { color:var(--muted); }
.help-actions { display:flex; gap:.6rem; flex-wrap:wrap; align-items:center; }

/* Policy/contact readability without changing the approved visual system. */
.policy-copy { overflow-wrap: anywhere; }
.policy-copy h2 { font-size: clamp(1.45rem, 3.5vw, 2rem); line-height: 1.2; }
.policy-copy > h2:first-child { margin-top: 0; }
.policy-date { font-size: .9rem; color: var(--muted); }
.contact-email { font-size: clamp(1rem, 3vw, 1.35rem); }
.footer-links a, .footer-links button { min-height: 28px; display: inline-flex; align-items: center; }
#main { scroll-margin-top: 90px; }
