/* No third-party fonts, no external resources, no JS.
   Vazirmatn is self-hosted from /fonts/ (SIL OFL 1.1, see Vazirmatn-OFL.txt).
   Used for the Persian couplet under the hero logo. */

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Deep, dignified palette - Persian-influenced without being decorative.
     The accent is a saturated gold drawn from the lion-and-sun emblem,
     used sparingly. Body colours stay close to ink-on-parchment. */
  --fg: #14140d;
  --bg: #fbf8f1;
  --muted: #4a4a3e;
  --link: #6b3a14;
  --link-hover: #4a2810;
  --accent: #8a6a00;
  --accent-dark: #5a4500;
  --accent-soft: #b89840;
  --rule: #c8c0a8;
  --rule-strong: #1a1a14;
  --code-bg: #efe9d6;
  /* Hero: deep warm parchment. The collective's emblem is gold-on-white,
     so the hero stays light by necessity - but warmer and more substantial
     than a cream wash. The double-rule border below gives the gravitas. */
  --hero-bg: #ede2c6;
  --hero-fg: #1a1408;
  --hero-muted: #5a4818;
  --hero-accent: #8a6a00;
  --btn-primary-bg: #6b3a14;
  --btn-primary-bg-hover: #4a2810;
  --btn-primary-fg: #fbf8f1;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #ece6d2;
    --bg: #14140d;
    --muted: #b8b09a;
    --link: #d4a040;
    --link-hover: #e8be60;
    --accent: #d4a040;
    --accent-dark: #b89840;
    --accent-soft: #8a6a00;
    --rule: #3a3628;
    --rule-strong: #d4a040;
    --code-bg: #1f1d14;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 17px; scroll-behavior: smooth; }

body {
  font-family: ui-serif, Georgia, "Times New Roman", Cambria, serif;
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  text-rendering: optimizeLegibility;
}

/* Sans-serif for UI chrome. Serif stays with the content. */
.site-header, .site-header nav, .btn-primary, .btn-secondary, .hero-quiet-link, .footer-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--link); text-decoration: none; border-bottom: 1px solid transparent; transition: color 0.15s, border-color 0.15s; }
a:hover, a:focus { color: var(--link-hover); border-bottom-color: var(--link); }

/* ── Header ─────────────────────────────────────── */
.site-header {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1rem 1.75rem 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.75rem;
  align-items: center;
  border-bottom: 1px solid var(--accent-soft);
  box-shadow: 0 1px 0 var(--rule);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--fg);
  border-bottom: none;
}
.brand:hover, .brand:focus { border-bottom: none; color: var(--fg); }

.site-logo {
  height: 58px;
  width: auto;
  display: block;
}

.brand-name {
  font-family: ui-serif, Georgia, "Times New Roman", Cambria, serif;
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: 0.04em;
  color: var(--rule-strong);
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-left: auto;
}

.site-header nav a {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.7rem;
  border-radius: 2px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: none;
  transition: color 0.15s, background 0.15s;
}

.site-header nav a:hover,
.site-header nav a:focus {
  color: var(--rule-strong);
  background: var(--code-bg);
  border-bottom: none;
}

/* ── Hero ────────────────────────────────────────── */
.hero {
  background: var(--hero-bg);
  color: var(--hero-fg);
  text-align: center;
  padding: 4rem 2rem 4.5rem;
  border-top: 4px double var(--hero-accent);
  border-bottom: 4px double var(--hero-accent);
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 1.4rem;
  left: 1.4rem;
  right: 1.4rem;
  bottom: 1.4rem;
  border: 1px solid rgba(138, 106, 0, 0.32);
  pointer-events: none;
}

.hero-logo {
  max-height: 480px;
  max-width: 100%;
  width: auto;
  height: auto;
  margin: 0 auto 1.6rem;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(80, 60, 0, 0.12));
}

.hero-title {
  font-family: ui-serif, Georgia, "Times New Roman", Cambria, serif;
  font-size: 2.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--hero-fg);
  margin-bottom: 1rem;
  line-height: 1.05;
  text-transform: uppercase;
}

.hero-copy {
  max-width: 720px;
  margin: 0 auto 1.9rem;
  padding: 0 1rem;
}

.hero-identity,
.hero-purpose {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.55;
}

.hero-purpose {
  color: var(--hero-muted);
  margin-top: 0.35rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}

.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 0.82rem 1.85rem;
  border-radius: 3px;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  border-bottom: none;
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  border: 1px solid var(--btn-primary-bg);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--btn-primary-bg-hover);
  border-color: var(--btn-primary-bg-hover);
  color: var(--btn-primary-fg);
  border-bottom: none;
}

