/* ==========================================================================
   selfhub public site stylesheet
   ========================================================================== */
:root {
  --brand: #3ecf8e;
  --brand-dark: #24b47e;
  --brand-soft: rgba(62, 207, 142, .12);
  --brand-line: rgba(62, 207, 142, .32);
  --accent: #3ecf8e;
  --violet: #24b47e;
  --ink: #ffffff;
  --ink-2: #c7c7c7;
  --muted: #8b8b8b;
  --line: #2b2b2b;
  --line-strong: #3d3d3d;
  --bg: #121212;
  --bg-2: #171717;
  --card: #1c1c1c;
  --code: #0b0b0b;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow: 0 16px 40px rgba(0, 0, 0, .55);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.28; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(28px, 4vw, 46px); letter-spacing: -.02em; }
h2 { font-size: clamp(22px, 2.6vw, 32px); }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
code, pre { font-family: var(--mono); font-size: 14px; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--brand); color: #101010;
  padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; color: #101010; }
.section { padding: 72px 0; }
.section.is-alt { background: var(--bg-2); }
.section.is-ink { background: var(--bg-2); color: var(--ink-2); }
.section.is-ink h2, .section.is-ink h3 { color: #fff; }
.section-head { max-width: 760px; margin: 0 auto 42px; text-align: center; }
.section-head .eyebrow {
  display: inline-block; font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand); font-weight: 700; margin-bottom: 10px;
}
.section.is-ink .section-head .eyebrow { color: var(--accent); }
.section-head p { color: var(--muted); font-size: 17px; margin: 0; }
.section.is-ink .section-head p { color: var(--muted); }
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(18, 18, 18, .82);
  backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255, 255, 255, .06); transition: box-shadow .2s, border-color .2s;
}
.site-header.is-stuck { border-color: var(--line-strong); background: rgba(18, 18, 18, .94); }
.header-inner { display: flex; align-items: center; gap: 22px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 8px; font-weight: 800; font-size: 15px; letter-spacing: .02em;
  color: #101010; background: var(--brand);
}
img.brand-mark { background: none; border-radius: 0; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 18px; color: var(--ink); }
.brand-text em { font-style: normal; font-size: 12px; color: var(--muted); }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.site-nav ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--ink-2); font-size: 15px; font-weight: 500; padding: 6px 0; position: relative; }
.site-nav a:hover, .site-nav a.is-active { color: var(--brand); }
.site-nav a.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--brand); border-radius: 2px;
}
.nav-actions { display: flex; align-items: center; gap: 10px; }
/* 右上角主 CTA（免费试用）：.site-nav a 的 color / padding 优先级更高，这里显式覆盖为纯黑字 + 左右内边距 */
.site-nav .nav-actions .btn-primary { color: #000; padding-left: 20px; padding-right: 20px; }
.site-nav .nav-actions .btn-primary:hover { color: #000; }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; margin: 5px auto; width: 22px; background: var(--ink); border-radius: 2px; }
@media (max-width: 980px) {
  .nav-toggle { display: block; margin-left: auto; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 72px; background: var(--bg-2); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0; padding: 12px 20px 22px; display: none; box-shadow: var(--shadow);
  }
  .site-header.nav-open .site-nav { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav li { border-bottom: 1px solid var(--line); }
  .site-nav a { display: block; padding: 12px 0; }
  .nav-actions { flex-direction: column; align-items: stretch; margin-top: 14px; }
  .brand-text em { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; border: 1px solid transparent; font-size: 15px;
  font-weight: 600; cursor: pointer; transition: transform .12s, box-shadow .2s, background .2s, color .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #101010; box-shadow: 0 6px 18px rgba(62, 207, 142, .16); }
.btn-primary:hover { color: #101010; background: var(--brand-dark); box-shadow: 0 10px 24px rgba(62, 207, 142, .22); }
.btn-outline { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost { background: transparent; color: var(--ink); border-color: transparent; }
.btn-ghost:hover { background: rgba(255, 255, 255, .06); color: var(--ink); }
.btn-light { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .3); }
.btn-light:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.btn-sm { padding: 9px 15px; font-size: 14px; }
.btn-lg { padding: 15px 30px; font-size: 16px; }
.btn-block { width: 100%; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #d6d6d6;
  background-color: var(--bg);
  background-image: linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px),
                    radial-gradient(1000px 460px at 50% -25%, rgba(62, 207, 142, .17), transparent 62%);
  background-size: 56px 56px, 56px 56px, auto;
  border-bottom: 1px solid var(--line);
  padding: 84px 0 76px;
}
.hero h1 { color: #fff; }
.hero .lede { font-size: 18px; color: var(--muted); max-width: 620px; }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 46px; align-items: center; }
@media (max-width: 980px) { .hero-inner { grid-template-columns: 1fr; } .hero { padding: 56px 0; } }
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  padding: 6px 14px; border-radius: 999px; background: var(--brand-soft);
  border: 1px solid var(--brand-line); color: var(--brand); margin-bottom: 18px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 18px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 0; font-size: 14px; color: var(--muted); }
.hero-points li::before { content: "✓"; color: var(--accent); margin-right: 7px; font-weight: 700; }
.hero-panel {
  background: rgba(28, 28, 28, .86); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 22px; backdrop-filter: blur(6px); box-shadow: var(--shadow);
}
.hero-panel .panel-title { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); margin-bottom: 14px; }
.hero-panel .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(62, 207, 142, .18); }
.hero-panel ul { list-style: none; margin: 0; padding: 0; }
.hero-panel li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed rgba(255, 255, 255, .12); font-size: 14px; }
.hero-panel li:last-child { border-bottom: 0; }
.hero-panel .k { color: #fff; font-weight: 600; }
.hero-panel .v { color: var(--muted); }

/* ---------- cards & features ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .2s, border-color .2s; height: 100%;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card.is-flat:hover { transform: none; box-shadow: var(--shadow-sm); }
.feature-card { display: flex; flex-direction: column; gap: 12px; }
.icon-badge {
  width: 46px; height: 46px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: var(--brand); background: var(--brand-soft);
}
.section.is-ink .icon-badge { color: var(--brand); background: var(--brand-soft); }
.feature-card .feature-foot { margin-top: auto; font-size: 13px; color: var(--muted); }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 780px) { .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.metric { text-align: center; padding: 20px 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.metric strong { display: block; font-size: 30px; color: #fff; line-height: 1.2; }
.metric span { font-size: 13px; color: var(--muted); }
.list-check { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.list-check li { position: relative; padding-left: 26px; }
.list-check li::before {
  content: "✓"; position: absolute; left: 0; top: 0; color: var(--brand); font-weight: 800;
}
.section.is-ink .list-check li::before { color: var(--accent); }
.cta-band {
  background: radial-gradient(600px 240px at 8% 0%, rgba(62, 207, 142, .16), transparent 62%), var(--card);
  border: 1px solid var(--brand-line); color: var(--ink-2);
  border-radius: var(--radius-lg); padding: 42px; display: flex; flex-wrap: wrap; gap: 22px; align-items: center;
  justify-content: space-between; box-shadow: var(--shadow);
}
.cta-band h2 { color: #fff; margin-bottom: 6px; }
.cta-band p { color: var(--muted); margin: 0; }
.steps { display: grid; gap: 18px; counter-reset: step; }
.step { position: relative; padding: 22px 22px 22px 68px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.step::before {
  counter-increment: step; content: counter(step); position: absolute; left: 20px; top: 20px;
  width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand);
  font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.quote { border-left: 3px solid var(--brand); padding: 4px 0 4px 18px; color: var(--ink-2); font-size: 17px; }
.pill {
  display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--brand-soft); color: var(--brand);
}
.badge { display: inline-block; padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 700; background: var(--brand-soft); color: var(--brand); }
.badge.is-green { background: var(--brand-soft); color: var(--brand); }
.badge.is-gray { background: rgba(255, 255, 255, .07); color: #b4b4b4; }

/* ---------- tabs ---------- */
.tabs { display: grid; gap: 22px; }
.tab-list { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.tab-list button {
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2); padding: 10px 18px;
  border-radius: 999px; font-size: 15px; font-weight: 600; cursor: pointer;
}
.tab-list button.is-active { background: var(--brand); border-color: var(--brand); color: #101010; }
.section.is-ink .tab-list button { background: rgba(255, 255, 255, .05); border-color: var(--line-strong); color: var(--ink-2); }
.section.is-ink .tab-list button.is-active { background: var(--card); color: var(--brand-dark); }
.tab-panel[hidden] { display: none; }

/* ---------- accordion ---------- */
.accordion { display: grid; gap: 12px; }
.accordion-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.accordion-head {
  width: 100%; text-align: left; background: none; border: 0; padding: 18px 20px; font-size: 16px;
  font-weight: 600; color: var(--ink); cursor: pointer; display: flex; justify-content: space-between; gap: 14px;
}
.accordion-head::after { content: "+"; color: var(--brand); font-weight: 800; }
.accordion-item.is-open .accordion-head::after { content: "–"; }
.accordion-body { display: none; padding: 0 20px 18px; color: var(--muted); }
.accordion-item.is-open .accordion-body { display: block; }

/* ---------- data tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-sm); }
table.data-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
table.data-table th, table.data-table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data-table thead th { background: #181818; color: var(--ink); font-weight: 700; font-size: 14px; }
table.data-table tbody tr:last-child td { border-bottom: 0; }
table.data-table tbody tr:hover { background: #202020; }
table.data-table td.is-center, table.data-table th.is-center { text-align: center; }
table.data-table .yes { color: var(--brand); font-weight: 700; }
table.data-table .no { color: #6f6f6f; }

/* ---------- pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; align-items: stretch; }
.plan-card { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px 24px; box-shadow: var(--shadow-sm); }
.plan-card.is-popular { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand-line), 0 18px 44px rgba(0, 0, 0, .5); }
.plan-badge { position: absolute; top: -12px; left: 24px; background: var(--brand); color: #101010; font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; }
.plan-card h3 { font-size: 20px; margin-bottom: 4px; }
.plan-tagline { color: var(--muted); font-size: 14px; min-height: 42px; }
.plan-price { font-size: 34px; font-weight: 800; color: var(--ink); line-height: 1.1; margin: 10px 0 2px; }
.plan-price small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 6px; }
.plan-meta { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.plan-features { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 9px; font-size: 14.5px; }
.plan-features li { position: relative; padding-left: 24px; }
.plan-features li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 800; }
.plan-card .btn { margin-top: auto; }
.cycle-switch { display: inline-flex; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; gap: 4px; }
.cycle-switch button { border: 0; background: none; padding: 8px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.cycle-switch button.is-active { background: var(--brand); color: #101010; }

/* ---------- blog ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.post-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .2s; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.post-card .post-cover { aspect-ratio: 16 / 9; background: linear-gradient(135deg, rgba(62, 207, 142, .16), rgba(62, 207, 142, .03)); display: flex; align-items: center; justify-content: center; color: var(--brand); font-weight: 800; font-size: 26px; letter-spacing: .04em; }
.post-card .post-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card h3 { font-size: 18px; margin: 0; }
.post-card h3 a { color: var(--ink); }
.post-card h3 a:hover { color: var(--brand); }
.post-card .post-summary { color: var(--muted); font-size: 14.5px; flex: 1; margin: 0; }
.post-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--muted); }
.post-meta a { color: var(--muted); }
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .06); color: #b4b4b4; font-size: 12.5px; }
.tag:hover { background: var(--brand-soft); color: var(--brand); }
.layout-with-side { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
@media (max-width: 980px) { .layout-with-side { grid-template-columns: 1fr; } }
.sidebar-widget { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 22px; }
.sidebar-widget h3 { font-size: 16px; margin-bottom: 14px; }
.sidebar-widget ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 14.5px; }
.sidebar-widget .count { float: right; color: var(--muted); font-size: 13px; }

/* ---------- docs ---------- */
.docs-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 36px; align-items: start; }
@media (max-width: 980px) { .docs-layout { grid-template-columns: 1fr; } }
.docs-side { position: sticky; top: 92px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; max-height: calc(100vh - 120px); overflow: auto; }
.docs-side h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 16px 0 8px; }
.docs-side h3:first-child { margin-top: 0; }
.docs-side ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.docs-side a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--ink-2); font-size: 14.5px; }
.docs-side a:hover { background: rgba(255, 255, 255, .05); }
.docs-side a.is-active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.docs-body { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 38px; box-shadow: var(--shadow-sm); }
@media (max-width: 680px) { .docs-body { padding: 22px; } }
.doc-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 14.5px; }

