/* ============================================================
   老友記「智」識講 / Parliament of Ideas
   Design system — ported from PoIdeas-Design
   (styles.css + components.css + sections.css + org.css)
   ============================================================ */

:root {
  /* ---- Brand palette (violet DNA, deepened for credibility) ---- */
  --violet:        oklch(0.50 0.17 292);
  --violet-deep:   oklch(0.41 0.16 292);
  --violet-soft:   oklch(0.93 0.045 292);
  --violet-tint:   oklch(0.975 0.018 296);

  /* ---- Warm human accent ---- */
  --apricot:       oklch(0.80 0.12 58);
  --apricot-deep:  oklch(0.72 0.14 52);

  /* ---- Ink + neutrals (warm) ---- */
  --ink:           oklch(0.27 0.018 290);
  --ink-soft:      oklch(0.44 0.02 290);
  --ink-faint:     oklch(0.60 0.015 290);
  --surface:       oklch(0.995 0.004 90);
  --surface-2:     oklch(0.98 0.008 300);
  --page:          oklch(0.985 0.01 300);
  --border:        oklch(0.90 0.012 292);
  --border-soft:   oklch(0.94 0.01 292);

  --primary:       var(--violet);
  --primary-deep:  var(--violet-deep);
  --primary-soft:  var(--violet-soft);
  --primary-tint:  var(--violet-tint);

  /* ---- Type ---- */
  --font-head: "Noto Serif TC", serif;
  --font-body: "Noto Sans TC", system-ui, sans-serif;

  /* ---- Radius ---- */
  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-pill: 999px;

  /* ---- Senior-friendly text scale ---- */
  --scale: 1;
  --fs-body:   calc(17px * var(--scale));
  --fs-lead:   calc(19px * var(--scale));
  --fs-small:  calc(15px * var(--scale));
  --fs-h3:     calc(23px * var(--scale));
  --fs-h2:     calc(33px * var(--scale));
  --fs-h1:     calc(50px * var(--scale));

  --shadow-sm: 0 1px 2px oklch(0.4 0.05 292 / 0.06), 0 2px 8px oklch(0.4 0.05 292 / 0.05);
  --shadow-md: 0 8px 24px oklch(0.4 0.06 292 / 0.10), 0 2px 6px oklch(0.4 0.05 292 / 0.06);
  --shadow-lg: 0 20px 50px oklch(0.4 0.08 292 / 0.16);

  --maxw: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

p { margin: 0; }

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

button { font-family: inherit; cursor: pointer; }

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

::selection { background: var(--primary-soft); }

/* Images that fill a sized frame (replaces the design's <image-slot>) */
.slot { width: 100%; height: 100%; object-fit: cover; }

/* Skip link (accessibility) */
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--primary); color: oklch(0.99 0.005 90);
  padding: 12px 20px; border-radius: var(--r-pill); font-weight: 700;
  transition: top .2s ease;
}
.skip-link:focus { top: 16px; }

/* Visible focus for accessibility */
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.center { text-align: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--primary-deep);
  background: var(--primary-soft);
  padding: 8px 16px;
  border-radius: var(--r-pill);
}
.eyebrow::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 58px;
  padding: 0 32px;
  font-size: var(--fs-body);
  font-weight: 700;
  border-radius: var(--r-pill);
  border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: oklch(0.99 0.005 90);
  box-shadow: 0 8px 20px oklch(0.5 0.17 292 / 0.28);
}
.btn-primary:hover { background: var(--primary-deep); transform: translateY(-2px); box-shadow: 0 12px 28px oklch(0.5 0.17 292 / 0.34); }
.btn-primary:disabled { opacity: .6; cursor: default; transform: none; }
.btn-ghost {
  background: var(--surface);
  color: var(--primary-deep);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--primary); background: var(--primary-tint); }
