:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --panel-soft: #f9fbfe;
  --text: #1f2937;
  --muted: #667085;
  --line: #e5eaf1;
  --accent: #2f6fed;
  --accent-soft: #eaf1ff;
  --shadow: 0 18px 45px rgba(31, 41, 55, .08);
  --sidebar-width: 276px;
  --header-height: 68px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 8%, rgba(47,111,237,.10) 0, transparent 30rem),
    radial-gradient(circle at 95% 95%, rgba(16,185,129,.08) 0, transparent 28rem),
    var(--bg);
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  font-size: 16px;
}
a { color: inherit; }
.page-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(14px, 3vw, 36px);
  border-bottom: 1px solid rgba(229,234,241,.9);
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-left, .header-right { display: flex; align-items: center; gap: 14px; }
.header-right { color: var(--muted); font-size: 13px; }
.status-dot { width: 8px; height: 8px; border-radius: 999px; background: #12b76a; box-shadow: 0 0 0 4px rgba(18,183,106,.12); }
.hard-refresh-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: #344054;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(31,41,55,.05);
}
.hard-refresh-btn:hover { color: var(--accent); border-color: rgba(47,111,237,.28); background: var(--panel-soft); }
.refresh-icon { font-size: 16px; line-height: 1; }
.desktop-status { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }

