/* Reset + base */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}
a { color: inherit; }
img { max-width: 100%; }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 13px;
  line-height: 1;
  padding: 10px 14px;
  border-radius: var(--r-2);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
  white-space: nowrap;
  letter-spacing: -0.005em;
  text-decoration: none;
}
.btn-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-primary:hover { background: var(--ink-2); }
.btn-secondary { background: var(--bg-elev); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--ink-3); }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: transparent; }
.btn-ghost:hover { background: var(--bg-sunk); }
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { filter: brightness(0.95); }
.btn-sm { padding: 6px 10px; font-size: 12px; }
.btn-lg { padding: 14px 20px; font-size: 14px; }

/* ── Cards ───────────────────────────────────────────── */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
}

/* ── Form elements ───────────────────────────────────── */
.input, .textarea, .select {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--ink-2);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.label {
  display: block;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.help-text {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 4px;
  line-height: 1.4;
}

/* ── Badge / Pill ────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink-2);
  white-space: nowrap;
}
.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}
.verified-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border: 1px solid color-mix(in oklab, var(--accent) 30%, transparent);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Topbar ──────────────────────────────────────────── */
.topbar {
  border-bottom: 1px solid var(--line);
  padding: 9px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  background: var(--bg);
}
.topbar-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

/* ── Lang pill ───────────────────────────────────────── */
.lang-pill {
  background: transparent;
  border: 1px solid var(--line);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.lang-pill:hover { border-color: var(--ink-3); }

/* ── Navigation ──────────────────────────────────────── */
.main-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 14px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.nav-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  white-space: nowrap;
}
.nav-brand-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.nav-brand-sub {
  font-size: 10px;
  color: var(--ink-3);
  margin-top: 3px;
  letter-spacing: 0.04em;
}
.nav-links {
  display: flex;
  gap: 28px;
  font-size: 13px;
}
.nav-links a {
  text-decoration: none;
  color: var(--ink-2);
  font-weight: 500;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active {
  color: var(--ink);
  font-weight: 600;
  position: relative;
}
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -19px;
  height: 2px;
  background: var(--accent);
}
.nav-actions {
  display: flex;
  gap: 8px;
}

/* ── Brand mark (G in black square) ──────────────────── */
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.brand-mark::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid color-mix(in oklab, var(--bg) 35%, transparent);
  border-radius: 3px;
}
.brand-mark-dot {
  position: absolute;
  right: -3px;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--bg);
}

/* ── Section helpers ─────────────────────────────────── */
.section { padding: 112px 40px; }
.section-sunk { background: var(--bg-sunk); border-top: 1px solid var(--line); }
.section-deep {
  background: var(--accent-deep);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.section-deep .glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, color-mix(in oklab, var(--accent) 60%, transparent), transparent 60%);
  pointer-events: none;
}
.container { max-width: 1280px; margin: 0 auto; }
.container-narrow { max-width: 1180px; margin: 0 auto; }

.section-eyebrow {
  font-weight: 600;
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 56px;
  margin: 0;
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: 500;
}
.section-lede {
  font-size: 17px;
  color: var(--ink-2);
  line-height: 1.65;
  margin: 0;
}

/* ── Hero ────────────────────────────────────────────── */
.hero { padding: 112px 40px 88px; }
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 8.4vw, 132px);
  line-height: 0.94;
  letter-spacing: -0.038em;
  margin: 0;
  max-width: 1200px;
  font-weight: 500;
}
.hero-title em {
  font-style: italic;
  color: var(--accent-ink);
  font-family: var(--font-display);
}
.hero-lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
  max-width: 720px;
}

/* ── Stat strip ──────────────────────────────────────── */
.stat-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.stat-strip--sunk { background: var(--bg-sunk); }
.stat-label {
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.stat-value {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-top: 2px;
}

/* ── Grid cards (2x2 or 5-col or 3-col) ─────────────── */
.grid-cards {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.grid-cards-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cards-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cards-5 { grid-template-columns: repeat(5, 1fr); }
.grid-card {
  padding: 28px 24px;
  background: var(--bg);
  display: flex;
  gap: 20px;
}
.grid-card--col {
  flex-direction: column;
  gap: 14px;
}
.grid-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.grid-card-icon--sm { width: 36px; height: 36px; }
.grid-card-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin-bottom: 6px;
}
.grid-card-desc {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.6;
}
.grid-card-num {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-4);
}
.grid-card-numblock {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--accent-ink);
  line-height: 1;
  width: 56px;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

/* ── Community tiles (hub chooser) ───────────────────── */
.community-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.community-tile {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.community-tile:not(.community-tile--forming):hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}
.community-tile--forming {
  opacity: 0.5;
  cursor: default;
}
.community-tile-glow {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  pointer-events: none;
}
.community-tile-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.community-tile-name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.community-tile-domain {
  font-size: 11px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  margin-top: 8px;
  letter-spacing: 0.04em;
}

