/* Shared publisher shell. Colour roles are supplied by brand-tokens.css.
   Editorial type is scoped here; product interfaces retain their own identity. */
:root {
  --display: 'Ritesh Serif Variable', Georgia, serif;
  --body: 'Vedu Sans Variable', Arial, sans-serif;
  --content: 1240px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; position: relative; isolation: isolate; background: var(--bg); color: var(--text); font: 20px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
/* Very light raster paper carries the painted studio style into reading pages.
   Texture is behind all content and never intercepts interaction. */
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: url('/static/images/homepage/studio-paper.webp') repeat; background-size: 768px 512px; opacity: .3; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; }
.wrap { width: min(var(--content), calc(100% - 80px)); margin-inline: auto; }
.skip { position: absolute; top: 8px; left: -9999px; z-index: 100; padding: 12px; background: var(--surface); }
.skip:focus { left: 8px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 400; }
h2 { font: 44px/1.15 var(--display); letter-spacing: -.6px; }

/* The publisher's signature stays quiet and consistent. */
.site-header { position: relative; z-index: 20; background: transparent; }
.header-inner { display: flex; align-items: center; min-height: 100px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; font: 650 27px/1 'Dimple Sans Variable', var(--body); letter-spacing: -.6px; }
.brand img { width: 29px; height: 29px; }
.brand-subtitle { padding-left: 22px; border-left: 1px solid var(--border); font-size: 15px; color: var(--text-muted); }
.nav { display: flex; gap: 26px; align-items: center; margin-left: auto; font-size: 17px; font-weight: 500; }
.nav a { padding-block: 12px; }
.nav a:hover { text-decoration: underline; text-underline-offset: 6px; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.icon-button { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; padding: 10px; border: 1px solid var(--border); border-radius: 50%; background: transparent; color: var(--text); }
.icon-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.icon-button:hover { background: var(--sunken); }
.mobile-menu { display: none; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 18px; min-height: 46px; padding: 11px 23px; border: 1px solid transparent; border-radius: 26px; font-size: 17px; font-weight: 500; transition: background .18s, color .18s; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); color: var(--on-primary); }
.btn-small { min-height: 44px; padding: 7px 17px; font-size: 16px; }
.text-link, .story-link { display: inline-flex; align-items: center; gap: 14px; color: var(--link); font-size: 17px; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.text-link:hover, .story-link:hover { text-decoration-thickness: 2px; }


.feature-label { font-size: 16px; color: var(--text-subtle); margin-bottom: 12px; }
.section-top { display: flex; justify-content: space-between; align-items: end; gap: 25px; margin-bottom: 30px; }
.hello-actions { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 24px; }
.footer { background: var(--sunken); padding-block: 30px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-brand { font: 700 19px 'Dimple Sans Variable', var(--body); }
.footer p { margin-top: 5px; font-size: 15px; color: var(--text-subtle); }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; font-size: 15px; }
.footer-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer small { font-size: 14px; color: var(--text-subtle); }

/* Native dialog supplies focus containment, Escape and focus restoration. */
.search-dialog { width: min(620px, calc(100% - 32px)); max-height: 85vh; padding: 25px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: 0 20px 80px #14121030; }
.search-dialog::backdrop { background: #14121070; backdrop-filter: blur(3px); }
.search-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.search-header h2 { font-size: 28px; }
.search-dialog label { display: block; font-size: 16px; color: var(--text-muted); margin-bottom: 9px; }
.search-dialog input { width: 100%; padding: 13px; font-size: 20px; border: 1px solid var(--border-strong); border-radius: 7px; background: var(--surface); color: var(--text); }
.search-count { margin-top: 14px; color: var(--text-subtle); font-size: 15px; }
.search-results { max-height: 350px; overflow: auto; margin-top: 12px; }
.search-result { display: flex; align-items: center; gap: 13px; padding: 12px; border-radius: 7px; }
.search-result:hover { background: var(--sunken); }
.search-result img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.search-result strong, .search-result small { display: block; }
.search-result strong { font-size: 18px; font-weight: 500; }
.search-result small { margin-top: 3px; font-size: 15px; color: var(--text-muted); }
.search-empty { font-size: 17px; color: var(--text-muted); }


@media (max-width: 1100px) {
  .brand-subtitle { display: none; }
  .header-inner { gap: 22px; }
}
@media (max-width: 820px) {
  .wrap { width: calc(100% - 40px); }
  .header-inner { min-height: 80px; }
  .brand { font-size: 23px; }
  .header-actions { margin-left: auto; }
  .header-actions > .btn { display: none; }
  .mobile-menu { display: grid; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 80px; padding: 18px 25px; background: var(--surface); border-bottom: 1px solid var(--border); }
  .nav.open { display: flex; justify-content: space-between; }
  .footer-inner { flex-wrap: wrap; }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 36px); }
  .header-inner { gap: 12px; min-height: 76px; }
  .brand { font-size: 19px; gap: 9px; }
  .brand img { width: 25px; height: 25px; }
  .header-actions { gap: 8px; }
  .icon-button { width: 44px; height: 44px; }
  .nav { top: 76px; padding-inline: 18px; gap: 12px; font-size: 16px; flex-wrap: wrap; }
  .section-top { flex-wrap: wrap; }
  .footer-inner { display: block; }
  .footer-links { margin-block: 22px; }
  .search-dialog { padding: 20px; }
  .search-result { padding-inline: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
