:root {
  --ink: #1f2b24;
  --paper: #fffaf0;
  --cream: #f8f1df;
  --matcha: #31533d;
  --rule: rgba(31, 43, 36, .2);
  --danger: #9b3d2a;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--body); }
button, input, textarea, select { font: inherit; }
button { border: 1px solid var(--ink); background: var(--matcha); color: var(--cream); cursor: pointer; padding: 10px 12px; }
input, textarea, select { width: 100%; border: 1px solid var(--rule); background: #fffdf6; padding: 10px; }
label { display: grid; gap: 6px; font-size: .9rem; }
pre { overflow: auto; white-space: pre-wrap; }

.app { width: min(100%, 1500px); margin: 0 auto; padding: 24px; }
.panel { border: 1px solid var(--ink); background: var(--paper); box-shadow: 4px 5px 0 var(--ink); padding: 18px; }
.login-panel { width: min(100%, 420px); margin: 12vh auto 0; }
.login-panel form, .editor-form { display: grid; gap: 14px; }
.eyebrow { margin: 0 0 4px; color: var(--danger); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.form-intro { color: #5d675f; line-height: 1.5; }
.text-action { border: 0; background: transparent; color: var(--matcha); padding: 5px; text-decoration: underline; }
.text-action:hover { background: transparent; color: var(--danger); }
.form-message { border-left: 4px solid var(--matcha); background: #eef6e9; padding: 10px 12px; line-height: 1.4; }
.form-message.is-error { border-color: var(--danger); background: #fff1eb; color: var(--danger); }
.form-message[hidden] { display: none; }
.app-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  width: min(390px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: 32px 1fr 28px;
  align-items: center;
  gap: 10px;
  border: 1px solid #b8d4b2;
  border-radius: 14px;
  background: #f5fbf1;
  color: #23452c;
  padding: 12px;
  box-shadow: 0 16px 42px rgba(28, 46, 34, .18);
  font-weight: 750;
}
.app-toast[hidden] { display: none; }
.app-toast.is-error { border-color: #e0aaa0; background: #fff4ef; color: var(--danger); }
.app-toast-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--matcha); color: var(--cream); }
.app-toast.is-error .app-toast-icon { background: var(--danger); }
.app-toast-close { border: 0; background: transparent; color: currentColor; padding: 2px; font-size: 1.25rem; line-height: 1; }
.app-toast-close:hover { background: transparent; opacity: .65; }
.structured-editor { gap: 16px; }
.structured-group { display: grid; gap: 12px; min-width: 0; margin: 0; padding: 14px; border: 1px solid var(--rule); border-radius: 14px; background: rgba(255, 255, 255, .38); }
.structured-group .structured-group { background: rgba(255, 255, 255, .56); }
.structured-group legend { padding: 0 6px; font-weight: 800; }
/* One row per entry in a list of plain values, so each can be edited alone. */
.structured-list-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; min-width: 0; }
.structured-list-row > .danger { align-self: end; margin-bottom: 2px; white-space: nowrap; }
.structured-item { min-width: 0; padding: 10px; border: 1px solid var(--rule); border-radius: 12px; background: var(--paper); }
.structured-item > summary { cursor: pointer; font-weight: 750; }
.structured-item > .structured-group { margin-top: 10px; padding: 10px; border: 0; }
.checkbox-field { display: flex !important; align-items: center; gap: 8px; }
.checkbox-field input { width: auto; }
.content-selector, .menu-workflow, .menu-items-browser, .focused-editor { border: 1px solid var(--rule); border-radius: 16px; background: rgba(255, 255, 255, .44); padding: 14px; }
.content-selector, .menu-workflow, .menu-items-browser { margin-bottom: 12px; }
.content-selector-heading, .focused-editor-header, .menu-workflow-head, .menu-workflow-head > div { display: flex; align-items: center; gap: 10px; }
.content-selector-heading { margin-bottom: 12px; }
.content-selector-heading > div, .focused-editor-header > div { min-width: 0; }
.content-selector-heading strong, .content-selector-heading small { display: block; }
.content-selector-heading strong { font-size: .94rem; }
.content-selector-heading small { margin-top: 2px; color: #68726b; font-size: .73rem; }
.sandbox-instruction { background: linear-gradient(145deg, #f7f5e9, #eef4e9); border-color: rgba(49, 83, 61, .3); }
.selection-cursor, .selection-check { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 50%; background: var(--matcha); color: var(--cream); }
.selection-cursor svg { width: 18px; height: 18px; fill: currentColor; }
.selection-check { background: #dce9d8; color: var(--matcha); font-size: 1rem; font-weight: 900; }
.section-browser { margin-top: 11px; border-top: 1px solid var(--rule); padding-top: 10px; }
.section-browser > summary { cursor: pointer; color: var(--matcha); font-size: .73rem; font-weight: 800; }
.section-browser-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 9px; }
.section-browser-choice { min-width: 0; border-color: var(--rule); border-radius: 9px; background: #fffdf6; color: var(--ink); padding: 8px; text-align: left; }
.section-browser-choice:hover { border-color: var(--matcha); background: #f3f6ee; }
.section-browser-choice.is-active { border-color: var(--matcha); box-shadow: inset 3px 0 0 var(--matcha); }
.section-browser-choice span, .section-browser-choice small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section-browser-choice span { font-size: .72rem; font-weight: 800; }
.section-browser-choice small { margin-top: 2px; color: #6a746d; font-size: .63rem; }
.content-step { width: 26px; height: 26px; flex: 0 0 26px; display: grid; place-items: center; border-radius: 50%; background: var(--matcha); color: var(--cream); font-size: .72rem; font-weight: 850; }
.content-select-label { gap: 7px; color: #59645d; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.content-select-label select { border-color: rgba(49, 83, 61, .42); border-radius: 10px; background: #fffdf6; color: var(--ink); font-size: .86rem; font-weight: 650; letter-spacing: 0; text-transform: none; }
.focused-editor { background: #fffdf6; }
.focused-editor-header { margin: -14px -14px 14px; border-bottom: 1px solid var(--rule); border-radius: 16px 16px 0 0; background: #edf2e9; padding: 12px 14px; }
.focused-editor-header small, .focused-editor-header h3 { display: block; margin: 0; }
.focused-editor-header small { margin-bottom: 2px; color: #657068; font-size: .66rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.focused-editor-header h3 { font-size: 1rem; }
.focused-editor > .editor-form > .structured-group { border: 0; background: transparent; padding: 0; }
.sandbox-selection-editor { border-color: rgba(49, 83, 61, .38); box-shadow: 0 8px 22px rgba(31, 43, 36, .07); }
.selected-block-header { background: linear-gradient(135deg, #edf3e9, #f6f3e7); }
.selected-block-preview { margin: 0 0 14px; border-left: 3px solid var(--matcha); border-radius: 0 9px 9px 0; background: #f5f4ea; color: #4c5b51; padding: 9px 11px; font-size: .78rem; line-height: 1.45; }
.selected-picture-label { font-weight: 750; }
.selected-fields-form { gap: 11px; }
.selected-fields-form > label, .selected-fields-form > .image-field, .selected-fields-form > .destination-field { border-radius: 11px; background: #fff; }
.selected-fields-form > label { border: 1px solid var(--rule); color: #59645d; padding: 10px; font-size: .72rem; font-weight: 800; }
.selected-fields-form > label input, .selected-fields-form > label textarea { margin-top: 2px; border-radius: 8px; color: var(--ink); font-size: .9rem; font-weight: 500; }
.field-help { color: #6b756e; font-size: .66rem; font-weight: 500; line-height: 1.35; }
.content-count { display: block; margin-top: 5px; color: #68726b; font-size: .64rem; font-weight: 600; text-align: right; }
.typography-controls { display: grid; gap: 8px; margin: -4px 0 13px; border: 1px solid rgba(49, 83, 61, .32); border-radius: 13px; background: linear-gradient(145deg, #fffef9, #f0f3e9); box-shadow: 0 5px 16px rgba(31, 43, 36, .08); padding: 9px; }
.typography-toolbar-heading { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--ink); }
.typography-toolbar-heading > span:last-child { display: grid; gap: 1px; }
.typography-toolbar-heading strong { font-size: .72rem; line-height: 1.1; }
.typography-toolbar-heading small { color: #6b756e; font-size: .59rem; line-height: 1.1; }
.typography-heading-mark { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; background: var(--matcha); color: var(--cream); font: 800 .69rem/1 Georgia, serif; }
.typography-tool-group { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.18fr) 38px; gap: 5px; }
.typography-tool { min-width: 0; min-height: 47px; display: flex; align-items: center; gap: 6px; position: relative; overflow: hidden; border: 1px solid rgba(49, 83, 61, .2); border-radius: 9px; background: rgba(255, 255, 255, .78); color: var(--ink); padding: 6px 7px; }
.typography-tool:hover, .typography-tool:focus-within { border-color: var(--matcha); background: #fff; color: var(--matcha); box-shadow: 0 0 0 2px rgba(49, 83, 61, .1); }
.typography-tool svg { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.typography-tool-copy { min-width: 0; display: grid; gap: 1px; text-align: left; }
.typography-tool-copy small, .typography-tool-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.typography-tool-copy small { color: #717b74; font-size: .54rem; font-weight: 750; letter-spacing: .05em; line-height: 1; text-transform: uppercase; }
.typography-tool-copy strong { color: inherit; font-size: .62rem; line-height: 1.25; }
.typography-native-control { width: 100% !important; height: 100% !important; position: absolute !important; inset: 0; z-index: 2; margin: 0 !important; border: 0 !important; opacity: 0; cursor: pointer; }
.typography-color-swatch { width: 13px; height: 13px; flex: 0 0 13px; margin-left: auto; border: 2px solid white; border-radius: 50%; background: var(--text-color); box-shadow: 0 0 0 1px rgba(31, 43, 36, .3); }
.typography-reset { width: 38px; min-width: 38px; justify-content: center; cursor: pointer; padding: 0; }
.typography-reset:hover { transform: none; }
.selection-empty-state { display: grid; justify-items: center; gap: 4px; border: 1px dashed rgba(49, 83, 61, .38); border-radius: 14px; background: rgba(255, 255, 255, .34); color: #68726b; padding: 22px 14px; text-align: center; }
.selection-empty-state span { color: var(--matcha); font-size: 1.3rem; }
.selection-empty-state p { margin: 0; font-size: .76rem; line-height: 1.45; }
.menu-workflow-head { justify-content: space-between; margin-bottom: 11px; }
.menu-workflow-head strong { font-size: .88rem; }
.compact-add { border-radius: 999px; background: transparent; color: var(--matcha); border-color: var(--matcha); padding: 6px 9px; font-size: .7rem; font-weight: 800; }
.compact-add:hover { background: rgba(49, 83, 61, .08); }
.category-settings { margin-top: 11px; border-top: 1px solid var(--rule); padding-top: 10px; }
.category-settings > summary { cursor: pointer; color: var(--matcha); font-size: .76rem; font-weight: 800; }
.category-settings > .editor-form { margin-top: 11px; }
.category-settings .structured-group { padding: 10px; }
.fixed-category-note { display: block; margin-top: 9px; color: #68726b; font-size: .7rem; line-height: 1.4; }
.menu-item-picker { display: grid; gap: 7px; }
.menu-item-choice { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-color: var(--rule); border-radius: 11px; background: #fffdf6; color: var(--ink); padding: 10px 11px; text-align: left; }
.menu-item-choice:hover { border-color: var(--matcha); background: #f5f7ef; }
.menu-item-choice.is-active { border-color: var(--matcha); background: #eaf0e6; box-shadow: inset 3px 0 0 var(--matcha); }
.menu-item-choice span:first-child { min-width: 0; }
.menu-item-choice strong, .menu-item-choice small { display: block; }
.menu-item-choice strong { overflow: hidden; font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.menu-item-choice small { margin-top: 2px; color: #68726b; font-size: .68rem; }
.menu-item-choice > span:last-child { flex: 0 0 auto; color: var(--matcha); font-size: .66rem; font-weight: 850; text-transform: uppercase; }
.menu-focused-editor { margin-top: 12px; }
.menu-management { margin-top: 12px; border: 1px solid var(--rule); border-radius: 12px; background: rgba(255, 255, 255, .35); padding: 10px; }
.menu-management > summary { cursor: pointer; color: var(--matcha); font-size: .75rem; font-weight: 850; }
.menu-management[open] > summary { margin-bottom: 12px; }
.menu-management .menu-focused-editor { margin-bottom: 2px; }
.menu-edit-prompt { border: 1px dashed rgba(49, 83, 61, .4); border-radius: 12px; background: rgba(255, 255, 255, .35); color: #68726b; padding: 14px; font-size: .76rem; line-height: 1.45; text-align: center; }
.subtle-danger { width: 100%; margin-top: 10px; border-radius: 10px; padding: 8px 10px; font-size: .72rem; }
.edit-target-flash { position: relative; z-index: 1; border-radius: 9px; animation: edit-target-pulse .8s ease-in-out 2; }
@keyframes edit-target-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(49, 83, 61, 0); }
  50% { box-shadow: 0 0 0 5px rgba(49, 83, 61, .24); background-color: rgba(225, 238, 217, .5); }
}
.login-field { display: grid; gap: 6px; }
.password-input { display: grid; grid-template-columns: minmax(0, 1fr) auto; border: 1px solid var(--rule); background: #fffdf6; }
.password-input input { border: 0; background: transparent; }
.password-toggle { width: 46px; min-width: 46px; display: grid; place-items: center; border-color: transparent; background: transparent; color: var(--ink); padding: 8px; }
.password-toggle:hover { background: rgba(49, 83, 61, .08); }
.password-toggle:focus-visible { outline: 3px solid var(--matcha); outline-offset: 2px; }
.password-eye { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.password-eye-hide { display: none; }
.password-toggle[aria-pressed="true"] .password-eye-show { display: none; }
.password-toggle[aria-pressed="true"] .password-eye-hide { display: block; }
.login-error { margin: -2px 0 0; border-left: 4px solid var(--danger); background: #fff1eb; color: var(--danger); padding: 10px 12px; font-size: .9rem; line-height: 1.4; }
.login-error[hidden] { display: none; }
.login-card form.has-login-error .password-input,
.login-card form.has-login-error #login-email { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(155, 61, 42, .12); }
.login-card form.has-login-error label { color: var(--danger); }
.blocking-message { width: min(440px, calc(100vw - 32px)); border: 0; border-radius: 22px; background: transparent; padding: 0; box-shadow: 0 28px 80px rgba(27, 37, 31, .34); }
.blocking-message::backdrop { background: rgba(22, 31, 26, .62); backdrop-filter: blur(4px); }
.blocking-message-shell { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; border: 1px solid #e0aaa0; border-radius: 22px; background: #fffaf5; color: var(--ink); padding: 22px; }
.blocking-message-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--danger); color: white; font-size: 1.3rem; font-weight: 900; }
.blocking-message h1 { margin: 3px 0 8px; color: var(--danger); font: 600 1.55rem/1.15 var(--display); }
.blocking-message [data-blocking-message-copy] { margin: 0; color: #5d514c; line-height: 1.55; }
.blocking-message button { grid-column: 1 / -1; justify-self: end; min-width: 120px; border-radius: 11px; }
.simple-restore { width: min(540px, calc(100vw - 32px)); border: 0; padding: 0; border-radius: 24px; background: transparent; box-shadow: 0 30px 90px rgba(26, 36, 30, .34); }
.simple-restore::backdrop { background: rgba(22, 31, 26, .62); backdrop-filter: blur(5px); }
.simple-restore-shell { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; border: 1px solid #d9c9b4; border-radius: 24px; background: #fffaf2; color: var(--ink); padding: 25px; }
.simple-restore-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: #e8f0e5; color: var(--green); font-size: 1.6rem; font-weight: 800; }
.simple-restore h1 { margin: 4px 0 10px; font: 600 1.65rem/1.15 var(--display); }
.simple-restore [data-simple-restore-copy] { margin: 0; color: #625a50; line-height: 1.55; }
.simple-restore footer { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.simple-restore footer button { min-height: 44px; border-radius: 12px; }
.login-panel button:disabled { cursor: wait; opacity: .65; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--ink); padding-bottom: 16px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.secondary-action { background: transparent; color: var(--matcha); border-color: var(--matcha); }
.topbar p { margin: 0 0 4px; color: var(--danger); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.topbar h1 { margin: 0; font-size: clamp(1.7rem, 5vw, 3.4rem); }
.publish-actions { display: grid; justify-items: end; gap: 8px; }
.publish-action-buttons { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.save-draft-action { background: transparent; color: var(--matcha); border-color: var(--matcha); }
.restored-version-indicator { max-width: 390px; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 9px; align-items: center; border: 1px solid #a87826; border-radius: 14px; background: #fff5d8; color: #654815; padding: 9px 11px; text-align: left; box-shadow: 0 4px 14px rgba(91, 67, 24, .08); }
.restored-version-indicator[hidden] { display: none; }
.restored-version-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: #f0dfad; }
.restored-version-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.restored-version-indicator strong, .restored-version-indicator small { display: block; }
.restored-version-indicator strong { font-size: .78rem; line-height: 1.25; }
.restored-version-indicator small { margin-top: 2px; color: #765c2b; font-size: .68rem; line-height: 1.35; }
.restored-version-indicator[data-phase="submitted"] { border-color: #4d8a57; background: #eef6e9; color: #31533d; }
.restored-version-indicator[data-phase="submitted"] .restored-version-icon { background: #d9ead6; }
.deployment-pill { max-width: 390px; padding: 7px 10px; border: 1px solid var(--rule); background: var(--paper); color: #5d675f; font-size: .75rem; line-height: 1.4; text-align: right; }
.deployment-pill[data-state="success"] { border-color: #4d8a57; color: #31533d; background: #eef6e9; }
.deployment-pill[data-state="failed"], .deployment-pill[data-state="check_error"], .deployment-pill[data-state="error"] { border-color: var(--danger); color: var(--danger); background: #fff1eb; }
.deployment-pill[data-state="in_progress"], .deployment-pill[data-state="queued"], .deployment-pill[data-state="retrying"] { border-color: #9b742a; color: #70531c; background: #fff6da; }
.account-dialog { width: min(94vw, 900px); max-width: none; max-height: 92vh; margin: auto; border: 2px solid var(--ink); background: var(--cream); color: var(--ink); padding: 0; box-shadow: 9px 10px 0 rgba(31,43,36,.5); }
.account-dialog::backdrop { background: rgba(20,28,23,.68); backdrop-filter: blur(3px); }
.account-shell { display: grid; gap: 18px; padding: 22px; }
.account-header, .channel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.account-header { border-bottom: 1px solid var(--ink); padding-bottom: 14px; }
.account-header p, .channel-title p { margin: 0; color: #536058; font-size: .76rem; }
.account-header h1, .channel-title h2, .preference-card h2 { margin: 2px 0 0; }
.account-lead { margin: -6px 0 0; color: #5d675f; }
.admin-invite-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.membership-list { display: grid; gap: 8px; margin-top: 8px; }
.membership-choice, .managed-account { display: grid; grid-template-columns: auto 1fr minmax(110px, auto); align-items: center; gap: 10px; padding: 10px; border: 1px solid rgba(24,56,42,.18); border-radius: 10px; background: rgba(255,255,255,.45); }
.managed-account-list { display: grid; gap: 8px; margin-top: 16px; }
.managed-account small { color: #667169; }
.managed-account button { width: auto; }
.membership-editor { grid-column: 2 / -1; }
.membership-editor summary { cursor: pointer; font-weight: 700; }
.membership-editor > div { display: grid; gap: 8px; margin-top: 10px; }
[data-editor-panel].is-read-only { opacity: .62; filter: grayscale(.15); }
@media (max-width: 680px) { .admin-invite-fields { grid-template-columns: 1fr; } .membership-choice, .managed-account { grid-template-columns: auto 1fr; } }
.channel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.channel-card, .preference-card { border: 1px solid var(--rule); border-radius: 14px; background: var(--paper); padding: 16px; }
.channel-card form, .preference-card { display: grid; gap: 12px; }
.channel-title { justify-content: flex-start; margin-bottom: 14px; }
.channel-icon { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 50%; background: var(--matcha); color: var(--cream); font-size: 1.1rem; font-weight: 850; }
.channel-title p.is-connected { color: #357043; font-weight: 800; }
.telegram-pairing { display: grid; gap: 10px; margin-top: 13px; border-top: 1px solid var(--rule); padding-top: 13px; }
.telegram-pairing p { margin: 0; font-size: .85rem; line-height: 1.5; }
.telegram-waiting { color: #667169; font-size: .78rem; text-align: center; }
.preference-table { display: grid; grid-template-columns: 1fr 64px 80px; align-items: center; gap: 10px; }
.preference-table strong:not(:first-child), .preference-table input { justify-self: center; }
.preference-table input { width: 20px; height: 20px; }
@media (max-width: 680px) { .channel-grid { grid-template-columns: 1fr; } .account-shell { padding: 14px; } .topbar-actions { width: 100%; } }
@media (max-width: 680px) { .app-toast { right: 16px; bottom: 12px; } }
.website-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; }
.website-card {
  --card-accent: #31533d;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  position: relative;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 3px;
  background: #fffdf6;
  color: var(--ink);
  box-shadow: 6px 7px 0 var(--ink);
  padding: 20px;
  text-align: left;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.website-card[data-design="b"] { --card-accent: #9b3d2a; }
.website-card[data-design="c"] { --card-accent: #6a5941; }
.website-card[data-design="d"] { --card-accent: #2f5266; }
.website-card[data-design="e"] { --card-accent: #744a70; }
.website-card::after {
  content: attr(data-design);
  position: absolute;
  right: -7px;
  bottom: -32px;
  color: color-mix(in srgb, var(--card-accent) 9%, transparent);
  font-family: Georgia, serif;
  font-size: 11rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  pointer-events: none;
}
.website-card:hover { transform: translate(-3px, -3px); background: white; box-shadow: 9px 10px 0 var(--card-accent); }
.website-card:focus-visible { outline: 4px solid var(--card-accent); outline-offset: 4px; }
.website-card-top, .website-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: relative; z-index: 1; }
.design-badge { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--card-accent); color: white; font-size: 1.3rem; font-weight: 800; }
.managed-label { display: inline-flex; align-items: center; gap: 6px; color: var(--matcha); font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.managed-label i { width: 8px; height: 8px; border-radius: 50%; background: #4d8a57; box-shadow: 0 0 0 3px rgba(77, 138, 87, .14); }
.website-card-copy { display: grid; gap: 7px; position: relative; z-index: 1; }
.website-card strong { color: var(--ink); font-size: clamp(1.35rem, 2vw, 1.7rem); line-height: 1.1; }
.repo-label { color: #536158; font-family: Consolas, monospace; font-size: .82rem; overflow-wrap: anywhere; }
.website-card-footer { padding-top: 14px; border-top: 1px solid var(--rule); }
.website-card-footer small { max-width: 55%; color: #5d675f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.website-card-footer > span { color: var(--card-accent); font-weight: 800; }
.website-card-footer b { display: inline-block; margin-left: 3px; transition: transform .16s ease; }
.website-card:hover .website-card-footer b { transform: translateX(4px); }
.editor-layout { display: grid; grid-template-columns: minmax(320px, 410px) minmax(0, 1fr); gap: 18px; align-items: start; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-bottom: 16px; background: var(--ink); border: 1px solid var(--ink); }
.tabs button { border: 0; background: var(--paper); color: var(--ink); }
.tabs button.is-active { background: var(--matcha); color: var(--cream); }
.menu-group-editor { display: grid; gap: 10px; border-top: 1px dashed var(--rule); padding-top: 14px; margin-top: 14px; }
.menu-item-editor { display: grid; gap: 10px; border: 1px solid var(--rule); padding: 12px; }
.draft-history { margin-top: 18px; border-top: 2px solid var(--ink); padding-top: 16px; }
.draft-history-header { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.draft-history-header p { margin: 0 0 3px; color: var(--danger); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; }
.draft-history-header h2 { margin: 0; font-size: 1.15rem; }
.history-refresh { border-radius: 999px; background: transparent; color: var(--matcha); border-color: var(--matcha); padding: 7px 11px; font-size: .75rem; font-weight: 750; }
.history-refresh:hover { background: rgba(49, 83, 61, .08); }
.draft-history-list { display: grid; gap: 10px; max-height: 420px; overflow-y: auto; padding: 2px 5px 5px 2px; }
.history-empty { margin: 0; color: #5d675f; font-size: .85rem; }
.history-item { overflow: hidden; border: 1px solid rgba(31, 43, 36, .2); border-radius: 14px; background: #fffdf6; box-shadow: 0 2px 0 rgba(31, 43, 36, .08); transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.history-item:hover { border-color: rgba(49, 83, 61, .72); box-shadow: 0 5px 14px rgba(31, 43, 36, .1); transform: translateY(-1px); }
.history-entry { width: 100%; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; border: 0; border-radius: 0; background: transparent; color: var(--ink); padding: 12px; text-align: left; }
.history-entry:hover { background: rgba(49, 83, 61, .055); }
.history-entry:focus-visible, .history-restore:focus-visible { position: relative; z-index: 1; outline: 3px solid rgba(49, 83, 61, .35); outline-offset: -3px; }
.history-deploy-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #e8efe7; color: var(--matcha); }
.history-deploy-icon svg, .history-restore svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.history-copy { min-width: 0; }
.history-copy strong, .history-copy small { display: block; }
.history-copy strong { font-size: .82rem; line-height: 1.3; }
.history-copy small { margin-top: 3px; color: #68726b; font-size: .69rem; line-height: 1.35; overflow-wrap: anywhere; }
.history-compare-hint { display: inline-flex; align-items: center; gap: 4px; color: var(--matcha); font-size: .68rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.history-compare-hint span { transition: transform .16s ease; }
.history-entry:hover .history-compare-hint span { transform: translateX(3px); }
.history-restore { width: 100%; display: flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-top: 1px solid rgba(31, 43, 36, .13); border-radius: 0; background: #f3eee1; color: #5b4939; padding: 8px 10px; font-size: .72rem; font-weight: 800; }
.history-restore:hover { background: #eadfcd; color: var(--danger); }
.history-restore:disabled { cursor: wait; opacity: .65; }
.history-restore.is-restored:disabled { cursor: default; opacity: 1; background: #e4eedf; color: var(--matcha); }
.history-restore.is-restored svg { stroke-width: 2.2; }
/* A link, phone or email field: the value plus a note saying where it goes. */
.destination-field { display: grid; gap: 6px; }
.destination-field > label { display: grid; gap: 6px; }
.destination-field .field-help { color: #4d5a52; }
.destination-field[data-field-kind="phone"] input { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
/* The web-address box only appears once "somewhere else on the web" is chosen. */
.destination-address { display: grid; gap: 6px; }

.image-field { display: grid; gap: 8px; padding: 10px; border: 1px dashed var(--rule); background: rgba(255, 255, 255, .35); }
.image-field img { width: 100%; max-height: 180px; object-fit: contain; border: 1px solid var(--rule); background: white; }
.image-field small { color: rgba(31, 43, 36, .7); line-height: 1.4; }
.image-field-label { font-weight: 700; }
/* Stands in for the thumbnail so the field keeps its shape when nothing is set. */
.image-field-empty { display: grid; place-items: center; min-height: 72px; border: 1px solid var(--rule); border-radius: 8px; background: #fff; color: rgba(31, 43, 36, .55); font-size: .78rem; }
.image-field-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.image-field-note { font-size: .78rem; font-style: italic; }

/* Add or remove the thing you just clicked, when it is one of a list. */
.selection-list-actions { display: grid; gap: 8px; margin-top: 4px; padding-top: 12px; border-top: 1px dashed var(--rule); }
.selection-list-actions small { color: rgba(31, 43, 36, .7); }
.selection-list-buttons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.upload-button { display: inline-flex; width: max-content; padding: 8px 10px; border: 1px solid var(--ink); background: var(--paper); cursor: pointer; }
.upload-button input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.inline-actions { display: flex; gap: 8px; justify-content: space-between; }
.danger { color: var(--danger); background: transparent; border-color: var(--danger); }
.preview { min-height: 520px; padding: 12px; }
.preview-header { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding: 4px 4px 12px; }
.preview-header p { margin: 0 0 3px; color: var(--danger); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.preview-header h2 { margin: 0; font-size: 1.35rem; }
.preview-status { color: var(--matcha); font-size: .78rem; text-align: right; }
.preview-status.is-error { color: var(--danger); }
.preview-toolbar { display: flex; justify-content: space-between; gap: 12px; padding: 8px; border: 1px solid var(--rule); border-bottom: 0; background: var(--cream); }
.preview-pages, .preview-sizes, .preview-modes, .preview-tools { display: flex; gap: 4px; }
.preview-tools { align-items: center; gap: 10px; }
.preview-modes { padding-right: 10px; border-right: 1px solid var(--rule); }
.preview-toolbar button { padding: 6px 9px; border-color: transparent; background: transparent; color: var(--ink); font-size: .78rem; }
.preview-toolbar button.is-active { border-color: var(--ink); background: var(--matcha); color: var(--cream); }
.preview-stage { min-height: 720px; display: flex; justify-content: center; overflow: hidden; border: 1px solid var(--ink); background: #d8d8d8; transition: padding .2s ease; }
.preview-stage iframe { width: 100%; min-height: 720px; border: 0; background: white; transition: width .2s ease; }
.preview-stage.is-mobile { padding: 18px 0; }
.preview-stage.is-mobile iframe { width: 390px; max-width: 100%; min-height: 684px; border: 1px solid rgba(31, 43, 36, .35); }
.publish-review { width: min(96vw, 1500px); max-width: none; height: min(94vh, 980px); max-height: none; margin: auto; border: 2px solid var(--ink); background: var(--cream); color: var(--ink); padding: 0; box-shadow: 10px 12px 0 rgba(31, 43, 36, .45); }
.publish-review::backdrop { background: rgba(20, 28, 23, .72); backdrop-filter: blur(3px); }
.publish-review-shell { height: 100%; display: grid; grid-template-rows: auto auto auto auto minmax(0, 1fr) auto auto; gap: 12px; padding: 18px; }
.publish-review-header, .publish-review-summary, .publish-review-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.publish-review-header { border-bottom: 2px solid var(--ink); padding-bottom: 12px; }
.publish-review-header p { margin: 0 0 3px; color: var(--danger); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.publish-review-header h1 { margin: 0; font-size: clamp(1.45rem, 3vw, 2.4rem); }
.review-close, .review-cancel { background: transparent; color: var(--ink); }
.publish-review-summary { align-items: end; }
.publish-review-summary strong, .publish-review-summary span { display: block; }
.publish-review-summary span { margin-top: 3px; color: #5d675f; font-size: .78rem; }
.review-pages { display: flex; gap: 4px; }
.review-pages button { background: transparent; color: var(--ink); padding: 7px 10px; }
.review-pages button.is-active { background: var(--matcha); color: var(--cream); }
.review-pages button.has-changes:not(.is-active), .restore-preview-pages button.has-changes:not(.is-active) { border-color: #6f9b69; background: #edf5e9; color: var(--matcha); }
.review-change-list { display: flex; gap: 6px; min-height: 26px; overflow-x: auto; padding-bottom: 2px; }
.change-chip { flex: 0 0 auto; border: 1px solid #c45135; border-radius: 999px; background: #fff1eb; color: #7d2e1f; padding: 5px 9px; font-family: Consolas, monospace; font-size: .7rem; }
.publish-comparison { min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.comparison-pane { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); border: 1px solid var(--ink); background: white; }
.comparison-pane > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--ink); background: #eee9dc; padding: 8px 10px; }
.comparison-before > header { background: #fff1eb; }
.comparison-after > header { background: #edf7ed; }
.comparison-pane > header span { color: var(--danger); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.comparison-pane > header strong { font-size: .8rem; text-align: right; }
.comparison-pane iframe { width: 100%; height: 100%; min-height: 480px; border: 0; background: white; }
.review-error { margin: 0; border-left: 4px solid var(--danger); background: #fff1eb; color: var(--danger); padding: 9px 12px; }
.review-error[hidden] { display: none; }
.publish-review-actions { border-top: 1px solid var(--rule); padding-top: 12px; }

.draft-conflict { width: min(94vw, 820px); max-width: none; max-height: 90vh; margin: auto; border: 0; border-radius: 26px; background: #f8f5eb; color: var(--ink); padding: 0; box-shadow: 0 30px 90px rgba(16, 38, 27, .32); }
.draft-conflict::backdrop { background: rgba(16, 38, 27, .65); backdrop-filter: blur(8px); }
.draft-conflict-shell { display: grid; gap: 18px; padding: clamp(20px, 4vw, 34px); }
.draft-conflict header { padding-bottom: 14px; border-bottom: 1px solid rgba(24, 56, 42, .15); }
.draft-conflict header p { margin: 0 0 5px; color: var(--danger); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.draft-conflict h1 { margin: 0; font-family: var(--display); font-size: clamp(1.7rem, 4vw, 2.7rem); font-weight: 500; line-height: 1.04; }
.draft-conflict-lead { margin: 0; color: #53645a; line-height: 1.55; }
.conflict-list { display: grid; gap: 10px; max-height: min(42vh, 390px); overflow: auto; padding-right: 4px; }
.conflict-item { display: grid; grid-template-columns: minmax(140px, .65fr) repeat(2, minmax(0, 1fr)); gap: 10px; align-items: stretch; padding: 12px; border: 1px solid rgba(24, 56, 42, .13); border-radius: 16px; background: rgba(255, 255, 255, .72); }
.conflict-item > strong { align-self: center; font-size: .8rem; text-transform: capitalize; }
.conflict-item div { min-width: 0; padding: 9px 10px; border-radius: 11px; background: #f2eee2; }
.conflict-item div:last-child { background: #e7efe5; }
.conflict-item span { display: block; margin-bottom: 4px; color: #6b786f; font-size: .66rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.conflict-item p { margin: 0; overflow-wrap: anywhere; font-size: .78rem; line-height: 1.4; }
.conflict-more { margin: 0; color: #647168; font-size: .78rem; }
.draft-conflict-note { display: flex; gap: 10px; padding: 13px 15px; border-radius: 14px; background: #e4eedf; color: #31533d; font-size: .8rem; line-height: 1.45; }
.draft-conflict-note strong { white-space: nowrap; }
.draft-conflict footer { display: flex; justify-content: flex-end; gap: 9px; padding-top: 4px; }

.restore-resolution { width: min(96vw, 1120px); max-width: none; max-height: 94vh; margin: auto; border: 0; border-radius: 26px; background: #f8f5eb; color: var(--ink); padding: 0; box-shadow: 0 30px 90px rgba(16, 38, 27, .34); }
.restore-resolution::backdrop { background: rgba(16, 38, 27, .68); backdrop-filter: blur(8px); }
.restore-resolution-shell { max-height: 94vh; display: grid; gap: 17px; overflow-y: auto; padding: clamp(20px, 4vw, 34px); }
.restore-resolution header { border-bottom: 1px solid rgba(24, 56, 42, .15); padding-bottom: 14px; }
.restore-resolution header p { margin: 0 0 5px; color: var(--danger); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.restore-resolution h1 { margin: 0; font-family: var(--display); font-size: clamp(1.65rem, 4vw, 2.55rem); font-weight: 500; line-height: 1.08; }
.restore-resolution-copy { margin: 0; color: #53645a; line-height: 1.55; }
.restore-decision { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.restore-decision[hidden] { display: none; }
.restore-decision > button { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; border: 1px solid rgba(49, 83, 61, .24); border-radius: 16px; background: rgba(255, 255, 255, .72); color: var(--ink); padding: 14px; text-align: left; }
.restore-decision > button:hover { border-color: var(--matcha); background: #fffef9; color: var(--matcha); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(31, 43, 36, .1); }
.restore-decision > button > span:first-child { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #e4eedf; color: var(--matcha); font-size: 1.15rem; font-weight: 900; }
.restore-decision strong, .restore-decision small, .restore-decision em { display: block; }
.restore-decision strong { font-size: .88rem; }
.restore-decision small { margin-top: 4px; color: #657168; font-size: .75rem; font-style: normal; line-height: 1.45; }
.restore-decision em { margin-top: 11px; color: var(--matcha); font-size: .7rem; font-style: normal; font-weight: 850; }
.restore-conflicts { min-height: 0; }
.restore-conflicts-heading strong { font-size: .95rem; }
.restore-conflicts-heading p { margin: 4px 0 12px; color: #657168; font-size: .78rem; line-height: 1.45; }
.restore-conflict-list { display: grid; gap: 10px; max-height: min(48vh, 460px); overflow-y: auto; padding-right: 4px; }
.restore-conflict-item { min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 0; border: 1px solid rgba(24, 56, 42, .15); border-radius: 16px; background: rgba(255, 255, 255, .7); padding: 12px; }
.restore-conflict-item legend { grid-column: 1 / -1; padding: 0 6px; color: var(--ink); font-size: .78rem; font-weight: 850; text-transform: capitalize; }
.restore-conflict-item label { min-width: 0; display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 8px; border: 1px solid rgba(49, 83, 61, .16); border-radius: 12px; background: #f4f0e5; padding: 10px; cursor: pointer; }
.restore-conflict-item label:last-child { background: #eaf1e7; }
.restore-conflict-item input { width: 16px; margin: 2px 0 0; accent-color: var(--matcha); }
.restore-conflict-item strong, .restore-conflict-item small { display: block; }
.restore-conflict-item strong { font-size: .72rem; }
.restore-conflict-item small { margin-top: 4px; overflow-wrap: anywhere; color: #5f6b63; font-size: .7rem; line-height: 1.4; }
.restore-result-preview { min-height: 0; display: grid; gap: 10px; }
.restore-result-preview[hidden] { display: none; }
.restore-resolution .restore-preview-header { display: flex; align-items: end; justify-content: space-between; gap: 12px; border: 0; padding: 0; }
.restore-preview-header p { margin: 0 0 3px; }
.restore-preview-header h2 { margin: 0; font: 500 1.35rem/1.15 var(--display); }
.restore-preview-pages { display: flex; gap: 4px; }
.restore-preview-pages button { border-radius: 9px; background: transparent; color: var(--ink); padding: 7px 10px; font-size: .72rem; }
.restore-preview-pages button.is-active { background: var(--matcha); color: var(--cream); }
.restore-preview-status { margin: 0; border-left: 3px solid #4d8a57; background: #eaf3e6; color: #31533d; padding: 8px 10px; font-size: .75rem; line-height: 1.4; }
.restore-preview-change-list { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 2px; }
.restore-preview-change-list span { flex: 0 0 auto; border: 1px solid #75a477; border-radius: 999px; background: #edf7ed; color: #31533d; padding: 4px 8px; font: 700 .65rem/1.2 Consolas, monospace; }
.restore-result-preview iframe { width: 100%; min-height: 500px; border: 1px solid rgba(31, 43, 36, .28); border-radius: 14px; background: white; }
.restore-resolution footer { display: flex; justify-content: flex-end; gap: 9px; border-top: 1px solid rgba(24, 56, 42, .15); padding-top: 15px; }

@media (max-width: 680px) {
  .draft-conflict { width: 100vw; max-height: 100vh; border-radius: 0; }
  .conflict-item { grid-template-columns: 1fr; }
  .draft-conflict-note { align-items: start; flex-direction: column; }
  .draft-conflict footer { align-items: stretch; flex-direction: column-reverse; }
  .restore-resolution { width: 100vw; max-height: 100vh; border-radius: 0; }
  .restore-decision, .restore-conflict-item { grid-template-columns: 1fr; }
  .restore-preview-header { align-items: start; flex-direction: column; }
  .restore-result-preview iframe { min-height: 560px; }
  .restore-resolution footer { align-items: stretch; flex-direction: column-reverse; }
}
.is-hidden { display: none !important; }

@media (max-width: 820px) {
  .app { padding: 14px; }
  .topbar, .editor-layout { grid-template-columns: 1fr; }
  .topbar { align-items: start; flex-direction: column; }
  .publish-review { width: 100vw; height: 100vh; border: 0; }
  .publish-review-shell { padding: 12px; }
  .publish-review-header, .publish-review-summary { align-items: start; flex-direction: column; }
  .publish-comparison { grid-template-columns: 1fr; overflow-y: auto; }
  .comparison-pane iframe { min-height: 520px; }
}

/* Editorial studio visual system */
:root {
  --ink: #18382a;
  --ink-soft: #4f6458;
  --paper: #fffdf7;
  --cream: #f2eee2;
  --matcha: #2f6048;
  --matcha-dark: #173d2c;
  --sage: #dfe9da;
  --peach: #e36a45;
  --rule: rgba(24, 56, 42, .15);
  --danger: #a84431;
  --display: Georgia, "Times New Roman", serif;
  --body: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --soft-shadow: 0 22px 60px rgba(28, 55, 41, .10);
}

html { min-height: 100%; background: var(--cream); }
body {
  min-height: 100vh;
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(circle at 8% 12%, rgba(174, 202, 159, .38), transparent 28rem),
    radial-gradient(circle at 94% 8%, rgba(229, 177, 140, .20), transparent 26rem),
    linear-gradient(145deg, #f7f3e8 0%, #eeeade 58%, #f5efe3 100%);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.45;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .42;
  background-image:
    linear-gradient(rgba(24, 56, 42, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 56, 42, .025) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

h1, h2, h3 { letter-spacing: -.025em; }
button, input, textarea, select { font-family: var(--body); }
button {
  border-color: transparent;
  border-radius: 11px;
  background: var(--matcha);
  box-shadow: 0 1px 0 rgba(255,255,255,.16) inset;
  color: #fffdf7;
  padding: 10px 15px;
  font-weight: 720;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
button:hover { transform: translateY(-1px); background: #254f3b; box-shadow: 0 8px 20px rgba(30, 76, 53, .16); }
button:disabled:hover { transform: none; box-shadow: none; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(227, 106, 69, .38);
  outline-offset: 3px;
}
input, textarea, select {
  border: 1px solid rgba(24, 56, 42, .18);
  border-radius: 11px;
  background: rgba(255, 254, 249, .92);
  color: var(--ink);
  padding: 11px 12px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
input:hover, textarea:hover, select:hover { border-color: rgba(47, 96, 72, .42); background: #fff; }
input:focus, textarea:focus, select:focus { border-color: var(--matcha); background: #fff; box-shadow: 0 0 0 4px rgba(47, 96, 72, .08); }
label { color: #3e574a; font-size: .82rem; font-weight: 680; }

.app { width: min(100%, 1560px); padding: clamp(18px, 3vw, 42px); }
.panel {
  border: 1px solid rgba(24, 56, 42, .13);
  border-radius: 22px;
  background: rgba(255, 253, 247, .94);
  box-shadow: var(--soft-shadow);
}
.eyebrow { color: #315442; font-size: .67rem; letter-spacing: .14em; }
.secondary-action, .save-draft-action, .history-refresh, .compact-add {
  border-color: rgba(47, 96, 72, .28);
  background: rgba(255,255,255,.55);
  box-shadow: none;
  color: var(--matcha);
}
.secondary-action:hover, .save-draft-action:hover, .history-refresh:hover, .compact-add:hover { border-color: var(--matcha); background: #eef4eb; }

.login-panel-primary {
  width: min(100%, 980px);
  min-height: 590px;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(380px, .94fr);
  overflow: hidden;
  margin: clamp(34px, 7vh, 86px) auto 0;
  padding: 0;
  border-radius: 30px;
  background: var(--paper);
  box-shadow: 0 35px 90px rgba(26, 57, 42, .18), 0 2px 0 rgba(255,255,255,.8) inset;
}
.login-brand {
  min-height: 590px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 18%, rgba(187, 214, 166, .23), transparent 12rem),
    linear-gradient(155deg, #2f674c 0%, #173d2c 74%);
  color: #fffdf4;
  padding: clamp(32px, 5vw, 58px);
}
.login-brand::before, .login-brand::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(246, 239, 213, .18);
  border-radius: 50%;
  pointer-events: none;
}
.login-brand::before { width: 330px; height: 330px; right: -188px; top: 78px; box-shadow: 0 0 0 54px rgba(255,255,255,.025), 0 0 0 108px rgba(255,255,255,.018); }
.login-brand::after { width: 170px; height: 170px; left: -92px; bottom: 78px; }
.brand-kicker { display: inline-flex; align-items: center; gap: 9px; position: relative; z-index: 1; font-size: .67rem; font-weight: 750; letter-spacing: .15em; text-transform: uppercase; }
.brand-kicker i { width: 22px; height: 1px; background: #e8b894; }
.brand-statement { position: relative; z-index: 1; }
.brand-monogram {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 28px;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  color: #f0c3a2;
  font: italic 700 1.65rem/1 var(--display);
}
.brand-statement h1 { margin: 0; font: 500 clamp(2.35rem, 4.3vw, 4.1rem)/.98 var(--display); letter-spacing: -.055em; }
.brand-statement h1 em { color: #c8dcb9; font-weight: 400; }
.brand-statement p { max-width: 390px; margin: 24px 0 0; color: rgba(255,253,244,.72); font-size: .9rem; line-height: 1.65; }
.brand-footnote { display: flex; gap: 21px; position: relative; z-index: 1; color: rgba(255,253,244,.54); font-size: .63rem; font-weight: 720; letter-spacing: .12em; text-transform: uppercase; }
.brand-footnote span + span::before { content: "·"; margin-right: 21px; color: #e8b894; }
.login-card { align-self: center; padding: clamp(34px, 5vw, 64px); }
.login-card h2 { margin: 4px 0 0; font: 500 clamp(2.1rem, 4vw, 3.2rem)/1 var(--display); color: var(--matcha-dark); }
.login-intro { margin: 14px 0 30px; color: var(--ink-soft); font-size: .88rem; }
.login-card form { gap: 17px; }
.login-card .login-field { gap: 8px; }
.login-card input { min-height: 48px; }
.login-card [data-login-submit] { min-height: 50px; display: flex; align-items: center; justify-content: space-between; margin-top: 3px; padding-inline: 18px; }
.login-card [data-login-submit] span { font-size: 1.15rem; transition: transform .16s ease; }
.login-card [data-login-submit]:hover span { transform: translateX(4px); }
.login-card .text-action { justify-self: start; color: var(--ink-soft); padding: 2px 0; font-size: .78rem; text-decoration-color: rgba(47,96,72,.35); text-underline-offset: 4px; }
.login-card .text-action:hover { color: var(--matcha); box-shadow: none; transform: none; }
.login-security { display: flex; align-items: center; gap: 7px; margin: 29px 0 0; color: #58655e; font-size: .68rem; }
.login-security span { color: #7fa170; font-size: .55rem; }
.password-input { overflow: hidden; border-color: rgba(24, 56, 42, .18); border-radius: 11px; background: rgba(255,254,249,.92); }
.password-input:focus-within { border-color: var(--matcha); box-shadow: 0 0 0 4px rgba(47,96,72,.08); background: #fff; }
.password-input input:focus { box-shadow: none; }
.login-panel:not(.login-panel-primary) { width: min(100%, 500px); margin-top: 10vh; border-radius: 24px; padding: clamp(25px, 4vw, 38px); }
.login-panel:not(.login-panel-primary) h1 { font: 500 2.2rem/1.05 var(--display); }

.topbar {
  position: relative;
  margin-bottom: 25px;
  border: 1px solid rgba(24,56,42,.12);
  border-radius: 20px;
  background: rgba(255,253,247,.72);
  box-shadow: 0 14px 36px rgba(28,55,41,.07);
  padding: 20px 22px;
  backdrop-filter: blur(14px);
}
.topbar p { color: var(--peach); font-size: .67rem; font-weight: 780; letter-spacing: .14em; }
.topbar h1 { font: 500 clamp(2rem, 4.7vw, 3.8rem)/.98 var(--display); color: var(--matcha-dark); }
.topbar-description { display: block; max-width: 570px; margin-top: 10px; color: var(--ink-soft); font-size: .82rem; }
.topbar-actions button { min-height: 42px; }
.dashboard .topbar { padding-block: 27px; }

.website-grid { grid-template-columns: repeat(auto-fit, minmax(285px, 1fr)); gap: 22px; }
.website-card {
  min-height: 250px;
  border: 1px solid color-mix(in srgb, var(--card-accent) 24%, transparent);
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--card-accent) 14%, transparent), transparent 12rem),
    rgba(255,253,247,.92);
  box-shadow: 0 16px 38px rgba(28,55,41,.08);
  padding: 22px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.website-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--card-accent); opacity: .88; }
.website-card::after { right: 8px; bottom: -30px; color: color-mix(in srgb, var(--card-accent) 7%, transparent); font-size: 10rem; font-style: italic; }
.website-card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--card-accent) 50%, transparent); background-color: #fffdf9; box-shadow: 0 25px 55px color-mix(in srgb, var(--card-accent) 17%, transparent); }
.design-badge { width: 45px; height: 45px; border-radius: 14px; box-shadow: 0 8px 18px color-mix(in srgb, var(--card-accent) 24%, transparent); font-family: var(--display); font-weight: 600; }
.managed-label { border: 1px solid rgba(47,96,72,.14); border-radius: 999px; background: rgba(235,242,230,.78); padding: 6px 9px; font-size: .61rem; letter-spacing: .08em; }
.website-card strong { font: 500 clamp(1.55rem, 2vw, 2rem)/1.05 var(--display); }
.repo-label { color: #708077; font-family: var(--body); font-size: .72rem; }
.website-card-footer { border-color: rgba(24,56,42,.12); }
.website-card-footer small { color: #748078; font-size: .71rem; }
.website-card-footer > span { font-size: .76rem; }

.editor-layout { grid-template-columns: minmax(330px, 420px) minmax(0, 1fr); gap: 22px; }
.editor-layout > .panel, .preview { border-radius: 22px; box-shadow: 0 18px 46px rgba(28,55,41,.08); }
.tabs { gap: 5px; margin: -2px 0 17px; border: 0; border-radius: 13px; background: #e8ede3; padding: 5px; }
.tabs button { border-radius: 9px; background: transparent; color: #5b6d62; box-shadow: none; }
.tabs button.is-active { background: #fffdf7; color: var(--matcha-dark); box-shadow: 0 3px 12px rgba(28,55,41,.10); }
.content-selector, .menu-workflow, .menu-items-browser, .focused-editor { border-color: rgba(24,56,42,.12); background: rgba(250,248,239,.72); }
.focused-editor, .selected-fields-form > label, .menu-item-choice, .section-browser-choice { box-shadow: 0 5px 16px rgba(28,55,41,.035); }
.focused-editor-header { background: linear-gradient(135deg, #e8efe3, #f4eee2); }
.draft-history { border-top: 1px solid rgba(24,56,42,.16); }
.draft-history-header h2, .preview-header h2 { font-family: var(--display); font-weight: 500; }
.history-item { border-color: rgba(24,56,42,.12); background: rgba(255,254,249,.95); box-shadow: 0 6px 20px rgba(28,55,41,.045); }
.preview { padding: 15px; }
.preview-toolbar { border: 1px solid rgba(24,56,42,.13); border-radius: 14px 14px 0 0; background: #eef0e8; }
.preview-toolbar button { border-radius: 8px; }
.preview-toolbar button.is-active { border-color: transparent; background: var(--matcha-dark); }
.preview-stage { border-color: rgba(24,56,42,.18); border-radius: 0 0 15px 15px; background: #dfe3dc; }
.deployment-pill { border-color: rgba(24,56,42,.13); border-radius: 999px; background: rgba(255,253,247,.75); }

.account-dialog, .publish-review {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 28px;
  background: #f3efe4;
  box-shadow: 0 35px 110px rgba(10,35,23,.32);
}
.account-dialog::backdrop, .publish-review::backdrop { background: rgba(16,38,27,.62); backdrop-filter: blur(8px); }
.account-shell { padding: clamp(18px, 3vw, 30px); }
.account-header { border-color: rgba(24,56,42,.14); }
.account-header h1, .preference-card h2, .channel-title h2 { font-family: var(--display); font-weight: 500; }
.channel-card, .preference-card { border-color: rgba(24,56,42,.12); border-radius: 18px; box-shadow: 0 10px 28px rgba(28,55,41,.055); }
.channel-icon { border-radius: 13px; background: linear-gradient(145deg, #3a7356, #214b37); box-shadow: 0 8px 18px rgba(30,76,53,.18); }
.preference-table { border-radius: 13px; background: #f6f3e9; padding: 12px; }
.preference-table input { accent-color: var(--matcha); }
.publish-review-header { border-color: rgba(24,56,42,.16); }
.publish-review-header h1 { font-family: var(--display); font-weight: 500; }
.comparison-pane { overflow: hidden; border-color: rgba(24,56,42,.16); border-radius: 15px; }
.publish-review-actions { border-color: rgba(24,56,42,.13); }

.publish-timing { display: grid; gap: 11px; border: 1px solid rgba(47,96,72,.17); border-radius: 16px; background: linear-gradient(135deg, #f8f6ed, #edf3e9); padding: 13px; }
.publish-timing[hidden] { display: none; }
.publish-timing-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.publish-timing-heading p, .publish-timing-heading h2 { margin: 0; }
.publish-timing-heading p { color: var(--peach); font-size: .62rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.publish-timing-heading h2 { margin-top: 2px; font: 500 1.08rem/1.1 var(--display); }
.publish-timing-heading > span { border-radius: 999px; background: #dfead9; color: var(--matcha); padding: 5px 9px; font-size: .62rem; font-weight: 800; }
.publish-timing-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.publish-timing-option { grid-template-columns: auto minmax(0,1fr); align-items: start; gap: 9px; border: 1px solid rgba(24,56,42,.13); border-radius: 12px; background: rgba(255,255,255,.7); padding: 10px; cursor: pointer; }
.publish-timing-option:has(input:checked) { border-color: var(--matcha); background: #fffdf8; box-shadow: 0 0 0 3px rgba(47,96,72,.08); }
.publish-timing-option input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--matcha); }
.publish-timing-option strong, .publish-timing-option small { display: block; }
.publish-timing-option strong { color: var(--ink); font-size: .76rem; }
.publish-timing-option small { margin-top: 2px; color: #68786e; font-size: .65rem; font-weight: 500; line-height: 1.35; }
.publish-datetime { grid-template-columns: 1fr 1fr; align-items: end; gap: 10px; border-top: 1px solid rgba(24,56,42,.1); padding-top: 10px; }
.publish-datetime[hidden] { display: none; }
.publish-time-field { gap: 5px; color: #59695f; font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.publish-time-field select { min-height: 44px; border-color: rgba(47,96,72,.24); border-radius: 11px; background-color: #fffdf8; color: var(--ink); font-size: .82rem; font-weight: 700; letter-spacing: 0; text-transform: none; }
.publish-time-field select:focus { border-color: var(--matcha); box-shadow: 0 0 0 3px rgba(47,96,72,.1); }
.publish-timing-guidance { margin: 0; color: #64746a; font-size: .67rem; line-height: 1.4; }

.app-toast { border: 1px solid rgba(47,96,72,.2); border-radius: 18px; background: rgba(250,255,246,.96); box-shadow: 0 22px 55px rgba(25,58,42,.20); animation: toast-rise .24s ease-out; backdrop-filter: blur(12px); }
@keyframes toast-rise { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 820px) {
  .login-panel-primary { grid-template-columns: 1fr; width: min(100%, 560px); margin-top: 14px; }
  .login-brand { min-height: 300px; padding: 30px; }
  .brand-statement { margin-block: 40px; }
  .brand-statement h1 { font-size: clamp(2.25rem, 11vw, 3.8rem); }
  .brand-monogram { display: none; }
  .login-card { padding: 34px 28px; }
  .topbar { padding: 18px; }
  .topbar-actions { flex-wrap: wrap; }
  .editor-layout { grid-template-columns: 1fr; }
  .publish-timing-options { grid-template-columns: 1fr; }
  .publish-datetime { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .app { padding: 12px; }
  .login-panel-primary { border-radius: 22px; }
  .login-brand { min-height: 260px; }
  .brand-footnote { gap: 11px; }
  .brand-footnote span + span::before { margin-right: 11px; }
  .website-grid { grid-template-columns: 1fr; }
  .topbar-actions button { flex: 1 1 auto; }
  .publish-action-buttons { width: 100%; }
  .publish-action-buttons button { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------------------------------------------- quotation form builder */
.quotation-builder { display: grid; gap: 10px; }
.quotation-builder-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.quotation-builder-head small { display: block; margin-top: 4px; opacity: .75; }
.quotation-section { border: 1px solid rgba(0,0,0,.12); border-radius: 10px; background: #fff; }
.quotation-section > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; cursor: pointer; }
.quotation-section-title { font-weight: 700; }
.quotation-section-meta { font-size: 12px; opacity: .65; }
.quotation-section-body { padding: 0 14px 14px; display: grid; gap: 10px; }
.quotation-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.quotation-row label { display: grid; gap: 4px; font-size: 12px; }
.quotation-row input[type="text"], .quotation-row input[type="number"], .quotation-row select { min-width: 150px; }
.quotation-toggle { flex-direction: row !important; align-items: center; gap: 6px !important; }
.quotation-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.quotation-actions button { font-size: 12px; padding: 4px 10px; }
.quotation-danger { color: #a3242c; }
.quotation-condition { margin: 0; font-size: 12px; opacity: .8; }
.quotation-fields { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.quotation-field { border: 1px solid rgba(0,0,0,.1); border-radius: 8px; padding: 10px 12px; display: grid; gap: 8px; }
.quotation-field.is-hidden-field { opacity: .55; }
.quotation-field-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.quotation-field-head code { font-size: 11px; opacity: .7; }
.quotation-locked, .quotation-custom { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; padding: 2px 6px; border-radius: 4px; }
.quotation-locked { background: #eef2fb; color: #2f4f9b; }
.quotation-custom { background: #eef8f0; color: #2c6b40; }
.quotation-options { margin: 0; font-size: 12px; opacity: .7; }
