:root {
  /* SocialFlow Light — stitch_socialflow_intelligence_hub */
  --primary: #036a69;
  --primary-container: #7ccbca;
  --mint-primary: #7ccbca;
  --on-primary: #ffffff;
  --on-primary-container: #005656;
  --secondary: #36637e;
  --sky-accent: #b3e0ff;
  --background: #f8fafb;
  --surface: #f8fafb;
  --surface-container: #eceeef;
  --surface-container-low: #f2f4f5;
  --surface-container-lowest: #ffffff;
  --on-surface: #191c1d;
  --on-surface-variant: #3e4948;
  --slate-strong: #334155;
  --slate-muted: #64748b;
  --outline: #6e7979;
  --outline-variant: #e2e8f0;
  --border-subtle: #e2e8f0;
  --canvas: #f2f4f5;
  --error: #ba1a1a;
  --error-container: #ffdad6;
  --warn: #b45309;

  --bg: var(--background);
  --bg-elevated: var(--surface-container-lowest);
  --ink: var(--slate-strong);
  --ink-soft: var(--on-surface-variant);
  --muted: var(--slate-muted);
  --line: var(--outline-variant);
  --line-strong: color-mix(in srgb, var(--outline) 55%, transparent);
  --accent: var(--primary);
  --accent-soft: color-mix(in srgb, var(--primary-container) 22%, transparent);
  --accent-ink: var(--on-primary);
  --bad: var(--error);
  --ok: #0f766e;

  --font-display: "Montserrat", "Noto Sans SC", sans-serif;
  --font-body: "Noto Sans", "Noto Sans SC", "Inter", "Segoe UI", sans-serif;
  --radius: 8px;
  --shadow: 0 4px 20px rgba(51, 65, 85, 0.05);
  --wrap: min(1280px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  background: var(--background);
}
.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  font-size: 20px;
  line-height: 1;
  vertical-align: middle;
}

a { color: inherit; text-decoration: none; }
.wrap { width: var(--wrap); margin: 0 auto; }
.page-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: var(--wrap);
  min-height: calc(100vh - 64px);
}
.page-home .site-header { flex-shrink: 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}
.nav {
  width: var(--wrap);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--primary);
}
.brand span { color: var(--primary); opacity: 0.72; }
.lang-switch {
  display: inline-flex;
  background: var(--surface-container-low);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.lang-switch button {
  border: none;
  background: transparent;
  color: var(--slate-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.lang-switch button.active {
  background: var(--primary);
  color: #fff;
}
.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
  color: var(--on-surface-variant);
  font-size: 0.9rem;
  font-weight: 500;
}
.nav-links #authNav {
  display: inline-flex;
  gap: 16px;
  align-items: center;
}
.nav-links a:hover { color: var(--primary); }
.nav-links .btn { margin-left: 4px; }
.nav-user {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.88rem;
}
.nav-links .btn-ghost {
  padding: 8px 12px;
  font-size: 0.85rem;
}
.hero-user {
  margin: 14px 0 0;
  color: var(--primary);
  font-size: 0.92rem;
  font-weight: 600;
}
.simple-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  max-width: 560px;
}
.simple-list li {
  padding: 14px 0;
  border-top: 1px solid var(--outline-variant);
  color: var(--ink-soft);
  font-size: 0.98rem;
}
.simple-list li:last-child { border-bottom: 1px solid var(--outline-variant); }
.simple-list strong { color: var(--ink); margin-right: 6px; }
.hidden { display: none !important; }
a.btn.is-disabled,
.btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 10px 20px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 4px 14px rgba(3, 106, 105, 0.18);
}
.btn-primary:hover { background: #025554; }
.btn-mint {
  background: var(--mint-primary);
  color: #005656;
  box-shadow: 0 4px 14px rgba(124, 203, 202, 0.35);
}
.btn-mint:hover { background: #85d4d3; }
.btn-ghost {
  background: var(--surface-container-lowest);
  color: var(--secondary);
  border: 2px solid color-mix(in srgb, var(--secondary) 45%, transparent);
}
.btn-ghost:hover {
  border-color: var(--secondary);
  color: var(--secondary);
  background: color-mix(in srgb, var(--sky-accent) 18%, white);
}

.hero {
  position: relative;
  padding: 56px 0 64px;
  min-height: clamp(420px, 78vh, 720px);
  display: flex;
  align-items: center;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-container-low) 100%);
}
.hero::after {
  content: "";
  position: absolute;
  right: 8%;
  top: 12%;
  width: min(42vw, 420px);
  height: min(42vw, 420px);
  border-radius: 50%;
  background: color-mix(in srgb, var(--sky-accent) 35%, transparent);
  filter: blur(80px);
  pointer-events: none;
}
.hero::before {
  content: "";
  position: absolute;
  left: 6%;
  bottom: 8%;
  width: min(38vw, 380px);
  height: min(38vw, 380px);
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary-container) 32%, transparent);
  filter: blur(80px);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  animation: rise 0.65s ease both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--primary);
  letter-spacing: -0.03em;
}
.hero-brand span { opacity: 0.7; }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.6vw, 3rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  max-width: none;
  color: var(--slate-strong);
}
.hero h1 .grad {
  background: linear-gradient(90deg, #036a69, #7ccbca);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  color: var(--slate-muted);
  font-size: 1.05rem;
  max-width: 34rem;
  margin: 0 0 28px;
  line-height: 1.65;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-visual {
  position: relative;
  min-height: 360px;
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(179, 224, 255, 0.45), rgba(124, 203, 202, 0.35)),
    var(--surface-container-lowest);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: rise 0.75s ease 0.08s both;
}
.hero-visual-glow {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(3, 106, 105, 0.18), transparent 70%);
}
.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
  animation: floaty 4.5s ease-in-out infinite;
}
.float-card.a { top: 18%; left: 8%; }
.float-card.b { bottom: 16%; right: 8%; animation-delay: -1.5s; }
.float-card .ico {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--sky-accent);
  color: var(--secondary);
  flex-shrink: 0;
}
.float-card.b .ico { background: var(--primary-container); color: var(--on-primary-container); }
.float-card .meta { font-size: 11px; font-weight: 600; color: var(--slate-muted); letter-spacing: 0.02em; }
.float-card .val { font-size: 14px; font-weight: 700; color: var(--primary); margin-top: 2px; }

