/*
 * Calm (Claude-style) look for the static pages in public/: cream / near-black, Lora headlines,
 * violet only as the accent. Everything is scoped to html.calm, which
 * scripts/pwa-static-head.mjs sets on every page. Loaded after site.css and mostly
 * re-points its tokens; the header and footer come from calm.js.
 */

@font-face { font-family: 'Lora'; font-style: normal; font-display: swap; font-weight: 400; src: url('/fonts/lora/lora-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Lora'; font-style: normal; font-display: swap; font-weight: 500; src: url('/fonts/lora/lora-latin-500-normal.woff2') format('woff2'); }

/* ── Tokens ─────────────────────────────────────────────────────────── */
html.calm {
  --s-bg: #faf9f5;
  --s-bg-soft: #f0eee6;
  --s-surface: #faf9f5;
  --s-surface-2: #f0eee6;
  --s-border: rgba(31, 30, 29, 0.10);
  --s-border-strong: rgba(31, 30, 29, 0.18);
  --s-text: #1f1e1d;
  --s-text-2: rgba(31, 30, 29, 0.72);
  --s-muted: rgba(31, 30, 29, 0.55);
  /* The logo violet */
  --s-accent: #5E17EB;
  --s-accent-hover: #4C0FCB;
  --s-accent-text: #5E17EB;
  --s-accent-soft: rgba(94, 23, 235, 0.08);
  --s-accent-border: rgba(94, 23, 235, 0.25);
  --s-cta-bg: #f0eee6;
  --s-shadow: none;
  --s-glow: none;
  --c-serif: 'Lora', Georgia, serif;
}
html.calm.dark {
  --s-bg: #141413;
  --s-bg-soft: #1a1918;
  --s-surface: #141413;
  --s-surface-2: #1a1918;
  --s-border: rgba(255, 255, 255, 0.10);
  --s-border-strong: rgba(255, 255, 255, 0.18);
  --s-text: #faf9f5;
  --s-text-2: rgba(250, 249, 245, 0.72);
  --s-muted: rgba(250, 249, 245, 0.50);
  --s-accent: #5E17EB;
  --s-accent-text: #c4b5fd;
  --s-accent-soft: rgba(139, 92, 246, 0.10);
  --s-cta-bg: #1a1918;
}
html.calm body::before { background: var(--s-bg); }

/* ── Type ───────────────────────────────────────────────────────────── */
html.calm body h1, html.calm body h2,
html.calm body .hero h1, html.calm body h1[class], html.calm body .section-title {
  font-family: var(--c-serif) !important; font-weight: 400 !important; letter-spacing: -0.015em !important;
  background: none !important; -webkit-text-fill-color: currentColor !important; color: var(--s-text) !important;
}
html.calm body h3 { font-weight: 600; letter-spacing: -0.01em; }

/* ── Old navigation out, calm bar in ────────────────────────────────── */
html.calm body > header nav, html.calm body .nav-bar, html.calm body .static-nav-extra { display: none !important; }

.calm-bar { position: sticky; top: 0; z-index: 100; background: color-mix(in srgb, var(--s-bg) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--s-border); font-family: 'Geist', system-ui, sans-serif; }
.calm-bar-in { position: relative; max-width: 1152px; margin: 0 auto; height: 64px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; }
.calm-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--s-text) !important; text-decoration: none; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.calm-brand img { width: 28px; height: 28px; border-radius: 6px; }
.calm-menu { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 28px; }
.calm-nav-item { display: inline-flex; align-items: center; gap: 4px; padding: 8px 0; background: none; border: 0; cursor: pointer; font: inherit; font-size: 14px; color: var(--s-text-2) !important; text-decoration: none; }
.calm-nav-item:hover, .calm-drop.open .calm-nav-item { color: var(--s-text) !important; }
.calm-nav-item svg { transition: transform .2s; }
.calm-drop.open .calm-nav-item svg { transform: rotate(180deg); }
.calm-panel { display: none; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); padding-top: 12px; }
.calm-drop.open .calm-panel { display: grid; animation: calm-in .15s ease-out; }
.calm-panel { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 0 40px; width: calc(var(--cols) * 230px); }
.calm-drop.open .calm-panel { background: var(--s-bg); border: 1px solid var(--s-border); border-radius: 12px; padding: 24px; margin-top: 12px; box-shadow: 0 16px 48px -16px rgba(0, 0, 0, .25); }
html.calm.dark .calm-drop.open .calm-panel { background: #1a1918; }
@keyframes calm-in { from { opacity: 0; transform: translate(-50%, -4px); } to { opacity: 1; transform: translate(-50%, 0); } }
.calm-group { margin: 0 0 8px; padding: 0 8px; font-size: 12px; color: var(--s-muted) !important; }
.calm-link { display: block; padding: 6px 8px; border-radius: 8px; text-decoration: none; }
.calm-link:hover { background: rgba(127, 127, 127, 0.08); }
.calm-link span { display: block; font-size: 14px; color: var(--s-text); }
.calm-link small { display: block; font-size: 12.5px; line-height: 1.35; color: var(--s-muted); }
.calm-actions { display: flex; align-items: center; gap: 12px; }
.calm-lang, .calm-login { font-size: 14px; color: var(--s-text-2) !important; text-decoration: none; }
.calm-lang:hover, .calm-login:hover { color: var(--s-text) !important; }
.calm-cta { display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; padding: 8px 16px; font-size: 14px; font-weight: 500; text-decoration: none; background: var(--s-text); color: var(--s-bg) !important; }
.calm-cta:hover { opacity: .9; }
.calm-theme { width: 32px; height: 32px; }
.calm-burger { display: none; width: 40px; height: 40px; border: 0; background: none; cursor: pointer; flex-direction: column; justify-content: center; gap: 6px; }
.calm-burger span { display: block; height: 1.5px; width: 20px; margin: 0 auto; background: var(--s-text); transition: transform .2s; }
.calm-bar.m-open .calm-burger span:first-child { transform: translateY(3.75px) rotate(45deg); }
.calm-bar.m-open .calm-burger span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
.calm-mobile { display: none; }
@media (max-width: 1023px) { .calm-mobile { display: block; } }
@media (max-width: 1023px) {
  .calm-menu, .calm-actions { display: none; }
  .calm-burger { display: flex; }
  .calm-bar.m-open .calm-mobile { display: block; max-height: calc(100dvh - 64px); overflow-y: auto; padding: 8px 24px 24px; border-top: 1px solid var(--s-border); }
  .calm-m-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--s-border); font-size: 15px; color: var(--s-text) !important; text-decoration: none; cursor: pointer; list-style: none; }
  .calm-m-top::-webkit-details-marker { display: none; }
  .calm-mobile details[open] > summary svg { transform: rotate(180deg); }
  .calm-mobile .calm-group { margin: 14px 0 4px; padding: 0; }
  .calm-m-link { display: block; padding: 6px 0; font-size: 14px; color: var(--s-text-2) !important; text-decoration: none; }
  .calm-m-cta { display: flex; margin: 16px 0 8px; padding: 12px; background: var(--s-accent); color: #fff !important; }
}

