/* Shared public surfaces. Keep the existing document reader and contact controls. */
:root {
  --accent: #0d9488;
  --ink: #111827;
  --muted: #606c7c;
  --line: #e5e7eb;
  --paper: #fff;
  --bg: #f7f9fa;
  color-scheme: light;
}
html.dark {
  --accent: #5eead4;
  --ink: #f1f5f9;
  --muted: #a4b0c2;
  --line: #334155;
  --paper: #17212f;
  --bg: #101822;
  color-scheme: dark;
}
html { scroll-padding-top: 96px; }
body, body.services-page {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}
html.dark body { background: var(--paper); color: var(--ink); }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 2px solid #14b8a6; outline-offset: 3px; }
.ai-public-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding-top: 12px;
  padding-bottom: 12px;
  background: var(--paper);
  border-color: var(--line);
}
.ai-public-header nav { max-width: 1120px; flex-wrap: nowrap; }
.ai-public-header nav > a { flex-shrink: 0; }
.ai-public-header nav > a img { border-radius: 8px; }
.ai-public-header a[href="/agent/"] { background: #0d9488; color: #fff; border-radius: 6px; }
.ai-public-header a[href="/agent/"]:hover { background: #0f766e; }
.ai-public-header .btn-icon { border-radius: 6px; color: var(--muted); }
.ai-public-links { display: flex; align-items: center; gap: 20px; }
.ai-public-nav-link { padding: 8px 0; border: 0; background: none; color: var(--muted); font-size: 14px; white-space: nowrap; cursor: pointer; }
.ai-public-nav-link:hover { color: var(--accent); }
.ai-public-menu { display: none; }
.q-skip { position: fixed; left: 16px; top: -80px; z-index: 100; padding: 10px 16px; background: var(--paper); color: var(--ink); }
.q-skip:focus { top: 12px; }
.reader { width: 100%; max-width: 1120px; margin: auto; padding: 0 24px 24px; }
.document-page, .document-page > article { width: 100%; max-width: none; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; min-width: 0; }
.ai-public-hero { margin: 0; padding: 56px 0 48px; border: 0; background: transparent; text-align: center; }
.ai-public-hero > img { width: 64px; height: 64px; margin-bottom: 20px; border-radius: 8px; }
.ai-public-hero h1 { margin: 0; color: var(--ink); font-size: 36px; line-height: 1.3; font-weight: 700; letter-spacing: 0; }
.ai-public-hero > p { line-height: 1.8; color: var(--muted); }
.ai-public-intro { max-width: 600px; margin: 12px auto 0; font-size: 14px; }
.ai-hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.ai-hero-actions .btn { min-height: 42px; border-radius: 6px; }
.document-page .doc-section, .document-page .contact {
  margin: 0;
  padding: 36px 0;
  min-width: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}
.document-page h2 { margin: 0 0 16px; color: var(--ink); font-size: 22px; font-weight: 600; line-height: 1.5; letter-spacing: 0; }
.document-page p, .document-page li { color: var(--muted); font-size: 14px; line-height: 1.85; }
.document-page .doc-section > h3 { margin: 24px 0 10px; color: var(--ink); font-size: 16px; }
.document-page .doc-section > ul { padding-left: 22px; list-style: disc; }
.document-page strong { color: var(--ink); }
.document-kicker { color: var(--accent) !important; font-size: 12px !important; letter-spacing: 0; }
.update-list { border: 0; }
.update-list p { grid-template-columns: 30px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-color: var(--line); }
.update-list p:last-child { border-bottom: 0; }
.update-list b { color: var(--accent); }
.steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; border: 0; }
.steps li { margin: 0; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 18px 0; border-color: var(--line); }
.steps h3 { margin: 0 0 5px; color: var(--ink); font-size: 17px; line-height: 1.5; }
.steps b { color: var(--accent); }
#categories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
#categories > h2, #categories > p { grid-column: 1 / -1; }
#categories > p { margin-bottom: 16px; }
.category { min-width: 0; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 22px 0; border-color: var(--line); }
.category > span { padding-top: 4px; color: var(--accent); }
.category h3 { margin: 0 0 8px; color: var(--ink); font-size: 18px; line-height: 1.6; }
.category p { margin: 0; }
.category ul { margin: 10px 0 0; padding-left: 18px; list-style: disc; }
.category li { margin: 3px 0; }
.document-switcher { display: flex; flex-wrap: nowrap; gap: 8px; max-width: 100%; margin: 22px 0 16px; padding: 4px 0 10px; overflow-x: auto; border: 0; scrollbar-width: thin; }
.document-switcher button { flex: none; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--muted); font: inherit; font-size: 13px; white-space: nowrap; cursor: pointer; }
.document-switcher button.active { background: #f0fdfa; color: #0f766e; border-color: #99dace; }
html.dark .document-switcher button.active { background: #134e4a; color: #5eead4; border-color: #0f766e; }
.source-document { padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--paper); }
.source-document-head { padding: 32px 48px; border: 0; border-bottom: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.source-document-head h3 { margin: 10px 0 6px; color: var(--ink); font-size: 22px; line-height: 1.55; overflow-wrap: anywhere; }
.source-document-head small { display: block; color: var(--muted); line-height: 1.8; }
.document-toolbar { flex-wrap: wrap; gap: 8px 14px; border: 0; border-bottom: 1px solid var(--line); background: var(--bg); color: var(--muted); }
.document-toolbar a, .document-toolbar button { color: var(--accent); }
.source-document-body { min-height: 420px; padding: 40px 48px 56px; overflow-x: auto; border: 0; background: var(--paper); color: var(--ink); box-shadow: none; }
.source-document-body p, .source-document-body li { color: var(--ink); font-size: 16px; }
.source-document-body ul { list-style: disc; }
.source-document-body ol { list-style: decimal; }
.source-document-body .document-figure img { height: auto; }
.source-document-body blockquote, .document-code-figure, .document-math { background: var(--bg); border-color: var(--line); color: var(--ink); }
.document-code-figure pre, .document-math pre { color: var(--ink); }
.document-figure figcaption { color: var(--muted); letter-spacing: 0; }
html.dark .source-document-body :is(h1, h2, h3, h4, strong) { color: var(--ink); }
html.dark .source-document-body :is(th, td) { border-color: #64748b; color: var(--ink); }
html.dark .source-document-body th { background: var(--bg); }
html.dark [id^="showcase-"] .document-toolbar button { background: var(--paper); color: var(--accent); border-color: var(--line); }
.contact-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 24px 0; border: 0; }
.contact-grid > div { min-width: 0; padding: 0; border: 0 !important; border-radius: 0; background: transparent; }
.contact-grid span { color: var(--muted); font-size: 12px; }
.contact-grid strong { margin-top: 6px; color: var(--ink); overflow-wrap: anywhere; }
.contact-qr-grid { max-width: 100%; }
#contact-qr-grid > .contact-qr-card { padding: 20px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); box-shadow: none; }
#contact-qr-grid > .contact-qr-card img { background: #fff; }
.contact > a { min-height: 42px; align-items: center; padding: 10px 16px; border-radius: 6px; background: #0d9488; color: #fff; }
.ai-public-footer { padding: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; text-align: center; }

/* Service directions use the same header, page width and separated sections. */
.services-page > main { max-width: 1120px; padding: 0 24px; margin: auto; overflow: visible; }
.services-page > main > :is(.services-hero, .studios-section, .service-combinations, .services-contact) { width: 100%; }
.services-hero { display: block; margin: 0; padding: 56px 0 40px; min-height: 0; color: var(--ink); }
.services-hero-copy { max-width: 760px; }
.services-hero h1 { margin: 0; color: var(--ink); font-size: 36px; font-weight: 700; line-height: 1.4; letter-spacing: 0; }
.services-hero-lead { margin: 16px 0 0; color: var(--muted); font-size: 15px; line-height: 1.9; }
.services-hero-actions { gap: 12px; margin-top: 24px; }
.eyebrow { margin: 0 0 10px; color: var(--accent); font: inherit; font-size: 12px; letter-spacing: 0; }
.studios-section { padding: 32px 0 40px; border-top: 1px solid var(--line); }
.section-heading { gap: 24px; padding: 0 0 20px; border: 0; align-items: flex-end; }
.section-heading > div { min-width: 0; }
.section-heading h2, .services-contact h2, .service-combinations h2 { margin: 0; color: var(--ink); font-size: 24px; font-weight: 600; line-height: 1.5; letter-spacing: 0; }
.section-heading > p { color: var(--muted); font-size: 14px; line-height: 1.8; }
.studio-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0; }
.services-page .studio-card { min-width: 0; padding: 24px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--ink); box-shadow: none; transform: none; overflow: visible; }
.studio-card::before { display: none; }
.studio-card:last-child { grid-column: auto; }
.studio-card h3 { margin: 16px 0 10px; color: var(--ink); font-size: 20px; line-height: 1.55; }
.studio-card h4 { color: var(--ink); font-size: 14px; }
.studio-card p, .studio-positioning { color: var(--muted); font-size: 14px; line-height: 1.85; }
.studio-positioning { min-height: 52px; margin-bottom: 6px; }
.studio-card-top { margin-bottom: 0; color: var(--muted); border-color: var(--line); }
.studio-kicker { color: var(--muted); letter-spacing: 0; font-size: 11px; }
.services-page .studio-index, .studio-link { color: var(--accent); }
.studio-block { border-color: var(--line); }
.studio-tags { gap: 6px; }
.studio-tags span { padding: 4px 7px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); color: var(--muted); font-size: 12px; }
.studio-link { min-height: 44px; border-color: var(--line); font-size: 14px; }
.button { min-height: 42px; padding: 9px 14px; border-radius: 6px; font-size: 14px; justify-content: center; }
.button-primary { border: 1px solid #0d9488; background: #0d9488; color: #fff; }
.button-primary:hover { border-color: #0f766e; background: #0f766e; }
.button-quiet { border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.service-combinations { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; padding: 32px 0; border-top: 1px solid var(--line); }
.service-combinations p { color: var(--muted); font-size: 14px; }
.combination-flow { gap: 8px; flex-wrap: wrap; color: var(--ink); }
.combination-flow span { padding: 8px 10px; border: 0; border-radius: 0; background: transparent; font-size: 14px; }
.combination-flow i { color: var(--accent); }
.services-contact { margin: 0; padding: 32px 0 40px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--ink); gap: 24px; }
.services-contact h2 { font-size: 22px; }
.services-contact p:not(.eyebrow) { color: var(--muted); font-size: 14px; }
.services-contact .button { flex-shrink: 0; }
.services-contact .eyebrow { color: var(--accent); }
.services-contact .button-primary { background: #0d9488; border-color: #0d9488; color: #fff; }
.services-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; max-width: 1120px; margin: 0 auto; padding: 24px; background: transparent; color: var(--muted); border-color: var(--line); text-align: left; }
.services-footer a { color: var(--accent); }

@media (max-width: 1023px) {
  .ai-public-header nav { position: relative; }
  .ai-public-menu { display: inline-flex; }
  .ai-public-links { display: none; position: absolute; top: calc(100% + 12px); left: 0; right: 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); box-shadow: 0 5px 16px #00000014; flex-wrap: wrap; gap: 4px 20px; }
  .ai-public-links.is-open { display: flex; }
  .studio-grid { gap: 20px; }
  .studio-card h3 { font-size: 18px; }
  .studio-positioning { min-height: 78px; }
  .service-combinations { grid-template-columns: 1fr; gap: 12px; }
  .combination-flow { justify-content: flex-start; }
}
@media (max-width: 760px) {
  .steps, #categories { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-grid { grid-template-columns: 1fr; gap: 20px; }
  .studio-positioning { min-height: 0; }
  .studio-card { padding-top: 20px; }
  .studio-card h3 { font-size: 20px; }
  .studio-link { margin-top: 16px; }
  .section-heading { display: block; }
  .section-heading > p { max-width: none; margin-top: 12px; }
}
@media (max-width: 600px) {
  .ai-public-header { padding: 10px 12px; }
  .ai-public-header nav { gap: 8px; }
  .ai-public-header nav > a { gap: 8px; flex-shrink: 1; }
  .ai-public-header nav > a span { font-size: 14px; }
  .ai-public-header nav > a img { width: 28px; height: 28px; }
  .ai-public-header .btn-icon { width: 32px; height: 36px; padding: 6px; }
  .ai-public-header a[href="/agent/"] { min-height: 36px; padding: 7px 10px; font-size: 12px; }
  .reader, .services-page > main { padding: 0 16px; }
  .ai-public-hero { padding: 36px 0; }
  .ai-public-hero h1, .services-hero h1 { font-size: 30px; }
  .ai-public-hero > img { width: 56px; height: 56px; }
  .ai-hero-actions { gap: 8px; }
  .document-page .doc-section, .document-page .contact { padding: 28px 0; }
  .document-page h2 { font-size: 20px; }
  .category { padding: 18px 0; }
  .source-document-head { padding: 22px 18px; }
  .source-document-head h3 { font-size: 19px; }
  .source-document-body { padding: 24px 18px; }
  .document-toolbar { padding: 10px 14px; }
  .services-hero { padding: 36px 0 28px; }
  .studios-section { padding: 28px 0; }
  .section-heading h2, .service-combinations h2 { font-size: 22px; }
  .services-contact { display: block; padding: 28px 0; }
  .services-contact .button { margin-top: 20px; }
  .services-footer { display: block; padding: 20px 16px; }
  .services-footer a { display: block; margin-top: 8px; }
}
@media (max-width: 380px) {
  .ai-public-header nav > a { gap: 6px; }
  .ai-public-header nav > a span { font-size: 13px; }
  .ai-public-header nav > a img { width: 24px; height: 24px; }
  .ai-public-header nav > div:last-child { gap: 4px; }
  .ai-public-header a[href="/agent/"] { padding-left: 8px; padding-right: 8px; }
  .contact-grid { gap: 20px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
