:root {
  --bg: #eaf8ee;
  --bg-soft: #f5fbf4;
  --surface: #ffffff;
  --surface-green: #dff5e8;
  --text: #050806;
  --muted: #516158;
  --line: rgba(5, 8, 6, 0.12);
  --line-strong: rgba(5, 8, 6, 0.22);
  --green: #2fd262;
  --green-deep: #0d9d4d;
  --teal: #1f9c8c;
  --sky: #dff0ff;
  --cream: #fff8e7;
  --coral: #ff8a68;
  --danger: #c83d3d;
  --shadow: 0 24px 70px rgba(30, 91, 55, 0.16);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

:root[data-theme="night"] {
  --bg: #102018;
  --bg-soft: #172b21;
  --surface: #f4fbf5;
  --surface-green: #d7f0df;
  --text: #07100b;
  --muted: #435149;
  --line: rgba(255, 255, 255, 0.16);
  --line-strong: rgba(255, 255, 255, 0.28);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background: var(--bg);
}

button,
textarea,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

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

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

[hidden] {
  display: none !important;
}

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

.skip-link {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 1000;
  padding: 10px 14px;
  color: #fff;
  background: var(--green-deep);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transform: translateY(-160%);
  transition: transform 0.16s ease;
}

.skip-link:focus {
  transform: translateY(0);
  outline: 3px solid #fff;
  outline-offset: 2px;
}

main:focus {
  outline: none;
}

.article-body h2[id] {
  scroll-margin-top: 112px;
}

.article-body h2[id]:target {
  background: var(--surface-green);
  border-radius: 4px;
  box-shadow: 0 0 0 8px var(--surface-green);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  width: min(1180px, calc(100% - 40px));
  min-height: 88px;
  margin: 0 auto;
  background: rgba(234, 248, 238, 0.86);
  backdrop-filter: blur(16px);
}

.brand {
  display: block;
  width: 172px;
  line-height: 0;
}

.brand picture {
  display: block;
  width: 100%;
}

.brand-logo {
  width: 100%;
  height: 58px;
  object-fit: contain;
  object-position: left center;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-width: 0;
  max-width: 100%;
  font-size: 17px;
  font-weight: 800;
}

.top-nav a {
  flex: 0 0 auto;
  padding: 8px 0;
  white-space: nowrap;
}

.top-nav a:hover,
.top-nav a:focus-visible,
.top-nav a[aria-current="page"] {
  color: var(--green-deep);
  outline: none;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.login-link,
.header-action,
.primary-button,
.secondary-button,
.wide-button,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border-radius: var(--radius);
  font-weight: 850;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.theme-toggle {
  width: 46px;
  padding: 0;
  border: 2px solid var(--text);
  background: var(--surface);
}

.login-link,
.secondary-button {
  padding: 0 22px;
  border: 2px solid var(--text);
  background: var(--surface);
}

.header-action,
.primary-button {
  padding: 0 24px;
  border: 2px solid var(--green);
  color: #fff;
  background: var(--green);
  box-shadow: 0 12px 22px rgba(47, 210, 98, 0.24);
}

.login-link:hover,
.header-action:hover,
.primary-button:hover,
.secondary-button:hover,
.wide-button:hover,
.service-card:hover {
  transform: translateY(-2px);
}

button svg,
.primary-button svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.theme-toggle svg {
  width: 19px;
  height: 19px;
}

.hero-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  align-items: center;
  gap: 36px;
  width: min(1220px, calc(100% - 48px));
  min-height: calc(100vh - 138px);
  margin: 0 auto;
  padding: 44px 0 72px;
}

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

.section-kicker {
  margin: 0 0 10px;
  color: var(--green-deep);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  font-size: clamp(58px, 7vw, 92px);
  line-height: 0.95;
  letter-spacing: 0;
}

h1 span {
  display: block;
}

.hero-lede {
  max-width: 540px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 21px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-button {
  min-width: 160px;
}

.hero-visual {
  position: relative;
  min-height: 620px;
}

.hero-image-ring {
  position: absolute;
  right: 0;
  bottom: 10px;
  display: grid;
  width: min(620px, 100%);
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--green);
  box-shadow: inset 0 0 0 18px rgba(255, 255, 255, 0.2);
}

.hero-image-ring picture {
  display: block;
  width: 106%;
  height: 106%;
}

.hero-image-ring img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.appointment-card {
  position: absolute;
  top: 70px;
  right: 12px;
  display: grid;
  min-width: 180px;
  gap: 4px;
  padding: 18px 20px;
  border: 2px solid var(--text);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 12px 12px 0 rgba(5, 8, 6, 0.09);
}

.appointment-card strong {
  font-size: 18px;
}

.appointment-card span {
  color: var(--muted);
  font-size: 14px;
}

.stats-strip,
.section-block,
.experience-section {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: -42px;
  margin-bottom: 70px;
}

.stats-strip article {
  min-height: 118px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stats-strip strong,
.stats-strip span {
  display: block;
}

.stats-strip strong {
  margin-bottom: 8px;
  color: var(--green-deep);
  font-size: 34px;
  line-height: 1;
}

.stats-strip span {
  color: var(--muted);
  font-weight: 700;
}

.section-block,
.experience-section {
  padding: 58px 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 30px;
}

.section-heading.centered {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.language-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 980px;
  margin: 0 0 18px;
}

.language-switcher a,
.language-switcher span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.language-switcher span[aria-current="true"] {
  border-color: rgba(13, 157, 77, 0.4);
  color: var(--green-deep);
  background: var(--green-soft);
}

h2 {
  margin-bottom: 0;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.08;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

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

.content-card {
  display: grid;
  min-height: 226px;
  align-content: start;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition:
    transform 0.16s ease,
    border-color 0.16s ease;
}

.content-card:hover,
.content-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(13, 157, 77, 0.34);
  outline: none;
}

.content-card span {
  color: var(--green-deep);
  font-size: 13px;
  font-weight: 900;
}

.content-card strong {
  font-size: 21px;
  line-height: 1.24;
}

.content-card small {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.astro-insight-section {
  padding-top: 34px;
}

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

.astro-insight-card {
  display: grid;
  min-height: 238px;
  align-content: start;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.astro-insight-card:nth-child(2) {
  background: var(--cream);
}

.astro-insight-card:nth-child(3) {
  background: var(--sky);
}

.astro-insight-card:nth-child(4) {
  background: #eef3ff;
}

.astro-insight-card span {
  color: var(--green-deep);
  font-size: 13px;
  font-weight: 900;
}

.astro-insight-card h3 {
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1.24;
}

.astro-insight-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.68;
}

.astro-insight-card a {
  align-self: end;
  color: var(--green-deep);
  font-weight: 900;
}

.astro-disclaimer {
  max-width: 840px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.service-card {
  display: grid;
  min-height: 238px;
  align-content: start;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: left;
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.service-card:nth-child(2) {
  background: var(--cream);
}

.service-card:nth-child(3) {
  background: var(--sky);
}

.service-card:nth-child(4) {
  background: #eef3ff;
}

.service-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
}

.service-card strong {
  font-size: 22px;
}

.service-card small {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.experience-section {
  padding-top: 72px;
}

.experience-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

.conversation-panel,
.panel-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.conversation-panel {
  display: grid;
  min-height: 690px;
  grid-template-rows: auto auto minmax(270px, 1fr) auto auto;
  overflow: hidden;
}

.session-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 26px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-green);
}

.session-bar h3,
.block-heading h3 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1.2;
}

.session-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(13, 157, 77, 0.2);
  border-radius: 999px;
  color: var(--green-deep);
  background: #fff;
  font-size: 13px;
  font-weight: 800;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
}

.prompt-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 26px;
  border-bottom: 1px solid var(--line);
}