/* ── Page header (hero) ─────────────────────────────────────────────── */
html.calm body > header, html.calm body .hero {
  background: var(--s-bg) !important; border-bottom: 0 !important; padding: 72px 0 48px !important; text-align: center;
}
html.calm body > header::before, html.calm body .hero::before { display: none !important; }
html.calm body > header h1, html.calm body .hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem) !important; line-height: 1.1 !important; max-width: 820px; margin: 0 auto 16px !important; }
html.calm body > header p, html.calm body .hero p { font-size: 1.1rem !important; color: var(--s-text-2) !important; max-width: 640px; margin-left: auto !important; margin-right: auto !important; }
html.calm body > header .breadcrumb { margin-bottom: 20px; font-size: 13px; }
html.calm body > header .tag { display: inline-block; margin-bottom: 14px; background: none !important; border: 0 !important; padding: 0 !important; color: var(--s-accent-text) !important; font-size: 13px; font-weight: 500; }
html.calm body > header .article-meta { font-size: 13px; }
html.calm body > header .share-bar { justify-content: center; }

/* Buttons */
html.calm body .cta-button, html.calm body .btn-primary {
  background: var(--s-accent) !important; color: #fff !important; border-radius: 8px !important; box-shadow: none !important;
  padding: 12px 22px !important; font-size: 15px !important; font-weight: 500 !important;
}
html.calm body .cta-button:hover, html.calm body .btn-primary:hover { background: var(--s-accent-hover) !important; transform: none !important; }

/* ── Sections ───────────────────────────────────────────────────────── */
html.calm body main > section, html.calm body main > section:nth-child(even) { background: var(--s-bg) !important; padding: 72px 0 !important; border: 0 !important; }
html.calm body main > section + section { border-top: 1px solid var(--s-border) !important; }
html.calm body main h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem) !important; margin-bottom: 14px !important; }
html.calm body main > section > .container > p:first-of-type { max-width: 680px; }

/* Feature cards → plain text blocks with a hairline on top, no emoji tiles */
html.calm body .features { gap: 40px 48px !important; margin-top: 40px !important; }
html.calm body .feature, html.calm body .feature:hover { background: none !important; border: 0 !important; border-top: 1px solid var(--s-border) !important; border-radius: 0 !important; padding: 20px 0 0 !important; box-shadow: none !important; transform: none !important; }
html.calm body .feature-icon { display: none !important; }
html.calm body .feature h3 { font-size: 17px !important; margin-bottom: 8px !important; }