/* ---------- article typography ---------- */
.prose { font-size: 16.5px; line-height: 1.85; color: var(--ink-2); }
.prose > *:first-child { margin-top: 0; }
.prose h2 { margin-top: 1.9em; padding-bottom: .3em; border-bottom: 1px solid var(--line); }
.prose h3 { margin-top: 1.6em; }
.prose h4 { margin-top: 1.4em; color: var(--ink-2); }
.prose a { border-bottom: 1px solid var(--brand-soft); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: .45em; }
.prose blockquote { margin: 1.4em 0; padding: 14px 20px; background: var(--bg-2); border-left: 4px solid var(--brand); border-radius: 0 10px 10px 0; color: var(--muted); }
.prose code { background: rgba(62, 207, 142, .12); padding: 2px 6px; border-radius: 6px; color: var(--brand); }
.prose pre, .md-code { background: var(--code); border: 1px solid var(--line); color: #d6d6d6; padding: 18px 20px; border-radius: 12px; overflow-x: auto; margin: 1.4em 0; }
.prose pre code, .md-code code { background: none; color: inherit; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 15px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; }
.prose th { background: #181818; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose img { border-radius: 12px; }
mark { background: rgba(62, 207, 142, .28); color: #fff; padding: 0 2px; }

/* ---------- inner page hero ---------- */
.page-hero { padding: 54px 0 38px; background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); }
.page-hero h1 { margin-bottom: 10px; }
.page-hero .lede { color: var(--muted); font-size: 17px; max-width: 720px; margin: 0; }
.breadcrumb { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.breadcrumb a { color: var(--muted); }
.breadcrumb i { font-style: normal; color: #4d4d4d; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid .is-full { grid-column: 1 / -1; }
@media (max-width: 680px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.field .error { font-size: 13px; color: #ef8080; }
.field input[type="text"], .field input[type="email"], .field input[type="password"],
.field input[type="tel"], .field input[type="number"], .field input[type="url"], .field select, .field textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 15px; font-family: inherit; color: var(--ink); background: #161616;
}
.field textarea { min-height: 130px; resize: vertical; line-height: 1.7; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.field.is-invalid input, .field.is-invalid textarea, .field.is-invalid select { border-color: #b3554f; }
.checkbox { display: flex; align-items: center; gap: 9px; font-size: 14.5px; }
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow-sm); }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 22px; }
.form-side { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; font-size: 14px; color: var(--muted); }
.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---------- notices, pager, footer ---------- */
.notice-wrap { margin: 18px auto 0; display: grid; gap: 10px; }
.notice { padding: 12px 16px; border-radius: 10px; font-size: 14.5px; border: 1px solid transparent; }
.notice-success { background: rgba(62, 207, 142, .1); border-color: var(--brand-line); color: var(--brand); }
.notice-error { background: rgba(239, 68, 68, .1); border-color: rgba(239, 68, 68, .32); color: #ef8080; }
.notice-warning { background: rgba(245, 158, 11, .1); border-color: rgba(245, 158, 11, .32); color: #f0b354; }
.notice-info { background: rgba(56, 189, 248, .1); border-color: rgba(56, 189, 248, .3); color: #7dd3fc; }
.pager { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 34px; }
.pager-link { min-width: 40px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); color: var(--ink-2); font-size: 14px; text-align: center; }
.pager-link:hover { border-color: var(--brand); color: var(--brand); }
.pager-link.is-current { background: var(--brand); border-color: var(--brand); color: #101010; }
.site-footer { margin-top: 80px; background: #0b0b0b; border-top: 1px solid var(--line); color: var(--muted); padding: 56px 0 24px; }
.footer-inner { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 30px; }
@media (max-width: 980px) { .footer-inner { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-brand .brand-mark { margin-bottom: 14px; }
.footer-slogan { color: #b4b4b4; font-size: 14.5px; max-width: 300px; }
.footer-contact { list-style: none; padding: 0; margin: 0; font-size: 13.5px; display: grid; gap: 6px; }
.footer-contact a { color: var(--muted); }
.footer-group h3 { color: #fff; font-size: 14px; letter-spacing: .04em; margin-bottom: 14px; }
.footer-group ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: 14px; }
.footer-group a { color: var(--muted); }
.footer-group a:hover, .footer-contact a:hover { color: var(--brand); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .09); font-size: 13px; }
.footer-bottom a { color: inherit; text-decoration: none; }
.footer-bottom a:hover { color: var(--brand); text-decoration: underline; }
.footer-links a { margin-left: 16px; color: var(--muted); }

/* ---------- error pages ---------- */
.error-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--bg); }
.error-box { text-align: center; max-width: 520px; padding: 40px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.error-code { font-size: 64px; font-weight: 800; line-height: 1; color: var(--brand); }
.error-actions { display: flex; gap: 12px; justify-content: center; margin-top: 18px; }

/* ---------- text & data utilities ---------- */
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 13px; }
.hero-copy { min-width: 0; }
.badge.is-amber { background: rgba(245, 158, 11, .14); color: #f0b354; }
.badge.is-red { background: rgba(239, 68, 68, .14); color: #ef8080; }
.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 14px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink-2); word-break: break-all; }
.kv dd .badge { margin-top: 4px; }

/* ---------- filter / search bar (blog, docs, search) ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.filter-bar input[type="text"], .filter-bar input[type="search"], .filter-bar select {
  flex: 1 1 240px; min-width: 0; padding: 11px 14px; border: 1px solid var(--line);
  border-radius: 10px; font-size: 15px; font-family: inherit; color: var(--ink); background: #161616;
}
.filter-bar input:focus, .filter-bar select:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.filter-bar .spacer { flex: 1; }

@media (max-width: 680px) {
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dt:not(:first-child) { margin-top: 10px; }
  .kv dd { margin-bottom: 2px; }
  .filter-bar input[type="text"], .filter-bar input[type="search"], .filter-bar select { flex: 1 1 100%; }
}

/* ---------- dark theme extras (supabase palette) ---------- */
::selection { background: rgba(62, 207, 142, .28); color: #fff; }
a:hover { color: #7ce0ae; }
input::placeholder, textarea::placeholder { color: #6b6b6b; }
:focus-visible { outline: 2px solid var(--brand-line); outline-offset: 2px; }
* { scrollbar-width: thin; scrollbar-color: #3d3d3d transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333333; border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #454545; }
img.brand-mark { width: 34px; height: 34px; }
.footer-brand img.brand-mark { width: 32px; height: 32px; }
.site-nav .btn-outline { border-color: var(--line-strong); }
.hero .btn-light { border-color: var(--line-strong); }
.section.is-ink + .section.is-ink { border-top: 1px solid var(--line); }
.page-hero .breadcrumb a:hover { color: var(--brand); }