/* ── FAQ accordion ───────────────────────────────────── */
.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 80px;
  align-items: start;
}
.faq-sticky {
  position: sticky;
  top: 100px;
}
.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  display: grid;
  grid-template-columns: 32px 1fr 24px;
  gap: 16px;
  align-items: start;
  cursor: pointer;
}
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-num {
  font-family: var(--font-mono);
  color: var(--accent-ink);
  font-size: 12px;
  padding-top: 4px;
}
.faq-question {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.faq-answer {
  font-size: 15px;
  color: var(--ink-3);
  line-height: 1.65;
  margin-top: 12px;
  text-wrap: pretty;
}
.faq-toggle { color: var(--ink-3); padding-top: 4px; }

/* ── CTA section ─────────────────────────────────────── */
.cta-section {
  padding: 120px 40px;
  text-align: center;
}
.cta-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 96px);
  margin: 0;
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-weight: 500;
  max-width: 1100px;
  margin-inline: auto;
}
.cta-title em {
  color: color-mix(in oklab, var(--accent) 70%, #fff);
  font-family: var(--font-display);
}
.cta-sub {
  font-size: 18px;
  color: rgba(255,255,255,0.7);
  margin-top: 24px;
}
.cta-buttons {
  margin-top: 36px;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.btn-cta-primary {
  background: #fff;
  color: var(--accent-deep);
  border-color: #fff;
}
.btn-cta-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}

/* ── Footer ──────────────────────────────────────────── */
.footer {
  padding: 56px 40px 32px;
  background: var(--bg-sunk);
  border-top: 1px solid var(--line);
}
.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 48px;
}
.footer-brand-desc {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.6;
  max-width: 320px;
}
.footer-col-title {
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-col a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 13px;
}
.footer-col a:hover { color: var(--ink); }
.footer-legal {
  max-width: 1280px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}

/* ── Certificate visual ──────────────────────────────── */
.cert-block {
  background: var(--bg-deep);
  color: #fff;
  border-radius: 14px;
  padding: 40px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 56px;
  align-items: center;
}
.cert-block .glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, color-mix(in oklab, var(--accent) 50%, transparent), transparent 55%);
  pointer-events: none;
}
.cert-visual {
  aspect-ratio: 1 / 1.35;
  max-width: 320px;
  margin-left: auto;
  background: #fff;
  color: var(--ink);
  border-radius: 6px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 60px rgba(0,0,0,0.35);
}

/* ── Cabinet layout ──────────────────────────────────── */
.cabinet-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  flex: 1;
  min-height: 0;
}
.cabinet-sidebar {
  background: var(--bg-sunk);
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cabinet-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  font-weight: 500;
  font-size: 13px;
  font-family: var(--font-sans);
  border: none;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  position: relative;
  width: 100%;
}
.cabinet-nav-item:hover { background: var(--bg); }
.cabinet-nav-item.active {
  background: var(--bg);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-1);
}
.cabinet-nav-item.active::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}
.cabinet-nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
}
.cabinet-main {
  padding: 32px 40px 64px;
  overflow: auto;
}

/* ── Pane (cabinet card wrapper) ─────────────────────── */
.pane {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.pane-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ── Tab heading ─────────────────────────────────────── */
.tab-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 28px;
  gap: 16px;
}
.tab-head-title {
  font-family: var(--font-display);
  font-size: 38px;
  margin: 0;
  line-height: 1;
  letter-spacing: -0.025em;
  font-weight: 500;
}
.tab-head-sub {
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.55;
  margin: 10px 0 0;
  max-width: 720px;
}

/* ── Monogram avatar ─────────────────────────────────── */
.name-mono {
  border-radius: 50%;
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  color: var(--ink-2);
  font-weight: 500;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  text-transform: uppercase;
  min-width: 32px;
  min-height: 32px;
  box-sizing: border-box;
}

/* ── SVG icon base ───────────────────────────────────── */
.icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ── Page hero (interior) ────────────────────────────── */
.page-hero {
  padding: 96px 40px 72px;
  border-bottom: 1px solid var(--line);
}
.page-hero--dense { padding: 64px 40px 48px; }
.page-hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 6.5vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 0;
  font-weight: 500;
  max-width: 1100px;
}
.page-hero-title em {
  font-style: italic;
  color: var(--accent-ink);
  font-family: var(--font-display);
}

/* ── Utility classes ─────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-start { align-items: start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }
.gap-10 { gap: 40px; }
.gap-12 { gap: 48px; }
.gap-16 { gap: 64px; }
.mt-auto { margin-top: auto; }
.relative { position: relative; }
.text-center { text-align: center; }

/* Shared file upload */
.fu-drop {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px;
  border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  background: var(--bg); font-family: var(--font-sans);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.fu-drop:hover { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.fu-drop:hover .fu-label { color: var(--accent-ink); }
.fu-label { font-size: 13px; color: var(--ink-2); font-weight: 500; }

/* ── User avatar menu ─────────────────────────────────── */
.user-menu {
  position: relative;
  z-index: 200;
}
.user-avatar-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--accent-soft);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.user-avatar-btn:hover,
.user-avatar-btn[aria-expanded="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.user-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.user-avatar-initials {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-ink);
  line-height: 1;
}
.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 192px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(20,16,28,0.1), 0 2px 6px rgba(20,16,28,0.06);
  z-index: 400;
  overflow: hidden;
}
.user-dropdown.open {
  display: block;
}
.user-dropdown-header {
  padding: 12px 16px 10px;
}
.user-dropdown-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-dropdown-role {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-dropdown-divider {
  height: 1px;
  background: var(--line);
  margin: 0;
}
.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-sans);
  text-align: left;
  transition: background 0.1s, color 0.1s;
}
.user-dropdown-item:hover {
  background: var(--bg-sunk);
  color: var(--ink);
}
.user-dropdown-item--danger {
  color: var(--danger);
}
.user-dropdown-item--danger:hover {
  background: color-mix(in oklab, var(--danger) 8%, var(--bg));
  color: var(--danger);
}