.sidebar-toggle {
  width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; padding: 0 10px;
  cursor: pointer; box-shadow: 0 6px 18px rgba(31,41,55,.05);
}
.sidebar-toggle span { display: block; height: 2px; background: #344054; border-radius: 2px; }
.brand { text-decoration: none; display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--accent); font-weight: 800; }
.brand strong { display: block; font-size: 16px; line-height: 1.1; }
.brand em { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; font-style: normal; }
.layout { flex: 1; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 0; }
.sidebar {
  width: var(--sidebar-width);
  border-right: 1px solid var(--line);
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(12px);
  padding: 18px 12px;
  overflow-y: auto;
  transition: transform .22s ease, box-shadow .22s ease;
  z-index: 15;
}
.sidebar-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 10px 12px; color: var(--muted); }
.sidebar-head strong { color: var(--text); }
.sidebar-head small { font-size: 12px; }
.nav-group { margin-bottom: 6px; }
.nav-title, .nav-link {
  width: 100%; min-height: 38px; border: 0; border-radius: 10px; background: transparent;
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; color: #344054;
  text-decoration: none; font: inherit; text-align: left; cursor: pointer;
}
.nav-title:hover, .nav-link:hover { background: var(--panel-soft); color: var(--accent); }
.nav-title .arrow { width: 14px; font-size: 10px; color: var(--muted); transition: transform .18s ease; }
.nav-group.open > .nav-title .arrow { transform: rotate(90deg); }
.nav-children { display: none; margin: 2px 0 8px 24px; padding-left: 10px; border-left: 1px solid var(--line); }
.nav-group.open > .nav-children { display: block; }
.nav-link { font-size: 14px; color: var(--muted); }
.nav-title.active,
.nav-link.active { color: var(--accent); background: var(--accent-soft); font-weight: 650; }
.content { padding: clamp(22px, 4vw, 48px); overflow: auto; }
.content-section { display: none; max-width: 1120px; margin: 0 auto; }
.content-section.active { display: block; animation: fadeIn .16s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 760px; font-size: clamp(34px, 5vw, 58px); line-height: 1.08; letter-spacing: -.04em; }
h2 { font-size: clamp(26px, 3vw, 38px); letter-spacing: -.02em; }
h3 { font-size: 18px; }
p { color: var(--muted); line-height: 1.8; }
.hero-text { max-width: 760px; font-size: 18px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0; }
.button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 8px 16px; border-radius: 12px; border: 1px solid var(--line); background: #fff; text-decoration: none; font-weight: 650; }
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.feature-grid, .tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.feature-card, .tool-card, .plain-card, .note-box {
  border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.86); box-shadow: var(--shadow); padding: 22px;
}
.tool-card { text-decoration: none; display: block; }
.tool-card:hover { border-color: rgba(47,111,237,.35); transform: translateY(-1px); }
.tool-card strong { display: block; margin: 8px 0; }
.list-card { border: 1px solid var(--line); border-radius: 18px; background: #fff; overflow: hidden; box-shadow: var(--shadow); }
.list-card a { display: flex; justify-content: space-between; gap: 20px; padding: 18px 22px; text-decoration: none; border-bottom: 1px solid var(--line); }
.list-card a:last-child { border-bottom: 0; }
.list-card a:hover { background: var(--panel-soft); }
.list-card span { color: var(--muted); }
.note-box { color: var(--muted); background: var(--panel-soft); }
.svg-icon { width: 34px; height: 34px; display: inline-block; border-radius: 12px; background: var(--accent-soft); position: relative; }
.svg-icon::before, .svg-icon::after { content: ""; position: absolute; border-radius: 4px; }
.svg-icon.tool::before { inset: 8px; border: 2px solid var(--accent); }
.svg-icon.tool::after { width: 14px; height: 2px; background: var(--accent); left: 10px; top: 16px; }
.svg-icon.note::before { left: 9px; top: 7px; width: 16px; height: 20px; border: 2px solid var(--accent); }
.svg-icon.note::after { left: 13px; top: 14px; width: 9px; height: 2px; background: var(--accent); box-shadow: 0 5px 0 var(--accent); }
.svg-icon.map::before { left: 9px; top: 6px; width: 16px; height: 22px; background: var(--accent); clip-path: polygon(50% 100%, 0 38%, 0 18%, 18% 0, 82% 0, 100% 18%, 100% 38%); }
.svg-icon.map::after { left: 14px; top: 11px; width: 6px; height: 6px; background: #fff; border-radius: 50%; }
.svg-icon.data::before { left: 8px; right: 8px; top: 8px; height: 6px; border: 2px solid var(--accent); border-radius: 50%; box-shadow: 0 7px 0 -2px var(--accent), 0 14px 0 -2px var(--accent); }
.svg-icon.web::before { inset: 8px; border: 2px solid var(--accent); border-radius: 50%; }
.svg-icon.web::after { left: 9px; right: 9px; top: 16px; height: 2px; background: var(--accent); box-shadow: 0 -5px 0 -1px var(--accent), 0 5px 0 -1px var(--accent); }
.site-footer { min-height: 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; display: flex; gap: 18px; justify-content: center; align-items: center; background: rgba(255,255,255,.72); }
.edge-hotspot { position: fixed; left: 0; top: var(--header-height); bottom: 0; width: 10px; z-index: 30; }
body.sidebar-collapsed .layout { grid-template-columns: 0 minmax(0, 1fr); }
body.sidebar-collapsed .sidebar { transform: translateX(calc(-1 * var(--sidebar-width))); box-shadow: none; }
body.sidebar-collapsed.sidebar-peek .sidebar { transform: translateX(0); position: fixed; top: var(--header-height); bottom: 48px; left: 0; box-shadow: 20px 0 40px rgba(31,41,55,.12); }
@media (max-width: 768px) {
  :root { --header-height: 64px; }
  .brand em { display: none; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; top: var(--header-height); left: 0; bottom: 0; transform: translateX(calc(-1 * var(--sidebar-width))); box-shadow: 20px 0 40px rgba(31,41,55,.12); }
  body:not(.sidebar-collapsed) .sidebar, body.sidebar-peek .sidebar { transform: translateX(0); }
  .content { padding: 22px 16px 34px; }
  h1 { font-size: 34px; }
  .feature-grid, .tool-grid { grid-template-columns: 1fr; }
  .list-card a { flex-direction: column; gap: 4px; }
  .site-footer { flex-direction: column; gap: 2px; padding: 10px; }
}
.text-link { display: inline-flex; margin-top: 8px; color: var(--accent); text-decoration: none; font-weight: 650; }
.text-link:hover { text-decoration: underline; }
.mt-24 { margin-top: 24px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

/* ===== v2: mobile compatibility fix and conference-style simplification ===== */
html, body { width: 100%; overflow-x: hidden; }
.content, .content-section, .plain-card, .feature-card, .tool-card, .list-card { min-width: 0; }
.content-section { width: 100%; }
h1, h2, h3, p, a, strong, span { overflow-wrap: break-word; }
.drawer-backdrop { display: none; }

@media (min-width: 769px) {
  body.sidebar-collapsed .content { padding-left: clamp(28px, 5vw, 64px); }
}

@media (max-width: 768px) {
  :root {
    --header-height: 64px;
    --sidebar-width: min(82vw, 320px);
  }

  body {
    font-size: 15px;
    background:
      radial-gradient(circle at 0 0, rgba(47,111,237,.10) 0, transparent 18rem),
      radial-gradient(circle at 100% 100%, rgba(16,185,129,.08) 0, transparent 18rem),
      var(--bg);
  }

  .page-shell { width: 100%; }
  .site-header {
    padding: 0 14px;
    gap: 10px;
  }
  .header-right {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
  }
  .desktop-status { display: none; }
  .hard-refresh-btn {
    min-height: 44px;
    height: 44px;
    padding: 0 14px;
    border-radius: 14px;
    font-size: 14px;
  }
  .hard-refresh-btn .refresh-text { display: inline; }

  .header-left { min-width: 0; gap: 10px; }
  .sidebar-toggle {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border-radius: 14px;
  }
  .brand { min-width: 0; flex: 1 1 auto; }
  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    flex: 0 0 auto;
  }
  .brand strong {
    font-size: 17px;
    max-width: calc(100vw - 184px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .layout {
    display: block !important;
    width: 100%;
    min-height: calc(100vh - var(--header-height));
  }

  .content {
    display: block;
    width: 100%;
    max-width: none;
    min-width: 0;
    padding: 22px 16px 34px;
    overflow: visible;
  }

  .content-section {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
  }

  .hero {
    padding-top: 6px;
  }

  h1 {
    font-size: clamp(30px, 8.5vw, 38px);
    line-height: 1.12;
    letter-spacing: -.03em;
  }
  h2 {
    font-size: clamp(24px, 7vw, 32px);
    line-height: 1.18;
  }
  h3 { font-size: 18px; }
  p { line-height: 1.75; }
  .hero-text { font-size: 16px; }

  .hero-actions,
  .card-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .button {
    width: 100%;
    min-height: 44px;
    border-radius: 14px;
  }

  .feature-grid,
  .tool-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .feature-card,
  .tool-card,
  .plain-card,
  .note-box,
  .list-card {
    border-radius: 20px;
    box-shadow: 0 12px 30px rgba(31,41,55,.07);
  }

  .list-card a {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .sidebar {
    position: fixed !important;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    max-width: 320px;
    padding: 18px 12px 28px;
    background: rgba(255,255,255,.96);
    transform: translateX(-105%) !important;
    box-shadow: none;
    z-index: 100;
    border-right: 1px solid var(--line);
    -webkit-overflow-scrolling: touch;
  }

  body:not(.sidebar-collapsed) .sidebar,
  body.sidebar-peek .sidebar {
    transform: translateX(0) !important;
    box-shadow: 20px 0 48px rgba(31,41,55,.18);
  }

  .drawer-backdrop {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    top: var(--header-height);
    bottom: 0;
    background: rgba(15,23,42,.28);
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s ease, visibility .18s ease;
    z-index: 90;
  }

  body:not(.sidebar-collapsed) .drawer-backdrop,
  body.sidebar-peek .drawer-backdrop {
    opacity: 1;
    visibility: visible;
  }

  .edge-hotspot { display: none; }
  .site-footer {
    flex-direction: column;
    gap: 2px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    text-align: center;
  }
}

@media (max-width: 390px) {
  .content { padding-left: 14px; padding-right: 14px; }
  .brand strong { font-size: 16px; max-width: calc(100vw - 178px); }
}