.prompt-strip button,
.ghost-button,
.memory-suggestion button,
.tag-row button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
}

.prompt-strip button {
  min-height: 40px;
  color: var(--muted);
  font-weight: 750;
}

.prompt-strip button:hover,
.prompt-strip button:focus-visible,
.ghost-button:hover,
.ghost-button:focus-visible,
.tag-row button:hover,
.tag-row button.selected {
  color: var(--green-deep);
  border-color: rgba(13, 157, 77, 0.36);
  background: var(--surface-green);
  outline: none;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 26px;
  overflow: auto;
  background: linear-gradient(180deg, rgba(223, 245, 232, 0.2), rgba(255, 255, 255, 0));
}

.message {
  display: flex;
  gap: 11px;
  max-width: min(760px, 84%);
}

.message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font-weight: 900;
}

.message.user .message-avatar {
  background: var(--teal);
}

.message-bubble {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  line-height: 1.7;
}

.message.user .message-bubble {
  color: #fff;
  border-color: var(--teal);
  background: var(--teal);
}

.message-bubble p:last-child {
  margin-bottom: 0;
}

.message-bubble .alert-title {
  margin-bottom: 6px;
  color: var(--danger);
  font-weight: 900;
}

.memory-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 26px 16px;
  padding: 13px;
  border: 1px solid rgba(255, 138, 104, 0.34);
  border-radius: var(--radius);
  color: #7e3621;
  background: #fff1e9;
}