.btn-secondary {
  background: transparent;
  color: var(--hero-fg);
  border: 1px solid var(--hero-accent);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background: rgba(138, 106, 0, 0.1);
  color: var(--hero-fg);
  border-bottom: none;
}

.hero-link-row {
  margin-top: 1rem;
}

.hero-quiet-link {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--hero-accent);
  border-bottom: none;
}

.hero-quiet-link:hover,
.hero-quiet-link:focus {
  color: var(--accent-dark);
  border-bottom: none;
}

/* ── Main content ────────────────────────────────── */

main {
  max-width: 860px;
  margin: 0 auto;
  padding: 3.25rem 1.75rem 4.5rem;
}

.page,
.home-content,
.join-page {
  max-width: 760px;
  margin: 0 auto;
}

h1, h2, h3, h4 {
  font-family: ui-serif, Georgia, "Times New Roman", Cambria, serif;
  line-height: 1.25;
  color: var(--rule-strong);
}
h1 { font-size: 2.35rem; margin-top: 0; margin-bottom: 1.25rem; font-weight: 700; letter-spacing: -0.02em; }
h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 3rem;
  padding-top: 1.2rem;
  border-top: 3px double var(--accent);
  letter-spacing: 0.01em;
}
h3 { margin-top: 1.85rem; font-size: 1.12rem; font-weight: 700; }

.page-header {
  margin-bottom: 1.75rem;
}

.page-header h1 {
  margin-bottom: 0;
}

.page-header-form {
  margin-bottom: 2rem;
  text-align: center;
}

.page-body > p:first-child,
.home-intro > p:first-child,
.join-page > p:first-of-type {
  font-size: 1.14rem;
  color: var(--muted);
  margin-top: 0;
}

p { margin: 1rem 0; }
ul, ol { margin: 1rem 0; padding-left: 1.6rem; }
li { margin: 0.4rem 0; }

blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.25rem 0 0.25rem 1.2rem;
  color: var(--accent-dark);
  margin: 2rem 0;
  font-style: italic;
  font-size: 1.08rem;
  max-width: 36rem;
}

blockquote p:first-child {
  margin-top: 0;
}

blockquote p:last-child {
  margin-bottom: 0;
}

code {
  background: var(--code-bg);
  padding: 0.12em 0.38em;
  border-radius: 2px;
  font-size: 0.9em;
  font-family: ui-monospace, "SF Mono", Consolas, "Liberation Mono", monospace;
}

pre {
  background: var(--code-bg);
  padding: 1.1rem;
  overflow-x: auto;
  border-radius: 3px;
  margin: 1.2rem 0;
  border-left: 3px solid var(--accent-soft);
}

pre code { background: transparent; padding: 0; font-size: 0.88em; }

table { border-collapse: collapse; width: 100%; margin: 1.2rem 0; }
th, td { border: 1px solid var(--rule); padding: 0.55rem 0.85rem; text-align: left; vertical-align: top; }
th { background: var(--code-bg); font-weight: 700; font-size: 0.95em; }

hr { border: none; border-top: 3px double var(--accent); margin: 2.5rem 0; }

strong { color: var(--rule-strong); font-weight: 700; }

/* ── Homepage ────────────────────────────────────── */

.home-content {
  padding-top: 0;
}

.home-paths {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 3px double var(--accent);
}

.home-paths h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.home-path-row {
  margin: 0;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
}

.home-path-row:first-of-type {
  border-top: none;
}

/* ── Footer ──────────────────────────────────────── */

.site-footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.75rem 1.75rem 3rem;
  border-top: 3px double var(--accent);
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.site-footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem 2rem;
}

.footer-group {
  min-width: 0;
}

