:root {
  --sky-t: #c8e8ff;
  --sky-m: #e8f5ff;
  --sky-b: #f5fbff;
  --white: #ffffff;
  --ink: #1a2a3a;
  --ink-2: #3a5070;
  --ink-3: #6a8aaa;
  --ink-4: #a0b8cc;
  --teal: #00b8a0;
  --teal-d: #008878;
  --teal-soft: rgba(0, 184, 160, 0.1);
  --amber: #f5a623;
  --amber-d: #c07800;
  --amber-soft: rgba(245, 166, 35, 0.12);
  --green: #00b87a;
  --green-soft: rgba(0, 184, 122, 0.12);
  --blue-soft: rgba(0, 100, 180, 0.06);
  --blue-line: rgba(0, 130, 200, 0.13);
  --card-bg: rgba(255, 255, 255, 0.82);
  --card-bg-strong: rgba(255, 255, 255, 0.92);
  --shadow-sm: 0 2px 14px rgba(0, 90, 170, 0.08);
  --shadow-md: 0 8px 34px rgba(0, 90, 170, 0.13);
  --shadow-lg: 0 18px 60px rgba(0, 90, 170, 0.17);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.7;
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.58), transparent 18%),
    radial-gradient(circle at 82% 16%, rgba(255, 244, 190, 0.48), transparent 24%),
    linear-gradient(180deg, var(--sky-t) 0%, var(--sky-m) 42%, var(--sky-b) 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: -2;
}

body::before {
  top: -84px;
  right: 56px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 30%, #fffde0 0%, #ffe066 24%, #ffc020 54%, #d07000 100%);
  box-shadow:
    0 0 0 14px rgba(255, 205, 60, 0.16),
    0 0 0 38px rgba(255, 205, 60, 0.08),
    0 0 90px rgba(255, 220, 100, 0.28),
    0 0 170px rgba(255, 220, 100, 0.14);
  opacity: 0.92;
  animation: sunFloat 10s ease-in-out infinite;
}

body::after {
  inset: 0;
  background:
    radial-gradient(circle at 4% 14%, rgba(255, 255, 255, 0.92) 0 60px, transparent 62px),
    radial-gradient(circle at 9% 12%, rgba(255, 255, 255, 0.84) 0 48px, transparent 50px),
    radial-gradient(circle at 14% 16%, rgba(230, 244, 255, 0.8) 0 40px, transparent 42px),
    radial-gradient(circle at 78% 12%, rgba(255, 255, 255, 0.8) 0 38px, transparent 40px),
    radial-gradient(circle at 82% 14%, rgba(228, 242, 255, 0.7) 0 30px, transparent 32px),
    radial-gradient(circle at 20% 88%, rgba(255, 255, 255, 0.34) 0 80px, transparent 82px);
  opacity: 0.75;
  animation: cloudDrift 24s ease-in-out infinite alternate;
}

@keyframes sunFloat {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(4deg);
  }
}

@keyframes cloudDrift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(18px, -10px, 0);
  }
}

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

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

button,
input,
textarea,
select {
  font: inherit;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0 0 80px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 20px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-brand-icon {
  width: 42px;
  height: 42px;
  padding: 4px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--teal) 0%, #0075b0 100%);
  box-shadow: 0 4px 14px rgba(0, 184, 160, 0.35);
  overflow: hidden;
}

.topbar-brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 9px;
}

.topbar-brand > div:last-child > :first-child {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.1;
}

.topbar-brand > div:last-child > :last-child {
  margin-top: 2px;
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--teal);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 184, 160, 0.3);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.btn:hover,
button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 184, 160, 0.36);
  background: var(--teal-d);
}

.btn.secondary,
button.secondary {
  border-color: var(--blue-line);
  background: var(--card-bg);
  color: var(--ink-2);
  box-shadow: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn.secondary:hover,
button.secondary:hover {
  background: rgba(0, 184, 160, 0.07);
  color: var(--teal-d);
  border-color: rgba(0, 184, 160, 0.28);
  box-shadow: var(--shadow-sm);
}

.btn.ghost,
button.ghost {
  background: transparent;
  color: var(--teal-d);
  border-color: rgba(0, 184, 160, 0.22);
  box-shadow: none;
}

.btn.ghost:hover,
button.ghost:hover {
  background: var(--teal-soft);
}

button:disabled,
.btn.disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
}

