:root {
  color-scheme: light;
  --ink: #1b1914;
  --muted: #6b645b;
  --paper: #f6f3ec;
  --panel: #fffdf8;
  --line: #e4dfd4;
  --yellow: #e2f34a;
  --yellow-deep: #d3e62d;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  display: flex;
  flex-direction: column;
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, textarea:focus-visible, input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.top {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.bar {
  display: flex;
  align-items: center;
  gap: 12px 16px;
  min-height: 56px;
  padding: 8px 16px 4px;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  align-items: baseline;
  padding: 0 16px 8px;
}
.brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand strong { display: block; letter-spacing: -0.03em; }
.brand span, .who, .ship-state, .config-note, .hint, .field-id { color: var(--muted); }
.mark {
  width: 28px; height: 28px; display: grid; place-items: center;
  background: var(--ink); color: var(--yellow); font-weight: 700; border-radius: 7px;
}
.pages { display: flex; gap: 6px; flex: 0 0 auto; }
.pages button, .quiet, .version, [data-testid="restore"] {
  background: transparent; border: 0; border-radius: 999px; padding: 6px 10px;
}
.pages button[aria-current="page"] { background: var(--ink); color: var(--yellow); }
.target { margin: 0; font-weight: 650; letter-spacing: -0.02em; }
.staging-link { color: var(--ink); font-weight: 650; }
.ship-state { margin: 0; font-size: 0.82rem; }
.actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: 0 0 auto; }
.dirty { font-size: 0.82rem; white-space: nowrap; }
#undo, #undo-all, #save, #publish, #logout, .login button, #comment-form button {
  white-space: nowrap;
  flex: 0 0 auto;
}
#undo, #undo-all {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
}
#save, #publish, .login button, #comment-form button {
  border: 0; border-radius: 999px; padding: 8px 14px; font-weight: 650;
}
#save { background: var(--yellow); }
#save:hover { background: var(--yellow-deep); }
#publish { background: var(--ink); color: var(--yellow); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
.notice { margin: 0 0 16px; padding: 10px 12px; background: #f7f4ee; border: 1px solid var(--line); border-radius: 10px; font-size: 0.88rem; }
.shell { display: grid; grid-template-columns: minmax(0, 1fr) 360px; flex: 1; min-height: 0; }
iframe { width: 100%; height: 100%; border: 0; background: white; }
aside { overflow: auto; border-left: 1px solid var(--line); background: var(--panel); padding: 16px 16px 32px; }
aside h2 { margin: 22px 0 8px; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; }
.kicker { margin: 0 0 4px; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem; color: var(--muted); }
#field-label { display: block; font-size: 1.15rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 8px; }
textarea, input[type="password"], input[type="text"], #author, #password {
  width: 100%; border: 1px solid var(--line); background: white; border-radius: 10px; padding: 10px 12px;
}
.field-id { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.78rem; margin-top: 6px; }
.hint { font-size: 0.92rem; }
#history, #comments { list-style: none; padding: 0; margin: 0; }
#history li, #comments li { padding: 8px 0; border-top: 1px solid var(--line); }
.version { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; padding: 4px 0; }
.pill { display: inline-block; background: var(--yellow); color: var(--ink); border-radius: 999px; padding: 1px 6px; font-size: 0.72rem; }
.diff { white-space: pre-wrap; background: #f7f4ee; padding: 8px; border-radius: 8px; }
.d-del { background: #f6d0c8; text-decoration: line-through; }
.d-add { background: var(--yellow); }
.muted { color: var(--muted); }
.status { position: fixed; left: 16px; bottom: 12px; margin: 0; background: var(--ink); color: white; padding: 8px 12px; border-radius: 999px; max-width: min(640px, calc(100% - 32px)); }
.status:empty { display: none; }
.config-note { font-size: 0.82rem; }
.choice { display: grid; gap: 6px; padding: 12px 0; border-top: 1px solid var(--line); }
.choice label.tick { display: flex; gap: 8px; align-items: flex-start; font-weight: 650; }
.choice textarea { min-height: 72px; }
.skipped { color: var(--muted); font-size: 0.88rem; }
#accept-text { margin-top: 12px; background: var(--yellow); border: 0; border-radius: 999px; padding: 8px 14px; font-weight: 650; }
.setup-step { margin: 22px 0; }
.setup-step h2 { font-size: 1.2rem; letter-spacing: -0.03em; margin: 0 0 6px; }
.lock { background: #f7f4ee; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.login-body { min-height: 100%; display: grid; place-items: center; padding: 32px 16px; }
.login { width: min(440px, 100%); }
.login h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); letter-spacing: -0.05em; line-height: 0.95; margin: 0 0 8px; }
.login .lede { margin-top: 0; }
.login form { display: grid; gap: 8px; margin-top: 18px; }
.login button { justify-self: start; background: var(--ink); color: var(--yellow); }
.error { background: #f6d0c8; padding: 8px 10px; border-radius: 8px; }
@media (max-width: 1280px) {
  .bar { flex-wrap: wrap; }
  .actions { margin-left: 0; }
}
@media (max-width: 720px) {
  .shell { grid-template-columns: 1fr; }
  iframe { height: 72vh; border-bottom: 1px solid var(--line); }
  aside { border-left: 0; }
  .actions { width: 100%; flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
