/* AiSC Help Center — Phase 1 */
:root {
  --paper: #fcfcfc;
  --panel: #ffffff;
  --ink: #3c3f5e;
  --muted: #7f828e;
  --line: #d8dde6;
  --navy: #1f2430;
  --primary: #6366f1;
  --primary-soft: rgba(99, 102, 241, 0.08);
  --positive: #3b7e1d;
  --warning: #f28c28;
  --danger: #ca4234;
  --info: #00a8c8;
  --radius: 12px;
  --shadow: 0 10px 30px -18px rgba(31, 36, 48, 0.35);
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --sidebar-w: 280px;
  --max: 1100px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

/* Top bar */
.hc-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: rgba(252, 252, 252, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.hc-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
}

.hc-brand:hover {
  text-decoration: none;
}

.hc-brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

.hc-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.hc-brand-text small {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.hc-top-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.hc-btn:hover {
  text-decoration: none;
  border-color: #c5cae8;
}

.hc-btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.hc-btn-primary:hover {
  filter: brightness(1.05);
}

.hc-menu-toggle {
  display: none;
}

/* Layout */
.hc-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  max-width: 1280px;
  margin: 0 auto;
  min-height: calc(100vh - 64px);
}

.hc-sidebar {
  position: sticky;
  top: 64px;
  align-self: start;
  height: calc(100vh - 64px);
  overflow: auto;
  padding: 1.25rem 1rem 2rem;
  border-right: 1px solid var(--line);
  background: #f7f8fb;
}

.hc-nav-label {
  margin: 1.1rem 0.6rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.hc-nav a {
  display: block;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  color: var(--ink);
  font-size: 0.92rem;
  text-decoration: none;
}

.hc-nav a:hover {
  background: rgba(99, 102, 241, 0.08);
  text-decoration: none;
}

.hc-nav a.is-active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

.hc-main {
  padding: 1.75rem 1.5rem 3rem;
}

.hc-article {
  max-width: 760px;
}

.hc-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.hc-breadcrumb a {
  color: var(--muted);
}

.hc-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
}

.hc-article h1 {
  margin: 0 0 0.75rem;
  color: var(--navy);
  font-size: clamp(1.75rem, 3vw, 2.15rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hc-lead {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.hc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.75rem;
}

.hc-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: #eef0f6;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.hc-article h2 {
  margin: 2rem 0 0.75rem;
  color: var(--navy);
  font-size: 1.25rem;
}

.hc-article h3 {
  margin: 1.4rem 0 0.5rem;
  color: var(--navy);
  font-size: 1.05rem;
}

.hc-article p,
.hc-article ul,
.hc-article ol {
  margin: 0 0 1rem;
}

.hc-article ul,
.hc-article ol {
  padding-left: 1.25rem;
}

.hc-article li {
  margin: 0.25rem 0;
}

.hc-callout {
  margin: 1.25rem 0;
  padding: 0.95rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hc-callout strong {
  display: block;
  margin-bottom: 0.25rem;
}

.hc-callout.tip {
  border-color: rgba(59, 126, 29, 0.25);
  background: rgba(59, 126, 29, 0.06);
}

.hc-callout.note {
  border-color: rgba(0, 168, 200, 0.25);
  background: rgba(0, 168, 200, 0.06);
}

.hc-callout.warn {
  border-color: rgba(242, 140, 40, 0.3);
  background: rgba(242, 140, 40, 0.08);
}

.hc-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.hc-steps > li {
  position: relative;
  margin: 0 0 0.85rem;
  padding: 0.95rem 1rem 0.95rem 3.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.hc-steps > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0.85rem;
  top: 0.95rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.hc-kbd {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f3f4f8;
  font-family: var(--mono);
  font-size: 0.82rem;
}

.hc-related {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.hc-related ul {
  list-style: none;
  padding: 0;
}

.hc-related li {
  margin: 0.4rem 0;
}

.hc-footer {
  margin-top: 2.5rem;
  padding: 1rem 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

/* Home */
.hc-hero {
  margin-bottom: 1.75rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(circle at 12% 20%, rgba(99, 102, 241, 0.12), transparent 45%),
    radial-gradient(circle at 90% 10%, rgba(0, 168, 200, 0.1), transparent 40%),
    var(--panel);
}

.hc-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.9rem, 3.5vw, 2.4rem);
}

.hc-search {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
}

.hc-search input {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.hc-search input:focus {
  outline: 2px solid rgba(99, 102, 241, 0.35);
  border-color: var(--primary);
}

.hc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.hc-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.hc-card:hover {
  border-color: #c5cae8;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  text-decoration: none;
}

.hc-card h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.05rem;
}

.hc-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.hc-card-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary);
}

@media (max-width: 900px) {
  .hc-menu-toggle {
    display: inline-flex;
  }

  .hc-shell {
    grid-template-columns: 1fr;
  }

  .hc-sidebar {
    position: fixed;
    inset: 64px auto 0 0;
    width: min(86vw, var(--sidebar-w));
    z-index: 30;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow);
  }

  body.nav-open .hc-sidebar {
    transform: translateX(0);
  }

  .hc-backdrop {
    display: none;
    position: fixed;
    inset: 64px 0 0;
    background: rgba(31, 36, 48, 0.35);
    z-index: 25;
  }

  body.nav-open .hc-backdrop {
    display: block;
  }
}
