:root {
  color-scheme: light;
  --ink: #1c2430;
  --muted: #5b6573;
  --line: #dce2e8;
  --paper: #ffffff;
  --soft: #f5f7f9;
  --brand: #0f6b5d;
  --brand-dark: #0a433d;
  --brand-light: #dff4ef;
  --accent: #b63f4e;
  --gold: #d6a02f;
  --blue: #2f6f91;
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a {
  color: inherit;
}

.topbar {
  background: var(--brand-dark);
  color: #eefaf7;
  font-size: 13px;
}

.topbar-inner {
  width: min(var(--max), calc(100% - 48px));
  min-height: 36px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar a {
  color: #ffffff;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 84px;
  padding: 14px max(24px, calc((100vw - var(--max)) / 2));
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 250px;
  color: var(--brand-dark);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 44px;
  border: 2px solid #36b9ad;
  color: #22a79b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.brand-text {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.brand-text strong {
  font-size: 17px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.header-navigation {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 14px;
  min-width: 0;
}

.nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 14px;
}

.nav a,
.nav summary,
.member-link {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}

.nav a:hover,
.nav summary:hover,
.member-link:hover {
  background: var(--soft);
  color: var(--brand-dark);
}

.nav details {
  position: relative;
}

.nav summary {
  list-style: none;
}

.nav summary::-webkit-details-marker {
  display: none;
}

.nav summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.nav details > div {
  position: absolute;
  right: 0;
  top: 44px;
  display: grid;
  min-width: 280px;
  padding: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(28, 36, 48, 0.16);
}

.nav details > div a {
  justify-content: flex-start;
}

.member-link {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  color: var(--brand-dark);
  font-weight: 700;
  background: #ffffff;
  font: inherit;
}

.member-nav {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.hero,
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(10, 67, 61, 0.98) 0%, rgba(15, 107, 93, 0.94) 56%, rgba(47, 111, 145, 0.92) 100%),
    var(--brand-dark);
}

.hero::before,
.page-hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(120deg, transparent 0 58%, rgba(255, 255, 255, 0.12) 58% 58.3%, transparent 58.3%),
    linear-gradient(150deg, transparent 0 69%, rgba(255, 255, 255, 0.1) 69% 69.25%, transparent 69.25%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 86px);
}

.home-hero {
  min-height: 520px;
  display: grid;
  align-items: center;
  padding: 72px 24px 64px;
}

.page-hero {
  min-height: 300px;
  display: grid;
  align-items: center;
  padding: 58px 24px 50px;
}

.hero.compact {
  min-height: 320px;
  display: grid;
  align-items: center;
  padding: 58px 24px;
}

.hero-inner {
  width: min(var(--max), 100%);
  margin: 0 auto;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.75fr);
  gap: 44px;
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.eyebrow,
.section-kicker,
.panel-kicker {
  margin: 0 0 12px;
  color: inherit;
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin: 0;
  overflow-wrap: break-word;
  font-size: 56px;
  line-height: 1.06;
  letter-spacing: 0;
}

.lead {
  max-width: 720px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 21px;
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--brand);
  border-radius: 6px;
  color: var(--brand-dark);
  font-weight: 760;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  white-space: normal;
}

.button.primary {
  border-color: #ffffff;
  background: #ffffff;
  color: var(--brand-dark);
}

.button.primary-dark {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
  color: #ffffff;
}

.button.ghost {
  border-color: rgba(255, 255, 255, 0.64);
  color: #ffffff;
}

.button.light {
  border-color: #ffffff;
  background: #ffffff;
  color: var(--brand-dark);
}

.button:hover,
.text-link:hover {
  transform: translateY(-1px);
}

.hero-panel {
  position: relative;
  min-width: 0;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(10px);
}

.hero-panel::before {
  position: absolute;
  top: 28px;
  right: 28px;
  width: 74px;
  height: 74px;
  content: "";
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 47%, rgba(255, 255, 255, 0.45) 47% 53%, transparent 53%),
    linear-gradient(0deg, transparent 47%, rgba(255, 255, 255, 0.45) 47% 53%, transparent 53%);
}

.panel-kicker {
  color: #fff;
}

