:root {
  --surface: var(--glass-bg);
  --ink: var(--uc-ink);
  --muted: var(--uc-ink-med);
  --line: rgba(var(--md-primary-rgb), .11);
  --accent: var(--md-primary);
  --accent-soft: rgba(var(--md-primary-rgb), .07);
  --link: var(--uc-primary-deep);
  --radius: 20px;
  --cover-bg: #e5effd;
  --cover-shape: #bde9ef;
  --cover-shape-alt: #c8dafa;
  --cover-ink: #183b62;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --cover-bg: #243954;
  --cover-shape: #2b5661;
  --cover-shape-alt: #334c78;
  --cover-ink: #e0efff;
  color-scheme: dark;
}
body.editorial-page { font-size: 14px; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
button, input, kbd { color: inherit; }
:focus-visible { outline: 2px solid var(--uc-focus); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.shell { width: min(1456px, calc(100% - 24px)); margin-inline: auto; position: relative; }
.icon {
  width: 16px;
  height: 16px;
  flex: none;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.skip { position: absolute; z-index: 1; left: 12px; top: 12px; padding: 10px; background: var(--accent); color: var(--md-on-primary); transform: translateY(-160%); }
.skip:focus { transform: none; }
.shop-nav__item { white-space: nowrap; }
.editorial-theme { background: transparent; color: var(--uc-ink); }
.editorial-theme[aria-pressed="true"] { background: var(--accent-soft); }
.editorial-menu {
  position: fixed; inset: 0 auto 0 0; margin: 0; padding: 16px 12px;
  width: min(82vw, 320px); height: 100%; max-height: none;
  background: var(--glass-bg-strong); color: var(--ink);
  border: 0; border-right: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-filter);
}
.editorial-menu::backdrop { background: rgba(20, 22, 30, .32); }
.editorial-menu-heading { display: flex; align-items: start; justify-content: space-between; gap: 5px; }
.editorial-menu-heading button { background: transparent; color: var(--ink); }

.hero.hmg-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  margin: 24px 0 18px;
}
.hero.hmg-hero p { font-size: 14px; line-height: 1.65; }
.hero-art { width: 100%; aspect-ratio: 480 / 205; height: auto; max-height: 132px; display: block; justify-self: end; }
.search input {
  width: 100%; min-height: 40px; padding: 8px 13px; border-radius: 10px;
  border: 1px solid var(--glass-border-soft); background: var(--uc-field-bg); color: var(--ink);
}
.search button {
  border: 0; border-radius: 10px; padding: 0 16px; color: var(--md-on-primary);
  background: var(--md-primary); font-weight: 700; box-shadow: 0 4px 14px rgba(var(--md-primary-rgb), .22);
}
.entries { scroll-margin-top: 88px; }
.partner-action {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 15px; border-radius: 10px;
  background: var(--md-primary); color: var(--md-on-primary); font-weight: 700;
}
.partner-action:hover { color: var(--md-on-primary); filter: brightness(.9); }
.partner-article { max-width: 860px; margin-inline: auto; }
.partner-contact { padding: 16px; border-radius: 12px; background: var(--accent-soft); scroll-margin-top: 88px; }
.partner-wechat { user-select: all; white-space: nowrap; }
.list-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 14px; }
.list-heading h2 { font-size: 21px; font-weight: 780; }
.results, .byline { font-size: 12px; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.filters button, .empty button {
  border: 1px solid var(--line);
  padding: 7px 12px;
  min-height: 34px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  line-height: 1.3;
}
.filters button:hover, .empty button:hover { background: var(--accent-soft); }
.filters button[aria-pressed="true"] { background: var(--accent); color: var(--md-on-primary); border-color: transparent; font-weight: 700; }
.empty { padding: 35px 14px; text-align: center; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty p { margin-bottom: 12px; color: var(--muted); }

.learn .entry-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tutorial-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; background: var(--surface); border: 1px solid var(--glass-border-soft); border-radius: 14px; box-shadow: 0 4px 16px rgba(31, 45, 70, .07); }
.tutorial-card:hover, .topic:hover { border-color: var(--uc-focus); }
.tutorial-card:hover h3, .topic:hover h3 { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.cover { position: relative; display: grid; height: 105px; place-items: center; isolation: isolate; overflow: hidden; background: var(--cover-bg); color: var(--cover-ink); }
.cover::before, .cover::after { position: absolute; z-index: -1; width: 48%; aspect-ratio: 1.25; border-radius: 50%; content: ""; }
.cover::before { background: var(--cover-shape); inset: 45% auto auto -7%; }
.cover::after { background: var(--cover-shape-alt); inset: -65% -7% auto auto; }
.cover-clapper::before, .cover-chart::before, .cover-people::before, .cover-camera::before { inset: auto -8% 23% auto; }
.cover-clapper::after, .cover-chart::after, .cover-people::after, .cover-camera::after { inset: 55% auto auto -7%; }
.cover-icon { width: 95px; height: 71px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.card-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 12px 13px; }
.card-body h3, .topic h3 { font-size: 15px; font-weight: 750; line-height: 1.5; }
.card-body p, .topic p, .panel p { color: var(--muted); font-size: 13px; line-height: 1.65; }
.card-meta { margin-top: auto; padding-top: 4px; display: flex; justify-content: space-between; align-items: center; color: var(--link); }
.tag { align-self: start; white-space: nowrap; display: inline-block; border-radius: 999px; background: var(--accent-soft); padding: 3px 7px; font-size: 11px; color: var(--muted); line-height: 1.4; }

.community-grid { display: grid; grid-template-columns: 160px minmax(0, 1fr) 275px; align-items: start; gap: 14px; }
.panel, .community .entries { border: 1px solid var(--glass-border); border-radius: var(--radius); background: var(--surface); padding: 16px; box-shadow: var(--glass-shadow), var(--glass-hi); }
.community-guide .panel + .panel { margin-top: 0; }
.panel h2 { font-size: 15px; font-weight: 760; margin-bottom: 7px; }
.category-panel .filters { display: grid; gap: 5px; margin: 12px 0 0; }
.category-panel .filters button { text-align: left; border-color: transparent; }
.category-panel .filters button[aria-pressed="true"] { background: var(--accent); color: var(--md-on-primary); border-color: transparent; }
.community .list-heading { padding-bottom: 12px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.community .list-heading h2 { font-size: 17px; }
.community .entry-list, .community-guide { display: grid; gap: 10px; }
.topic { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.topic .tag { margin-top: 2px; }
.topic .icon { align-self: center; }
.topic p { margin: 3px 0 5px; }
.community-guide ol, .related ul { margin-top: 10px; }
.community-guide li a, .related li a {
  display: flex; align-items: center; justify-content: space-between; gap: 7px;
  padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px;
}
.community-guide li a:hover, .related li a:hover { color: var(--link); text-decoration: underline; }
.step { min-width: 24px; padding: 3px; text-align: center; background: var(--accent-soft); border-radius: 5px; font-size: 11px; }
.community-guide li a span:nth-child(2) { margin-right: auto; }
.text-link { color: var(--link); display: inline-flex; gap: 5px; align-items: center; font-size: 13px; font-weight: 700; margin-top: 8px; }
.text-link:hover { text-decoration: underline; }

.crumb { display: flex; align-items: center; gap: 5px; margin: 22px 0 13px; color: var(--muted); font-size: 13px; }
.crumb a:hover { text-decoration: underline; }
.article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 258px; align-items: start; gap: 16px; max-width: 1050px; margin-inline: auto; }
.article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.article .cover { height: 140px; }
.article .cover-icon { width: 124px; height: 91px; }
.article-copy { padding: clamp(17px, 3vw, 36px); }
.article h1 { margin: 8px 0; font-size: clamp(24px, 3.2vw, 32px); line-height: 1.35; }
.lede { color: var(--muted); line-height: 1.7; margin-bottom: 12px; }
.article section { margin-top: 24px; }
.article section h2 { margin-bottom: 6px; font-size: 16px; }
.article section p { line-height: 1.85; }
.references { border-top: 1px solid var(--line); padding-top: 14px; }
.references a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; line-height: 2; }
.hmg-guide-support strong { user-select: all; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding: 15px 0; margin-top: 30px; color: var(--muted); font-size: 12px; }
.footer a:hover { color: var(--link); }

@media (max-width: 1030px) {
  .community-grid { grid-template-columns: 135px minmax(0, 1fr) 218px; }
  .community-grid .panel, .community .entries { padding: 12px; }
}
@media (max-width: 1040px) {
  .editorial-page .shop-nav__list { display: none; }
  .editorial-page .shop-burger { display: inline-flex; }
}
@media (max-width: 820px) {
  .learn .entry-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .community-grid { grid-template-columns: 145px minmax(0, 1fr); }
  .community-guide { grid-column: 2; }
  .article-grid { grid-template-columns: minmax(0, 1fr) 200px; }
}
@media (max-width: 625px) {
  .hero.hmg-hero { grid-template-columns: minmax(0, 1fr); gap: 0; margin: 18px 0 14px; }
  .hero-copy { position: relative; z-index: 1; }
  .hero.hmg-hero h1 { font-size: 27px; margin-bottom: 6px; }
  .hero.hmg-hero p { font-size: 13px; max-width: calc(100% - 56px); }
  .hero-art { position: absolute; right: 8px; top: 15px; width: 82px; opacity: .55; }
  .hero.hmg-hero { position: relative; }
  .entries { scroll-margin-top: 70px; }
  .community-grid, .article-grid { grid-template-columns: minmax(0, 1fr); }
  .community-guide { grid-column: auto; }
  .category-panel .filters { display: flex; gap: 6px; margin: 8px 0 0; }
  .category-panel .filters button { border-color: var(--line); }
  .learn .entry-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-body { padding: 10px; }
  .card-body h3, .topic h3 { font-size: 14px; }
  .cover { height: 82px; }
  .cover-icon { width: 75px; height: 59px; }
  .topic { grid-template-columns: minmax(0, 1fr) auto; gap: 5px 8px; }
  .topic .tag { justify-self: start; grid-column: 1 / -1; }
}
