@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Syne:wght@500;600;700;800&display=swap");

/* Shared application chrome. Canvas compositions retain their own styling. */
body.climate-editor {
  --ui-ink: #1a2f23;
  --ui-muted: #526052;
  --ui-line: #dedfd3;
  --ui-accent: #1f3a2b;
  --studio-ink: #1a2f23;
  --studio-muted: #526052;
  --studio-line: #dedfd3;
  --studio-accent: #1f3a2b;
  --studio-paper: #fffefa;
  --studio-soft: #f7f2e7;
  --studio-radius: 6px;
  background: #fbf8f2;
  color: #1a2f23;
  font-family: "DM Sans", sans-serif;
}
.climate-editor .editor-page-heading {
  flex-shrink: 0;
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 28px 4vw 0;
}
.climate-editor .editor-page-kicker {
  display: block;
  margin-bottom: 8px;
  color: #7b653f;
  font: 700 10px/1.5 "DM Sans", sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.climate-editor .editor-page-heading h1 {
  margin: 0;
  color: #1a2f23;
  font: 700 clamp(25px, 2vw, 34px)/1.2 "Syne", sans-serif;
  letter-spacing: -.7px;
}
.climate-editor .editor-page-heading p {
  margin: 8px 0 0;
  color: #526052;
  font-size: 13px;
  line-height: 1.7;
}
.climate-editor .panel-heading {
  border-bottom: 1px solid #dedfd3;
  margin-bottom: 16px;
}
.climate-editor .panel-heading h2 {
  color: #1a2f23;
  font: 700 15px/1.4 "Syne", sans-serif;
}
.climate-editor .panel-heading span { color: #68725e; letter-spacing: .12em; }
.climate-editor main > aside :is(.card, details),
.climate-editor .preview-inspector {
  border-color: #dedfd3;
  border-radius: 6px;
  background: #fffefa;
  box-shadow: none;
}
.climate-editor main > aside :is(.card h2, summary b),
.climate-editor .preview-inspector > h3 {
  color: #1a2f23;
  font-family: "Syne", sans-serif;
  font-weight: 700;
}
.climate-editor main > aside label {
  color: #354b3b;
  font-size: 12px;
  font-weight: 600;
}
.climate-editor main > aside :is(.hint, label small, summary small),
.climate-editor .preview-inspector > p { color: #63705f; font-size: 11px; }
.climate-editor main > aside :is(textarea, select, input:not([type=range]):not([type=checkbox]):not([type=color])),
.climate-editor .download :is(input, select) {
  border-color: #d7ddcf;
  border-radius: 4px;
  background: #fffefa;
  color: #263f2e;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  box-shadow: none;
}
.climate-editor main > aside :is(textarea, select, input):focus {
  border-color: #52734c;
  outline: 2px solid #52734c44;
  outline-offset: 2px;
  box-shadow: none;
}
.climate-editor main > aside button,
.climate-editor .editor-toolbar button,
.climate-editor .download button,
.climate-editor .preview-context button,
.climate-editor .post-preview button {
  border-radius: 4px;
  font-family: "DM Sans", sans-serif;
}
.climate-editor main > aside button {
  border-color: #d7ddcf;
  background: #f7f2e7;
  color: #254435;
  font-size: 12px;
}
.climate-editor main > aside button:hover { background: #eee6d2; border-color: #afbea4; }
.climate-editor .template-shortcuts button[aria-pressed=true] {
  border-color: #1f3a2b;
  background: #1f3a2b;
  color: #fffefa;
}
.climate-editor main > aside .upload {
  background: #f7f2e7;
  border-color: #a9b79e;
  border-radius: 4px;
  color: #254435;
}
.climate-editor main > aside .advanced-controls { background: #fbf8f2; }
.climate-editor main > aside .advanced-controls > summary { color: #465c3e; font-size: 12px; }
.climate-editor .section-number,
.climate-editor main > aside .card h2 > span { color: #7b653f; background: #f7f2e7; border-color: #e4dbc6; }
.climate-editor .canvas-wrap {
  padding: 16px;
  border: 1px solid #d8d5c9;
  border-radius: 6px;
  background: #eeeade;
  box-shadow: 0 6px 24px #1a2f2308;
}
.climate-editor :is(.download, .editor-toolbar) {
  border-color: #dedfd3;
  border-radius: 6px;
  background: #fffefa;
  box-shadow: none;
}
.climate-editor :is(#download, #previewPost, #previewImageUpload) {
  border-color: #1f3a2b;
  border-radius: 4px;
  background: #1f3a2b;
  color: #fffefa;
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
}
.climate-editor :is(#download, #previewPost, #previewImageUpload):hover { background: #132a1d; }
.climate-editor .post-preview-player { border-color: #d8d5c9; background: #fbf8f2; border-radius: 6px; }
.climate-editor .post-preview-header :is(h2, h3) { font-family: "Syne", sans-serif; color: #1a2f23; }
.climate-editor .preview-context { border-color: #dedfd3; background: #fffefa; color: #1a2f23; }
.climate-editor .preview-note,
.climate-editor :is(#draftStatus, #status) { color: #526052; }
.climate-editor .footer-brand { opacity: .9; }

/* Video and jacket controls share the same newsroom surfaces as Image. */
body.climate-editor :is(.video-export, .jacket-preview-panel, .jacket-gallery, .jacket-editor-heading) {
  border-color: #dedfd3;
  border-radius: 6px;
  background-color: #fffefa;
  box-shadow: none;
}
body.climate-editor :is(.video-upload, .jacket-file-upload) {
  border-color: #a9b79e;
  border-radius: 4px;
  background: #f7f2e7;
  color: #254435;
}
body.climate-editor :is(.video-export, .jacket-start-actions) :is(input, select, button),
body.climate-editor :is(.jacket-text-toolbar, .jacket-action-bar) button {
  border-radius: 4px;
  font-family: "DM Sans", sans-serif;
}
body.climate-editor :is(#exportVideo, #previewVideoUpload, #downloadJacket, #useExampleJacket, #sendJacketToVideo) {
  border-color: #1f3a2b;
  background: #1f3a2b;
  color: #fffefa;
  border-radius: 4px;
}
body.climate-editor :is(.jacket-current, .jacket-gallery h2, .video-export h2) {
  color: #1a2f23;
  font-family: "Syne", sans-serif;
}

/* Converters keep their own layouts, upload states and image previews. */
body.climate-editor :is(.converter-intro h1, .converter h2, .cutout-title) {
  color: #1a2f23;
  font-family: "Syne", sans-serif;
  font-weight: 700;
}
body.climate-editor :is(.converter-intro p, .converter-settings small, .privacy-note, .converter-status) { color: #526052; }
body.climate-editor :is(.converter-settings, .conversion-workspace) {
  border-color: #dedfd3;
  border-radius: 6px;
  background: #fffefa;
  box-shadow: none;
}
body.climate-editor :is(.converter-badge, .cutout-format, .cutout-empty-tag) {
  border-color: #e4dbc6;
  border-radius: 4px;
  background: #f7f2e7;
  color: #6c5939;
}
body.climate-editor .converter-settings :is(label, input, select, button) { font-family: "DM Sans", sans-serif; }
body.climate-editor .converter-settings :is(input:not([type=range]), select) {
  border-color: #d7ddcf;
  border-radius: 4px;
  background: #fffefa;
  color: #263f2e;
}
body.climate-editor :is(.converter-drop, .converter-empty, .cutout-surface, .cutout-workspace-heading) {
  border-color: #dedfd3;
  background-color: #f7f2e7;
}
body.climate-editor .converter-drop { border-radius: 4px; color: #254435; }
body.climate-editor .converter-drop { background-image: none; }
body.climate-editor .converter-drop:hover { border-color: #52734c; background-color: #eee6d2; }
body.climate-editor :is(.converter-drop strong, .cutout-steps b) { font-family: "Syne", sans-serif; color: #1a2f23; }
body.climate-editor .converter :is(button, .download-webp, .cutout-upload-button) { border-radius: 4px; font-family: "DM Sans", sans-serif; }
body.climate-editor .converter :is(.primary, .download-webp, .cutout-upload-button) {
  background: #1f3a2b;
  border-color: #1f3a2b;
  color: #fffefa;
}
body.climate-editor .converter :is(.primary, .download-webp):hover { background: #132a1d; }

/* Thumbnail library, inspectors and dialogs. Do not target text on the stage. */
body.climate-editor.thumbnail-page :is(.thumb-heading, .thumb-toolrail, .thumb-compose, .thumb-inspector) {
  background: #fbf8f2;
  border-color: #dedfd3;
}
body.climate-editor.thumbnail-page .thumb-workspace { background: #eeeade; }
body.climate-editor.thumbnail-page .thumb-project-icon { font: 700 13px "DM Sans", sans-serif; }
body.climate-editor.thumbnail-page :is(.thumb-card, .thumb-export-dialog, .thumb-looks-dialog, .thumb-gallery-header, .thumb-gallery-filter, .thumb-gallery-scroll) {
  background: #fffefa;
  border-color: #dedfd3;
  border-radius: 6px;
  box-shadow: none;
}
body.climate-editor.thumbnail-page :is(.thumb-heading h1, .thumb-panel-heading h2, .thumb-card h2, .thumb-export-heading h2, .thumb-gallery-header h2) {
  color: #1a2f23;
  font-family: "Syne", sans-serif;
  font-weight: 700;
}
body.climate-editor.thumbnail-page .thumb-heading h1 { font-size: clamp(22px, 2vw, 30px); }
body.climate-editor.thumbnail-page :is(.thumb-project-icon, .thumb-platform-help, .thumb-file-button, .thumb-quickbar, .thumb-preview-surface) {
  background-color: #f7f2e7;
  border-color: #dedfd3;
  border-radius: 4px;
}
body.climate-editor.thumbnail-page :is(.thumb-compose, .thumb-inspector, .thumb-export-dialog, .thumb-looks-dialog) :is(label, input, select, textarea, button) {
  font-family: "DM Sans", sans-serif;
}
body.climate-editor.thumbnail-page :is(.thumb-compose, .thumb-inspector, .thumb-export-dialog) :is(input:not([type=range]):not([type=color]), select, textarea) {
  border-color: #d7ddcf;
  border-radius: 4px;
  background: #fffefa;
  color: #263f2e;
}
body.climate-editor.thumbnail-page :is(.thumb-heading-actions, .thumb-toolrail, .thumb-compose, .thumb-inspector, .thumb-export-dialog) button {
  border-radius: 4px;
  font-family: "DM Sans", sans-serif;
}
body.climate-editor.thumbnail-page :is(.thumb-export-trigger, #thumbDownload) {
  background: #1f3a2b;
  border-color: #1f3a2b;
  color: #fffefa;
}
body.climate-editor.thumbnail-page .thumb-toolrail button[aria-pressed=true] { color: #1f3a2b; background: #eee6d2; }
body.climate-editor.thumbnail-page :is(.thumb-note, .thumb-draft, .thumb-eyebrow) { color: #63705f; }
body.climate-editor :is(input, select, textarea) { accent-color: #315b46; }

/* Both click-to-select panels and right-click menus use the same design. */
body.climate-editor :is(.preview-context, .preview-format-toolbar) {
  border: 1px solid #dedfd3;
  border-radius: 6px;
  background: #fffefa;
  color: #1a2f23;
  font-family: "DM Sans", sans-serif;
}
body.climate-editor .preview-context:not(.preview-inspector) { box-shadow: 0 16px 44px #1a2f2326; }
body.climate-editor .preview-inspector { box-shadow: none; }
body.climate-editor :is(.preview-context-header h3, .preview-format-name) {
  color: #1a2f23;
  font-family: "Syne", sans-serif;
  font-weight: 700;
}
body.climate-editor .preview-context-header { border-color: #dedfd3; }
body.climate-editor :is(.preview-context-eyebrow, .preview-context-field, .preview-format-fit) { color: #63705f; }
body.climate-editor .preview-context-field { border-radius: 4px; background: #f7f2e7; }
body.climate-editor :is(.preview-context, .preview-format-toolbar, .preview-text-dock, .section-options-bar, .jacket-text-toolbar) button {
  border-radius: 4px;
  color: #254435;
  font-family: "DM Sans", sans-serif;
}
body.climate-editor :is(.preview-context, .preview-format-toolbar) button:not(:disabled):hover {
  background: #eee6d2;
  color: #1a2f23;
}
body.climate-editor .preview-context .is-danger { color: #963e32; }
body.climate-editor .preview-context .is-danger:hover { color: #802f26; background: #faeee8; }
body.climate-editor :is(.preview-context-field, .preview-format-group) :is(input:not([type=range]):not([type=color]):not([type=checkbox]), select) {
  border: 1px solid #d7ddcf;
  border-radius: 4px;
  background: #fffefa;
  color: #263f2e;
  font-family: "DM Sans", sans-serif;
}
body.climate-editor :is(.preview-context-caption output, .preview-context .context-advanced, .preview-format-group) {
  border-color: #e4dbc6;
  border-radius: 4px;
  background: #f7f2e7;
  color: #465c3e;
}
body.climate-editor .preview-context .context-advanced > summary { color: #465c3e; font-family: "DM Sans", sans-serif; }
body.climate-editor .preview-format-toolbar { box-shadow: 0 8px 24px #1a2f2314; }
body.climate-editor .preview-format-group > span { color: #526052; font-family: "DM Sans", sans-serif; }
body.climate-editor .preview-word-styles button[aria-pressed=true] { background: #1f3a2b; border-color: #1f3a2b; color: #fffefa; }
body.climate-editor .preview-text-dock button { border-color: #d7ddcf; background: #f7f2e7; }
body.climate-editor .section-options-bar { border-color: #dedfd3; }
body.climate-editor .section-options-bar button { border-color: #d7ddcf; background: #fffefa; }
body.climate-editor :is(.preview-context, .preview-format-toolbar, .preview-text-dock, .section-options-bar) :focus-visible {
  outline: 2px solid #52734c;
  outline-offset: 2px;
}
@media (max-width: 760px) {
  .climate-editor .editor-page-heading { padding: 24px 16px 0; }
  .climate-editor .canvas-wrap { padding: 8px; }
  .climate-editor main > aside :is(textarea, select, input:not([type=range]):not([type=checkbox]):not([type=color])) { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .climate-editor main :is(button, input, select, textarea) { transition: none; }
}

/* Readable, crawlable guides beneath the creative workspace. */
.climate-editor .editor-resource{box-sizing:border-box;max-width:1320px;margin:32px auto;padding:32px clamp(16px,4vw,48px);color:#263f2e;font:14px/1.8 "DM Sans",sans-serif;border-top:1px solid #dedfd3}
.climate-editor .editor-resource h2{font:700 clamp(22px,3vw,32px)/1.3 "Syne",sans-serif;color:#1a2f23;margin:12px 0}
.climate-editor .editor-resource h3{font:700 17px/1.5 "Syne",sans-serif;color:#1a2f23;margin:0 0 14px}
.climate-editor .editor-resource-intro{max-width:850px;margin:24px 0 32px}
.climate-editor .editor-breadcrumb{display:flex;flex-wrap:wrap;gap:8px 12px;font-size:12px}
.climate-editor .editor-resource a{color:#315b46;text-underline-offset:4px}
.climate-editor .editor-resource-grid{display:grid;grid-template-columns:1fr 1fr;gap:40px}
.climate-editor .editor-resource ol{padding-inline-start:22px;margin:0}
.climate-editor .editor-resource li{padding:0 0 14px 6px}
.climate-editor .editor-resource details{border-bottom:1px solid #dedfd3;padding:14px 0;background:transparent}
.climate-editor .editor-resource summary{cursor:pointer;font-weight:600;min-height:28px;line-height:1.7}
.climate-editor .editor-resource details p{margin:12px 0 4px;color:#526052}
.climate-editor .editor-resource [lang=ur]{font:22px/2.1 JameelNooriNastaleeq,serif}
.climate-editor .editor-related{margin-top:30px;padding-top:24px;border-top:1px solid #dedfd3}
.climate-editor .editor-related>div{display:flex;flex-wrap:wrap;gap:12px}
.climate-editor .editor-related a{display:flex;align-items:center;gap:20px;min-height:44px;padding:8px 16px;border:1px solid #dedfd3;border-radius:4px;background:#fffefa;text-decoration:none}
.climate-editor .editor-related a:hover{background:#eee6d2}
@media(max-width:700px){.climate-editor .editor-resource-grid{grid-template-columns:1fr;gap:24px}.climate-editor .editor-resource{margin-top:20px;padding-top:24px}}


.climate-editor > .editor-page-footer{width:100%;max-width:1440px;margin:32px auto 0;padding:24px clamp(16px,4vw,64px);border-top:1px solid #dedfd3;background:transparent}

/* Stable navigation and clearly discoverable, independent editing panels. */
html:has(body.climate-editor) { scroll-padding-top: calc(var(--navbar-height, 80px) + 20px); scrollbar-gutter: stable; }
body.climate-editor #site-header {
  position: sticky; top: 0; z-index: 100;
  transform: none; opacity: 1; margin-top: 0; pointer-events: auto;
  transition: box-shadow .2s ease, background-color .2s ease;
}
body.climate-editor #site-header.scrolled { box-shadow: 0 4px 20px #1a2f2312; }
body.climate-editor :is(main > aside, main > article, .thumb-compose, .thumb-inspector, .thumb-workspace) {
  scrollbar-width: thin; scrollbar-color: #b8c3b3 transparent;
  scrollbar-gutter: stable; scroll-padding-block: 20px;
}
body.climate-editor :is(main > aside, main > article, .thumb-compose, .thumb-inspector, .thumb-workspace)::-webkit-scrollbar {
  display: block; width: 6px; height: 6px;
}
body.climate-editor :is(main > aside, main > article, .thumb-compose, .thumb-inspector, .thumb-workspace)::-webkit-scrollbar-thumb {
  background: #b8c3b3; border-radius: 8px;
}
body.climate-editor :is(main > aside, main > article, .thumb-compose, .thumb-inspector, .thumb-workspace)::-webkit-scrollbar-thumb:hover { background: #82967c; }

@media(max-width:1199px), (max-height:699px) {
  body.climate-editor :is(main [id], .thumb-compose, .thumb-workspace, .thumb-inspector, #jacketGallery, #jacketWorkspace) {
    scroll-margin-top: calc(var(--navbar-height, 80px) + 20px);
  }
}
@media(prefers-reduced-motion:no-preference) {
  html:has(body.climate-editor) { scroll-behavior: smooth; }
}

/* One document scroll: hero, workspace and guides move together. */
body.climate-editor { height: auto; min-height: 100dvh; overflow: visible; }
body.climate-editor > main { height: auto; flex: none; grid-template-rows: auto; }
body.climate-editor main > :is(aside, article) {
  position: static; height: auto; max-height: none; overflow: visible;
  scrollbar-gutter: auto;
}
body.climate-editor :is(.editor-page-heading, .thumb-heading, .converter-intro) { position: static; }
body.climate-editor.thumbnail-page { display: block; height: auto; min-height: 100dvh; overflow: visible; }
body.climate-editor.thumbnail-page > main.thumbnail-app { flex: none; height: auto; }
body.climate-editor .thumb-layout { flex: none; min-height: 0; align-items: start; }
body.climate-editor :is(.thumb-compose, .thumb-workspace, .thumb-inspector, .thumb-toolrail) {
  height: auto; max-height: none; overflow: visible; scrollbar-gutter: auto;
}
body.climate-editor.thumbnail-page > .thumb-footer { display: flex; }
body.climate-editor .thumb-toolrail { top: var(--navbar-height, 80px); }
body.climate-editor :is(.thumb-compose, .thumb-workspace, .thumb-inspector, #jacketGallery, #jacketWorkspace) {
  scroll-margin-top: calc(var(--navbar-height, 80px) + 20px);
}

html:has(body.climate-editor):not(.editor-menu-open):not(.thumb-gallery-open):not(.thumb-export-open) { overflow-y: auto; }
body.climate-editor:is(.thumb-gallery-open, .thumb-export-open) { overflow: hidden; }

/* Sidebars retain their selection and scrolling independently of canvas popovers. */
body.climate-editor > .preview-context[popover] { margin: 0; right: auto; bottom: auto; z-index: 1000; }
@media(min-width:1200px) {
  body.climate-editor main > aside.content-sidebar,
  body.climate-editor main > aside.settings-sidebar,
  body.climate-editor .thumb-inspector {
    position: sticky; top: calc(var(--navbar-height, 80px) + 16px);
    align-self: start; max-height: calc(100dvh - var(--navbar-height, 80px) - 32px);
    overflow-y: auto; scrollbar-gutter: stable; scroll-padding-block: 16px;
  }
  body.climate-editor .settings-sidebar > .preview-inspector {
    position: relative; inset: auto; width: 100%; max-width: 100%;
    height: auto; max-height: none; overflow: visible; margin: 0 0 18px;
  }
  body.climate-editor .ig-presets {
    position: sticky; top: calc(var(--navbar-height, 80px) + 16px);
    align-self: start; max-height: calc(100dvh - var(--navbar-height, 80px) - 32px);
    overflow-y: auto; scroll-padding-block: 16px;
    scrollbar-width: thin; scrollbar-color: #bdc8b4 transparent;
  }
  body.climate-editor .ig-presets :is(.ig-preset-list, .ig-layer-list) {
    max-height: none; overflow: visible;
  }
}