.memory-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.memory-suggestion button {
  min-height: 32px;
  padding: 0 10px;
}

.chat-form {
  display: grid;
  gap: 12px;
  padding: 0 26px 26px;
}

textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 14px;
  color: var(--text);
  background: #fff;
  line-height: 1.55;
}

textarea::placeholder {
  color: rgba(81, 97, 88, 0.72);
}

.field-meta {
  display: flex;
  justify-content: flex-end;
  min-height: 18px;
  margin-top: -6px;
}

.char-counter {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
}

textarea:focus,
input:focus {
  border-color: rgba(13, 157, 77, 0.5);
  outline: 3px solid rgba(47, 210, 98, 0.18);
}

.chat-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chat-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  color: var(--muted);
  font-weight: 800;
}

.send-button {
  min-width: 106px;
}

.side-stack {
  display: grid;
  gap: 18px;
}

.panel-block {
  padding: 22px;
}

.block-heading {
  margin-bottom: 16px;
}

.range-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
}

.range-label strong {
  color: var(--text);
}

.mood-range {
  width: 100%;
  accent-color: var(--green);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 13px 0;
}

.tag-row button {
  min-height: 32px;
  padding: 0 10px;
  color: var(--muted);
}

.wide-button {
  width: 100%;
  margin-top: 10px;
  border: 0;
  color: #fff;
  background: var(--green);
}

.trend-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(18px, 1fr));
  align-items: end;
  gap: 7px;
  height: 86px;
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.trend-bar {
  min-height: 10px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--green), rgba(47, 210, 98, 0.28));
}

.safety-card {
  background: var(--cream);
}

.safety-card p {
  color: var(--muted);
  line-height: 1.7;
}

.inline-link {
  display: inline-flex;
  margin-top: 2px;
  color: var(--green-deep);
  font-weight: 900;
}

.safety-section {
  padding-bottom: 42px;
}

.safety-layout {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
}

.safety-layout img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.launch-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: launch;
}

.launch-list li {
  min-height: 126px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  line-height: 1.55;
  counter-increment: launch;
  box-shadow: var(--shadow);
}

.launch-list li::before {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  content: counter(launch);
  font-weight: 900;
}

.crisis-section,
.governance-section {
  padding-top: 44px;
}

.resource-grid,
.governance-grid {
  display: grid;
  gap: 18px;
}

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

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

