/* Shared interaction/layout layer. Generated project artwork is isolated in
   its iframe; these rules apply only to the studio interface. */
:root {
  --paper: #f6f8f4;
  --ink: #20352d;
  --muted: #53645b;
  --green: #185442;
  --line: #d8e1d5;
  --control-line: #7d8e82;
  --focus: #176849;
}
html { scroll-padding-top: 24px; }
body { text-size-adjust: 100%; }
h1, h2, h3, h4 { letter-spacing: -.025em; }
h1, .page-heading h1, .empty h1, .auth-layout h1 { line-height: 1.3; }
h2, .section-heading h2 { line-height: 1.4; }
p, .muted, label, legend, small, th { color: var(--muted); }
p { max-width: 75ch; }
a { text-underline-offset: .2em; }
.prose a, p a:not(.button), .field-help a { text-decoration: underline; }
.prose a.button { text-decoration: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px;
}
input:not([type=checkbox]):not([type=radio]):not([type=color]),
textarea, select { border-color: var(--control-line); min-height: 48px; }
input::placeholder, textarea::placeholder { color: #647269; opacity: 1; }
input[type=color] { min-height: 44px; border-color: var(--control-line); }
input[type=file] { width: 100%; border: 1px solid var(--control-line); border-radius: 9px; padding: 7px; }
input::file-selector-button { min-height: 36px; border: 0; border-radius: 5px; background: #e9f0e4; color: var(--ink); font: inherit; padding: 5px 10px; margin-inline-end: 10px; cursor: pointer; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; flex-shrink: 0; vertical-align: middle; }
label:has(> input[type=checkbox]), label:has(> input[type=radio]), .checkline {
  display: flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 500;
}
label:has(> input[type=checkbox]) input, label:has(> input[type=radio]) input { margin: 0; }
button, .button { min-height: 44px; }
.button, button:not(.icon-button):not(.mobile-menu):not([data-dismiss]) { padding: 11px 18px; border-color: #829486; }
.button.small, button.small { min-height: 44px; padding: 9px 14px; font-size: 1rem; }
.button.large { min-height: 52px; }
.button:hover, button:hover:not(:disabled) { transform: none; }
.icon-button, .mobile-menu, [data-dismiss] { min-width: 44px; min-height: 44px; color: var(--green); }
.button-danger { color: #962d26 !important; border-color: #c58a80 !important; }
.button:disabled, button:disabled { opacity: .65; }
.button[aria-disabled=true] { opacity: .65; }
.row, .form-actions, .actions, .toolbar { gap: 12px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; }
.row > *, .form-grid > *, .grid-2 > *, .grid-3 > *, .grid-4 > *, .split > * { min-width: 0; }
.field { margin-bottom: 22px; }
.field-help { display: block; font-size: var(--text-small); color: var(--muted); margin: 7px 0 0; line-height: 1.6; }
.section-heading { gap: 16px; flex-wrap: wrap; }
.section-heading p { margin: 6px 0 0; }
.panel, .card { padding: 28px; }
.panel > :last-child, .card > :last-child { margin-bottom: 0; }
.panel > h2, .card > h2 { margin-bottom: 12px; }
.panel form + form { margin-top: 18px; }
.page-heading { align-items: flex-start; flex-wrap: wrap; }
.page-heading p { max-width: 65ch; }
.page-heading > .row { flex-wrap: wrap; }
.toolbar { align-items: flex-start; }
.toolbar > form, .toolbar > .row { flex-wrap: wrap; }
.tabs a, .tabs button, .site-nav a, .section-nav a, .catalog-filters a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 10px 14px !important;
  font-size: 1rem; color: var(--muted) !important;
}
.tabs .active, .tabs [aria-selected=true], .tabs [aria-current=page], .site-nav a.active, .catalog-filters a.active {
  color: #194e37 !important; box-shadow: inset 0 -3px #316d4e;
}
.section-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.section-nav a { border: 1px solid var(--line); border-radius: 8px; background: white; }
summary { min-height: 48px; line-height: 1.5; padding: 14px 0; color: var(--ink); }
summary:hover { color: var(--green); }
.advanced-options { border: 1px solid var(--line); border-radius: 12px; background: #fbfcf9; padding: 0 18px; margin: 18px 0; }
.advanced-options[open] { padding-bottom: 20px; }
.advanced-options > summary { font-size: 1rem; }
.advanced-options > summary + * { margin-top: 12px; }
details.panel:not([open]), details.card:not([open]) { padding-block: 8px; }
.empty-state { padding: 25px; background: #f4f7ef; border: 1px dashed #b4c5ad; border-radius: 12px; }
.empty-state p:last-child { margin-bottom: 0; }
.table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.table-wrap:focus-visible { outline-offset: 2px; }
th { letter-spacing: .025em; text-transform: none; font-size: .9375rem; background: #f0f4ec; }
td { font-size: .9375rem; vertical-align: top; }
td, th { padding: 14px 16px; }
tr:last-child td { border-bottom: 0; }
pre, .code-block { font-size: .9375rem; }
.notice, .flash { font-size: .9375rem; color: #365c36; }
.notice.error, .notice.danger { color: #8b3028; }
.notice.warning { color: #73551c; }
.badge, .badge.live, .tiny-tag, .notification-count { color: #365b32; }
.badge.premium { color: #80591f; }
.pricing-card .badge { background: #315d38; color: white; position: static; width: fit-content; }
.status-completed { color: #285e34; }
.status-failed { color: #9a3127; }
.status-queued { color: #765c1f; }
.eyebrow, .sidebar-label, .brand small, .brand-light, .welcome-date,
.quota-card .row, .quota-card small, .quota-card > a, .sidebar-profile small,
.workspace-header .muted, .language-picker, .language-picker summary,
.nav-item, .nav-icon, .project-info .meta, .project-footer, .project-thumb .thumb-label,
.new-project-card, .new-project-card strong, .inspiration-card p, .inspiration-card > a,
.quick-card small, .quick-card > .arrow, .stat .row, .stat .delta,
.section-heading a, .subtle-link, .hero-search-note, .hero-proof, .hero-hints,
.public-nav, .public-hero > div > p, .dashboard-hero p, .section-intro p,
.category-card strong, .category-card small, .public-section .card p,
.public-footer, .public-footer p, .public-footer small, .public-footer nav strong, .footer-bottom,
.docs-sidebar a, .docs-sidebar h3, .catalog-header p, .template-card p, .template-card > small,
.pricing-card ul, .pricing-card .price small, .chat-message .message-role, .list-card p,
.module-feature-list a, .progress-list li, .checklist li, .divider, .kbd, .prose ul, .prose ol {
  color: var(--muted);
}
.public-hero h1 em { color: #456d39; }
.hero-kicker, .prompt-tags a { color: #426033; }
.step-number { color: #5b744b; }
.public-article-lead, .public-lead { color: var(--muted) !important; }
.prose a { color: #225b41; }
.docs-sidebar a.active { color: #254d32; }
.language-picker nav { top: 100%; max-height: min(400px, 65vh); }
.language-picker nav a { min-height: 44px; display: flex; align-items: center; color: var(--muted); }
.language-picker nav a[aria-current=true] { color: #254d32; }
.help-link { width: auto; height: auto; min-height: 44px; padding: 10px 12px; border-radius: 8px; color: #365835; display: inline-flex; align-items: center; gap: 5px; }
.help-link span { display: inline; }
.header-actions > .avatar, .sidebar-profile > .avatar { width: 44px; height: 44px; }
.workspace-header { min-height: 76px; height: auto; padding-block: 12px; }
.sidebar { width: 272px; padding: 24px 18px 0; }
.workspace-frame { margin-left: 272px; }
.sidebar .brand { margin-bottom: 25px; }
.sidebar-label { letter-spacing: .08em; font-size: .8125rem; }
.nav-item { min-height: 48px; padding: 11px 12px; gap: 10px; }
.nav-item.active { color: #224e34; box-shadow: inset 3px 0 #316d4e; }
.nav-item.active .nav-icon, .workspace-header .slash { color: #46613c; }
.quota-card { padding: 15px; }
.quota-card .row, .quota-card > a, .quota-card small, .sidebar-profile small { font-size: .875rem; }
.quota-card > a { min-height: 44px; align-items: center; flex-wrap: wrap; gap: 5px; }
.sidebar-profile { padding-block: 15px; }
.sidebar-profile strong { overflow-wrap: anywhere; }
.sidebar-grow { min-height: 20px; }
.demo-strip { font-size: .875rem; color: #43543a; padding-block: 9px; flex-wrap: wrap; justify-content: flex-start; }
.demo-strip strong, .demo-strip a { color: #36552d; font-size: .875rem; }
.demo-strip a { min-height: 32px; display: inline-flex; align-items: center; }
.demo-strip span:nth-child(3) { display: inline; flex: 1; min-width: 200px; }
.demo-disclosure { display: block; padding-block: 0; }
.demo-disclosure > summary { min-height: 44px; padding: 10px 0; font-size: .875rem; color: #36552d; }
.demo-disclosure > summary strong { font-size: inherit; }
.demo-disclosure > div { padding: 6px 0 14px; }
.demo-disclosure p { font-size: .9375rem; color: #43543a; margin: 0; padding: 0; }
.demo-disclosure a { min-height: 44px; text-decoration: underline; }
.workspace-main { padding: 32px; }
.dashboard-hero { min-height: 190px; padding: 30px; }
.dashboard-hero h2 { font-size: 1.75rem; line-height: 1.4; }
.dashboard-hero p { max-width: 50ch; }
.dashboard-hero .eyebrow { margin-bottom: 10px; }
.quick-actions { grid-template-columns: repeat(2, minmax(0,1fr)); }
.quick-card { padding: 20px; }
.quick-card strong { font-size: 1.125rem; }
.quick-card small { font-size: .9375rem; }
.quick-card > div { min-width: 0; }
.quick-icon { width: 42px; height: 44px; flex-shrink: 0; }
.quick-icon, .quick-icon.peach, .quick-icon.lavender, .quick-icon.blue,
.inspiration-card .inspiration-icon, .new-project-card > span { color: #46613c; }
.avatar-stack span { color: #3b5434; }
.project-info h3 { white-space: normal; overflow-wrap: anywhere; font-size: 1.125rem; }
.project-info .meta { flex-wrap: wrap; gap: 6px; }
.project-info .meta a, .project-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.project-footer { flex-wrap: wrap; gap: 8px; }
.new-project-card { padding: 24px; text-align: center; }
.inspiration-card { flex-wrap: wrap; }
.inspiration-card > div { flex: 1; min-width: 160px; }
.inspiration-card > a { display: inline-flex; align-items: center; min-height: 44px; }
.hero-input { padding: 20px; max-width: 560px; }
.hero-input textarea { min-height: 105px; }
.hero-input .row { flex-wrap: wrap; }
.prompt-tags a { min-height: 44px; display: inline-flex; align-items: center; }
.public-footer nav { gap: 4px; }
.public-footer nav a { min-height: 44px; display: inline-flex; align-items: center; }
.public-footer small, .footer-bottom { font-size: .875rem; }
.public-header { min-height: 90px; height: auto; padding-block: 14px; }
.public-nav a { min-height: 44px; display: inline-flex; align-items: center; }
.category-card { padding: 24px 16px; }
.category-card strong { display: block; }
.category-card .category-icon { color: #506e40; }
.template-card .template-icon { color: #506e40; }
.template-card { min-height: 230px; }
.prose { max-width: 70ch; }
.auth-page { max-width: 1100px; margin: 0 auto; padding: 40px 28px 64px; align-items: start; }
.auth-page .auth-intro h1 { margin-bottom: 0; }
.prose p, .markdown-output { color: #31483b; }
.prose .button { color: var(--ink); }
.docs-sidebar { max-height: 80vh; padding-right: 18px; }
.docs-sidebar a { min-height: 44px; }
.module-feature-list a, .subtle-link { display: inline-flex; align-items: center; min-height: 44px; }
.preview-toolbar { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.preview-toolbar .row { flex-wrap: wrap; }
.preview-frame { min-width: 0; }
.chat-message { padding: 24px; }
.chat-message .message-role { letter-spacing: .04em; font-weight: 600; }
.chat-message.user { margin-left: 24px; }
.chat-message.assistant { margin-right: 24px; }
.chat-message .advanced-options { background: transparent; }
.list-card { flex-wrap: wrap; }
.skip-link { position: fixed; top: 8px; left: 16px; z-index: 200; padding: 12px 20px; border-radius: 8px; background: #185442; color: white; transform: translateY(-160%); }
.skip-link:focus { transform: none; color: white; }
.menu-backdrop { display: none !important; }
.sidebar-close { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[dir=rtl] .sidebar { inset: 0 0 0 auto; border-left: 1px solid var(--line); border-right: 0; }
[dir=rtl] .workspace-frame { margin-left: 0; margin-right: 272px; }
[dir=rtl] h1, [lang=bn] h1, [lang=bn] h2, [lang=bn] h3 { letter-spacing: 0; }
@media (max-width: 1100px) {
  .workspace-body .split, .workspace-body .builder-workspace { grid-template-columns: minmax(0,1fr); }
  .project-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .public-nav { gap: 16px; }
  .public-header { padding-inline: 24px; gap: 18px; }
}
@media (max-width: 950px) {
  .public-header > .mobile-menu { display: block; }
  .public-header { position: relative; }
  .menu-open .public-nav { display: flex; position: absolute; top: 100%; left: 16px; right: 16px; padding: 18px; background: white; border: 1px solid var(--line); border-radius: 10px; z-index: 45; flex-wrap: wrap; box-shadow: 0 12px 30px #20352d22; }
  .workspace-body .grid-3, .workspace-body .grid-4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 800px) {
  .sidebar { width: min(300px, 86vw); transform: translateX(-105%); transition: transform .18s; z-index: 70; padding-top: 18px; }
  .sidebar-close { display: inline-flex !important; align-self: flex-end; margin-bottom: 6px; }
  .sidebar .brand { margin-top: -38px; margin-right: 44px; font-size: 17px; }
  .sidebar .brand small { display: none; }
  .menu-open .sidebar { transform: none; }
  .workspace-frame { margin-left: 0; }
  .mobile-menu { display: block; }
  .workspace-body.menu-open { overflow: hidden; }
  .workspace-body.menu-open .menu-backdrop { display: block !important; position: fixed; inset: 0; z-index: 60; background: #15291f66; border: 0; border-radius: 0; width: 100%; height: 100%; padding: 0; }
  .workspace-header { padding: 10px 18px; }
  .workspace-header > .row:first-child { min-width: 0; flex: 1; }
  .workspace-header > .row:first-child > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .workspace-header .slash, .workspace-header .row > a.muted { display: none; }
  .header-actions { gap: 8px; }
  .header-actions .avatar { display: none; }
  .workspace-main { padding: 24px 18px 40px; }
  .workspace-main .row { flex-wrap: wrap; }
  .workspace-main form[style*="display:flex"] { flex-wrap: wrap; }
  .demo-strip { padding-inline: 18px; }
  [dir=rtl] .sidebar { transform: translateX(105%); }
  [dir=rtl] .menu-open .sidebar { transform: none; }
  [dir=rtl] .workspace-frame { margin-right: 0; }
}
@media (max-width: 640px) {
  .panel, .card { padding: 20px; }
  .public-header { padding: 16px 20px; }
  .public-hero { padding: 32px 20px; }
  .public-hero h1 { font-size: 2.25rem; line-height: 1.2; }
  .public-section { margin-inline: 20px; }
  .grid-2, .grid-3, .grid-4, .workspace-body .grid-3, .workspace-body .grid-4, .form-grid { grid-template-columns: minmax(0,1fr); }
  .quick-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .quick-card { padding: 16px; }
  .quick-card strong { font-size: 1rem; }
  .dashboard-hero { padding: 24px; }
  .dashboard-hero h2, .dashboard-hero p { max-width: none; }
  .hero-art { display: none; }
  .page-heading > .row { justify-content: flex-start; }
  .project-grid { grid-template-columns: minmax(0,1fr); }
  .project-thumb { height: 190px; }
  .project-thumb iframe { transform: scale(.3); }
  .docs-layout { margin-inline: 20px; }
  .docs-sidebar { max-height: 260px; }
  .input-group { flex-wrap: wrap; }
  .input-group > :first-child { flex-basis: 100%; }
  .chat-message { padding: 18px; }
  .chat-message.user, .chat-message.assistant { margin-inline: 0; }
  .preview-frame { height: 520px; }
  .demo-strip span:nth-child(3) { flex-basis: 100%; min-width: 0; }
  .demo-strip a { margin-left: 0; }
  .footer-bottom { flex-wrap: wrap; gap: 10px; }
  .auth-layout .panel { padding: 24px; }
  .auth-page { padding: 26px 20px 40px; gap: 24px; }
  .auth-marketing { display: none; }
  .logo-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .card:hover, .quick-card:hover, .project-card:hover { transform: none; }
}
@media print {
  .skip-link, .menu-backdrop, .sidebar-close { display: none !important; }
  .workspace-frame, [dir=rtl] .workspace-frame { margin: 0; }
}
/* Keep the setup checklist readable without squeezing three columns on phones. */
@media (max-width: 600px) {
  .service-requirements table,
  .service-requirements tbody,
  .service-requirements tr,
  .service-requirements td { display: block; width: 100%; }
  .service-requirements thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .service-requirements tr { padding: 12px 0; border-bottom: 1px solid #dce2dc; }
  .service-requirements td { padding: 6px 12px; border: 0; }
  .service-requirements td:first-child { font-weight: 700; }
  .service-requirements td:nth-child(2)::before { content: "Service: "; font-weight: 600; }
  .service-requirements td:nth-child(3)::before { content: "Setup: "; font-weight: 600; }
}