h2 {
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 700;
}

h3 {
  font-size: clamp(16px, 2vw, 21px);
  font-weight: 700;
}

h4 {
  font-size: 14px;
  font-weight: 700;
}

p {
  margin: 0;
}

.eyebrow,
.pill,
.meta-text,
.window-bar-label,
.window-bar-value,
.status-badge,
.method-tag,
.tag {
  font-family: var(--font-mono);
}

.eyebrow,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 184, 160, 0.2);
  background: rgba(0, 184, 160, 0.08);
  color: var(--teal);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before,
.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 6px rgba(0, 184, 160, 0.12);
}

.meta-text {
  color: var(--teal);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.muted,
.section-copy,
.panel-subtitle,
.metric-meta,
.summary-card p,
.hero-copy p,
.legal-note p,
.tdsc {
  color: var(--ink-2);
}

.mono,
.mono-cell,
code,
pre {
  font-family: var(--font-mono);
}

.mono-cell {
  word-break: break-all;
}

.mission-hero,
.panel,
.hero,
.summary-card,
.metric-card,
.table-shell,
.auth-card,
.window-bar,
.plan-card,
.card,
.notice-panel,
.code-shell,
.timeline-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--blue-line);
  border-radius: var(--radius-xl);
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.mission-hero::before,
.panel::before,
.summary-card::before,
.metric-card::before,
.plan-card::before,
.auth-card::before,
.timeline-card::before {
  content: "";
  position: absolute;
  inset: auto -6% 58% 48%;
  height: 220px;
  background: radial-gradient(circle, rgba(0, 184, 160, 0.08) 0%, transparent 68%);
  pointer-events: none;
}

.mission-hero,
.hero {
  padding: 34px;
  margin-bottom: 22px;
}

.panel,
.summary-card,
.auth-card,
.plan-card,
.notice-panel,
.code-shell,
.timeline-card {
  padding: 28px;
}

.metric-card {
  padding: 20px;
}

.table-shell {
  padding: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.window-bar {
  padding: 14px;
}

.hero-grid,
.dashboard-grid,
.split-grid,
.two-col,
.auth-shell,
.city-layout,
.api-layout,
.admin-console-grid,
.console-grid,
.legal-grid,
.detail-grid,
.stats-grid,
.hero-stat-grid,
.meta,
.plan-command-grid,
.city-command-grid,
.snapshot-grid {
  display: grid;
  gap: 16px;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.92fr);
  align-items: stretch;
}

.city-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.9fr);
}

.api-layout {
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
}

.auth-shell,
.split-grid,
.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-console-grid {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.92fr);
}

.console-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.85fr);
}

.detail-grid,
.legal-grid,
.meta,
.plan-command-grid,
.city-command-grid,
.stats-grid,
.hero-stat-grid,
.snapshot-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.hero-copy,
.stack,
.plan-body {
  display: grid;
  gap: 16px;
  align-content: start;
}

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

.hero-panel,
.auth-stage {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(0, 184, 160, 0.14);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.6)),
    linear-gradient(180deg, rgba(0, 184, 160, 0.04), rgba(0, 184, 160, 0));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64);
}

.panel-head,
.section-head,
.card-head,
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.section-head {
  margin-bottom: 18px;
}

.panel-head {
  margin-bottom: 14px;
}

.panel-head > div,
.section-head > div {
  display: grid;
  gap: 6px;
}

.section-title,
.panel-title {
  color: var(--ink);
}

.panel-subtitle,
.section-copy {
  max-width: 720px;
  font-size: 13px;
}

.feature-list,
.list,
.flow-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.feature-list li,
.list li,
.flow-list li {
  position: relative;
  padding-left: 18px;
  color: var(--ink-2);
  font-size: 13px;
}

.feature-list li::before,
.list li::before,
.flow-list li::before {
  content: "";
  position: absolute;
  top: 0.78em;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(0, 184, 160, 0.12);
  transform: translateY(-50%);
}

.metric-card,
.summary-card,
.auth-card,
.timeline-card,
.plan-card,
.card {
  display: grid;
  gap: 14px;
}

.metric-card .metric-value,
.summary-card .metric-value,
.plan-card h3,
.big-temp {
  color: var(--ink);
  font-family: var(--font-display);
}

.metric-card .metric-value,
.summary-card .metric-value {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  line-height: 1.15;
}

