:root {
  color-scheme: dark;
  --ink: #e7f4f2; --night: #081f31; --sun: #ffcf52; --coral: #ff8768;
  --water: #86d7d2; --paper: #102f40; --wash: #16475a; --field: #081f31;
  --line: #456674; --muted: #c1d9d6; --control-line: #7293a1;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  color: var(--ink); background: var(--night); font: 16px/1.5 var(--sans);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { opacity: .6; cursor: not-allowed; }
a { color: var(--water); text-underline-offset: .2em; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--coral); outline-offset: 4px;
}
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 20; padding: 12px 18px; background: var(--sun); color: #062940; font-weight: 800; }
.skip-link:focus { top: 12px; }
.masthead {
  min-height: 88px; padding: 14px max(24px, calc((100vw - 1180px) / 2));
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: #102f40; color: #e7f4f2; border-bottom: 1px solid #456674;
}
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; color: inherit; font-weight: 900; font-size: 1rem; text-transform: uppercase; letter-spacing: .025em; line-height: 1; }
.brand img, .footer-brand img { flex: 0 0 auto; object-fit: contain; border-radius: 50%; background: #fff; }
.brand img { width: 58px; height: 58px; }
.brand small { display: block; margin-top: 7px; font-size: .68rem; font-weight: 600; letter-spacing: .08em; color: #c1d9d6; }
.header-links, nav { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
nav:empty { display: none; }
nav button, .website-link { min-height: 44px; padding: 10px 12px; border: 0; border-radius: 2px; color: #e7f4f2; background: transparent; font-size: .88rem; font-weight: 650; text-decoration: none; }
nav button:hover, .website-link:hover { background: #16475a; }
nav button.active { color: #062940; background: var(--sun); font-weight: 800; }
.website-link { border: 1px solid #7293a1; }
.editor-stage { max-width: 1180px; margin: 0 auto; padding: 44px 24px 48px; }
body[data-mode="auth"] .editor-stage { display: grid; grid-template-columns: 1fr minmax(330px, 470px); gap: clamp(40px, 7vw, 88px); align-items: center; }
.brand-intro { min-width: 0; }
.kicker { margin: 0 0 12px; color: var(--coral); font-size: .72rem; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.brand-intro h2 { font-size: clamp(2.6rem, 5.2vw, 4rem); line-height: 1.04; font-weight: 850; letter-spacing: -.055em; margin: 0 0 15px; }
em { font-family: var(--serif); font-weight: 400; }
.brand-intro h2 em { color: var(--coral); }
.brand-intro-copy > p:not(.kicker) { max-width: 480px; margin: 0 0 10px; color: var(--muted); }
.brand-intro-copy .workflow-hint { font-size: .85rem; }
.editor-photo { position: relative; margin: 27px 14px 6px 0; transform: rotate(-2deg); box-shadow: 9px 10px 0 var(--sun); }
.editor-photo img { display: block; width: 100%; height: 205px; object-fit: cover; object-position: center 70%; }
.editor-photo figcaption { position: absolute; right: 0; bottom: 0; max-width: 92%; padding: 10px 13px; color: #fffdf8; background: #062940; font-size: .78rem; font-weight: 650; }
main { min-width: 0; }
.loading { padding: 50px 0; text-align: center; color: var(--muted); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.7rem, 3vw, 2.2rem); line-height: 1.1; letter-spacing: -.04em; margin-bottom: 10px; }
h2 { font-size: 1.3rem; line-height: 1.2; }
h3 { font-size: 1rem; }
p { line-height: 1.55; }
.muted { color: var(--muted); }
.auth { padding: 31px; background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--sun); }
.auth form, .card form, .account form { display: grid; gap: 18px; }
.auth > .hint { margin: 22px 0 0; }
.hint { font-size: .88rem; line-height: 1.5; }
.field { display: grid; gap: 8px; font-weight: 700; font-size: .93rem; min-width: 0; }
.field .hint { font-weight: 400; color: var(--muted); }
input:not([type="checkbox"]), textarea, select { width: 100%; min-height: 48px; border: 1px solid var(--control-line); border-radius: 2px; padding: 12px 13px; background: var(--field); color: var(--ink); font-weight: 400; }
textarea { min-height: 106px; resize: vertical; line-height: 1.55; }
input[type="checkbox"] { width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--sun); }
button.primary, button.secondary, button.danger, .site-link, .file-select { min-height: 46px; padding: 11px 17px; border-radius: 2px; font-weight: 750; text-decoration: none; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.primary { background: var(--sun); color: #062940; }
.primary:hover:not(:disabled) { background: var(--coral); color: #062940; }
.secondary, .site-link, .file-select { background: var(--paper); color: var(--ink); border-color: var(--control-line) !important; }
.secondary:hover:not(:disabled), .site-link:hover { background: var(--wash); }
.danger { background: var(--paper); color: var(--coral); border-color: var(--coral) !important; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.page-head p { margin-bottom: 0; }
body[data-mode="workspace"] .brand-intro { display: grid; grid-template-columns: 1fr 280px; gap: 32px; align-items: center; margin-bottom: 35px; padding-bottom: 27px; border-bottom: 1px solid var(--line); }
body[data-mode="workspace"] .brand-intro h2 { font-size: 2.3rem; margin-bottom: 10px; }
body[data-mode="workspace"] .brand-intro h2 br { display: none; }
body[data-mode="workspace"] .brand-intro h2 em { margin-left: .12em; }
body[data-mode="workspace"] .brand-intro-copy > p:not(.kicker) { max-width: 660px; font-size: .93rem; }
body[data-mode="workspace"] .brand-intro .workflow-hint { display: none; }
body[data-mode="workspace"] .editor-photo { margin: 0 9px 0 0; }
body[data-mode="workspace"] .editor-photo img { height: 128px; }
body[data-mode="workspace"] .editor-photo figcaption { font-size: .65rem; padding: 7px 9px; }
.toolbar { position: sticky; top: 0; z-index: 2; padding: 14px 0; background: var(--night); display: flex; justify-content: space-between; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.actions { display: flex; gap: 9px; flex-wrap: wrap; }
.site-select { max-width: 370px; }
.work-grid { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 24px; }
.pages { display: flex; flex-direction: column; gap: 7px; }
.pages button { min-height: 46px; text-align: left; border: 1px solid transparent; background: transparent; color: var(--ink); padding: 12px; border-radius: 2px; }
.pages button:hover { background: var(--wash); }
.pages button.active { background: var(--sun); color: #062940; font-weight: 750; }
.copy-panel { background: var(--paper); padding: 24px; border: 1px solid var(--line); display: grid; gap: 20px; }
.copy-panel > h2 { margin-bottom: 0; }
.copy-field { min-width: 0; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.copy-field:last-child { border: 0; padding: 0; }
.copy-field summary { font-size: .82rem; color: var(--muted); font-weight: 400; margin-top: 9px; cursor: pointer; }
.copy-field details p { font-size: .88rem; white-space: pre-wrap; overflow-wrap: anywhere; font-weight: 400; color: var(--muted); margin: 8px 0 0; }
.notice { border-left: 4px solid var(--sun); background: var(--wash); padding: 12px 16px; margin-bottom: 20px; font-size: .93rem; line-height: 1.5; }
.empty { padding: 40px 24px; border: 1px dashed var(--control-line); text-align: center; background: var(--paper); }
.user-grid { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 24px; }
.card { padding: 24px; background: var(--paper); border: 1px solid var(--line); min-width: 0; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.choice-grid .card { display: grid; align-content: start; gap: 12px; min-height: 220px; }
.choice-grid .card .primary { margin-top: auto; }
.proposal-change { border-top: 1px solid var(--line); padding: 12px 0 2px; }
.proposal-change p { white-space: pre-wrap; }
.user-row { padding: 18px 0; border-bottom: 1px solid var(--line); }
.user-row:first-child { padding-top: 0; }
.user-row:last-child { border: 0; padding-bottom: 0; }
.user-row h3 { margin-bottom: 5px; }
.user-row p { font-size: .88rem; margin-bottom: 12px; overflow-wrap: anywhere; }
.grant { padding: 10px 0; border-top: 1px solid var(--line); }
.check { display: flex; gap: 9px; align-items: center; font-weight: 450; line-height: 1.3; }
.grant .publish { margin: 9px 0 0 29px; font-size: .85rem; }
.badge { font-size: .75rem; background: var(--wash); padding: 4px 8px; border-radius: 2px; }
.secure-link { margin-top: 12px; overflow-wrap: anywhere; background: var(--wash); padding: 15px; line-height: 1.5; font-size: .9rem; }
.secure-link input { margin: 10px 0; font-size: .82rem; }
.file-select { position: relative; display: inline-flex; font-size: .85rem; cursor: pointer; }
.file-select input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-select:focus-within { outline: 3px solid var(--coral); outline-offset: 4px; }
.history { margin-top: 24px; }
.history-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding: 12px 0; }
.history-row small { display: block; color: var(--muted); margin-top: 4px; }
.account { max-width: 520px; }
#status:not(:empty) { max-width: 1132px; margin: 18px auto 0; padding: 12px 17px; color: var(--ink); background: var(--wash); border-left: 4px solid var(--water); line-height: 1.5; }
#status.error { border-color: var(--coral); }
#status:empty { display: none; }
.subtle { font-size: .85rem; }
label:has(input[readonly]) { color: var(--muted); }
.editor-footer { background: #062940; color: #e7f4f2; border-top: 1px solid #456674; }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 24px; display: grid; grid-template-columns: 1fr auto; gap: 18px 32px; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: 44px; height: 44px; }
.footer-brand b { font-size: .84rem; text-transform: uppercase; letter-spacing: .04em; }
.footer-brand p { font-size: .85rem; color: #c1d9d6; margin: 3px 0 0; }
.pride-note { margin: 0; display: flex; align-items: center; gap: 17px; }
.pride-note img { width: 125px; height: 78px; object-fit: cover; }
.pride-note figcaption { font-size: .83rem; font-weight: 650; }
.credits { grid-column: 1 / -1; margin: 0; font-size: .69rem; color: #c1d9d6; }
.credits a { color: #e7f4f2; }
@media (prefers-color-scheme: light) {
  :root { color-scheme: light; --ink: #063b5b; --sun: #ffd34f; --coral: #ae3e27; --water: #176b70; --paper: #f7f0e4; --wash: #e3eff2; --field: #fffdf8; --night: #efe9dd; --line: #b1bec1; --muted: #39576a; --control-line: #73858d; background: var(--night); }
  .editor-photo { box-shadow: 9px 10px 0 #063b5b; }
  .primary:hover:not(:disabled) { color: #fffdf8; }
  .danger { color: #922d22; border-color: #922d22 !important; }
}
@media (max-width: 850px) {
  .masthead { flex-wrap: wrap; gap: 12px; }
  .header-links { justify-content: flex-start; }
  body[data-mode="auth"] .editor-stage { grid-template-columns: 1fr 1fr; gap: 28px; }
  .auth { padding: 23px; }
  .brand-intro h2 { font-size: 2.6rem; }
  .editor-photo img { height: 185px; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .user-grid { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 160px minmax(0, 1fr); gap: 18px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .site-select { max-width: none; }
}
@media (max-width: 640px) {
  .masthead { padding: 13px 18px; }
  .brand { font-size: .88rem; gap: 10px; }
  .brand img { width: 48px; height: 48px; }
  .website-link { font-size: .8rem; padding: 9px 11px; }
  .header-links:has(nav:not(:empty)) { width: 100%; }
  nav { gap: 3px; }
  nav button { padding: 10px; font-size: .82rem; }
  .editor-stage { padding: 28px 18px 34px; }
  body[data-mode="auth"] .editor-stage { display: grid; grid-template-columns: 1fr; gap: 28px; }
  .brand-intro h2 { font-size: 2.6rem; }
  .brand-intro h2 br { display: none; }
  .brand-intro h2 em { display: block; }
  .brand-intro-copy > p:not(.kicker) { font-size: .92rem; }
  .brand-intro-copy .workflow-hint { display: none; }
  .editor-photo { margin: 18px 8px 4px 0; transform: none; box-shadow: 6px 7px 0 var(--sun); }
  .editor-photo img { height: 140px; }
  .editor-photo figcaption { padding: 8px 11px; font-size: .72rem; }
  .auth { padding: 23px; }
  body[data-mode="workspace"] .brand-intro { grid-template-columns: 1fr; gap: 15px; padding-bottom: 22px; margin-bottom: 27px; }
  body[data-mode="workspace"] .brand-intro h2 { font-size: 2rem; }
  body[data-mode="workspace"] .brand-intro h2 em { display: inline; }
  body[data-mode="workspace"] .editor-photo img { height: 98px; }
  .toolbar { padding: 12px 0; }
  .actions { gap: 8px; }
  .actions > button, .actions > .site-link { flex: 1 1 auto; font-size: .86rem; }
  .work-grid { grid-template-columns: 1fr; gap: 16px; }
  .pages { flex-direction: row; overflow-x: auto; padding: 4px 4px 8px; margin: -4px; }
  .pages button { white-space: nowrap; }
  .copy-panel, .card { padding: 19px; }
  .choice-grid { grid-template-columns: 1fr; }
  .history-row { align-items: flex-start; }
  #status:not(:empty) { margin: 15px 18px 0; }
  .footer-inner { grid-template-columns: 1fr; padding: 25px 18px; gap: 20px; }
  .pride-note img { width: 115px; height: 75px; }
  .credits { grid-column: 1; }
}
@media (max-width: 360px) {
  .masthead { display: grid; grid-template-columns: 1fr; }
  .brand-intro h2 { font-size: 2.35rem; }
  .auth { padding: 20px; }
  .pride-note { gap: 12px; }
  .pride-note img { width: 97px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
.password-choice { margin: 15px 0 8px; font-size: .85rem; }
.editor-modes, .visual-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.editor-modes button[aria-pressed="true"], .visual-tools button[aria-pressed="true"] { background: var(--sun); color: #062940; border-color: var(--sun); }
.work-grid.visual-grid { grid-template-columns: 1fr; }
.visual-grid .pages { flex-direction: row; overflow-x: auto; }
.visual-grid .pages button { white-space: nowrap; }
.copy-panel.visual-panel { display: block; padding: 16px; }
.visual-panel h2 { margin-bottom: 14px; }
.visual-hint, .preview-state { font-size: .86rem; line-height: 1.5; }
.preview-state { color: var(--muted); margin-bottom: 14px; }
.preview-stage { background: #dce6e8; width: 100%; margin: 0 auto; border: 1px solid var(--control-line); }
.preview-stage.phone-preview { max-width: 390px; }
.preview-stage iframe { display: block; border: 0; width: 100%; height: 70vh; min-height: 480px; }
.notes-panel { border-top: 1px solid var(--line); margin-top: 20px; padding: 20px 0; }
.notes-panel summary { cursor: pointer; margin-top: 14px; }
.notes-panel details p { font-size: .86rem; overflow-wrap: anywhere; }
.annotation-list:not(:empty) { margin-top: 20px; }
.annotation-row { border-top: 1px solid var(--line); padding: 14px 0; }
.annotation-row b, .request-note b { font-size: .86rem; overflow-wrap: anywhere; }
.annotation-row p, .request-note p { font-size: .9rem; white-space: pre-wrap; overflow-wrap: anywhere; margin: 7px 0 12px; }
.annotation-row button { margin-right: 8px; }
.note-dialog { width: min(540px, calc(100% - 32px)); max-height: 90vh; overflow-y: auto; padding: 25px; color: var(--ink); background: var(--paper); border: 2px solid var(--coral); }
.note-dialog::backdrop { background: #031826b8; }
.note-dialog label span { display: block; font-size: .9rem; font-weight: 700; margin-bottom: 8px; }
.note-dialog textarea { width: 100%; }
.note-dialog button { margin-right: 9px; }
.request-list { display: grid; gap: 18px; }
.request-note { padding: 15px 0; border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  .copy-panel.visual-panel { padding: 10px; }
  .visual-tools button, .editor-modes button { padding: 9px 12px; font-size: .83rem; }
  .preview-stage iframe { height: 65vh; min-height: 420px; }
}
.creative-prompts { margin: 18px 0 28px; }
.creative-prompts form { display: grid; gap: 13px; max-width: 720px; }
.creative-section { margin: 30px 0; }
.creative-section > h2 { margin-bottom: 8px; }
.creative-section > h3 { margin: 28px 0 12px; }
.creative-section > h2 + h3 { margin-top: 0; }
.creative-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 245px), 1fr)); gap: 14px; }
.creative-photo { overflow: hidden; border: 1px solid var(--line); background: var(--paper); }
.creative-photo[data-approved="true"] { border: 2px solid var(--water); }
.creative-photo > .check { display: flex; align-items: center; min-height: 48px; margin: 0; padding: 8px 12px; background: var(--wash); }
.creative-photo input[type="checkbox"], .creative-text-choice input[type="checkbox"] { width: 21px; height: 21px; flex: 0 0 21px; accent-color: var(--water); }
.creative-photo img { display: block; width: 100%; height: 170px; object-fit: cover; }
.creative-photo-body { display: grid; gap: 7px; padding: 12px; }
.creative-photo-body b { font-size: .85rem; line-height: 1.3; }
.creative-photo-body small { color: var(--muted); line-height: 1.4; }
.creative-photo-body a { font-size: .8rem; }
.creative-text-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr)); gap: 10px; margin: 14px 0 28px; }
.creative-text-choice { display: flex; align-items: flex-start; gap: 9px; padding: 12px; margin: 0; border: 1px solid var(--line); background: var(--paper); line-height: 1.45; }
.creative-text-choice:has(input:checked) { border-color: var(--water); background: var(--wash); }
.creative-thread { margin: 12px 0; }
.creative-reply { margin: 15px 0; padding: 13px; border-left: 3px solid var(--water); background: var(--wash); }
.creative-reply p { white-space: pre-wrap; }
.creative-reply .creative-text-choice { background: transparent; border: 0; padding: 6px 0; }
.note-dialog input[type="file"], .note-dialog input[type="text"] { display: block; width: 100%; margin: 6px 0 18px; }
.note-dialog .check { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; }
.note-dialog .check input { width: 20px; height: 20px; flex: 0 0 20px; }