.btn-lg { min-height: 66px; font-size: var(--fs-lead); padding: 0 40px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

/* ---------- Inline feedback ---------- */
.msg-error { color: oklch(0.55 0.2 25); font-size: var(--fs-small); }
.msg-success { color: oklch(0.52 0.13 155); font-size: var(--fs-small); }

.spin {
  display: inline-block; width: 16px; height: 16px; margin-right: 8px;
  border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  :root { --fs-h1: calc(33px * var(--scale)); --fs-h2: calc(25px * var(--scale)); --fs-h3: calc(20px * var(--scale)); }
  .wrap { padding: 0 20px; }
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: oklch(0.995 0.004 90 / 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--border-soft);
  box-shadow: 0 4px 20px oklch(0.4 0.05 292 / 0.06);
}
.header-inner {
  display: flex; align-items: center; gap: 24px;
  height: 86px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: calc(20px * var(--scale));
  color: var(--ink);
  letter-spacing: .01em;
  line-height: 1;
}
.brand-name-2 { color: var(--primary-deep); }

.nav-desktop { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-link {
  position: relative;
  padding: 10px 14px;
  font-size: calc(15px * var(--scale));
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: var(--r-sm);
  transition: color .15s ease, background .15s ease;
  white-space: nowrap;
}
.nav-link:hover { color: var(--primary-deep); background: var(--primary-tint); }
.nav-link.is-active { color: var(--primary-deep); font-weight: 700; }
.nav-link.is-active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px;
  height: 3px; border-radius: 3px; background: var(--primary);
}

.header-actions { display: flex; align-items: center; gap: 16px; }
.signin-pill { min-height: 50px; padding: 0 24px; }

.menu-btn {
  display: none;
  width: 52px; height: 52px;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--r-sm);
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.menu-btn span { width: 24px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: .2s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.nav-mobile {
  display: none;
  flex-direction: column; gap: 4px;
  padding: 0 20px;
  max-height: 0; overflow: hidden;
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
  transition: max-height .3s ease, padding .3s ease;
}
.nav-mobile.is-open { max-height: 640px; padding: 16px 20px 28px; }
.nav-mobile-link {
  padding: 16px 12px; font-size: calc(19px * var(--scale)); font-weight: 600;
  color: var(--ink); border-radius: var(--r-sm); border-bottom: 1px solid var(--border-soft);
}
.nav-mobile-link.is-active { color: var(--primary-deep); }

@media (max-width: 1080px) {
  .nav-desktop { display: none; }
  .header-actions { margin-left: auto; }
  .menu-btn { display: flex; }
  .nav-mobile { display: flex; }
}
@media (max-width: 600px) {
  .brand-name-2 { display: none; }
  .header-inner { height: 72px; gap: 12px; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 85% -10%, var(--primary-soft) 0%, transparent 55%),
    radial-gradient(90% 80% at 5% 110%, var(--primary-tint) 0%, transparent 50%),
    var(--page);
  padding: clamp(56px, 8vw, 104px) 0 clamp(64px, 9vw, 120px);
}
.hero-title {
  font-size: var(--fs-h1);
  letter-spacing: .03em;
}
.hero-sub {
  font-size: var(--fs-h2);
  margin-top: 10px;
  color: var(--primary-deep);
  letter-spacing: .04em;
}
.hero-desc {
  font-size: var(--fs-lead);
  color: var(--ink-soft);
  margin-top: 26px;
  max-width: 32ch;
  text-wrap: pretty;
  line-height: 1.75;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 38px; }

.hero-art { position: relative; }
.hero-centered { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-centered .hero-copy { max-width: 820px; display: flex; flex-direction: column; align-items: center; }
.hero-centered .hero-desc { max-width: 48ch; margin-left: auto; margin-right: auto; }
.hero-centered .hero-actions { justify-content: center; }
.hero-centered .hero-art { margin-top: 46px; width: 100%; max-width: min(600px, 100%); }
.hero-copy .eyebrow { margin-bottom: 22px; }

.art-cluster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.art-card {
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-md);
  aspect-ratio: 3 / 4;
  display: flex; align-items: center; justify-content: center;
  padding: 18px; text-align: center;
  min-width: 0; overflow: hidden;
}
.art-card.wide { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.art-card > img { width: 100%; height: 100%; min-width: 0; object-fit: cover; border-radius: calc(var(--r-lg) - 4px); }
.hero-blob {
  position: absolute; inset: -8% -6% -8% -6%;
  background: radial-gradient(circle at 50% 40%, var(--primary-soft), transparent 65%);
  z-index: -1; filter: blur(8px);
}

@media (max-width: 920px) {
  .hero-desc { max-width: none; }
  .hero-centered .hero-art { max-width: 460px; }
}

/* ============================================================
   Split rows (home about + key breakthroughs)
   ============================================================ */
.split-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.split-media {
  position: relative; aspect-ratio: 4 / 3; align-self: center;
  border-radius: 24px; box-shadow: var(--shadow-md); overflow: hidden;
}
.split-media > img { width: 100%; height: 100%; object-fit: cover; }
.split-copy .eyebrow { margin-bottom: 20px; }
.split-copy h2 { font-size: var(--fs-h2); margin-bottom: 20px; }
.split-copy p { font-size: var(--fs-lead); color: var(--ink-soft); line-height: 1.8; text-wrap: pretty; }
.muted-lead { color: var(--primary-deep) !important; font-weight: 600; margin-bottom: 30px !important; }
.section-tint { background: var(--surface-2); }

.text-link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 26px;
  font-weight: 700; color: var(--primary-deep); font-size: var(--fs-body);
}
.text-link svg { transition: transform .18s ease; }
.text-link:hover svg { transform: translateX(5px); }

@media (max-width: 860px) {
  .split-row { grid-template-columns: 1fr; }
  .split-row.reverse .split-copy { order: -1; }
}

/* ---------- Key breakthroughs grid ---------- */
.key-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 28px; margin-top: 8px; }
.key-item h3 { font-size: var(--fs-h3); margin: 16px 0 8px; }
.key-item p { font-size: var(--fs-body); color: var(--ink-soft); line-height: 1.7; }
.key-icon {
  width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: var(--primary-tint); color: var(--primary-deep); border: 1px solid var(--primary-soft);
}
.key-icon svg { width: 26px; height: 26px; }
@media (max-width: 620px) { .key-grid { grid-template-columns: 1fr; } }

/* ---------- CTA future ---------- */
.cta-future { background: var(--surface-2); }
.future-art { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; max-width: 720px; margin: 0 auto 44px; }
.future-art > img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.future-copy { max-width: 760px; margin: 0 auto; }
.future-copy h2 { font-size: var(--fs-h2); }
.future-copy p { font-size: var(--fs-lead); color: var(--ink-soft); margin: 18px 0 34px; line-height: 1.8; text-wrap: pretty; }
@media (max-width: 640px) { .future-art { gap: 12px; } }

/* ============================================================
   Centered page title (inner pages)
   ============================================================ */
.page-title { text-align: center; padding: clamp(52px, 7vw, 90px) 0 8px; }
.page-title h1 { font-size: var(--fs-h1); letter-spacing: .02em; }
.title-rule { display: block; width: 72px; height: 4px; border-radius: 4px; background: var(--primary); margin: 24px auto 0; }
.page-title p { max-width: 74ch; margin: 26px auto 0; font-size: var(--fs-lead); color: var(--ink-soft); line-height: 1.8; text-wrap: pretty; }

/* ============================================================
   About / 支持聯盟機構
   ============================================================ */
.ab-crumbbar { border-bottom: 1px solid var(--border-soft); background: var(--surface); }
.ab-crumbbar .breadcrumb { padding: 18px 32px; margin: 0 auto; }
.breadcrumb { font-size: var(--fs-small); color: var(--ink-faint); }
.breadcrumb a:hover { color: var(--primary-deep); }
.ab-split-sec { padding: clamp(40px, 5.5vw, 72px) 0; }
.ab-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 5vw, 64px); align-items: center; }
.ab-media { position: relative; aspect-ratio: 4 / 3; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-md); align-self: center; }
.ab-media > img { width: 100%; height: 100%; object-fit: cover; }
.ab-card { background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 24px; padding: clamp(28px, 3vw, 44px); }
.ab-copy h2 { font-size: var(--fs-h2); margin-bottom: 18px; }
.ab-copy > p { font-size: var(--fs-lead); color: var(--ink-soft); line-height: 1.8; text-wrap: pretty; }
.ab-sub { margin-top: 22px !important; font-weight: 700; color: var(--ink) !important; font-size: var(--fs-body) !important; }
.ab-steps { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.ab-steps li { display: flex; gap: 16px; align-items: flex-start; font-size: var(--fs-body); color: var(--ink-soft); line-height: 1.65; }
.ab-steps .step-n {
  flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--primary-tint); color: var(--primary-deep);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; margin-top: 2px;
}
.ab-steps strong { color: var(--ink); }
.ab-seclist { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.ab-seclist li { display: flex; gap: 14px; align-items: flex-start; font-size: var(--fs-body); color: var(--ink-soft); line-height: 1.65; }
.ab-seclist strong { color: var(--ink); }
.sec-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); margin-top: 9px; }