.metric-card .metric-meta,
.summary-card .metric-meta {
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-3);
}

.metric-inline,
.metric-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.metric-inline strong,
.metric-split strong {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 14px;
}

.notice {
  margin: 0 0 16px;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--blue-line);
  font-size: 13px;
  line-height: 1.7;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
}

.notice.success {
  color: #007752;
  background: rgba(0, 184, 122, 0.1);
  border-color: rgba(0, 184, 122, 0.24);
}

.notice.warning {
  color: var(--amber-d);
  background: rgba(245, 166, 35, 0.12);
  border-color: rgba(245, 166, 35, 0.26);
}

.notice.error,
.notice.danger {
  color: #a33d3d;
  background: rgba(255, 107, 107, 0.12);
  border-color: rgba(255, 107, 107, 0.24);
}

.notice.info {
  color: var(--ink-2);
  background: rgba(0, 100, 180, 0.06);
}

.empty-state {
  padding: 26px 20px;
  border: 1px dashed rgba(0, 130, 200, 0.24);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink-3);
  text-align: center;
  font-size: 13px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-badge.success {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(0, 184, 122, 0.24);
}

.status-badge.warning {
  color: var(--amber-d);
  background: rgba(245, 166, 35, 0.14);
  border-color: rgba(245, 166, 35, 0.24);
}

.status-badge.info {
  color: var(--teal-d);
  background: rgba(0, 184, 160, 0.08);
  border-color: rgba(0, 184, 160, 0.2);
}

.status-badge.danger,
.status-badge.error {
  color: #a33d3d;
  background: rgba(255, 107, 107, 0.14);
  border-color: rgba(255, 107, 107, 0.24);
}

.status-badge.neutral {
  color: var(--ink-3);
  background: rgba(0, 100, 180, 0.06);
  border-color: rgba(0, 130, 200, 0.16);
}

.big-temp {
  font-size: clamp(46px, 8vw, 72px);
  font-weight: 900;
  line-height: 1;
  color: var(--amber-d);
}

.big-temp sup {
  font-size: 0.34em;
  top: -0.9em;
}

.window-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.window-bar-item {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 130, 200, 0.1);
  background: rgba(0, 100, 180, 0.04);
  display: grid;
  gap: 6px;
}

.window-bar-label {
  color: var(--ink-4);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.window-bar-value {
  color: var(--ink-2);
  font-size: 13px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 960px;
}

.table th,
.table td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(0, 130, 200, 0.12);
  vertical-align: top;
  font-size: 13px;
  white-space: nowrap;
}

.table th {
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(0, 184, 160, 0.04);
}

.table td {
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.26);
}

.table tbody tr:hover td {
  background: rgba(0, 184, 160, 0.06);
}

.obs-value {
  color: var(--amber-d);
  font-family: var(--font-mono);
  font-weight: 700;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid.inline {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.form-grid label {
  display: grid;
  gap: 8px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 500;
}

input,
textarea,
select {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 130, 200, 0.16);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--ink-4);
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(0, 184, 160, 0.4);
  box-shadow:
    0 0 0 4px rgba(0, 184, 160, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.96);
}

pre,
.code-block {
  margin: 0;
  padding: 18px 20px;
  overflow: auto;
  border: 1px solid rgba(0, 130, 200, 0.14);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(240, 248, 255, 0.88));
  color: var(--ink-2);
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

code {
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(0, 100, 180, 0.08);
  color: var(--teal-d);
  font-size: 0.95em;
}

pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.endpoint-list {
  display: grid;
  gap: 14px;
}

.endpoint-row {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  border: 1px solid rgba(0, 130, 200, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.64);
}

.endpoint-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.method-tag,
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(0, 184, 122, 0.1);
  border: 1px solid rgba(0, 184, 122, 0.2);
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.plan-card {
  position: relative;
  gap: 18px;
}

.plan-card.highlight {
  border-color: rgba(0, 184, 160, 0.34);
  background: var(--card-bg-strong);
  box-shadow: 0 0 0 3px rgba(0, 184, 160, 0.08), var(--shadow-md);
}

.plan-card.highlight::after {
  content: "RECOMMENDED";
  position: absolute;
  top: 0;
  right: 20px;
  padding: 4px 10px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--teal);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.card-top {
  gap: 10px;
}

.plan-body h3,
.summary-card h3,
.card h3 {
  font-size: 18px;
}