.page-lower {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 72px 0 64px;
  border-top: 1px solid var(--border-subtle);
  background: var(--surface);
}
.lower-head {
  text-align: center;
  margin-bottom: 40px;
}
.lower-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 1.85rem);
  font-weight: 500;
  color: var(--slate-strong);
  margin: 0 0 10px;
}
.lower-head p {
  margin: 0 auto;
  max-width: 36rem;
  color: var(--slate-muted);
  font-size: 1rem;
}
.lower-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 28px;
}
.feature-card {
  padding: 24px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.feature-card:hover {
  box-shadow: 0 10px 28px rgba(51, 65, 85, 0.08);
  transform: translateY(-2px);
}
.feature-card .ico {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface-container-low);
  color: var(--primary);
  margin-bottom: 14px;
}
.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--slate-strong);
}
.feature-card p {
  margin: 0;
  color: var(--slate-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}
.download-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 32px;
  border-radius: 16px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--primary-container) 18%, white), #fff 60%);
  border: 1px solid var(--border-subtle);
}
.download-strip h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--slate-strong);
}
.download-strip .lead {
  margin: 0;
  color: var(--slate-muted);
  font-size: 0.95rem;
  max-width: 36rem;
}
.lower-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px 40px;
  min-height: 260px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow);
}
.lower-block h2 {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  color: var(--slate-strong);
}
.lower-block .lead {
  color: var(--slate-muted);
  margin: 0 0 28px;
  max-width: 28rem;
  font-size: 1rem;
  line-height: 1.7;
}
.lower-download {
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--primary-container) 16%, white), var(--surface-container-lowest) 55%);
}
.page-home .simple-list {
  max-width: none;
  margin-top: 4px;
}
.page-home .simple-list li {
  padding: 18px 0;
  font-size: 1.02rem;
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 280px; order: -1; }
  .lower-grid { grid-template-columns: 1fr; }
}

.section-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}

.section {
  padding: 72px 0;
  border-top: 1px solid var(--outline-variant);
}
.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.6vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  color: var(--on-surface);
}
.section .lead {
  color: var(--on-surface-variant);
  margin: 0 0 32px;
  max-width: 38rem;
  font-size: 0.98rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature,
.plan,
.step {
  border: 1px solid var(--outline-variant);
  border-radius: 12px;
  padding: 24px;
  background: var(--surface-container-lowest);
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.feature:hover,
.step:hover {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary-container) 3%, white);
  transform: translateY(-2px);
}
.feature h3,
.plan h3,
.step h3 {
  font-family: var(--font-display);
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--on-surface);
}
.feature p,
.plan p,
.step p {
  margin: 0;
  color: var(--on-surface-variant);
  font-size: 0.92rem;
  line-height: 1.65;
}

.feature-index {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 14px;
  font-weight: 700;
}

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step .n {
  font-family: var(--font-display);
  color: var(--secondary);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  font-weight: 700;
}