.ab-ready { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(28px, 4vw, 56px); align-items: center; }
.ab-ready-card { background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 24px; padding: clamp(32px, 4vw, 52px); }
.ab-ready-card h2 { font-size: var(--fs-h2); margin-bottom: 14px; }
.ab-ready-card p { font-size: var(--fs-lead); color: var(--ink-soft); margin-bottom: 30px; }
.portrait-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.portrait-cell { aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); }
.portrait-cell > img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 860px) {
  .ab-split, .ab-ready { grid-template-columns: 1fr; }
  .ab-ready-card { order: -1; }
}

/* ============================================================
   Milestones journey
   ============================================================ */
.journey-card { padding: clamp(30px, 4vw, 52px); }
.journey-head { display: flex; align-items: center; gap: 20px; padding-bottom: 26px; margin-bottom: 30px; border-bottom: 1px solid var(--border-soft); }
.journey-icon {
  width: 68px; height: 68px; border-radius: 18px; flex: none;
  background: var(--primary-tint); color: var(--primary-deep); border: 1px solid var(--primary-soft);
  display: flex; align-items: center; justify-content: center;
}
.journey-head h2 { font-size: var(--fs-h2); }
.journey-list { margin: 0; display: flex; flex-direction: column; gap: 26px; }
.journey-item dt { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-h3); color: var(--ink); margin-bottom: 8px; }
.journey-item dd { margin: 0; font-size: var(--fs-body); color: var(--ink-soft); line-height: 1.75; }