.hero-panel ul {
  display: grid;
  gap: 18px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.hero-panel li {
  display: grid;
  gap: 4px;
  padding-left: 18px;
  border-left: 3px solid var(--gold);
}

.hero-panel strong {
  font-size: 18px;
}

.hero-panel span {
  color: rgba(255, 255, 255, 0.82);
}

.quick-links {
  background: var(--soft);
  border-bottom: 1px solid var(--line);
}

.quick-links-inner {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  padding: 26px 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.quick-link {
  display: grid;
  gap: 8px;
  min-width: 0;
  min-height: 148px;
  padding: 20px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
}

.quick-link:nth-child(2) {
  border-top-color: var(--blue);
}

.quick-link:nth-child(3) {
  border-top-color: var(--accent);
}

.quick-link:nth-child(4) {
  border-top-color: var(--gold);
}

.quick-link strong {
  font-size: 17px;
  line-height: 1.25;
}

.quick-link span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.quick-link:hover {
  border-color: #b8c5cf;
  box-shadow: 0 12px 28px rgba(28, 36, 48, 0.08);
  transform: translateY(-1px);
}

.content-shell {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  padding: 54px 0 76px;
}

.home-shell {
  padding-bottom: 58px;
}

.content-section {
  display: grid;
  grid-template-columns: minmax(200px, 300px) minmax(0, 1fr);
  gap: 40px;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
}

.content-section:first-child {
  padding-top: 12px;
}

.section-kicker {
  color: var(--accent);
}

.content-section h2,
.support-band h2 {
  margin: 0;
  color: var(--brand-dark);
  font-size: 28px;
  line-height: 1.18;
  letter-spacing: 0;
}

.section-body {
  min-width: 0;
}

.content-section p {
  margin: 0 0 14px;
  max-width: 780px;
  color: var(--muted);
  font-size: 18px;
}

.section-images {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.section-images figure {
  margin: 0;
}

.section-images img {
  display: block;
  width: min(100%, 900px);
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.section-images figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.text-link {
  margin-top: 8px;
  border-color: var(--line);
  background: var(--paper);
}

.support-band {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 34px;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand-dark), #243b53);
}

.support-band h2 {
  color: #ffffff;
}

.support-band p {
  max-width: 680px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.support-band .section-kicker {
  color: #f3ca6b;
}

.app-panel {
  margin-top: 34px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.app-panel-header {
  max-width: 820px;
  margin-bottom: 24px;
}

.app-panel-header h2,
.app-form h3 {
  margin: 0;
  color: var(--brand-dark);
  line-height: 1.2;
}

.app-panel-header p {
  margin: 10px 0 0;
  color: var(--muted);
}

.app-message {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--soft);
}

.app-message[hidden] {
  display: none;
}

.app-message:empty {
  display: none;
}

.app-message[data-tone="success"] {
  border-color: #9fd1b7;
  color: #0b5d3f;
  background: #edf8f2;
}

.app-message[data-tone="error"] {
  border-color: #e7b6bd;
  color: #8a2330;
  background: #fff0f2;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.app-form,
.reset-form,
.protected-card,
.signed-in-panel,
.profile-card {
  display: grid;
  gap: 16px;
}

.app-form,
.protected-card,
.signed-in-panel,
.profile-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.app-form.compact {
  padding: 0;
  border: 0;
  background: transparent;
}

.app-form label,
.reset-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 700;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.app-form input,
.app-form select,
.app-form textarea,
.reset-form input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cfd8e3;
  border-radius: 6px;
  color: var(--ink);
  background: #ffffff;
  font: inherit;
}

.app-form textarea {
  resize: vertical;
}

.reset-form {
  margin-top: 20px;
}

.reset-form label span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.signed-in-panel {
  margin-top: 20px;
  border-color: #9fd1b7;
  background: #edf8f2;
}

.signed-in-panel p,
.protected-card p {
  margin: 0;
  color: var(--muted);
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.profile-card dl div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.profile-card dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.profile-card dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-weight: 760;
}

.forum-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
}

.forum-categories {
  align-self: start;
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.forum-categories a {
  color: var(--brand-dark);
  text-decoration: none;
}

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

.topic-form {
  margin-bottom: 22px;
}

.topic-list {
  display: grid;
  gap: 12px;
}

.topic-card,
.resource-grid article {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.topic-card span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 760;
}

.topic-card strong,
.resource-grid strong {
  color: var(--brand-dark);
  font-size: 18px;
}

.topic-card p,
.resource-grid span {
  margin: 0;
  color: var(--muted);
}

.topic-card small {
  color: var(--muted);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px max(24px, calc((100vw - var(--max)) / 2));
  color: #fff;
  background: var(--brand-dark);
}

.site-footer strong {
  display: block;
  margin-bottom: 4px;
}

.site-footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.site-footer a {
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 1080px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .header-navigation {
    width: 100%;
    align-items: flex-start;
    justify-content: space-between;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

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

  .hero-panel {
    max-width: 640px;
  }

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

@media (max-width: 760px) {
  .topbar-inner {
    width: calc(100% - 40px);
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 8px 0;
  }

  .site-header {
    position: static;
    padding: 14px 20px;
  }

  .brand {
    width: 100%;
    min-width: 0;
  }

  .brand-mark {
    width: 52px;
    height: 40px;
    font-size: 19px;
  }

  .brand-text strong {
    font-size: 16px;
  }

  .header-navigation {
    display: grid;
    gap: 10px;
  }

  .member-nav {
    justify-content: stretch;
  }

  .nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .nav a,
  .nav summary,
  .member-link {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    background: #ffffff;
    font-size: 14px;
  }

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

  .nav details > div {
    position: static;
    min-width: 0;
    margin-top: 6px;
    box-shadow: none;
  }

  .home-hero,
  .page-hero,
  .hero.compact {
    padding-right: 20px;
    padding-left: 20px;
  }

  .home-hero {
    min-height: 0;
    padding-top: 50px;
    padding-bottom: 48px;
  }

  .page-hero {
    min-height: 250px;
  }

  h1 {
    font-size: 42px;
  }

  .lead {
    font-size: 18px;
  }

  .hero-panel {
    padding: 22px;
  }

  .quick-links-inner,
  .content-shell,
  .support-band {
    width: calc(100% - 40px);
  }

  .quick-links-inner {
    grid-template-columns: 1fr;
  }

  .content-section {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .content-section h2,
  .support-band h2 {
    font-size: 24px;
  }

  .content-section p,
  .support-band p {
    font-size: 16px;
  }

  .support-band {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px;
  }

  .app-panel {
    padding: 20px;
  }

  .auth-grid,
  .form-row,
  .forum-layout,
  .profile-card dl,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .reset-form label span {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px 20px;
  }
}

@media (max-width: 460px) {
  .nav {
    grid-template-columns: 1fr;
  }

  .member-nav {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 32px;
  }

  .hero-actions {
    display: grid;
  }

  .button,
  .text-link {
    width: 100%;
  }

  .hero-panel::before {
    display: none;
  }
}