.plan {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  min-height: 100%;
}
.plan.featured {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--outline-variant));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--primary-container) 10%, white), white 42%);
  box-shadow: 0 14px 36px rgba(0, 61, 155, 0.1);
}
.plan .price {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--primary);
}
.plan .price small {
  font-size: 0.85rem;
  color: var(--secondary);
  font-weight: 500;
  letter-spacing: 0;
}
.plan ul {
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  color: var(--on-surface-variant);
  font-size: 0.9rem;
  flex: 1;
}
.plan li {
  padding: 8px 0;
  border-top: 1px solid var(--outline-variant);
}
.plan li:first-child { border-top: 0; }
.badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: color-mix(in srgb, var(--primary-container) 12%, white);
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}

.faq { max-width: 760px; }
.faq details {
  border-bottom: 1px solid var(--outline-variant);
  padding: 16px 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 650;
  font-family: var(--font-display);
  list-style: none;
  color: var(--on-surface);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  float: right;
  color: var(--secondary);
}
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--on-surface-variant); margin: 10px 0 0; font-size: 0.95rem; }

.footer {
  border-top: 1px solid var(--outline-variant);
  padding: 28px 0 44px;
  color: var(--secondary);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: auto;
}
.footer a:hover { color: var(--primary); }
.footer-roomy {
  padding: 40px 0 56px;
  margin-top: 24px;
  align-items: flex-end;
  gap: 20px 40px;
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--on-surface);
  line-height: 1;
}
.footer-brand span { color: var(--primary); }
.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  font-size: 0.9rem;
}
.footer-sep { opacity: 0.45; }

.card-form {
  width: min(460px, 100%);
  margin: 0 auto;
  border: 1px solid var(--outline-variant);
  border-radius: 16px;
  padding: 36px 32px 40px;
  background: var(--surface-container-lowest);
  box-shadow: var(--shadow);
}
.page-account .page-shell {
  padding: 40px 0 24px;
}
.page-account #loginPanel:not(.hidden) {
  margin-top: auto;
  margin-bottom: auto;
}
.page-account #appPanel:not(.hidden) {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.page-account .footer {
  padding-top: 48px;
  padding-bottom: 56px;
}
.card-form h1 {
  font-family: var(--font-display);
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--on-surface);
}
label {
  display: block;
  font-size: 0.78rem;
  color: var(--secondary);
  margin: 14px 0 6px;
  font-weight: 500;
}
input,
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--outline-variant);
  background: var(--surface-container-lowest);
  color: var(--on-surface);
  font: inherit;
  outline: none;
}
input:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-container) 18%, transparent);
}
.msg { min-height: 1.2em; font-size: 0.88rem; color: var(--secondary); margin-top: 10px; }
.msg.err { color: var(--error); }
.msg.ok { color: var(--ok); }
.tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--primary-container) 12%, white);
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
}
.tag.bad {
  background: var(--error-container);
  color: var(--error);
  border-color: color-mix(in srgb, var(--error) 25%, transparent);
}
.tag.warn {
  background: #fff7ed;
  color: var(--warn);
  border-color: #fed7aa;
}
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th, td {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid var(--outline-variant);
}
th {
  color: var(--secondary);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* 用户中心（登录后，非 admin） */
.user-shell {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  padding: 12px 0 8px;
  flex: 1;
  min-height: 0;
}
.user-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 12px;
  background: var(--surface-container-lowest);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius);
  align-self: start;
  position: sticky;
  top: 80px;
}
.user-nav-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0 8px 10px;
  color: var(--on-surface);
}
.user-nav-item {
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: 6px;
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink-soft);
  cursor: pointer;
  text-decoration: none;
}
.user-nav-item:hover { background: var(--surface-container-low); color: var(--ink); }
.user-nav-item.active {
  background: var(--accent-soft);
  color: var(--primary);
  font-weight: 600;
}
.user-nav-item.muted { margin-top: 8px; color: var(--muted); }
.user-nav-item.link { display: block; }
.user-main {
  min-width: 0;
}
.user-panel {
  background: var(--surface-container-lowest);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius);
  padding: 22px 22px 26px;
}

@media (max-width: 900px) {
  .grid-3,
  .steps { grid-template-columns: 1fr; }
  .nav-links a.hide-sm { display: none; }
  .hero {
    min-height: auto;
    padding: 48px 0 40px;
  }
  .hero::before,
  .hero::after { display: none; }
  .section { padding: 52px 0; }
  .page-lower {
    padding: 36px 0 28px;
    min-height: 0;
  }
  .lower-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .lower-block {
    min-height: 0;
    padding: 28px 24px;
  }
  .user-shell {
    grid-template-columns: 1fr;
  }
  .user-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .user-nav-title { width: 100%; margin-bottom: 4px; }
  .footer-roomy {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 40px;
  }
}