/* ============================================================
   News
   ============================================================ */
.news-list { display: flex; flex-direction: column; gap: 14px; max-width: 900px; margin: 0 auto 34px; }
.news-item { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.news-q {
  width: 100%; text-align: start; border: none; background: none;
  padding: 24px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.news-q-main { display: flex; flex-direction: column; gap: 6px; }
.news-q h3 { font-size: var(--fs-h3); }
.news-date { font-size: var(--fs-small); color: var(--primary-deep); font-weight: 700; letter-spacing: .08em; }
.news-q .chev { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--primary-tint); color: var(--primary-deep); display: flex; align-items: center; justify-content: center; transition: transform .25s ease; }
.news-item.is-open .news-q .chev { transform: rotate(90deg); }
.news-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.news-item.is-open .news-a { max-height: 1200px; }
.news-a-inner { padding: 0 28px 26px; color: var(--ink-soft); font-size: var(--fs-body); line-height: 1.8; }
.news-empty { text-align: center; padding: 40px 0 30px; color: var(--ink-faint); }

.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; list-style: none; padding: 0; margin: 0; }
.pager-btn {
  min-width: 90px; min-height: 52px; padding: 0 22px; border-radius: var(--r-pill); border: none;
  background: var(--primary-soft); color: var(--primary-deep); font-weight: 700; font-size: var(--fs-body);
  transition: background .15s ease, transform .15s ease;
}
.pager-btn:hover { background: var(--primary); color: #fff; transform: translateY(-1px); }
.pager-btn.is-active { background: var(--primary); color: #fff; }

/* ============================================================
   Contact
   ============================================================ */
.contact-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 30px; }
.contact-card { padding: 34px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.cc-icon { width: 62px; height: 62px; border-radius: 50%; border: 2px solid var(--primary-soft); color: var(--primary-deep);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.cc-icon svg { width: 28px; height: 28px; }
.contact-card h3 { font-size: var(--fs-h3); margin-bottom: 10px; }
.contact-card a, .contact-card p { color: var(--ink-soft); font-size: var(--fs-body); }
.contact-card a:hover { color: var(--primary-deep); }
.cc-follow { margin-bottom: 16px; }
.cc-social { display: flex; gap: 12px; }
.cc-social a { width: 46px; height: 46px; border-radius: 50%; background: var(--primary-tint); color: var(--primary-deep);
  display: flex; align-items: center; justify-content: center; transition: background .15s ease, transform .15s ease; }
.cc-social a:hover { background: var(--primary-soft); transform: translateY(-2px); }
.cc-social svg { width: 20px; height: 20px; }
.contact-form { padding: clamp(28px, 3.5vw, 48px); }
@media (max-width: 900px) { .contact-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .contact-cards { grid-template-columns: 1fr; } }

/* Form grid */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 600; font-size: var(--fs-small); margin-bottom: 8px; color: var(--ink); }
.field input, .field textarea, .field select {
  width: 100%; font-family: inherit; font-size: var(--fs-body);
  padding: 16px 18px; border: 2px solid var(--border); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink); transition: border-color .15s ease;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--primary); }