.resource-card,
.policy-card {
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.resource-card.urgent {
  color: #fff;
  border-color: rgba(5, 8, 6, 0.08);
  background: var(--green-deep);
}

.resource-card strong,
.policy-card h3 {
  display: block;
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.2;
}

.resource-card p,
.policy-card p {
  margin-bottom: 12px;
  color: var(--muted);
  line-height: 1.72;
}

.resource-card.urgent p {
  color: rgba(255, 255, 255, 0.88);
}

.resource-card a {
  display: inline-flex;
  color: var(--green-deep);
  font-weight: 900;
}

.resource-card.urgent a {
  color: #fff;
}

.resource-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.data-card {
  background: var(--surface-green);
}

.data-summary {
  min-height: 118px;
  padding: 14px;
  border: 1px solid rgba(13, 157, 77, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  line-height: 1.65;
}

.data-summary strong {
  color: var(--text);
}

.data-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.data-actions button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  font-weight: 850;
}

.data-actions button:hover,
.data-actions button:focus-visible {
  border-color: rgba(13, 157, 77, 0.34);
  background: var(--bg-soft);
  outline: none;
}

.data-actions .danger-button {
  color: #fff;
  border-color: var(--danger);
  background: var(--danger);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.site-footer nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--green-deep);
  font-weight: 800;
}

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.section-heading-row .section-heading {
  margin-bottom: 0;
}

.page-shell {
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
}

.page-hero {
  display: grid;
  gap: 18px;
  padding: 62px 0 36px;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.breadcrumb a {
  color: var(--green-deep);
}

.page-hero h1 {
  max-width: 920px;
  margin-bottom: 0;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.02;
}

.page-lede {
  max-width: 760px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.72;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
  padding-bottom: 72px;
}

.article-body,
.article-sidebar,
.trust-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.article-body {
  padding: 34px;
}

.article-body h2 {
  margin: 34px 0 14px;
  font-size: clamp(28px, 3vw, 40px);
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body h3 {
  margin: 24px 0 10px;
  font-size: 22px;
}

.article-body p,
.article-body li {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.86;
}

.article-body a,
.article-sidebar a {
  color: var(--green-deep);
  font-weight: 900;
}

.article-body ul,
.article-body ol {
  padding-left: 22px;
}

.article-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.article-meta span,
.source-list a,
.review-list span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-size: 13px;
  font-weight: 800;
}

.review-panel {
  display: grid;
  gap: 10px;
  margin: 24px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-green);
}

.review-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.faq-list {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.faq-list details {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 900;
}

.article-footer-cta {
  display: grid;
  gap: 16px;
  margin-top: 30px;
  padding: 22px;
  border: 1px solid rgba(13, 157, 77, 0.2);
  border-radius: var(--radius);
  background: var(--surface-green);
}

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

.related-grid a {
  display: block;
  padding: 12px;
  border: 1px solid rgba(13, 157, 77, 0.2);
  border-radius: var(--radius);
  background: #fff;
}

.resources-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: stretch;
}

