@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  color-scheme: light;
  --ink: #24212a;
  --muted: #686470;
  --paper: #f5f3ee;
  --white: #fffcf7;
  --line: #dedbd4;
  --accent: #c8f265;
  --olive: #36451a;
  --purple: #65567a;
  --sans: 'DM Sans', Arial, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; min-height: 100vh; font-family: var(--sans); color: var(--ink); background: var(--paper); display: flex; flex-direction: column; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
a { color: inherit; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
:focus-visible { outline: 2px solid #766a9f; outline-offset: 3px; }
h1,h2,h3,p { margin: 0; }
button:disabled { cursor: wait; opacity: .65; }
.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; }
.skip-link { position: fixed; inset: 12px auto auto 12px; padding: 12px; z-index: 10; transform: translateY(-200%); background: var(--accent); color: var(--ink); }
.skip-link:focus { transform: translateY(0); }
.topbar { color: #fbf8f4; background: #1b1a23; }
.top-inner { max-width: 1440px; min-height: 72px; margin: auto; padding: 0 56px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 26px; }
.brand { display: flex; align-items: center; justify-self: start; gap: 8px; text-decoration: none; }
.brand-icon { width: 28px; height: 28px; color: var(--accent); }
.brand-name { font-weight: 700; font-size: 27px; letter-spacing: -.09em; line-height: .95; }
.brand-divider { height: 22px; border-left: 1px solid #4b4756; margin: 0 3px 0 7px; }
.brand-product { font-size: 12px; color: #c1bdce; }
.top-nav { display: flex; gap: 4px; }
.nav-button { padding: 9px 15px; border: 0; border-radius: 5px; background: transparent; color: #c0bbc9; font-size: 13px; font-weight: 600; }
.nav-button:is(:hover,.is-active) { color: #fff; background: #34313e; }
.top-right { justify-self: end; display: flex; align-items: center; gap: 16px; }
.environment { white-space: nowrap; color: #d2cddd; font-size: 11px; display: flex; align-items: center; gap: 6px; }
.environment span, .eyebrow > span { display: inline-block; border-radius: 50%; width: 6px; height: 6px; background: var(--accent); }
.avatar { border: 1px solid #524c60; background: #312e3c; border-radius: 50%; width: 34px; height: 34px; color: #f5f0f9; font-size: 13px; font-weight: 700; }
.shell { width: min(1440px, 100%); padding: 49px 56px 70px; margin: 0 auto; flex: 1; }
.entry-view { width: min(660px,100%); padding: clamp(22px,5vw,46px); margin: clamp(12px,7vh,76px) auto; background: var(--white); border: 1px solid var(--line); border-radius: 8px; }
.entry-view h1 { font-size: clamp(55px,9vw,90px); }
.entry-view .button { margin-top: 18px; }
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; background: radial-gradient(ellipse at 90% -60%,#4a425a 0%,transparent 61%), #242230; border: 1px solid #383342; color: #faf6f1; padding: 36px 40px 38px; position: relative; isolation: isolate; overflow: hidden; border-radius: 8px; }
.hero::after { content: ''; position: absolute; z-index: -1; width: 540px; height: 540px; inset: auto -95px -410px auto; border: 1px solid #6a627b; border-radius: 50%; box-shadow: 0 0 0 28px #554d6600, 0 0 0 29px #554d6663, 0 0 0 60px #554d6600, 0 0 0 61px #554d6663, 0 0 0 96px #554d6600, 0 0 0 97px #554d6663; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: #57525e; font-size: 10px; letter-spacing: .14em; font-weight: 700; text-transform: uppercase; }
.eyebrow > span { background: #718342; }
.hero .eyebrow { color: #d1cbdc; }
.hero .eyebrow > span { background: var(--accent); }
h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(65px, 10vw, 112px); line-height: .95; letter-spacing: -.048em; margin: 9px 0 12px; }
h1 > span { color: #6a7c3e; }
.hero h1 > span { color: var(--accent); }
.intro { max-width: 580px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.hero .intro { color: #d6cfde; }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border: 1px solid transparent; border-radius: 5px; font-size: 13px; font-weight: 700; line-height: 1.2; text-decoration: none; white-space: nowrap; }
.button-primary { background: var(--accent); border-color: #bbdf64; color: #22251a; }
.button-primary:hover { background: #d7ff86; }
.button-secondary { background: var(--white); border-color: #d8d4cb; }
.button-secondary:hover { background: #eeeae5; }
.metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 17px 0 34px; }
.metric { min-height: 92px; padding: 15px 18px; display: flex; align-items: center; gap: 13px; border: 1px solid var(--line); background: var(--white); border-radius: 7px; }
.metric > div:last-child { display: grid; min-width: 0; gap: 2px; }
.metric span { color: var(--muted); font-size: 12px; }
.metric strong { font-size: 26px; line-height: 1; font-weight: 600; letter-spacing: -.05em; }
.metric-icon,.empty-icon,.upload-icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; }
.metric-all,.empty-icon,.upload-icon { color: var(--purple); background: #eeebf1; }
.metric-live { color: #4b5d26; background: #eaf0db; }
.metric-draft { color: #8b5b35; background: #f2eae2; }
.library-panel,.panel,.review { border-radius: 8px; background: var(--white); border: 1px solid var(--line); }
.library-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 22px 24px; }
h2 { font-size: 17px; letter-spacing: -.035em; font-weight: 700; }
.library-head h2 { font-size: 22px; }
.muted { color: var(--muted); line-height: 1.5; }
.small { font-size: 12px; }
.library-tools { display: flex; align-items: center; gap: 8px; }
.search { min-width: 0; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 5px; padding: 0 8px; color: var(--muted); background: var(--white); }
.search input { outline: none; border: 0; font-size: 13px; min-height: 38px; width: min(185px, 22vw); background: transparent; color: var(--ink); }
.search:focus-within { outline: 2px solid #766a9f; outline-offset: 2px; }
.search svg { width: 15px; height: 15px; }
select { min-height: 40px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 5px; padding: 7px 10px; }
.filter select { font-size: 13px; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 10px 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f6f3ed; color: #645d6c; font-size: 11px; font-weight: 700; }
td { padding: 13px 14px; border-bottom: 1px solid #ebe7df; vertical-align: middle; font-size: 13px; }
tr:last-child td { border-bottom: 0; }
th:first-child,td:first-child { padding-left: 24px; }
th:last-child,td:last-child { padding-right: 24px; }
.item-title { background: transparent; border: 0; padding: 0; text-align: left; font-weight: 700; overflow-wrap: anywhere; }
.item-title:hover { text-decoration: underline; }
.item-row { display: flex; align-items: center; min-width: 0; gap: 10px; }
.item-spec { display: block; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; margin-top: 2px; }
.format { border: 1px solid #ded9e6; color: #5a4b6b; padding: 4px 6px; border-radius: 4px; background: #f0edf2; font-size: 10px; font-weight: 700; justify-self: start; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 10px; background: #eee9e3; color: #6b533e; font-size: 11px; font-weight: 700; white-space: nowrap; }
.badge.live { background: #e8efd4; color: #43511c; }
.badge.live::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #617d26; }
.row-actions { display: flex; justify-content: flex-end; gap: 4px; white-space: nowrap; }
.icon-button { display: inline-grid; place-items: center; width: 33px; height: 33px; background: transparent; border: 1px solid transparent; border-radius: 4px; padding: 0; text-decoration: none; font-size: 20px; }
.icon-button:hover { background: #eeeae6; border-color: #e9e3dc; }
.empty { padding: 42px 16px 46px; text-align: center; }
.empty-icon { width: 47px; height: 47px; margin: 0 auto 11px; }
.empty h3 { font-size: 17px; }
.empty p { margin: 6px 0 13px; color: var(--muted); font-size: 13px; }
.back-button { background: none; border: none; padding: 0; margin-bottom: 20px; font-size: 13px; font-weight: 600; }
.back-button:hover { text-decoration: underline; }
.page-heading { margin-bottom: 27px; }
.page-heading h1 { font-size: clamp(58px, 8vw, 87px); }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .88fr); align-items: start; gap: 19px; }
.editor-columns { display: grid; align-items: start; gap: 13px; }
.panel,.review { padding: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 9px; margin-bottom: 11px; }
.dropzone { min-height: 140px; display: grid; justify-items: center; align-content: center; text-align: center; gap: 6px; padding: 10px; background: #f8f6f2; border: 1px dashed #c4beca; border-radius: 6px; cursor: pointer; }
.dropzone:hover,.dropzone.dragging,.dropzone:focus-within,.dropzone:has(+ input:focus-visible) { background: #f0edf4; border-color: #8d81a2; }
.dropzone strong { font-size: 13px; overflow-wrap: anywhere; }
.dropzone > span { color: var(--muted); font-size: 12px; }
.field { display: grid; gap: 5px; margin-top: 11px; font-size: 13px; }
.field > span { font-weight: 700; }
.field :is(input,textarea) { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--white); color: var(--ink); min-height: 40px; }
.field input::placeholder,textarea::placeholder { color: #746c78; }
.field small,.field-note { color: var(--muted); font-size: 12px; line-height: 1.45; }
.field-note { margin-top: 8px; overflow-wrap: anywhere; }
.path-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 5px; }
.path-input > span { flex: 0 1 auto; padding-left: 10px; min-width: 0; overflow-wrap: anywhere; color: var(--muted); }
.path-input > input { flex: 1 1 45%; min-width: 0; border: 0; }
.review-check input { accent-color: #54652d; margin: 0; }
.form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.review { position: sticky; top: 15px; min-width: 0; }
.viewport-controls { display: grid; grid-template-columns: repeat(2,1fr); gap: 3px; background: #ebe7ee; border-radius: 5px; padding: 3px; margin-bottom: 8px; }
.viewport-controls button { background: transparent; border: 1px solid transparent; border-radius: 4px; padding: 7px; font-size: 12px; font-weight: 600; display: inline-flex; justify-content: center; align-items: center; gap: 5px; }
.viewport-controls svg { height: 15px; width: 15px; }
.viewport-controls .is-selected { background: var(--white); border-color: #dfd9e4; }
.preview-stage { min-height: 390px; padding: 8px; background: #e9e5e9; border: 1px solid #e1dce5; border-radius: 6px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.preview-screen { flex: 0 1 100%; width: 100%; min-width: 0; position: relative; border: 1px solid #cbc4d1; background: #fff; border-radius: 5px; overflow: hidden; }
.preview-stage.mobile .preview-screen { width: 375px; flex-basis: 375px; max-width: 100%; border: 5px solid #2e2a35; border-radius: 15px; }
.preview-screen iframe,.preview-empty { display: block; width: 100%; height: 370px; border: 0; }
.preview-stage.mobile :is(iframe,.preview-empty) { height: 420px; }
.preview-empty { display: grid; justify-items: center; align-content: center; gap: 7px; padding: 10px; color: var(--muted); font-size: 13px; text-align: center; }
.preview-watermark { display: flex; flex-direction: column; justify-content: space-around; align-items: center; position: absolute; inset: 0; overflow: hidden; pointer-events: none; color: rgb(50 45 60 / .20); font-size: clamp(16px, 3vw, 27px); font-weight: 700; line-height: 1; }
.preview-watermark span { max-width: 88%; text-align: center; overflow-wrap: anywhere; transform: rotate(-24deg); }
.preview-link { display: inline-block; font-size: 12px; font-weight: 700; margin-top: 7px; }
.review-check { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; }
.setting-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.setting-card .panel-head { flex-wrap: wrap; }
.setting-card .button { margin-top: 10px; }
.domains-list { display: grid; gap: 6px; padding: 0; list-style: none; margin: 0; }
.domains-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px; font-size: 13px; overflow-wrap: anywhere; }
.footer { padding: 16px 56px; color: #625d68; border-top: 1px solid #e3dfd7; }
.footer > div { max-width: 1328px; margin: auto; display: flex; align-items: center; gap: 9px; font-size: 11px; }
.footer .brand-name { font-size: 19px; color: #403848; }
dialog { color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 8px; width: min(440px,calc(100% - 24px)); padding: 19px; }
dialog::backdrop { background: #22202bb2; }
.dialog-head,.dialog-actions { display: flex; align-items: center; gap: 8px; }
.dialog-head { justify-content: space-between; margin-bottom: 8px; }
.dialog-actions { justify-content: flex-end; flex-wrap: wrap; margin-top: 15px; }
dialog p { font-size: 13px; }
.toast { position: fixed; right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); z-index: 4; max-width: min(480px,calc(100% - 24px)); padding: 12px 15px; background: #292636; color: #fff; border-radius: 6px; font-size: 13px; box-shadow: 0 7px 20px #211f2633; }
.toast.error { background: #852e3b; }
@media (max-width: 1000px) {
  .top-inner,.shell,.footer { padding-left: 29px; padding-right: 29px; }
  .library-head,th:first-child,td:first-child { padding-left: 15px; }
  .library-head,th:last-child,td:last-child { padding-right: 15px; }
  td, th { padding-left: 8px; padding-right: 8px; }
}
@media (max-width: 749px) {
  .top-inner,.shell,.footer { padding-left: 15px; padding-right: 15px; }
  .top-inner { min-height: 59px; grid-template-columns: 1fr auto; gap: 5px 10px; padding-top: 10px; padding-bottom: 7px; }
  .top-nav { grid-column: 1 / -1; grid-row: 2; }
  .top-right { grid-column: 2; grid-row: 1; gap: 8px; }
  .nav-button { padding: 8px 12px; }
  .shell { padding-top: 24px; padding-bottom: 38px; }
  .hero { padding: 23px 17px 18px; align-items: flex-start; flex-direction: column; gap: 15px; }
  .hero h1 { font-size: 74px; }
  .hero .intro { font-size: 14px; }
  .metrics { gap: 5px; margin: 12px 0 22px; }
  .metric { padding: 8px 6px; min-height: 68px; gap: 5px; }
  .metric-icon { width: 23px; height: 27px; border-radius: 5px; }
  .metric-icon svg { width: 15px; height: 15px; }
  .metric span { font-size: 10px; }
  .metric strong { font-size: 22px; }
  .library-head { align-items: stretch; flex-direction: column; }
  .library-tools { display: grid; grid-template-columns: minmax(0,1fr) auto; }
  .search input { width: 100%; }
  .table-wrap thead { display: none; }
  table,tbody { display: block; }
  tr { display: grid; grid-template-columns: 1fr auto; gap: 6px 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
  tr td, tr td:first-child, tr td:last-child { padding: 0; border: 0; }
  td[data-column=material] { grid-column: 1; grid-row: 1; }
  td[data-column=access] { grid-column: 1; grid-row: 2; align-self: center; font-size: 11px; }
  td[data-column=status] { grid-column: 2; grid-row: 1; justify-self: end; }
  td[data-column=date] { grid-column: 1; grid-row: 3; font-size: 11px; color: var(--muted); }
  td[data-column=actions] { grid-column: 2; grid-row: 2 / 4; align-self: end; }
  .editor-grid,.setting-grid { grid-template-columns: minmax(0,1fr); }
  .editor-columns { display: contents; }
  .editor-columns .panel { grid-column: 1; }
  .form-actions { grid-row: 6; }
  .review { position: static; grid-row: 5; }
  .panel,.review { padding: 13px; }
  .editor-grid { gap: 9px; }
  .preview-stage { min-height: 330px; }
  .preview-screen iframe,.preview-empty { height: 310px; }
}
@media (max-width: 350px) {
  .environment { display: none; }
  .brand-name { font-size: 23px; }
  .metric-icon { display: none; }
  .filter select { max-width: 111px; }
}
#upload-version { margin-top: 8px; }
.preview-dimensions { margin: 0 0 7px; color: var(--muted); text-align: right; font-size: 11px; font-variant-numeric: tabular-nums; }
.preview-screen { height: var(--preview-display-height, 370px); }
.preview-stage.mobile .preview-screen { box-sizing: content-box; width: 390px; flex-basis: 390px; max-width: calc(100% - 10px); }
.preview-screen iframe, .preview-stage.mobile iframe {
  width: var(--preview-width, 1280px);
  height: var(--preview-height, 900px);
  transform: scale(var(--preview-scale, .4));
  transform-origin: top left;
}
.preview-screen .preview-empty, .preview-stage.mobile .preview-empty { height: 100%; }
#editor-view .page-heading { display: flex; justify-content: space-between; align-items: end; gap: 12px; }
.live-actions { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.live-actions > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.live-actions .icon-button { border-color: var(--line); background: var(--white); }
.live-actions .icon-button:hover { background: #eeeae6; }
.auth-error { color: #852e3b; margin-top: 8px; font-weight: 600; }
@media (max-width: 749px) {
  #editor-view .page-heading { align-items: start; flex-direction: column; }
  .icon-button { width: 39px; height: 39px; }
  .field :is(input,textarea,select) { font-size: 16px; }
}
