/* Agoraphobia Help */

:root {
  --bg: #ffffff;
  --ink: #111827;
  --text: #374151;
  --muted: #6b7280;
  --border: #e5e7eb;
  --surface: #f9fafb;
  --accent: #0d9488;
  --accent-light: #ccfbf1;
  --accent-dark: #0f766e;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --danger-border: #fecaca;
  --max: 960px;
  --radius: 8px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

form#form1 {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, video { max-width: 100%; height: auto; display: block; }

/* Links */
a { color: var(--accent-dark); }
a:hover { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* Layout */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.wide-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--ink);
  color: #fff;
  padding: .5rem 1rem;
  border-radius: var(--radius);
  z-index: 999;
  font-size: .875rem;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ── Announcement bar (sticky Discord) ── */
.announcement {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  font-size: .875rem;
}
.announcement-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding-top: .5rem;
  padding-bottom: .5rem;
}
.announcement-text { font-weight: 500; }
.announcement-text small { display: block; opacity: .7; font-weight: 400; }
.announcement-text a { color: #fff; }
.announcement-cta {
  display: inline-block;
  padding: .35rem .75rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .8125rem;
  white-space: nowrap;
}
.announcement-cta:hover { background: var(--accent-dark); color: #fff; }

/* ── Header ── */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: .75rem;
  padding-bottom: .75rem;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand-title {
  font-weight: 300;
  font-size: 1.25rem;
  letter-spacing: -.03em;
}
.brand-accent {
  font-weight: 800;
  color: var(--accent);
  margin-left: .3em;
}
.brand-subtitle { display: none; }

/* Nav toggle (mobile) */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  padding: .4rem .75rem;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  min-height: 44px;
}
.nav-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Navigation */
.site-nav {
  display: flex;
  align-items: center;
  gap: .125rem;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  padding: .375rem .625rem;
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  color: var(--muted);
  border-radius: var(--radius);
  min-height: 36px;
  transition: color .15s, background .15s;
}
.nav-link:hover { color: var(--ink); background: var(--surface); }
.nav-link[aria-current="page"] { color: var(--accent-dark); background: var(--accent-light); }
.nav-link-cta { color: var(--accent-dark); font-weight: 600; }
.nav-link-cta:hover { background: var(--accent-light); }
.nav-link-warn { color: var(--danger); }
.nav-link-warn:hover { background: var(--danger-light); }

/* ── Main content ── */
.site-main {
  flex: 1;
  padding: 2.5rem 0 3rem;
}
.site-main section + section { margin-top: 2.5rem; }

/* Typography */
h1, h2, h3 { color: var(--ink); line-height: 1.3; }
h1 { font-size: 1.875rem; margin: 0 0 1rem; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 1.375rem; margin: 0 0 .75rem; font-weight: 700; }
h3 { font-size: 1.0625rem; margin: 0 0 .375rem; font-weight: 600; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }

/* Hero (page intro) */
.hero {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}
.hero h1 { font-size: 2.25rem; margin-bottom: .75rem; }
.hero p { font-size: 1.125rem; max-width: 600px; }
.hero-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .375rem;
  padding: .5rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-decoration: none;
  font-weight: 600;
  font-size: .875rem;
  color: var(--ink);
  background: var(--bg);
  cursor: pointer;
  min-height: 40px;
  transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--surface); border-color: #d1d5db; color: var(--ink); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-warn {
  color: var(--danger);
  border-color: var(--danger-border);
  background: var(--danger-light);
}
.btn-warn:hover { background: #fee2e2; }

/* Grid */
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* Cards */
.card {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card > a:last-child { margin-top: auto; font-weight: 600; }
.card a { font-weight: 600; }

/* Panel */
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.panel-pad { padding: 1.25rem; }
.panel + .panel { margin-top: 1rem; }

/* Subhero */
.subhero {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

/* Callout */
.callout {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
  background: var(--accent-light);
}
.callout p:last-child { margin-bottom: 0; }
.callout-warn {
  border-left-color: var(--danger);
  background: var(--danger-light);
}

/* Ordered steps */
ol.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .75rem;
}
ol.steps li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: .75rem;
  align-items: start;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}
.step-num {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 700;
  font-size: .8125rem;
  color: #fff;
  background: var(--accent);
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 2rem 0 1.25rem;
  font-size: .875rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
}
.footer-title { font-weight: 700; color: var(--ink); margin-bottom: .5rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li + li { margin-top: .375rem; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent-dark); }
.footer-bottom {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  /* Typography */
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  .hero h1 { font-size: 1.625rem; line-height: 1.25; }
  .hero p { font-size: 1rem; }

  /* Spacing */
  .site-main { padding: 1.5rem 0 2rem; }
  .site-main section + section { margin-top: 2rem; }

  /* Announcement bar */
  .announcement-inner {
    flex-direction: column;
    align-items: stretch;
    gap: .375rem;
    padding-top: .5rem;
    padding-bottom: .5rem;
  }
  .announcement-text { font-size: .8125rem; }
  .announcement-text small { display: none; }
  .announcement-cta {
    text-align: center;
    padding: .5rem;
    font-size: .875rem;
  }

  /* Header */
  .header-inner { position: relative; }
  .nav-toggle { display: inline-flex; align-items: center; }

  /* Mobile nav dropdown */
  .site-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: .375rem 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
    z-index: 50;
  }
  .site-nav.is-open { display: flex; }
  .nav-link {
    width: 100%;
    padding: .75rem 1.5rem;
    min-height: 48px;
    font-size: .9375rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-link:last-child { border-bottom: none; }

  /* Grids to single column */
  .grid-3, .grid-2 { grid-template-columns: 1fr; }

  /* Cards */
  .card { padding: 1rem; }

  /* Panels */
  .panel-pad { padding: 1rem; }
  .subhero { padding: 1rem; }

  /* Hero */
  .hero { padding: 1.25rem 0; margin-bottom: 1.75rem; }

  /* Buttons full-width + bigger tap targets */
  .hero-actions { flex-direction: column; gap: .5rem; }
  .hero-actions .btn { width: 100%; min-height: 48px; font-size: .9375rem; }
  .btn { min-height: 44px; }

  /* Callout */
  .callout { padding: .875rem 1rem; }

  /* Steps */
  ol.steps li { padding: .875rem 1rem; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 1.25rem; }
}

/* Print */
@media print {
  .site-header, .site-footer, .announcement, .nav-toggle { display: none !important; }
  body { background: #fff; color: #111; }
  .panel, .card, .callout { box-shadow: none; border-color: #ccc; }
}
