:root {
  color: #0b1d3a;
  background: #dfeaf8;
  --ink: #0b1d3a;
  --muted: #637087;
  --line: #e7edf5;
  --paper: #ffffff;
  --page: #dfeaf8;
  --green: #00a77a;
  --green-dark: #008d67;
  --green-soft: #e6f8f2;
  --surface-soft: #f8fafc;
  --stage-bg: #dfeaf8;
  --stage-glow: rgba(255, 255, 255, 0.72);
  --shadow-card: 0 18px 44px rgba(31, 45, 68, 0.045);
  --shadow-panel: 0 24px 68px rgba(31, 45, 68, 0.07);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  min-height: 100%;
  max-width: 100%;
  overflow-x: clip;
  background: var(--page);
}

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  min-width: 320px;
  min-height: 100dvh;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 8%, var(--stage-glow), transparent 28rem),
    linear-gradient(180deg, var(--stage-bg) 0%, var(--page) 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.68;
}

main {
  --app-width: min(1560px, calc(100vw - clamp(28px, 8vw, 160px)));
  --app-y: clamp(20px, 5vh, 52px);
  --app-pad: 22px;
  --sidebar-width: 284px;
  width: var(--app-width);
  min-height: calc(100vh - clamp(42px, 8vh, 104px));
  margin: var(--app-y) auto;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 22px;
  padding: var(--app-pad);
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 34px 100px rgba(22, 43, 74, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

a {
  color: var(--green-dark);
  font-weight: 800;
}

.hero,
.seo-sidebar,
.seo-workspace > section,
.phrase-detail > section,
.cta {
  min-width: 0;
  border: 1px solid rgba(232, 238, 247, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-card);
}

.seo-sidebar {
  position: sticky;
  z-index: 20;
  top: calc(var(--app-y) + var(--app-pad));
  height: calc(100dvh - (var(--app-y) * 2) - (var(--app-pad) * 2));
  min-height: 0;
  max-height: none;
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  color: var(--ink);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 22px 54px rgba(31, 45, 68, 0.055);
}

.seo-sidebar::-webkit-scrollbar {
  display: none;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 8px 12px;
  color: var(--ink);
  text-decoration: none;
}

.sidebar-logo {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(11, 29, 58, 0.12);
}

.sidebar-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.sidebar-brand strong {
  display: block;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0;
}

.sidebar-brand small {
  display: block;
  margin-top: 6px;
  color: #8a8d93;
  font-size: 14px;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

.sidebar-nav a {
  position: relative;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  color: #5d6674;
  border-radius: 8px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  text-align: left;
  box-shadow: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.sidebar-nav a::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 13px;
  width: 3px;
  height: 22px;
  border-radius: 999px;
  background: transparent;
  transition: background 0.18s ease;
}

.sidebar-nav a:hover {
  color: var(--ink);
  background: #f4f8fc;
}

.sidebar-nav a.active {
  color: #10213d;
  background: color-mix(in srgb, var(--green-soft) 64%, #f5f8fc);
}

.sidebar-nav a.active::before {
  background: var(--green);
}

.nav-symbol {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: currentColor;
}

.nav-symbol svg {
  width: 25px;
  height: 25px;
  display: block;
}

.sidebar-profile {
  margin-top: auto;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--paper) 78%, var(--surface-soft));
  box-shadow: inset 0 0 0 1px rgba(231, 237, 245, 0.82);
}

.sidebar-avatar {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  border-radius: 999px;
  background: var(--green);
  font-size: 14px;
  font-weight: 900;
}

.sidebar-profile strong,
.sidebar-profile small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-profile strong {
  color: var(--ink);
  font-size: 15px;
  margin: 0 0 3px;
}

.seo-workspace {
  grid-column: 2;
  display: grid;
  align-content: start;
  gap: 18px;
  min-width: 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 8px;
  margin: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

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

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: #9aa7bb;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 5vw, 48px);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -8% -42% auto;
  width: min(360px, 46vw);
  aspect-ratio: 1;
  border-radius: 999px;
  background: color-mix(in srgb, var(--green-soft) 70%, #ffffff);
  opacity: 0.72;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  color: var(--green-dark);
  border-radius: 8px;
  background: var(--green-soft);
  font-size: 14px;
  font-weight: 900;
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.18;
  letter-spacing: 0;
}

h1 {
  max-width: 980px;
  margin: 18px 0 14px;
  font-size: clamp(34px, 5vw, 64px);
}

h2 {
  margin: 0 0 18px;
  font-size: 24px;
}

h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

p,
li,
span,
small {
  color: var(--muted);
}

.lead {
  max-width: 820px;
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.translation {
  margin: 0 0 18px;
  color: var(--green-dark);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 900;
}

.seo-workspace > section,
.phrase-detail > section {
  padding: 24px;
}

.phrase-detail {
  display: grid;
  gap: 18px;
}

.grid,
.topic-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.grid li,
.phrase-list li,
.faq-list article,
.topic-links a {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.grid strong,
.phrase-list strong,
.topic-links strong,
.faq-list h3 {
  color: var(--ink);
}

.topic-links a {
  display: grid;
  gap: 6px;
  text-decoration: none;
}

.phrase-list,
.faq-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.phrase-list strong {
  display: block;
}

.phrase-list span {
  display: block;
  margin-top: 4px;
}

.cta {
  margin-top: 0;
  padding: 22px;
  background: var(--green-soft);
}

.cta a {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  color: #ffffff;
  border-radius: 8px;
  background: var(--green-dark);
  text-decoration: none;
  box-shadow: 0 14px 28px rgba(0, 141, 103, 0.18);
}

@media (max-width: 1180px) {
  main {
    --sidebar-width: 92px;
    width: 100%;
    min-height: 100dvh;
    margin: 0;
    padding: 0 0 0 var(--sidebar-width);
    display: block;
    border-radius: 0;
  }

  .seo-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100dvh;
    min-height: auto;
    padding: 20px 12px;
    border-radius: 0;
  }

  .sidebar-brand {
    justify-content: center;
    padding: 0;
    gap: 0;
  }

  .sidebar-logo {
    width: 48px;
    height: 48px;
  }

  .sidebar-nav a {
    justify-content: center;
    padding: 0;
    font-size: 0;
  }

  .sidebar-nav a::before {
    left: -12px;
  }

  .sidebar-brand > span:not(.sidebar-logo),
  .nav-label,
  .sidebar-profile {
    display: none;
  }

  .seo-workspace {
    grid-column: auto;
    width: 100%;
    max-width: 100vw;
    min-height: 100dvh;
    padding: 18px 18px 24px;
  }
}

@media (max-width: 640px) {
  main {
    --sidebar-width: 76px;
    width: 100%;
    min-height: 100dvh;
    margin: 0;
    padding: 0 0 0 var(--sidebar-width);
    border: 0;
    border-radius: 0;
  }

  .seo-sidebar {
    width: var(--sidebar-width);
    padding: 16px 10px;
    gap: 18px;
  }

  .sidebar-logo {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .nav-symbol {
    width: 26px;
    height: 26px;
  }

  .nav-symbol svg {
    width: 23px;
    height: 23px;
  }

  .seo-workspace {
    padding: 12px 12px 20px;
  }

  .hero,
  .seo-sidebar,
  .seo-workspace > section,
  .phrase-detail > section,
  .cta {
    border-radius: 14px;
  }

  .hero,
  .seo-workspace > section,
  .phrase-detail > section {
    padding: 20px;
  }

  h1 {
    font-size: clamp(30px, 10vw, 42px);
  }

  .lead {
    font-size: 16px;
  }
}
