/* Konvrt / Creative studio, September 2026.
   Shared last-loaded presentation layer for every page and both locales. */
:root {
  /* Konvrt's original burgundy palette. Creative layout stays intact. */
  --brand: #550000; --brand-light: #e0cfc2; --brand-2: #8e3d32;
  --bg: #f6f2ef; --surface: #ffffff; --text: #1a1d26; --ink: #1a1d26;
  --muted: #6b6460; --line: #ddd5ce; --accent: #550000; --accent-fg: #ffffff;
  --soft: #f0ebe6; --studio-lime: #e0cfc2; --studio-ink: #550000;
  --shadow: 0 12px 30px #55000012; --code-bg: #f0ebe6;
}
html.dark {
  --bg: #1a1210; --surface: #2a201c; --text: #e8e0da; --ink: #e8e0da;
  --muted: #a09690; --line: #3d322c; --accent: #e0cfc2; --accent-fg: #2a1a14;
  --brand: #550000; --brand-light: #e0cfc2; --brand-2: #8e3d32;
  --soft: #332c26; --studio-lime: #e0cfc2; --studio-ink: #550000; --code-bg: #332c26;
}
body { background: var(--bg); color: var(--text); }
body::before, body::after { background: none; animation: none; }
::selection { background: var(--studio-lime); color: var(--studio-ink); }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
:where(a, button, summary) { -webkit-tap-highlight-color: transparent; }
/* A quiet, ruled navigation frame keeps the work itself in focus. */
.site-header { top: 0; margin-bottom: 0; padding: 12px 24px; background: var(--bg); animation: none; }
.site-header .site-header-inner, .legal-header {
  width: min(1440px, 100%); border-radius: 0; border: 0; border-bottom: 1px solid var(--line);
  background: var(--bg); box-shadow: none; backdrop-filter: none; padding: 10px 0 18px;
}
.site-header-inner::before { content: none; }
/* Appearance is always available directly from the header. */
body:is(.konvrt-app-header, .konvrt-workspace-active) #theme-btn { display: inline-flex !important; }
/* Keep the primary app navigation at the physical centre of the viewport.
   Header controls may grow when a person signs in or switches language. */