.resources-note {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.resource-filter-panel {
  display: grid;
  gap: 12px;
  margin: -4px 0 22px;
}

.resource-search-label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.resource-search {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  max-width: 620px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.resource-search i {
  width: 20px;
  height: 20px;
  color: var(--green-deep);
}

.resource-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  outline: 0;
}

.resource-search input::placeholder {
  color: rgba(81, 97, 88, 0.72);
}

.resource-search:focus-within {
  border-color: rgba(13, 157, 77, 0.5);
  outline: 3px solid rgba(47, 210, 98, 0.18);
}

.resource-filter {
  margin: 0;
}

.resource-filter-status {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.resource-empty {
  margin: 0;
  color: var(--danger);
  font-size: 14px;
  font-weight: 800;
}

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

.note-box,
.cta-box,
.boundary-box {
  margin: 24px 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.boundary-box {
  border-color: rgba(200, 61, 61, 0.22);
  background: #fff5f2;
}

.cta-box {
  display: grid;
  gap: 12px;
  background: var(--surface-green);
}

.step-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 18px 0;
  list-style: none;
  counter-reset: steps;
}

.step-list li {
  position: relative;
  min-height: 70px;
  padding: 16px 16px 16px 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  counter-increment: steps;
}

.step-list li::before {
  position: absolute;
  top: 16px;
  left: 16px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  content: counter(steps);
  font-weight: 900;
}

.article-sidebar {
  position: sticky;
  top: 112px;
  display: grid;
  gap: 16px;
  padding: 22px;
}

.article-sidebar h2,
.article-sidebar h3 {
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1.22;
}

.side-link-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.side-link-list a {
  display: block;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.source-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 72px;
}

.trust-panel {
  padding: 26px;
}

.trust-panel h2 {
  margin-bottom: 12px;
  font-size: clamp(28px, 3vw, 40px);
}

.trust-panel p,
.trust-panel li {
  color: var(--muted);
  line-height: 1.8;
}

:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 3px solid rgba(13, 157, 77, 0.46);
  outline-offset: 3px;
}

:where(
  .top-nav a,
  .primary-button,
  .secondary-button,
  .ghost-button,
  .header-action,
  .login-link,
  .content-card,
  .data-actions button,
  .related-grid a,
  .side-link-list a
):focus-visible {
  box-shadow: 0 0 0 4px rgba(47, 210, 98, 0.18);
}

@media (forced-colors: active) {
  :where(a, button, input, textarea, select, summary):focus-visible {
    outline: 2px solid CanvasText;
  }
}

@media (max-width: 1080px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .top-nav {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .hero-section,
  .experience-layout,
  .safety-layout,
  .resources-hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-section {
    min-height: auto;
    padding-top: 34px;
  }

  .hero-copy {
    max-width: 760px;
  }

  .hero-visual {
    min-height: 520px;
  }

  .hero-image-ring {
    right: 50%;
    transform: translateX(50%);
    width: min(520px, 92vw);
  }

  .appointment-card {
    right: max(16px, calc(50% - 280px));
  }

  .service-grid,
  .content-grid,
  .stats-strip,
  .astro-insight-grid,
  .resource-grid,
  .governance-grid,
  .region-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .article-sidebar {
    position: static;
  }
}

@media (max-width: 720px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    width: calc(100% - 28px);
    min-height: 116px;
    gap: 12px;
  }

  .brand {
    width: 132px;
  }

  .brand-logo {
    height: 44px;
  }

  .top-nav {
    justify-content: flex-start;
    gap: 18px;
    overflow-x: auto;
    max-width: 100%;
    padding-bottom: 2px;
    font-size: 15px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .top-nav::-webkit-scrollbar {
    display: none;
  }

  .header-actions {
    gap: 0;
  }

  .login-link {
    display: none;
  }

  .header-action {
    display: none;
  }

  .theme-toggle {
    width: 40px;
    min-height: 40px;
  }

  .hero-section,
  .stats-strip,
  .section-block,
  .experience-section,
  .page-shell,
  .site-footer {
    width: calc(100% - 28px);
  }

  .hero-section {
    gap: 14px;
    padding-bottom: 34px;
  }

  h1 {
    font-size: clamp(48px, 16vw, 68px);
  }

  .hero-lede {
    font-size: 18px;
  }

  .hero-actions,
  .chat-form-footer,
  .memory-suggestion,
  .site-footer {
    display: grid;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .hero-visual {
    min-height: 300px;
  }

  .hero-image-ring {
    width: min(284px, 76vw);
  }

  .appointment-card {
    top: 8px;
    right: 6px;
    min-width: 148px;
    padding: 14px;
  }

  .service-grid,
  .content-grid,
  .stats-strip,
  .astro-insight-grid,
  .prompt-strip,
  .launch-list,
  .resource-grid,
  .governance-grid,
  .region-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .section-heading-row {
    display: grid;
    align-items: start;
  }

  .data-actions {
    grid-template-columns: 1fr;
  }

  .stats-strip {
    margin-top: -46px;
    margin-bottom: 40px;
  }

  .section-block,
  .experience-section {
    padding: 42px 0;
  }

  .conversation-panel {
    min-height: 680px;
  }

  .message {
    max-width: 100%;
  }

  .session-bar {
    display: grid;
  }

  .chat-actions,
  .memory-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .send-button {
    width: 100%;
  }

  .resource-card,
  .policy-card {
    min-height: auto;
  }

  .site-footer nav {
    display: grid;
    gap: 8px;
  }

  .page-hero {
    padding-top: 34px;
  }

  .page-hero h1 {
    font-size: clamp(38px, 13vw, 58px);
  }

  .page-lede {
    font-size: 18px;
  }

  .article-body,
  .article-sidebar,
  .trust-panel {
    padding: 22px;
  }

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