/* Shared surfaces, type, and interactive controls */
:root {
  color-scheme: light;
  --page: #f0f4fa;
  --white: #fff;
  --text: #131b2e;
  --muted: #4b5567;
  --border: #cdd5e3;
  --brand: #3057f6;
  --brand-hover: #2646cb;
  --brand-soft: #e7edff;
  --mark: #ef4444;
  --radius: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 1rem/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

h1, h2, h3, p, figure, ol, ul { margin: 0; }
h1, h2, h3 { line-height: 1.13; text-wrap: balance; }
h2 { font-size: clamp(1.875rem, 3.8vw, 3.125rem); font-weight: 760; }
h3 { font-size: 1.125rem; font-weight: 730; }
a { color: var(--brand-hover); text-underline-offset: .2em; }
button { font: inherit; }
img { display: block; max-width: 100%; }
button:not(:disabled), summary { cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  z-index: 2;
  inset: .5rem auto auto .5rem;
  transform: translateY(-150%);
  background: var(--white);
}

.skip-link:focus { transform: translateY(0); }
.wrap { width: min(calc(100% - 2rem), 76rem); margin-inline: auto; }
.section { padding-block: clamp(3.25rem, 7vw, 6rem); }
.section-title { margin-bottom: 1.75rem; }

.button, .nav-link, .language a, .footer-links a, .skip-link, .legal-related a {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: .55rem .8rem;
  border-radius: .65rem;
  text-decoration: none;
}

.button {
  justify-content: center;
  padding-inline: 1.125rem;
  border: 1px solid transparent;
  font-weight: 690;
  text-align: center;
}

.button--primary { background: var(--brand); color: var(--white); }
.button--primary:hover { background: var(--brand-hover); }
.nav-link:hover, .language a:hover { background: var(--brand-soft); }
.button:disabled { border-color: #aab9df; background: #dce5ff; color: #334161; cursor: default; }
.icon { width: 1.25rem; height: 1.25rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }

/* Site navigation and localized links */
.site-header { border-bottom: 1px solid var(--border); background: var(--white); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 4.5rem; }
.brand { display: inline-flex; min-height: 44px; align-items: center; gap: .65rem; color: var(--text); font-weight: 750; line-height: 1.23; text-decoration: none; }
.brand img { flex: none; border-radius: .55rem; }
.desktop-nav, .desktop-actions { display: none; }
.nav-link, .language a { color: var(--muted); font-size: .875rem; font-weight: 650; }
.language { display: flex; flex-wrap: wrap; gap: .25rem; }
.language a[aria-current="page"] { color: var(--brand-hover); background: var(--brand-soft); }
.menu-button { display: grid; width: 44px; height: 44px; flex: none; place-items: center; border: 1px solid var(--border); border-radius: .65rem; background: var(--white); color: var(--text); }
.menu-button:hover, .menu-button[aria-expanded="true"] { background: var(--brand-soft); }
.mobile-nav { display: grid; gap: .3rem; padding-bottom: 1rem; }
.mobile-nav .button { justify-self: start; margin-top: .25rem; }

/* Homepage and editor illustration */
.hero { padding-block: clamp(2.4rem, 6.5vw, 6rem); }
.hero-layout { display: grid; align-items: center; gap: clamp(2rem, 5vw, 4rem); }
.hero-layout > * { min-width: 0; }
.hero-product { margin-bottom: 1rem; color: var(--brand-hover); font-size: .875rem; font-weight: 750; }
.hero h1 { max-width: 13ch; font-size: clamp(2.55rem, 4.7vw, 4.9rem); font-weight: 800; letter-spacing: -.035em; }
:lang(zh-Hans) .hero h1 { max-width: 12em; letter-spacing: -.045em; }
.hero-description, .section-description { max-width: 42rem; margin-top: 1rem; color: var(--muted); }
.hero-description { font-size: clamp(1rem, 1.5vw, 1.125rem); }
.hero-actions .button { padding-inline: .9rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.65rem; }

.editor-shade {
  padding: clamp(.5rem, 1.9vw, 1.35rem);
  border: 1px solid #d1dcf9;
  border-radius: calc(var(--radius) + 7px);
  background-color: #e4ebfd;
  background-image: radial-gradient(#b4c6f2 1px, transparent 1px);
  background-size: 16px 16px;
}

.editor-frame { overflow: hidden; border: 1px solid #b9c8e5; border-radius: 12px; background: var(--white); }
.editor-bar { display: flex; align-items: center; gap: .5rem; padding: .65rem .75rem; border-bottom: 1px solid var(--border); font-size: .75rem; font-weight: 720; }
.editor-bar img { border-radius: .25rem; }
.editor-bar > span:last-child { margin-inline-start: auto; color: var(--muted); font-size: .6875rem; text-align: end; }
.editor-layout { display: grid; grid-template-columns: 2.3rem minmax(0, 1fr) minmax(5.8rem, 28%); min-height: clamp(12rem, 26vw, 21rem); }
.editor-tools { display: grid; align-content: start; justify-items: center; gap: .4rem; padding-block: .65rem; border-inline-end: 1px solid var(--border); }
.editor-tools span { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; color: var(--muted); }
.editor-tools .selected-tool { border-radius: .32rem; background: var(--brand-soft); color: var(--brand-hover); }
.editor-tools .icon { width: 1rem; height: 1rem; }
.editor-canvas { display: grid; place-items: center; min-width: 0; padding: clamp(.4rem, 2vw, 1.1rem); background: #e9eef7; }

.sample {
  position: relative;
  width: 100%;
  padding: clamp(.6rem, 2vw, 1.15rem);
  border: 1px solid #bac9e3;
  border-radius: 7px;
  background: var(--white);
  line-height: 1.35;
}

.sample > p { color: #315187; font-size: clamp(.5rem, .95vw, .75rem); font-weight: 750; }
.sample strong { display: block; margin-block: .3rem .75rem; font-size: clamp(.68rem, 1.55vw, 1.2rem); }
.sample-lines { display: grid; gap: .3rem; margin-top: .7rem; }
.sample-lines span { width: 100%; height: 4px; border-radius: 8px; background: #d9e2f1; }
.sample-lines span:last-child { width: 65%; }
.sample-selection { position: relative; padding: .42rem .32rem; border: 2px solid var(--mark); border-radius: 3px; color: var(--text); font-size: clamp(.55rem, 1.1vw, .9rem); font-weight: 700; overflow-wrap: anywhere; }
.sample-arrow { position: absolute; right: 4%; bottom: -1rem; width: 1.65rem; height: 2px; background: var(--mark); transform: rotate(-52deg); transform-origin: left center; }
.sample-arrow::after { position: absolute; inset: -3px 0 auto auto; width: 8px; height: 8px; border: solid var(--mark); border-width: 2px 2px 0 0; content: ""; transform: rotate(45deg); }
.editor-panel { min-width: 0; padding: clamp(.4rem, 1.2vw, .7rem); border-inline-start: 1px solid var(--border); }
.editor-panel > strong { display: block; margin-bottom: .6rem; font-size: clamp(.55rem, 1vw, .75rem); line-height: 1.25; }
.editor-result { margin-bottom: .55rem; padding: .4rem; border: 1px solid #d9e2f2; border-radius: .35rem; background: #f4f7fc; color: #30405d; font-size: clamp(.5rem, .95vw, .7rem); line-height: 1.35; overflow-wrap: anywhere; }
.editor-result b { display: block; margin-bottom: .3rem; color: var(--brand-hover); }
.editor-caption { margin-top: .65rem; color: var(--muted); font-size: .8125rem; text-align: center; }

/* Feature grid and supporting sections */
.features { border-block: 1px solid var(--border); background: var(--page); }
.feature-grid { display: grid; gap: 1rem; }
.feature-card { min-width: 0; padding: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); }
.feature-card .icon { width: 1.5rem; height: 1.5rem; color: var(--brand); }
.feature-card h3 { margin-top: .9rem; }
.feature-card p { margin-top: .5rem; color: var(--muted); }

/* Store poster gallery */
.preview { background: var(--white); }
.poster-gallery { display: grid; gap: 1.25rem; }
.poster-gallery img {
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 3px 12px rgb(19 27 46 / 7%);
}
.poster-gallery figcaption {
  margin-top: .65rem;
  color: var(--muted);
  font-weight: 650;
  text-align: center;
}

.faq-layout { display: grid; gap: .8rem 2.5rem; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: .8rem; min-height: 56px; padding: .7rem .35rem; font-weight: 720; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { flex: none; color: var(--brand-hover); content: "+"; font-size: 1.3rem; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { max-width: 68ch; padding: .15rem .35rem 1rem; color: var(--muted); }


.site-footer { padding-block: 1.25rem; }
.footer-row, .footer-links { display: flex; flex-wrap: wrap; align-items: center; }
.footer-row { justify-content: space-between; gap: .35rem 1rem; }
.footer-row p, .footer-links a { color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
.footer-links a:hover, .legal-related a:hover { background: var(--brand-soft); color: var(--brand-hover); }

/* Readable agreement layout, including embedded view */
.legal-main { width: min(calc(100% - 2rem), 53rem); margin-inline: auto; padding-block: clamp(1.2rem, 4vw, 3.5rem); }
.legal-article { padding: clamp(1rem, 4vw, 3.25rem); border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); overflow-wrap: anywhere; }
.legal-article h1 { margin-bottom: 1rem; font-size: clamp(2rem, 4vw, 3rem); font-weight: 780; }
.legal-article h2, .legal-article h3 { margin: 1.7em 0 .65em; text-wrap: wrap; }
.legal-article h2 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
.legal-article h3 { font-size: 1.125rem; }
.legal-article p, .legal-article ul, .legal-article ol { margin-top: .75em; }
.legal-article li + li { margin-top: .28em; }
.legal-article ul, .legal-article ol { padding-inline-start: 1.35em; }
.legal-article ul { list-style: disc; }
.legal-article ol { list-style: decimal; }
.legal-article a { display: inline-block; min-width: 44px; min-height: 44px; align-content: center; }
.legal-related { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .75rem; }
.legal-related a { font-size: .875rem; }
.legal-embed .site-header,
.legal-embed .site-footer,
.legal-embed .legal-related,
.legal-embed .skip-link { display: none; }

@media (max-width: 767px) {
  .legal-page .site-header, .legal-page .site-footer { display: none; }
}

@media (min-width: 600px) {
  .wrap { width: min(calc(100% - 3rem), 76rem); }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor-layout { grid-template-columns: 2.7rem minmax(0, 1fr) minmax(7.25rem, 27%); }
}

@media (min-width: 768px) {
  .poster-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legal-related { display: none; }
  .faq-layout { grid-template-columns: 1fr 2fr; }
}

@media (min-width: 940px) {
  .hero-layout { grid-template-columns: .84fr 1.16fr; }
  .feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .poster-gallery > :first-child { grid-column: 1 / -1; }
}

@media (min-width: 1080px) {
  .desktop-nav, .desktop-actions { display: flex; align-items: center; gap: .4rem; }
  .menu-button, .mobile-nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
}

@media print {
  .legal-page .site-header, .legal-page .site-footer, .legal-page .legal-related, .skip-link { display: none; }
  .legal-main { width: auto; padding: 0; }
  .legal-article { border: 0; padding: 0; }
}
