/* 美国Google账号购买指南 — 本地样式，无外部依赖 */
:root {
  --bg-page: #ffffff;
  --bg-paper: #ffffff;
  --text: #1a1a1a;
  --text-muted: #666666;
  --border-sidebar: #e8e8e8;
  --nav-active-bg: #1a1a1a;
  --nav-active-fg: #ffffff;
  --nav-inactive: #757575;
  --nav-icon-inactive: #8a8a8a;
  --accent-blue: #1e6bd6;
  --header-bar: #000000;
  --radius-banner: 12px;
  --container-max: 1120px;
  --gap-page: clamp(16px, 4vw, 56px);
  /* 顶栏与下方内容区间距（小于左右留白） */
  --gap-below-topbar: 8px;
  /* 正文基准字号：随视口略调，版权等用 em / calc 与之成比例 */
  --font-size-body: clamp(14px, 0.25vw + 13.5px, 16px);
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg-page);
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: var(--font-size-body);
  line-height: 1.75;
  color: var(--text);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

/* 视口顶通栏 + Google 标识 */
.top-bar {
  width: 100%;
  background: var(--header-bar);
  color: #fff;
}

.top-bar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 10px 16px;
}

.top-bar__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  text-decoration: none;
  border-radius: 4px;
}

.top-bar__logo:focus {
  outline: none;
}

.top-bar__logo:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.google-logo {
  display: block;
  width: 28px;
  height: 28px;
}

.page-shell {
  min-height: 100vh;
  padding: var(--gap-below-topbar) var(--gap-page) var(--gap-page);
}

.page-footer {
  max-width: var(--container-max);
  margin: 1em auto 0;
  padding: 0.75em 0 0.25em;
  text-align: center;
}

.page-footer__text {
  margin: 0;
  /* 约为正文的 93%，随 --font-size-body 同步缩放 */
  font-size: calc(var(--font-size-body) * 0.93);
  line-height: 1.65;
  color: var(--text-muted);
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  background: var(--bg-paper);
  border: 1px solid #eaeaea;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* 两栏 */
.layout {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

.sidebar {
  flex: 1 1 220px;
  max-width: 100%;
  border-right: 1px solid var(--border-sidebar);
  background: #fff;
}

@media (min-width: 768px) {
  .sidebar {
    flex: 0 0 25%;
    max-width: 25%;
  }

  .main {
    flex: 1 1 0;
    min-width: 0;
  }
}

/* 侧栏标题区：白底、Google 小图标、粗体标题、底部分隔线 */
.sidebar__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 14px 14px;
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
}

.sidebar__head-mark {
  display: flex;
  flex-shrink: 0;
}

.sidebar__head-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar__head-google {
  display: block;
  width: 22px;
  height: 22px;
  vertical-align: middle;
}

.sidebar__head-text {
  font-size: 1em;
  font-weight: 700;
  color: #000;
  letter-spacing: 0.02em;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  padding: 6px 0 18px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  color: var(--nav-inactive);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.35;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-link:hover:not(.nav-link--active) {
  background: #f5f5f5;
  color: #444;
}

.nav-link--active {
  background: var(--nav-active-bg);
  color: var(--nav-active-fg);
}

.nav-link--active:hover {
  background: var(--nav-active-bg);
  color: var(--nav-active-fg);
}

.nav-link__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nav-icon-inactive);
}

.nav-link__icon-img {
  display: block;
  width: 20px;
  height: 20px;
  filter: none;
}

.nav-link--active .nav-link__icon-img {
  /* 导航图标是灰色线框：用反相变白，避免额外维护两套 SVG */
  filter: brightness(0) invert(1);
}

.nav-link:focus {
  outline: none;
}

.nav-link:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* 主内容 */
.main {
  flex: 1 1 320px;
  padding: 28px 32px 40px;
}

@media (max-width: 767px) {
  .main {
    padding: 20px 18px 32px;
  }

  .layout {
    flex-direction: column;
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border-sidebar);
  }

  /* 手机端导航：与稿一致 — 标题下浅灰线、黑圆+Google、两列网格、选中纯黑底 */
  .sidebar__head {
    border-bottom: 1px solid #eeeeee;
    padding: 18px 14px 14px;
  }

  .sidebar__head-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #000;
  }

  .sidebar__head-google {
    width: 17px;
    height: 17px;
  }

  .sidebar__nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 18px 12px 20px;
  }

  .nav-link {
    min-height: 52px;
    padding: 12px 10px;
    border-radius: 0;
    font-size: 13px;
    color: #666666;
    align-items: center;
  }

  .nav-link:hover:not(.nav-link--active) {
    background: #f8f8f8;
    color: #555;
  }

  .nav-link__icon {
    color: #888888;
  }

  .nav-link--active {
    background: #000000;
    color: #ffffff;
  }

  .nav-link--active:hover {
    background: #000000;
    color: #ffffff;
  }

  .nav-link--active .nav-link__icon {
    color: #ffffff;
  }

  .nav-link--full {
    grid-column: 1 / -1;
  }
}

.article-header {
  margin-bottom: 20px;
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

/* 横幅：深色卡片 + 左（圆标+双行文案）右「立即购买」 */
.hero-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  /* 桌面端加高；小屏在下方 media 中覆盖 min-height / padding */
  min-height: 128px;
  padding: 34px 28px;
  border-radius: 12px;
  background: #1a1a1a;
  color: #fff;
}

.hero-banner__left {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 15px;
  flex: 1;
  min-width: 0;
}

.hero-banner__badge {
  flex-shrink: 0;
  padding: 10px;
  border-radius: 50%;
  background: #2b2b2b;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-banner__google {
  display: block;
}

.hero-banner__text {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.hero-banner__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: #ffffff;
}

.hero-banner__subtitle {
  margin: 0;
  font-size: 0.8125em;
  font-weight: 400;
  line-height: 1.4;
  color: #ffffff;
}

.hero-banner__cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 40px;
  padding: 10px 28px;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  color: #ffffff;
  background: #ffb800;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease;
}

.hero-banner__cta:hover {
  background: #e6a500;
  text-decoration: none;
}

.hero-banner__cta:active {
  background: #cc9400;
}

.hero-banner__cta:focus {
  outline: none;
}

.hero-banner__cta:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.35);
  outline-offset: 2px;
  border-radius: 5px;
}

.content-section {
  margin-bottom: 36px;
}

.content-section:last-of-type {
  margin-bottom: 24px;
}

h2 {
  margin: 0 0 18px;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.35;
}

h3 {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin: 22px 0 12px;
  padding-left: 14px;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.45;
}

.h3-bar {
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 4px;
  height: 1.1em;
  background: var(--accent-blue);
  border-radius: 2px;
}

h4 {
  margin: 16px 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
}

p {
  margin: 0 0 12px;
  color: #333;
}

p strong {
  color: #222;
}

.related-block {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.related-block__title {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.related-block__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.related-block__list li {
  margin: 0 0 10px;
  padding: 0;
  line-height: 1.5;
}

.related-block__list li:last-child {
  margin-bottom: 0;
}

.related-block__list a {
  color: var(--accent-blue);
  text-decoration: none;
  font-size: 14px;
}

.related-block__list a:hover {
  text-decoration: underline;
}

.related-block__list a:focus {
  outline: none;
}

.related-block__list a:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .hero-banner {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 18px;
    min-height: 0;
    padding: 22px 18px;
  }

  .hero-banner__left {
    width: 100%;
  }

  .hero-banner__cta {
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    display: inline-flex;
    align-self: center;
  }
}
