/* Editor chrome shares Chispitas' brand; customer template previews keep
   their own selected styles. */
:root {
  --navy: #221b57; --navy-2: #302367; --butter: #fcfbff; --cream: #e9dfff;
  --amber: #ffc247; --aqua: #087a55; --ember: #4934b8;
  --ink: #221b57; --muted: #454268; --line: #dad3ef;
  --display: 'Newsreader', Georgia, serif;
  --body: 'Nunito', Arial, sans-serif;
}
body { background: var(--butter); }
:focus-visible { outline: 3px solid #4934b8; outline-offset: 4px; }
.topbar { background: #1e1747; padding: 16px 40px; min-height: 78px; gap: 24px; }
.topbar .brand { color: #fff; text-decoration: none; flex-shrink: 0; }
.topbar .spark { width: 44px; height: 28px; }
.topbar .mark { font-family: var(--body); font-size: 22px; font-weight: 600; letter-spacing: .1em; }
.topbar .sub { opacity: 1; color: #e5dcff; font-size: 10px; letter-spacing: .1em; }
.builder-site-nav { display: flex; align-items: center; justify-content: center; gap: 24px; flex: 1; }
.builder-site-nav a { color: #f4f0ff; font-size: 14px; font-weight: 600; text-decoration: none; }
.builder-site-nav a, .topbar .back-site { position: relative; padding-block: 6px; }
.builder-site-nav a::after, .topbar .back-site::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px;
  background: linear-gradient(90deg, #ffc247, #f26b5e);
  transform: scaleX(0); transform-origin: left; transition: transform .28s cubic-bezier(.34, 1.2, .64, 1);
}
.builder-site-nav a:is(:hover, :focus-visible), .topbar .back-site:is(:hover, :focus-visible) { color: #ffd166; }
.builder-site-nav a:is(:hover, :focus-visible)::after, .topbar .back-site:is(:hover, :focus-visible)::after { transform: scaleX(1); }
.topbar .back-site { color: #f4f0ff; font-size: 14px; text-decoration: none; white-space: nowrap; }
.topbar :focus-visible { outline-color: #ffd166; }
.saved { color: #a9f7d7; }
.langtoggle { gap: 2px; padding: 4px; border-color: #c4b4f3; background: #302367; flex-shrink: 0; }
.langtoggle button { min-width: 44px; min-height: 36px; padding: 7px 12px; font-size: 13px; font-weight: 800; letter-spacing: 0; opacity: 1; color: #f4f0ff; }
.langtoggle button:hover { background: #4934b8; }
.langtoggle button[aria-pressed="true"] { background: var(--amber); color: var(--navy); }
.builder-welcome { max-width: 1208px; margin: 32px auto 0; padding: 24px 32px; border-radius: 24px; background: #e9dfff; display: flex; align-items: center; gap: 24px; }
.builder-welcome h1 { font-family: var(--display); font-size: 36px; line-height: 1.1; font-weight: 500; margin: 0 0 8px; }
.builder-welcome p { color: var(--muted); font-size: 16px; margin: 0; }
.welcome-art { width: 100px; height: 100px; flex-shrink: 0; background: url('/images/home/chispitas-watercolor-icons.webp') 100% 100% / 200% 200% no-repeat; }
.wrap { gap: 40px; padding-top: 32px; }
.steptop { padding: 20px; background: #fff2b8; border-radius: 20px; }
.steptop .eyebrow { color: var(--navy); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.rail { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.rail .node, .rail .node:last-child { display: block; }
.rail .dot, .rail .seg { display: none; }
.rail button.dotbtn { position: static; display: flex; align-items: center; gap: 6px; width: 100%; min-height: 44px; padding: 8px; font-size: 12px; font-weight: 700; line-height: 1.4; color: var(--muted); background: #fff; border: 1px solid #d2c79b; border-radius: 10px; text-align: left; }
.rail .current button.dotbtn { background: var(--navy); border-color: var(--navy); color: #fff; }
.rail .done:not(.current) button.dotbtn { background: #d8fbea; border-color: #87c6aa; color: #07583f; }
.rail-number { opacity: .8; font-size: 11px; }
.panel h2 { font-weight: 500; font-size: 40px; line-height: 1.15; margin-bottom: 12px; }
.panel .lede { font-size: 16px; }
.tpl .meta b { font-weight: 500; font-size: 24px; line-height: 1.2; margin-bottom: 4px; }
.tpl .meta span { font-size: 14px; }
.tpl[aria-pressed="true"] { border-color: #4934b8; box-shadow: 0 0 0 2px #4934b8; }
.tpl .check { background: #4934b8; color: #fff; }
.field > label { font-size: 13px; font-weight: 800; letter-spacing: .04em; }
.field input::placeholder, .field textarea::placeholder, .counter, .field > label .hint { color: var(--muted); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: #4934b8; box-shadow: 0 0 0 3px #e9dfff; }
.panelnav button, .bigbtn, .mobilebar button { border-radius: 50px; min-height: 48px; font-weight: 800; box-shadow: none; }
.panelnav button.next:hover, .bigbtn:hover, .mobilebar button:hover { background: #ffd166; box-shadow: 0 6px 20px #221b5724; filter: none; }
.bigbtn.alt:hover { background: #e9dfff; }
.pal, .toneseg button, .seg button, .addbtn { min-height: 44px; }
.previewcol .plabel .eyebrow { color: var(--navy); font-weight: 800; }
.browser .chrome { background: #e9dfff; }
.previewcol .plabel .open { padding: 8px 0 8px 12px; min-height: 44px; }
.previewcol { top: 106px; height: calc(100vh - 138px); }
.mobilebar { display: none; }
.skip-builder { position: fixed; top: -100px; left: 16px; z-index: 100; background: var(--amber); color: var(--navy); padding: 12px 20px; border-radius: 50px; }
.skip-builder:focus { top: 16px; }
@media (max-width: 1100px) { .builder-site-nav { gap: 16px; } .saved { display: none; } .topbar { padding: 16px 24px; gap: 16px; } }
@media (max-width: 980px) {
  .builder-site-nav { display: none; }
  .topbar .back-site { margin-left: auto; }
  .builder-welcome { margin: 24px 20px 0; padding: 24px; }
  .builder-welcome h1 { font-size: 30px; }
  .mobilebar { display: flex; background: linear-gradient(transparent, #fcfbff 35%); padding-top: 24px; }
  .wrap { padding-top: 24px; }
  .topbar .mark { font-size: 18px; }
}
@media (max-width: 560px) {
  .topbar { padding: 12px 16px; gap: 12px; }
  .topbar .brand { gap: 8px; }
  .topbar .spark { width: 28px; height: 22px; }
  .topbar .mark { font-size: 16px; letter-spacing: .08em; }
  .topbar .back-site { font-size: 18px; }
  .builder-welcome { gap: 14px; padding: 20px; }
  .welcome-art { width: 64px; height: 64px; }
  .builder-welcome h1 { font-size: 27px; }
  .builder-welcome p { font-size: 14px; }
  .steptop { padding: 16px; }
  .rail { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 6px; }
  .rail button.dotbtn { flex-direction: column; align-items: flex-start; gap: 2px; font-size: 11px; padding: 8px 6px; }
  .panel h2 { font-size: 34px; }
  .logoctl { min-width: 0; width: 100%; }
  .rep .grid2 { grid-template-columns: minmax(0,1fr) 90px; }
  .slugrow { flex-wrap: wrap; }
  .slugrow input { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (max-width: 360px) {
  .rail button.dotbtn { padding-inline: 4px; font-size: 10px; }
}

/* Draft tools stay within reach at every step, including on phones. */
.workflow-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 16px; }
.workflow-meta #stepcount { margin: 0; }
.builder .saved { display: block; opacity: 1; color: #07583f; font-size: 12px; line-height: 1.5; }
.builder .saved[data-state="error"], .builder .saved[data-state="invalid"] { color: #9b2440; font-weight: 700; }
.steptop { scroll-margin-top: 96px; }
.draft-shortcuts { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 12px 0 24px; }
.draft-shortcuts button, .draft-shortcuts label { position: relative; display: inline-flex; align-items: center; min-height: 44px; border: 0; border-radius: 10px; color: #4934b8; background: transparent; font-size: 13px; font-weight: 800; padding: 8px 0; cursor: pointer; }
.draft-shortcuts label:focus-within { outline: 3px solid #4934b8; outline-offset: 4px; }
.draft-shortcuts input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.draft-feedback, .submitstatus { color: #07583f; background: #d8fbea; border-radius: 14px; padding: 16px; font-size: 14px; line-height: 1.6; margin: 0 0 24px; }
.draft-feedback[data-error="true"], .submitstatus[data-error="true"] { color: #9b2440; background: #ffe0d2; }
[hidden], .panel[hidden] { display: none !important; }
.review-card { padding: 24px; background: #d8fbea; border-radius: 20px; margin-bottom: 24px; }
.review-card h3 { font-family: var(--display); font-size: 28px; line-height: 1.2; margin: 0 0 12px; }
.review-card > p { color: var(--muted); font-size: 14px; line-height: 1.7; margin: 0 0 16px; }
.review-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid #aacfbf; font-size: 13px; }
.review-state { font-size: 12px; color: var(--muted); }
.review-state.is-ready { color: #07583f; font-weight: 800; }
.review-row button { min-height: 44px; min-width: 48px; border: 1px solid #8bb6a3; color: var(--ink); background: #fff; border-radius: 50px; padding: 8px 12px; font-size: 12px; font-weight: 800; }
.slug-label { display: block; font-size: 13px; font-weight: 700; margin-top: 20px; }
.launch-note { font-size: 13px; line-height: 1.7; color: var(--muted); margin: 12px 0 0; }
.field input[aria-invalid="true"] { border-color: #9b2440; }
.photoerr { color: #9b2440; opacity: 1; font-size: 14px; }
.modal { margin: 0; border: 0; max-width: none; max-height: none; width: 100%; height: 100dvh; padding: 20px; background: transparent; }
.modal[open] { display: flex; align-items: center; justify-content: center; }
.modal::backdrop { background: #100d35cc; }
.modal .sheet { max-width: 960px; height: calc(100dvh - 40px); }
.modal .closebar { justify-content: space-between; gap: 16px; align-items: center; color: #fff; }
.modal .closebar h2 { font-family: var(--display); font-size: 24px; font-weight: 500; margin: 0; }
.modal .closebar button { min-height: 44px; border-radius: 50px; padding: 10px 20px; }
.modal .browser { min-height: 0; flex: 1; }
.tpl .thumb iframe { pointer-events: none; }
@media (max-width: 560px) {
  .topbar .back-site { display: none; }
  .topbar .langtoggle { margin-left: auto; }
  .builder-welcome { margin-inline: 16px; }
  .draft-shortcuts { gap: 8px 16px; }
  .review-card { padding: 20px; }
  .review-row { grid-template-columns: 1fr auto; gap: 4px 12px; }
  .review-row > span:first-child { grid-column: 1; }
  .review-row .review-state { grid-column: 1; }
  .review-row button { grid-column: 2; grid-row: 1 / 3; }
  .modal { padding: 12px; }
  .modal .sheet { height: calc(100dvh - 24px); }
}