/* ============================================================
   FAQ
   ============================================================ */
.faq-list { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.faq-item { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.faq-q {
  width: 100%; text-align: start; border: none; background: none;
  padding: 26px 28px; font-size: var(--fs-h3); font-weight: 700; color: var(--ink);
  font-family: var(--font-head);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.faq-q .chev { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--primary-tint); color: var(--primary-deep); display: flex; align-items: center; justify-content: center; font-size: 22px; line-height: 1; transition: transform .25s ease; }
.faq-item.is-open .faq-q .chev { transform: rotate(90deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-item.is-open .faq-a { max-height: 600px; }
.faq-a-inner { padding: 0 28px 26px; color: var(--ink-soft); font-size: var(--fs-body); line-height: 1.8; }

/* ============================================================
   Privacy / long-form legal copy
   ============================================================ */
.legal { max-width: 860px; margin: 0 auto; }
.legal-body { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: clamp(28px, 4vw, 52px); }
.legal-body > ol { margin: 0; padding-left: 24px; display: flex; flex-direction: column; gap: 28px; }
.legal-body > ol > li { font-size: var(--fs-body); color: var(--ink-soft); line-height: 1.8; }
.legal-h { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-h3); color: var(--ink); margin-bottom: 10px; }
.legal-body ol ol { margin: 12px 0 0; padding-left: 22px; list-style-type: lower-alpha; display: flex; flex-direction: column; gap: 8px; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  position: relative;
  background: var(--surface-2);
  border-top: 1px solid var(--border-soft);
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.1fr;
  gap: clamp(32px, 5vw, 72px);
  padding-top: clamp(52px, 7vw, 84px);
  padding-bottom: 48px;
}
.footer-brand .brand { margin-bottom: 20px; }
.footer-tag {
  color: var(--ink-soft);
  font-size: var(--fs-body);
  max-width: 34ch;
  line-height: 1.7;
}
.footer-social { display: flex; gap: 14px; margin-top: 26px; }
.social-btn {
  width: 50px; height: 50px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--border);
  color: var(--ink-soft);
  background: var(--surface);
  transition: color .15s ease, border-color .15s ease, background .15s ease, transform .15s ease;
}
.social-btn:hover { color: var(--primary-deep); border-color: var(--primary); background: var(--primary-tint); transform: translateY(-2px); }

.footer-h {
  font-family: var(--font-head);
  font-size: calc(21px * var(--scale));
  color: var(--ink);
  margin-bottom: 22px;
}

.footer-nav { display: flex; flex-direction: column; gap: 14px; }
.footer-nav a {
  color: var(--ink-soft);
  font-size: var(--fs-body);
  width: fit-content;
  transition: color .15s ease, padding .15s ease;
}
.footer-nav a:hover { color: var(--primary-deep); padding-inline-start: 5px; }

.footer-contact { display: flex; flex-direction: column; gap: 16px; }
.footer-contact p { color: var(--ink-soft); font-size: var(--fs-body); }
.footer-contact strong { color: var(--ink); }
.footer-contact a:hover { color: var(--primary-deep); }

.footer-base {
  border-top: 1px solid var(--border-soft);
  padding: 28px 32px;
  text-align: center;
  color: var(--ink-faint);
  font-size: var(--fs-small);
}
.footer-base strong { color: var(--ink-soft); font-weight: 700; }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* Scroll-to-top */
.to-top {
  position: fixed; left: 26px; bottom: 26px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%;
  border: none; background: var(--primary); color: oklch(0.99 0.005 90);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px oklch(0.5 0.17 292 / 0.34);
  opacity: 0; visibility: hidden; transform: translateY(12px) scale(0.9);
  transition: opacity .25s ease, transform .25s ease, visibility .25s, background .15s ease;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.to-top:hover { background: var(--primary-deep); }
@media (max-width: 600px) { .to-top { left: 16px; bottom: 16px; width: 50px; height: 50px; } }

/* ============================================================
   Organization portal — popup shell
   ============================================================ */
.pop-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: oklch(0.22 0.03 292 / 0.55);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: pop-fade .2s ease;
}
@keyframes pop-fade { from { opacity: 0; } }
.pop-card {
  position: relative;
  width: 560px; max-width: calc(100vw - 32px); max-height: 92vh;
  background: var(--surface); border-radius: 24px;
  box-shadow: 0 30px 80px oklch(0.15 0.04 292 / 0.4);
  display: flex; flex-direction: column;
  animation: pop-rise .24s cubic-bezier(.2,.8,.2,1);
}
@keyframes pop-rise { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.size-sm { width: 440px; }
.size-md { width: 560px; }
.size-lg { width: 680px; }
.size-chat { width: 480px; height: min(660px, 90vh); }

.pop-head { position: relative; height: 66px; flex: none; }
.pop-head-left { position: absolute; left: 16px; top: 13px; }
.pop-pill {
  position: absolute; left: 50%; top: 14px; transform: translateX(-50%);
  background: var(--primary); color: #fff; font-family: var(--font-head); font-weight: 700;
  font-size: 19px; letter-spacing: .02em; padding: 8px 22px; border-radius: var(--r-pill);
  white-space: nowrap; box-shadow: 0 6px 16px oklch(0.5 0.17 292 / 0.3);
}
.pop-close, .pop-icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: none;
  background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center;
  transition: background .15s ease, transform .15s ease;
}
.pop-close { position: absolute; right: 16px; top: 13px; }
.pop-close:hover, .pop-icon-btn:hover { background: var(--primary-deep); transform: scale(1.06); }
.pop-body { overflow-y: auto; padding: 8px 30px 30px; -webkit-overflow-scrolling: touch; }
.size-chat .pop-body { padding: 0; display: flex; flex-direction: column; flex: 1; min-height: 0; }

@media (max-width: 560px) {
  .pop-pill { font-size: 15px; padding: 7px 14px; }
  .pop-body { padding: 8px 18px 24px; }
}

/* ---------- login ---------- */
.login-box { display: flex; flex-direction: column; gap: 14px; text-align: center; padding: 6px 8px 6px; }
.login-logo { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.login-logo span { font-family: ui-monospace, Menlo, monospace; font-size: 11px; letter-spacing: .3em; color: var(--primary-deep); }
.login-h { font-size: var(--fs-h2); margin: 4px 0 8px; }
.login-links { display: flex; justify-content: space-between; margin-top: 4px; }
.login-links a { color: var(--primary-deep); font-weight: 600; font-size: var(--fs-small); }
.login-links a:hover { text-decoration: underline; }

/* ---------- panel tiles ---------- */
.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 6px 6px 14px; }
.panel-tile { background: none; border: none; display: flex; flex-direction: column; align-items: center; gap: 14px; cursor: pointer; }
.tile-ico {
  width: 100%; aspect-ratio: 1; border-radius: 26px; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 26px oklch(0.4 0.06 292 / 0.22);
  transition: transform .18s ease, box-shadow .18s ease; position: relative; overflow: hidden;
}
.tile-ico::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, #fff3 0%, transparent 45%); }
.tile-ico svg { width: 48%; height: 48%; position: relative; }
.panel-tile:hover .tile-ico { transform: translateY(-5px); box-shadow: 0 20px 40px oklch(0.4 0.08 292 / 0.3); }
.tile-label { font-family: var(--font-head); font-weight: 700; font-size: 22px; color: var(--ink); }
.t-violet .tile-ico { background: linear-gradient(155deg, #b49cff, #6a45c8); }
.t-gold   .tile-ico { background: linear-gradient(155deg, #dcd873, #9a9636); }
.t-teal   .tile-ico { background: linear-gradient(155deg, #6fd3cf, #2c9391); }
.t-pink   .tile-ico { background: linear-gradient(155deg, #ec8fc6, #bd4593); }

.panel-notice { text-align: center; padding: 6px 6px 16px; color: var(--ink-soft); font-size: var(--fs-body); line-height: 1.8; }
.panel-notice a { color: var(--primary-deep); font-weight: 700; }
.panel-notice a:hover { text-decoration: underline; }

/* ---------- floating action button ---------- */
.org-fab {
  position: fixed; right: 26px; bottom: 26px; z-index: 65;
  width: 62px; height: 62px; border-radius: 50%; border: none;
  background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 28px oklch(0.5 0.17 292 / 0.4); cursor: pointer;
  transition: transform .18s ease, background .15s ease;
}
.org-fab:hover { transform: translateY(-3px) scale(1.05); background: var(--primary-deep); }
@media (max-width: 600px) { .org-fab { right: 16px; bottom: 16px; width: 56px; height: 56px; } }

/* ---------- org forms (profile + questionnaire) ---------- */
.org-form, .org-doc { padding: 2px 2px 6px; text-align: left; }
.org-h1 { font-size: var(--fs-h2); margin-bottom: 6px; }
.org-h2 { font-size: var(--fs-h3); margin: 26px 0 14px; }
.org-field { display: block; margin-bottom: 16px; }
.org-label { display: block; font-weight: 600; font-size: var(--fs-small); margin-bottom: 8px; color: var(--ink); }
.req { color: oklch(0.6 0.2 25); }
.org-field input, .org-field select, .org-field textarea,
.q-item input, .q-item select, .q-item textarea {
  width: 100%; font-family: inherit; font-size: var(--fs-body); color: var(--ink);
  padding: 14px 16px; border: 2px solid var(--border); border-radius: 12px; background: var(--surface);
  transition: border-color .15s ease;
}
.org-field input:focus, .org-field select:focus, .org-field textarea:focus,
.q-item input:focus, .q-item select:focus, .q-item textarea:focus { outline: none; border-color: var(--primary); }
.org-field input[readonly], .org-field input:disabled, .q-item input[readonly] { background: var(--surface-2); color: var(--ink-soft); }
.org-form-foot { margin-top: 26px; }
.org-msg { margin-top: 14px; text-align: center; }

/* ---------- tutorial doc ---------- */
.org-doc h2.org-h1 { line-height: 1.25; }
.org-doc > p { font-size: var(--fs-body); color: var(--ink-soft); line-height: 1.8; margin-bottom: 4px; }
.org-ol { margin: 12px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 16px; }
.org-ol > li { font-size: var(--fs-body); color: var(--ink); font-weight: 700; }
.org-ol > li > ul { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 7px; }
.org-ol > li > ul > li { font-weight: 400; color: var(--ink-soft); line-height: 1.7; }

/* ---------- chat ---------- */
.org-chat { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.chat-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; background: var(--surface-2); }
.chat-row { display: flex; gap: 10px; align-items: flex-end; max-width: 86%; }
.chat-row.bot { align-self: flex-start; }
.chat-row.user { align-self: flex-end; flex-direction: row-reverse; }
.chat-av { width: 38px; height: 38px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; }
.chat-av svg { width: 22px; height: 22px; }
.chat-av.bot { background: var(--primary); }
.chat-av.user { background: linear-gradient(150deg, #ff9d5c, #f4663a); }
.chat-bubble { padding: 12px 16px; border-radius: 18px; font-size: var(--fs-body); line-height: 1.65; white-space: pre-wrap; }
.chat-row.bot .chat-bubble { background: oklch(0.94 0.03 236); color: var(--ink); border-bottom-left-radius: 5px; }
.chat-row.user .chat-bubble { background: var(--surface); border: 1px solid var(--border); color: var(--ink); border-bottom-right-radius: 5px; }
.chat-bubble.typing { display: flex; gap: 5px; align-items: center; }
.chat-bubble.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-faint); animation: chat-blink 1.2s infinite; }
.chat-bubble.typing i:nth-child(2) { animation-delay: .2s; }
.chat-bubble.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes chat-blink { 0%,60%,100% { opacity: .3; } 30% { opacity: 1; } }
.chat-input { display: flex; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--border-soft); align-items: center; }
.chat-input input { flex: 1; min-width: 0; font-family: inherit; font-size: var(--fs-body); padding: 13px 18px; border: 2px solid var(--border); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); }
.chat-input input:focus { outline: none; border-color: var(--primary); }
.chat-send, .chat-tips {
  width: 46px; height: 46px; flex: none; border-radius: 50%; border: none;
  background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center;
  transition: background .15s ease;
}
.chat-tips { background: var(--primary-tint); color: var(--primary-deep); }
.chat-send:hover:not(:disabled) { background: var(--primary-deep); }
.chat-tips:hover:not(:disabled) { background: var(--primary-soft); }
.chat-send:disabled, .chat-tips:disabled { opacity: .5; cursor: default; }
.chat-foot { padding: 10px 18px 14px; font-size: var(--fs-small); color: var(--ink-faint); display: flex; justify-content: space-between; gap: 12px; align-items: center; }

/* ---------- questionnaire ---------- */
.q-intro { font-size: var(--fs-body); color: var(--ink-soft); line-height: 1.75; margin-bottom: 22px; }
.q-group { margin-bottom: 6px; }
.q-item { margin-bottom: 18px; }
.q-item .org-label { margin-bottom: 10px; }
.q-rating { display: flex; gap: 10px; }
.rate-dot { width: 48px; height: 48px; border-radius: 12px; border: 2px solid var(--border); background: var(--surface); font-weight: 800; font-size: 16px; color: var(--ink-soft); transition: .15s ease; }
.rate-dot.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.rate-dot:hover { border-color: var(--primary); }
.q-note { font-size: var(--fs-body); color: var(--ink-soft); line-height: 1.7; margin-bottom: 14px; }
.q-file { display: block; font-size: var(--fs-small); color: var(--ink-soft); }
.q-logo-preview { margin-top: 14px; border-radius: 12px; border: 1px solid var(--border-soft); max-height: 220px; object-fit: contain; }
.q-done-mark { width: 76px; height: 76px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 40px; display: flex; align-items: center; justify-content: center; margin: 0 auto 22px; }