.footer-title {
  margin: 0 0 0.85rem;
  color: var(--rule-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.45rem;
}

.footer-links li {
  margin: 0;
}

.footer-links a,
.footer-meta a {
  color: var(--muted);
  border-bottom: none;
}

.footer-links a:hover,
.footer-links a:focus,
.footer-meta a:hover,
.footer-meta a:focus {
  color: var(--fg);
  border-bottom: none;
}

.footer-meta {
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.84rem;
  line-height: 1.6;
}

/* ── Projects grid ───────────────────────────────── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.project-card {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--rule);
  border-top: 3px double var(--accent);
  background: linear-gradient(180deg, rgba(239, 233, 214, 0.4), transparent 70%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.2rem 1.3rem 1.15rem;
  overflow: hidden;
}

.project-card-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  width: 62%;
  height: auto;
  max-height: 66%;
  object-fit: contain;
  opacity: 0.68;
  pointer-events: none;
}

.project-card-fallback-initial {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  font-family: ui-serif, Georgia, "Times New Roman", Cambria, serif;
  font-size: 5rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.6;
  pointer-events: none;
}

.project-card-name {
  position: relative;
  z-index: 1;
  font-family: ui-serif, Georgia, "Times New Roman", Cambria, serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--rule-strong);
  letter-spacing: 0.02em;
  margin: 0;
  text-align: left;
  padding: 0;
}

.project-card-name::before {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  background: var(--accent);
  margin: 0 0 0.7rem;
}

/* ── Join form ────────────────────── */

/* ── Join page ─────────────────────────────────── */
/* A dignified standalone landing page for membership applications.
   Visual treatment matches the parchment+gold theme; the form itself
   reads as a considered document, not a generic input grid. */

.join-page {
  max-width: 720px;
  margin: 0 auto;
}

.join-page h2 {
  font-size: 1.55rem;
  margin-top: 2.8rem;
  padding-top: 1.6rem;
  border-top: 2px solid var(--accent);
  text-align: center;
  letter-spacing: 0.01em;
}

.join-page h2 + p,
.join-page h2 + ul {
  margin-top: 1.1rem;
}

.join-page > p,
.join-page ul {
  font-size: 1.02rem;
  line-height: 1.75;
}

/* The form lives inside a bordered card that visually separates it from
   the explanatory content above. The card sits on the parchment ground
   with a subtle gold rule, evoking a printed certificate. */
.join-form-section {
  margin-top: 3rem;
  padding: 2.25rem 2rem 2rem;
  border: 1px solid var(--rule);
  border-top: 3px double var(--accent);
  background: linear-gradient(180deg, rgba(255, 248, 220, 0.25), transparent 60%);
  border-radius: 4px;
}

.join-form-section h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  text-align: left;
  font-size: 1.4rem;
  margin-bottom: 0.3rem;
}

.join-form-intro {
  color: var(--muted);
  font-size: 0.95rem;
  font-style: italic;
  margin-bottom: 2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--rule);
}

/* Safety note for visitors inside Iran. Slightly red so the eye catches
   it, but well short of an alarm: muted rose background, faint red rule,
   a stronger left bar in the site's existing red token (#b33a2b, the
   same colour used for invalid form fields). Reads as "pay attention",
   not "danger". */
.join-safety-note {
  margin: 0 0 1.75rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(179, 58, 43, 0.3);
  border-left: 3px solid #b33a2b;
  border-radius: 3px;
  background: rgba(179, 58, 43, 0.06);
  color: #7a241a;
  font-size: 0.94rem;
  line-height: 1.55;
}

.join-safety-note p {
  margin: 0;
}

.join-safety-note strong {
  color: #5a1810;
  font-weight: 600;
}

@media (prefers-color-scheme: dark) {
  .join-safety-note {
    color: #e8a899;
    background: rgba(179, 58, 43, 0.12);
    border-color: rgba(220, 110, 95, 0.4);
    border-left-color: #d97560;
  }
  .join-safety-note strong {
    color: #f4c8bd;
  }
}

.oauth-section {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.15rem 1.1rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: rgba(239, 233, 214, 0.55);
}

.oauth-unverified,
.oauth-verified {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1rem;
  align-items: center;
}

.oauth-unverified {
  align-items: flex-start;
  flex-direction: column;
}

.oauth-button {
  display: inline-block;
  padding: 0.72rem 1.45rem;
  border: 1px solid var(--btn-primary-bg);
  border-radius: 2px;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: none;
  transition: background 0.15s, border-color 0.15s;
}

.oauth-button:hover,
.oauth-button:focus {
  background: var(--btn-primary-bg-hover);
  border-color: var(--btn-primary-bg-hover);
  color: var(--btn-primary-fg);
  border-bottom: none;
}

.oauth-help {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
  font-style: italic;
}

.oauth-change {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.oauth-switch-hint {
  flex-basis: 100%;
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
  font-style: italic;
}

.oauth-avatar {
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--bg);
  flex-shrink: 0;
}

.oauth-verified-label {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.93rem;
  color: var(--rule-strong);
}

.oauth-verified-label strong {
  color: var(--accent-dark);
}

.join-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 1.4rem;
  margin: 0;
}

.join-form .field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.join-form .field-full {
  grid-column: 1 / -1;
}

.join-form label {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--rule-strong);
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.join-form .optional {
  font-weight: 400;
  font-size: 0.78rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  font-style: italic;
}

.join-form .help {
  font-family: ui-serif, Georgia, "Times New Roman", Cambria, serif;
  font-size: 0.92rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.5;
  margin-top: -0.15rem;
}

.join-form input[type="text"],
.join-form select,
.join-form textarea {
  font-family: ui-serif, Georgia, "Times New Roman", Cambria, serif;
  font-size: 1.02rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--bg);
  color: var(--fg);
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.join-form input[type="text"]:hover,
.join-form select:hover,
.join-form textarea:hover {
  border-color: var(--accent-soft);
}