.plan-body p {
  font-size: 13px;
}

.auth-stage-item,
.timeline-step {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 130, 200, 0.12);
  background: rgba(255, 255, 255, 0.58);
}

.auth-stage-item strong,
.timeline-card strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14px;
}

.timeline,
.dashboard-grid {
  display: grid;
  gap: 16px;
}

.timeline {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.timeline-card,
.timeline-step {
  display: grid;
  gap: 10px;
}

.legal-note,
.notice-panel {
  gap: 12px;
}

.footer,
.footer-note {
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid rgba(0, 130, 200, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.flogo {
  color: var(--ink-2);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 5px;
}

.fnote {
  color: var(--ink-3);
  font-size: 11px;
  line-height: 1.7;
}

.fnote a {
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.fmeta {
  color: var(--ink-4);
  font-family: var(--font-mono);
  font-size: 10px;
  text-align: right;
}

.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;
}

@media (max-width: 1180px) {
  .hero-grid,
  .city-layout,
  .api-layout,
  .admin-console-grid,
  .console-grid,
  .auth-shell,
  .split-grid,
  .two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  body::before {
    right: 8px;
    width: 210px;
    height: 210px;
  }

  .shell {
    width: min(100%, calc(100% - 28px));
  }

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

  .nav {
    width: 100%;
  }

  .nav .btn,
  .nav button,
  .nav a {
    flex: 1 1 calc(50% - 8px);
  }

  .mission-hero,
  .hero,
  .panel,
  .summary-card,
  .auth-card,
  .plan-card,
  .timeline-card {
    padding: 22px;
  }

  .window-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  body::after {
    opacity: 0.4;
  }

  .shell {
    width: calc(100% - 20px);
  }

  .mission-hero,
  .hero,
  .panel,
  .summary-card,
  .auth-card,
  .plan-card,
  .metric-card,
  .timeline-card {
    padding: 18px;
    border-radius: 18px;
  }

  .btn,
  button {
    width: 100%;
  }

  .hero-actions {
    display: grid;
  }

  .nav .btn,
  .nav button,
  .nav a {
    flex-basis: 100%;
  }

  .table {
    min-width: 560px;
  }

  .window-bar {
    grid-template-columns: 1fr;
  }

  .form-grid.inline {
    grid-template-columns: 1fr;
  }

  .footer,
  .footer-note {
    align-items: flex-start;
  }

  .fmeta {
    text-align: left;
  }
}

/* ══════════════════════════════════════════════════════
   SKY / SUN / CLOUD  —  shared decorative background
   Add class "has-sky" to <body> and include the sky HTML
   structure to enable the full animated background.
   ══════════════════════════════════════════════════════ */

body.has-sky::before,
body.has-sky::after {
  display: none !important;
}

body.has-sky {
  background: var(--sky-b);
}

.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, #C8E8FF 0%, #E8F5FF 40%, #F5FBFF 100%);
}

.sun-wrap {
  position: fixed;
  top: -55px;
  right: 90px;
  width: 220px;
  height: 220px;
  z-index: 2;
  pointer-events: none;
  perspective: 500px;
}

.sun-scene {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: skyFloat 9s ease-in-out infinite;
}

@keyframes skyFloat {
  0%, 100% { transform: rotateX(8deg) rotateY(0deg) translateY(0px); }
  33%      { transform: rotateX(10deg) rotateY(5deg) translateY(-12px); }
  66%      { transform: rotateX(6deg) rotateY(-3deg) translateY(-5px); }
}

.halo {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.halo1 {
  inset: -28%;
  background: radial-gradient(circle, rgba(255, 220, 100, 0.28) 0%, transparent 65%);
  animation: haloBreath 5s ease-in-out infinite;
}

.halo2 {
  inset: -55%;
  background: radial-gradient(circle, rgba(255, 235, 150, 0.14) 0%, transparent 55%);
  animation: haloBreath 5s ease-in-out infinite reverse;
}

@keyframes haloBreath {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

.sun-orb {
  position: absolute;
  inset: 38px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, #FFFDE0 0%, #FFE066 25%, #FFC020 55%, #D07000 100%);
  box-shadow:
    0 0 0 5px rgba(255, 205, 60, 0.22),
    0 0 0 14px rgba(255, 185, 40, 0.10),
    inset 0 -8px 24px rgba(140, 50, 0, 0.16),
    inset 0 8px 18px rgba(255, 255, 210, 0.38);
}

.sun-rays-svg {
  position: absolute;
  inset: 0;
  animation: raysPin 22s linear infinite;
}

@keyframes raysPin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.cloud {
  position: fixed;
  pointer-events: none;
  z-index: 3;
}

.puff {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(155deg,
    rgba(255, 255, 255, 0.97) 0%,
    rgba(225, 243, 255, 0.88) 50%,
    rgba(185, 218, 248, 0.68) 100%);
  box-shadow:
    0 5px 22px rgba(80, 150, 220, 0.11),
    inset 0 -5px 14px rgba(140, 195, 245, 0.22),
    inset 0 7px 16px rgba(255, 255, 255, 0.58);
}

.cloud-a { top: 70px;  left: -20px;  width: 300px; height: 108px; animation: driftA 30s ease-in-out infinite; }
.cloud-a .puff:nth-child(1) { width: 140px; height: 96px;  top: 12px; left: 0; }
.cloud-a .puff:nth-child(2) { width: 108px; height: 108px; top: 0;    left: 78px; }
.cloud-a .puff:nth-child(3) { width: 116px; height: 86px;  top: 20px; left: 174px; }
.cloud-a .puff:nth-child(4) { width: 74px;  height: 54px;  top: 46px; left: 220px; }

.cloud-b { top: 22px;  left: 32%;    width: 210px; height: 82px;  animation: driftB 23s ease-in-out infinite; }
.cloud-b .puff:nth-child(1) { width: 96px; height: 78px; top: 4px;  left: 0; }
.cloud-b .puff:nth-child(2) { width: 88px; height: 82px; top: 0;    left: 60px; }
.cloud-b .puff:nth-child(3) { width: 84px; height: 64px; top: 16px; left: 116px; }

.cloud-c { top: 155px; right: 18%;   width: 160px; height: 64px;  animation: driftC 19s ease-in-out infinite; }
.cloud-c .puff:nth-child(1) { width: 74px; height: 58px; top: 6px;  left: 0; }
.cloud-c .puff:nth-child(2) { width: 70px; height: 64px; top: 0;    left: 48px; }
.cloud-c .puff:nth-child(3) { width: 62px; height: 48px; top: 14px; left: 90px; }

@keyframes driftA {
  0%, 100% { transform: translateX(0) translateY(0) rotateX(4deg); }
  30%      { transform: translateX(20px) translateY(-9px) rotateX(6deg); }
  65%      { transform: translateX(-12px) translateY(5px) rotateX(2deg); }
}

@keyframes driftB {
  0%, 100% { transform: translateX(0) translateY(0); }
  50%      { transform: translateX(-16px) translateY(-7px); }
}

@keyframes driftC {
  0%, 100% { transform: translateX(0) translateY(0); }
  50%      { transform: translateX(12px) translateY(6px); }
}

/* ── Alternate topbar (index / city / disclaimer style) ── */

.tb-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.b-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.08em;
  line-height: 1.1;
}

.b-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--teal);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 1px;
}

.topnav {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.nl {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-decoration: none;
  padding: 7px 14px;
  border: 1px solid var(--blue-line);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s;
}

.nl:hover {
  color: var(--teal-d);
  border-color: var(--teal);
  background: rgba(0, 184, 160, 0.07);
}

.nl.p {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 184, 160, 0.35);
}

.nl.p:hover {
  background: var(--teal-d);
  box-shadow: 0 6px 20px rgba(0, 184, 160, 0.45);
}

.lang-btn {
  width: auto !important;
  min-height: 32px !important;
  white-space: nowrap;
}

body.has-sky .shell {
  position: relative;
  z-index: 10;
}

@media (max-width: 768px) {
  .sun-wrap {
    right: 8px;
    width: 170px;
    height: 170px;
  }

  .cloud-b,
  .cloud-c {
    display: none;
  }

  .topbar {
    align-items: flex-start;
  }

  .topnav {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 8px;
    -webkit-overflow-scrolling: touch;
  }

  .topnav .nl {
    display: inline-flex;
    flex: 0 0 auto;
    min-height: 36px;
    padding: 7px 10px;
    white-space: nowrap;
    font-size: 10px;
  }

  .topnav #langSwitch {
    flex: 0 0 auto;
  }
}