html.calm body .profession { background: none !important; border: 1px solid var(--s-border-strong) !important; color: var(--s-text-2) !important; border-radius: 999px !important; font-weight: 400 !important; }

/* Prices */
html.calm body .price-card { background: var(--s-bg) !important; border: 1px solid var(--s-border) !important; border-radius: 16px !important; box-shadow: none !important; }
html.calm body .price-card.popular { border-color: var(--s-accent) !important; transform: none !important; }
html.calm body .price, html.calm body .price-card .price { font-family: var(--c-serif) !important; font-weight: 400 !important; }

/* FAQ, boxes */
html.calm body .faq-item { background: none !important; border: 0 !important; border-bottom: 1px solid var(--s-border) !important; border-radius: 0 !important; padding: 20px 0 !important; box-shadow: none !important; }
html.calm body .info-box, html.calm body .warning-box, html.calm body .example-box, html.calm body .checklist, html.calm body .muster,
html.calm body .author-box, html.calm body .related-card, html.calm body .card, html.calm body .cta-inline {
  background: var(--s-bg-soft) !important; border: 1px solid var(--s-border) !important; border-radius: 14px !important; box-shadow: none !important;
}
html.calm body .info-box { border-left: 3px solid var(--s-accent) !important; }
html.calm body .footer-cta { background: var(--s-bg-soft) !important; }
html.calm body .footer-cta h2, html.calm body .footer-cta p { color: var(--s-text) !important; }

/* ── Blog article ───────────────────────────────────────────────────── */
html.calm body article p, html.calm body article li { font-size: 17px; line-height: 1.75; }
html.calm body article h2 { font-size: 1.75rem !important; margin-top: 48px !important; }
html.calm body .related { background: var(--s-bg-soft) !important; }
html.calm body .tag-sm { background: none !important; color: var(--s-accent-text) !important; padding: 0 !important; }

/* ── Footer ─────────────────────────────────────────────────────────── */
.calm-footer { background: var(--s-bg-soft); border-top: 1px solid var(--s-border); font-family: 'Geist', system-ui, sans-serif; }
.calm-footer-in { max-width: 1152px; margin: 0 auto; padding: 64px 24px 32px; }
.calm-footer-grid { display: grid; grid-template-columns: 1.3fr repeat(5, 1fr); gap: 32px; }
.calm-footer-brand p { margin: 16px 0 0; max-width: 260px; font-size: 14px; line-height: 1.6; color: var(--s-text-2) !important; }
.calm-play { display: inline-block; margin-top: 24px; }
.calm-play img { height: 40px; width: auto; }
.calm-social { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 20px; }
.calm-social a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; color: var(--s-muted) !important; }
.calm-social a:hover { color: var(--s-text) !important; background: rgba(127, 127, 127, 0.08); }
.calm-footer h3 { margin: 0; font-size: 13px; font-weight: 500; color: var(--s-muted); font-family: inherit !important; }
.calm-footer ul { list-style: none; margin: 16px 0 0; padding: 0; }
.calm-footer li { margin: 0 0 12px; font-size: 14px; }
.calm-footer li::before { display: none; }
.calm-footer ul a { color: var(--s-text-2) !important; text-decoration: none; }
.calm-footer ul a:hover { color: var(--s-text) !important; }
.calm-footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--s-border); font-size: 13px; color: var(--s-muted); }
@media (max-width: 1023px) { .calm-footer-grid { grid-template-columns: repeat(3, 1fr); } .calm-footer-brand { grid-column: 1 / -1; } }
@media (max-width: 640px) { .calm-footer-grid { grid-template-columns: repeat(2, 1fr); } }

/* Page CSS styles bare <nav>/<strong> — keep it off the calm chrome and inline emphasis */
html.calm .calm-bar nav, html.calm .calm-bar .calm-menu { margin: 0 !important; padding: 0 !important; height: auto !important; background: none !important; border: 0 !important; }
html.calm body .info-box strong, html.calm body .warning-box strong { display: inline !important; margin: 0 !important; }
html.calm body .info-box > strong:first-child, html.calm body .warning-box > strong:first-child { display: block !important; margin-bottom: 6px !important; }
html.calm .calm-footer, html.calm .calm-footer * { text-align: left !important; }
html.calm .calm-footer-bottom { justify-content: space-between !important; }