.join-form input[disabled] {
  background: rgba(239, 233, 214, 0.6);
  color: var(--muted);
  cursor: not-allowed;
}

.join-form input[readonly] {
  background: rgba(239, 233, 214, 0.6);
  color: var(--muted);
}

.join-form input[type="text"]:focus,
.join-form select:focus,
.join-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(138, 106, 0, 0.15);
}

.join-form input[aria-invalid="true"] {
  border-color: #b33a2b;
  box-shadow: 0 0 0 3px rgba(179, 58, 43, 0.12);
}

.join-form select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2rem;
}

.join-form textarea {
  resize: vertical;
  min-height: 9rem;
  line-height: 1.6;
}

.join-form .consent-field {
  grid-column: 1 / -1;
  margin-top: 0.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
}

.join-form .consent {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  font-family: ui-serif, Georgia, "Times New Roman", Cambria, serif;
  font-size: 0.96rem;
  line-height: 1.65;
  color: var(--fg);
  cursor: pointer;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.join-form .consent input[type="checkbox"] {
  margin-top: 0.35rem;
  flex-shrink: 0;
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.join-form .submit-row {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  margin-top: 0.6rem;
}

.join-form button[type="submit"] {
  cursor: pointer;
  border: 1px solid var(--btn-primary-bg);
  padding: 0.85rem 2.4rem;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  text-transform: uppercase;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  border-radius: 2px;
  transition: background 0.15s;
}

.join-form button[type="submit"]:hover,
.join-form button[type="submit"]:focus {
  background: var(--btn-primary-bg-hover);
  border-color: var(--btn-primary-bg-hover);
  outline: none;
}

/* Honeypot field - must be hidden from sight, from assistive tech, from
   tab order, AND from visual layout in every browser. Belt and braces:
   display:none AND aria-hidden AND tabindex=-1 AND offscreen positioning. */
.join-form .honeypot {
  display: none !important;
  visibility: hidden !important;
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.join-page-aftermath {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  text-align: center;
  font-size: 0.95rem;
  color: var(--muted);
  font-style: italic;
}

/* ── Application received page ───────────────────────── */
.received-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  padding: 3rem 1.5rem;
}

.received-inner {
  max-width: 520px;
  text-align: center;
}

.received-icon {
  font-size: 3rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 1.25rem;
}

.received-icon-error {
  color: #c0392b;
  font-weight: 700;
}

.received-inner h1 {
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
}

.received-inner p {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.received-note {
  font-size: 0.9rem;
  font-style: italic;
}

.received-home {
  display: inline-block;
  margin-top: 1.75rem;
  padding: 0.65rem 1.75rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  transition: background 0.15s;
}

.received-home:hover,
.received-home:focus {
  background: var(--accent-dark);
}

/* Mobile: single column, larger touch targets */
@media (max-width: 640px) {
  .join-form-section {
    padding: 1.5rem 1.25rem 1.25rem;
  }
  .oauth-section {
    padding: 1rem 0.9rem;
  }
  .oauth-verified {
    align-items: flex-start;
  }
  .join-form {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .join-page h1 {
    font-size: 2rem;
  }
  .join-page h2 {
    font-size: 1.3rem;
  }
}

/* ── Responsive ──────────────────────────────────── */

@media (max-width: 720px) {
  html { font-size: 16px; }
  main { padding: 2.5rem 1rem 3.5rem; }
  .hero { padding: 2.75rem 1rem 3.2rem; }
  .hero::before { top: 0.9rem; left: 0.9rem; right: 0.9rem; bottom: 0.9rem; }
  .hero-logo { max-height: 360px; }
  .hero-title { font-size: 2.1rem; letter-spacing: 0.06em; }
  .hero-identity,
  .hero-purpose { font-size: 1rem; }
  .site-header { padding: 0.7rem 1rem; gap: 0.5rem 1rem; }
  .site-header nav { margin-left: 0; gap: 0.15rem 0; }
  .site-header nav a { padding: 0.35rem 0.55rem; font-size: 0.78rem; letter-spacing: 0.05em; }
  .site-logo { height: 48px; }
  .brand-name { font-size: 1.3rem; }
  .site-footer-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .project-grid { grid-template-columns: 1fr; gap: 1rem; }
  .project-card { aspect-ratio: auto; min-height: 240px; }
}

@media print {
  .site-header nav, .hero-actions, .hero-link-row { display: none; }
  body { background: white; color: black; font-size: 12pt; }
  .hero { background: white; color: black; border-bottom: 2px solid black; }
  .hero::before { display: none; }
  .hero-title, .hero-identity, .hero-purpose { color: black; }
}