@media (min-width: 901px) {
  body:is(.konvrt-app-header, .konvrt-workspace-active) .site-header-inner > .konvrt-mode-bar {
    position: absolute;
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    left: 50%;
    transform: translateX(-50%);
    width: min(620px, calc(100% - 300px));
  }
}
/* Match the legacy header's explicit priority without changing its layout. */
body:is(.konvrt-app-header, .konvrt-workspace-active) .site-header-inner > .konvrt-mode-bar .prompt-mode-btn {
  --mode-color: var(--accent); background: transparent !important; color: var(--text) !important;
  border-color: var(--line) !important; border-radius: 4px !important; box-shadow: none !important;
}
body:is(.konvrt-app-header, .konvrt-workspace-active) .site-header-inner > .konvrt-mode-bar .prompt-mode-btn.is-active {
  background: var(--studio-lime) !important; color: var(--studio-ink) !important; border-color: var(--studio-lime) !important;
}
body:is(.konvrt-app-header, .konvrt-workspace-active) .site-header-inner > .konvrt-mode-bar .prompt-mode-btn.is-active .prompt-mode-icon { color: var(--studio-ink) !important; background: transparent !important; }
body:is(.konvrt-app-header, .konvrt-workspace-active) .site-header-inner > .konvrt-mode-bar .prompt-mode-switch.has-explore {
  /* This header renders four destinations. Avoid reserving a phantom fifth track. */
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}
.landing-page { background: var(--bg); }
.landing-theme {
  position: absolute; top: clamp(1rem, 3vw, 1.75rem); inset-inline-end: clamp(1rem, 3vw, 1.75rem);
  display: inline-grid; place-items: center; width: 44px; min-height: 44px; padding: 0;
  color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 50%; cursor: pointer;
}
.landing-theme svg { width: 18px; height: 18px; }
.landing-page .landing-language { inset-inline-end: calc(clamp(1rem, 3vw, 1.75rem) + 54px); }
.landing-page .landing-logo-stage { width: 86px; }
.landing-page .landing-logo { border-radius: 4px; background: var(--studio-ink); box-shadow: none; }
.landing-page .landing-primary { color: var(--text); font-size: clamp(2.5rem, 5vw, 4.5rem); letter-spacing: -.055em; line-height: 1.08; max-width: 20ch; margin-inline: auto; }
.landing-page .landing-beta { color: var(--studio-ink); background: var(--studio-lime); border-radius: 2px; }
.landing-page .landing-motion-stage { border-radius: 3px; box-shadow: 9px 9px 0 var(--brand-light); }
.landing-page .landing-start { background: var(--studio-ink); color: #fffef8; border-radius: 4px; box-shadow: none; }
.landing-page .landing-secondary, .landing-page .landing-studio-preview { border-radius: 4px; }
[dir="rtl"] .landing-page .landing-primary { letter-spacing: 0; line-height: 1.3; }
.creative-error main { border-radius: 4px; border-color: var(--line); background: var(--surface); box-shadow: 12px 12px 0 var(--brand-light); }
.creative-error h1 { color: var(--text); }
.creative-error img, .creative-error a { background: var(--studio-ink); border-radius: 4px; }
.creative-error a + a { background: var(--studio-lime); color: var(--studio-ink); }
.site-header .site-logo-wrap, .legal-logo { background: var(--studio-ink); border-radius: 6px; box-shadow: none; }
.site-header .site-nav a, .legal-nav a { border-radius: 4px; }
.site-header .site-nav a.is-active, .legal-nav a[aria-current="page"] { background: var(--studio-lime); color: var(--studio-ink); }
.legal-header { top: 0; width: min(1440px, calc(100% - 48px)); margin-top: 0; padding-top: 18px; }
.language-toggle { border-radius: 4px; background: var(--surface); color: var(--text); }
.legal-theme-toggle { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--line); border-radius: 4px; color: var(--text); background: var(--surface); cursor: pointer; }
.legal-theme-toggle svg { width: 17px; height: 17px; }
.legal-header { grid-template-columns: auto 1fr auto auto; }
html.dark .legal-header, html.dark .legal-footer { color: var(--text); }
html.dark .legal-header, html.dark .legal-footer, html.dark .policy-card, html.dark .support-card, html.dark .about-card, html.dark .fact-card, html.dark .faq-list details { background: var(--surface); }
/* Homepage: an editorial headline opposite a photographic contact sheet. */
.kv-hero { width: min(1440px, calc(100% - 96px)); grid-template-columns: 1.05fr 1fr; gap: 60px; padding-block: 70px 64px; }
.kv-eyebrow, .kv-demo-topline, .legal-eyebrow, .atelier-label {
  font-family: "IBM Plex Sans", "IBM Plex Sans Arabic", sans-serif; font-size: 11px;
  font-weight: 600; letter-spacing: .13em; text-transform: uppercase;
}
.kv-eyebrow { display: flex; align-items: center; gap: 12px; }
.kv-eyebrow::before { content: ""; width: 9px; height: 9px; background: var(--accent); border-radius: 50%; flex: none; }
.kv-hero h1 { font-size: clamp(3.5rem, 6.7vw, 6.7rem); line-height: .97; letter-spacing: -.065em; font-weight: 600; margin-block: 30px 25px; }
.kv-hero h1 em { font-family: Georgia, serif; font-weight: 400; color: var(--accent); }
html.dark .kv-hero h1, html.dark .site-header .site-name { color: var(--text); }
html.dark .kv-button-primary { background: var(--accent); color: var(--accent-fg); }
.kv-hero-summary { font-size: 1.05rem; max-width: 34ch; }
.kv-button { border-radius: 4px; min-height: 56px; padding-inline: 22px; }
.kv-button-primary { background: var(--studio-ink); color: var(--surface); }
.kv-button-primary > span[aria-hidden] { display: grid; place-items: center; border-radius: 50%; background: var(--studio-lime); color: var(--studio-ink); width: 28px; height: 28px; }
.kv-text-link { text-decoration-thickness: 1px; }
.kv-credit-note { font-size: .72rem; margin-top: 22px; }
.kv-demo { position: relative; border-radius: 3px; background: var(--studio-ink); color: var(--surface); border: 0; padding: 18px; box-shadow: 12px 12px 0 var(--brand-light); transform: rotate(2deg); }
.kv-demo::after { content: "✳"; position: absolute; inset-inline-end: -24px; top: -35px; font-size: 76px; line-height: 1; color: var(--accent); transform: rotate(-14deg); pointer-events: none; }
.kv-demo-topline { color: var(--surface); font-size: 10px; }
.kv-demo-result { margin: 0; border-radius: 1px; aspect-ratio: 1.18; }
.kv-demo-result figcaption { background: var(--studio-lime); color: var(--studio-ink); border: 0; border-radius: 2px; }
.kv-demo-stage { padding-bottom: 22px; }
.kv-demo-source { margin: 0; inset-inline-start: -32px; bottom: 2px; width: 125px; border-radius: 2px; padding: 7px; transform: rotate(-10deg); background: var(--surface); }
.kv-demo-source img { border-radius: 0; }
.kv-demo-source figcaption { color: var(--studio-ink); }
.kv-demo-controls { gap: 7px; }
.kv-demo-controls button { min-height: 48px; color: var(--brand-light); border: 1px solid color-mix(in srgb, var(--brand-light) 45%, transparent); border-radius: 3px; }
.kv-demo-controls button[aria-pressed="true"] { background: var(--studio-lime); border-color: var(--studio-lime); color: var(--studio-ink); box-shadow: none; }
.kv-demo-controls button img { border-radius: 1px; }
.kv-demo-caption { color: var(--brand-light); font-size: 10px; }
.kv-quick-steps { width: min(1440px, calc(100% - 96px)); gap: 0; padding-block: 0; margin-bottom: 0; }
.kv-quick-steps a { padding: 22px 14px; justify-content: flex-start; gap: 18px; }
.kv-quick-steps a + a { border-inline-start: 1px solid var(--line); }
.kv-quick-steps a > span:first-child { background: var(--studio-lime); color: var(--studio-ink); border-radius: 50%; width: 28px; height: 28px; display: grid; place-items: center; }
.kv-quick-steps a::after { content: "↗"; margin-inline-start: auto; font-size: 22px; }
/* Curated examples remain useful even before the community has posts. */
.atelier-lookbook { width: min(1440px, calc(100% - 96px)); margin: 72px auto; }
.atelier-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.atelier-label { color: var(--muted); margin: 0 0 13px; }
.atelier-heading h2 { font-size: clamp(2rem, 3.8vw, 3.8rem); line-height: 1.1; font-weight: 500; letter-spacing: -.05em; margin: 0; }
.atelier-heading > p { max-width: 32ch; color: var(--muted); font-size: .86rem; }
.atelier-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.atelier-card { display: block; color: var(--text); text-decoration: none; min-width: 0; }
.atelier-image { overflow: hidden; position: relative; background: var(--soft); aspect-ratio: 4 / 4.5; }
.atelier-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.atelier-image > span { position: absolute; top: 14px; inset-inline-start: 14px; padding: 7px 10px; background: var(--surface); color: var(--text); font-size: 10px; letter-spacing: .06em; }
.atelier-card-copy { border-bottom: 1px solid var(--line); padding-block: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.atelier-card-copy strong { display: block; font-size: 1.15rem; font-weight: 500; }
.atelier-card-copy small { color: var(--muted); font-size: .75rem; }
.atelier-card-copy > span { font-size: 25px; }
.atelier-cta { margin-top: 55px; background: var(--studio-ink); color: var(--surface); padding: 36px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.atelier-cta p { font-size: clamp(1.4rem, 2.8vw, 2.6rem); letter-spacing: -.035em; margin: 0; }
.atelier-cta .kv-button { background: var(--studio-lime); color: var(--studio-ink); flex-shrink: 0; }
.kv-main .explore-hero { width: min(1440px, calc(100% - 96px)); margin-inline: auto; padding: 0 0 26px; text-align: start; }
.kv-main .explore-hero h2 { font-size: clamp(1.8rem, 3vw, 3rem); }
.explore-wall { max-width: 1440px; margin-inline: auto; }
.explore-empty { border: 1px dashed var(--line); background: var(--soft); border-radius: 2px; }
.kv-footer { width: min(1440px, calc(100% - 96px)); padding-top: 36px; margin-top: 55px; }
.kv-footer-brand { font-size: clamp(3rem, 6vw, 5rem); letter-spacing: -.065em; color: var(--text); }
/* The working studio keeps its geometry and control behavior. */
.card, .dock-panel, .studio-side-panel, .modal-content { border-color: var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.dock-panel-head { border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.import-intro h1, .import-intro h2 { letter-spacing: -.045em; }
.upload-btn.compact { background: var(--soft); border: 1px dashed var(--accent); border-radius: 6px; box-shadow: none; }
.workflow-header-step.is-active { background: var(--studio-lime); color: var(--studio-ink); border-color: var(--studio-lime); }
.explore-mobile-nav { background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px #5500000d; }
.explore-mobile-nav .mobile-item.is-active { background: var(--studio-lime); color: var(--studio-ink); }
/* Product, pricing, help, policy and error pages. */
.legal-shell { width: min(1200px, calc(100% - 64px)); }
.legal-hero { border: 0; border-radius: 0; background: var(--studio-ink); color: var(--surface); padding: clamp(28px, 5vw, 64px); box-shadow: none; overflow: hidden; }
.legal-hero::after { content: "✳"; top: 12px; inset-inline-end: 22px; width: auto; height: auto; background: none; color: var(--studio-lime); font-size: 100px; opacity: .5; border-radius: 0; pointer-events: none; }
.legal-eyebrow { background: var(--studio-lime); color: var(--studio-ink); border: 0; border-radius: 2px; padding: 6px 10px; }
.legal-hero h1 { color: var(--surface); max-width: 18ch; font-size: clamp(2.3rem, 4.8vw, 4.8rem); letter-spacing: -.045em; line-height: 1.15; position: relative; z-index: 1; }
.legal-hero p, .legal-hero .legal-meta, .legal-hero .legal-meta a, .legal-hero .product-hero-actions small { color: var(--brand-light); }
.legal-hero .support-submit { background: var(--studio-lime); color: var(--studio-ink); }
.policy-card, .support-card, .about-card, .fact-card, .faq-list details { border-radius: 4px; background: var(--surface); box-shadow: none; }
.policy-card, .support-card, .about-card { padding: clamp(22px, 3vw, 36px); }
.policy-card h2, .support-card h2, .about-card h2 { letter-spacing: -.025em; }
.policy-card p, .about-card p, .policy-card ul, .policy-card ol { color: var(--muted); }
.policy-callout, .product-example-method { background: var(--soft); border-radius: 2px; }
.support-submit { background: var(--accent); color: var(--accent-fg); border-radius: 4px; box-shadow: none; }
.field input, .field select, .field textarea { background: var(--bg); border-radius: 4px; color: var(--text); }
.faq-list details[open] { border-color: var(--accent); }
.faq-list summary { min-height: 56px; }
.product-example-grid a { border-radius: 3px; }
.legal-footer { background: var(--soft); border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }
[dir="rtl"] .kv-hero h1, [dir="rtl"] .kv-hero h1 em, [dir="rtl"] .legal-hero h1 { font-family: "IBM Plex Sans Arabic", sans-serif; letter-spacing: 0; line-height: 1.3; }
[dir="rtl"] .atelier-label, [dir="rtl"] .legal-eyebrow { letter-spacing: 0; }
[dir="rtl"] .kv-demo { transform: rotate(-2deg); }
@media (hover: hover) and (pointer: fine) {
  .atelier-card:hover .atelier-image img { transform: scale(1.045); }
  .kv-quick-steps a:hover { background: var(--soft); }
  .kv-button:hover { box-shadow: 4px 4px 0 var(--line); }
}
@media (max-width: 1000px) {
  .kv-hero { gap: 36px; width: calc(100% - 64px); }
  .kv-hero h1 { font-size: clamp(3rem, 6.7vw, 5rem); }
  .kv-demo-source { width: 95px; inset-inline-start: -16px; }
  .kv-quick-steps, .atelier-lookbook, .kv-main .explore-hero, .kv-footer { width: calc(100% - 64px); }
  .atelier-grid { gap: 14px; }
  .legal-nav a { font-size: 12px; padding: 6px; }
}
@media (max-width: 767px) {
  .site-header { padding: 6px 16px; }
  .kv-hero { width: calc(100% - 40px); display: flex; gap: 18px; padding-block: 30px 38px; }
  .kv-hero h1 { font-size: clamp(3rem, 12vw, 5rem); line-height: 1; margin: 0; }
  .kv-hero h1 span, .kv-hero h1 em { display: block; }
  .kv-hero-summary { font-size: .92rem; max-width: 38ch; }
  .kv-hero .kv-demo { margin: 20px 5px 15px; padding: 13px; box-shadow: 7px 7px 0 var(--brand-light); }
  .kv-demo::after { font-size: 58px; inset-inline-end: -13px; top: -27px; }
  .kv-demo-result { aspect-ratio: 1.3; }
  .kv-demo-controls button { min-height: 46px; }
  .kv-demo-source { inset-inline-start: -13px; width: 85px; }
  .kv-hero-actions { gap: 16px; }
  .kv-hero-actions .kv-button { flex: 1; }
  .kv-credit-note { font-size: .7rem; }
  .kv-quick-steps, .atelier-lookbook, .kv-main .explore-hero, .kv-footer { width: calc(100% - 40px); }
  .kv-quick-steps a { padding: 12px 5px; gap: 6px; font-size: .65rem; }
  .kv-quick-steps a > span:first-child { width: 21px; height: 21px; flex: none; font-size: 9px; }
  .kv-quick-steps a::after { content: none; }
  .atelier-lookbook { margin-block: 42px; }
  .atelier-heading { align-items: start; flex-direction: column; gap: 15px; }
  .atelier-heading h2 { font-size: 2.4rem; }
  .atelier-grid { grid-template-columns: 1fr; gap: 28px; }
  .atelier-image { aspect-ratio: 1.2; }
  .atelier-cta { flex-direction: column; align-items: stretch; padding: 25px; margin-top: 35px; }
  .atelier-cta p { font-size: 1.9rem; }
  .kv-footer { margin-top: 35px; }
  .legal-header { width: calc(100% - 28px); gap: 8px; }
  .landing-theme { top: calc(1rem + env(safe-area-inset-top, 0px)); width: 40px; min-height: 40px; }
  .landing-page .landing-language { inset-inline-end: calc(1rem + 48px); }
  .legal-shell { width: calc(100% - 32px); }
  .legal-hero { padding: 28px 22px; }
  .legal-hero::after { font-size: 66px; inset-inline-end: 12px; }
  .legal-hero h1 { font-size: 2.4rem; }
  .legal-hero p { font-size: 15px; }
}
@media (max-width: 900px) {
  body:is(.konvrt-app-header, .konvrt-workspace-active) .site-header-inner { grid-template-columns: 44px minmax(0, 1fr) 82px !important; }
  body:is(.konvrt-app-header, .konvrt-workspace-active) .site-header-actions { gap: .22rem; }
  body:is(.konvrt-app-header, .konvrt-workspace-active) #theme-btn { width: 30px; min-width: 30px; padding: 0; justify-content: center; }
  body:is(.konvrt-app-header, .konvrt-workspace-active) #auth-open-btn { padding-inline: .38rem; font-size: .68rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