/* ── Blog overview: a calm list instead of logo-placeholder cards ───── */
html.calm body .grid:has(> .card) { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)) !important; gap: 8px 40px !important; }
html.calm body .grid > .card { background: none !important; border: 0 !important; border-top: 1px solid var(--s-border) !important; border-radius: 0 !important; box-shadow: none !important; transform: none !important; }
html.calm body .grid > .card::before, html.calm body .card-media { display: none !important; }
html.calm body .card-body { padding: 22px 0 28px !important; }
html.calm body .card-tag { background: none !important; border: 0 !important; padding: 0 !important; color: var(--s-accent-text) !important; font-size: 12.5px !important; font-weight: 500 !important; text-transform: none !important; letter-spacing: 0 !important; }
html.calm body .grid > .card h2 { font-family: var(--c-serif) !important; font-weight: 400 !important; font-size: 1.45rem !important; line-height: 1.25 !important; margin: 8px 0 10px !important; }
html.calm body .grid > .card h2 a { color: var(--s-text) !important; text-decoration: none; }
html.calm body .grid > .card:hover h2 a { color: var(--s-accent-text) !important; }
html.calm body .grid > .card p { line-height: 1.6 !important; font-size: 15px !important; }

/* ── One continuous surface, like Claude: no divider lines, no banded sections ── */
.calm-bar { border-bottom: 0 !important; }
html.calm body main > section + section { border-top: 0 !important; }
html.calm body .feature, html.calm body .feature:hover { border-top: 0 !important; padding-top: 0 !important; }
html.calm body .faq-item { border-bottom: 0 !important; }
html.calm body .grid > .card { border-top: 0 !important; }
html.calm body .related, html.calm body .footer-cta { background: var(--s-bg) !important; }
.calm-footer { background: var(--s-bg) !important; border-top: 0 !important; }
.calm-footer-bottom { border-top: 0 !important; }
@media (max-width: 1023px) { .calm-bar.m-open .calm-mobile { border-top: 0 !important; } .calm-m-top { border-bottom: 0 !important; } }
.calm-brand img { width: auto !important; height: 32px !important; border-radius: 0 !important; }
.calm-brand .ai { color: var(--s-accent); }

/* ── Phone menu: sheet from the right (same as the React header) ─────── */
@media (max-width: 1023px) {
  .calm-mobile, .calm-mobile.open { position: fixed; inset: 0; z-index: 300; max-height: none !important; padding: 0 !important; overflow: visible !important; border: 0 !important; font-family: 'Geist', system-ui, sans-serif; }
  /* Same motion as the React sheet: backdrop fades, sheet slides in from the right */
  .calm-mobile { display: block !important; visibility: hidden; transition: visibility 0s .35s; }
  .calm-mobile.open { visibility: visible; transition: visibility 0s; }
  .calm-mobile .calm-m-backdrop { opacity: 0; transition: opacity .2s ease; }
  .calm-mobile.open .calm-m-backdrop { opacity: 1; }
  .calm-mobile .calm-m-sheet { transform: translateX(100%); transition: transform .35s cubic-bezier(.22, 1, .36, 1); }
  .calm-mobile.open .calm-m-sheet { transform: none; }
  .calm-m-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
  .calm-m-sheet { position: absolute; top: 0; right: 0; bottom: 0; width: 88%; max-width: 384px; display: flex; flex-direction: column; background: var(--s-bg); box-shadow: 0 0 40px rgba(0, 0, 0, .3); padding-bottom: max(20px, env(safe-area-inset-bottom)); }
  html.calm.dark .calm-m-sheet { background: #1a1918; }
  .calm-m-head { display: flex; justify-content: flex-end; padding: calc(12px + env(safe-area-inset-top)) 16px 0; }
  .calm-m-close { width: 40px; height: 40px; border: 0; border-radius: 8px; background: rgba(127, 127, 127, .1); color: var(--s-text); font-size: 24px; line-height: 1; cursor: pointer; }
  .calm-m-nav { flex: 1; overflow-y: auto; padding: 8px 24px 0; }
  .calm-m-nav .calm-m-top { font-size: 17px !important; font-weight: 500; padding: 16px 0 !important; border-bottom: 1px solid var(--s-border) !important; }
  .calm-m-foot { display: grid; gap: 12px; padding: 20px 24px 0; border-top: 1px solid var(--s-border); }
  .calm-m-play { display: flex; justify-content: center; }
  .calm-m-play img { height: 44px; width: auto; }
  .calm-m-lang { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 8px; background: rgba(127, 127, 127, .1); }
  .calm-m-lang a { text-align: center; padding: 8px 0; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--s-muted) !important; text-decoration: none; }
  .calm-m-lang a.on { background: var(--s-bg); color: var(--s-accent-text) !important; }
  .calm-m-zera, .calm-m-login { display: block; text-align: center; padding: 12px; border-radius: 8px; font-size: 14px; font-weight: 600; text-decoration: none; }
  .calm-m-zera { border: 1px solid var(--s-accent-border); background: var(--s-accent-soft); color: var(--s-accent-text) !important; }
  .calm-m-login { border: 1px solid var(--s-border-strong); color: var(--s-text) !important; }
  .calm-m-cta { display: flex !important; margin: 0 !important; padding: 12px !important; background: var(--s-accent) !important; color: #fff !important; }
}
