:root {
  --ink: #111;
  --gray: #666;
  --line: #e4e4e4;
  --soft: #f6f6f4;
  --pop: #ffe14d;
  /* Status colors (decision-007). Ink text on all of them; white doesn't pass contrast. */
  --go: #3bb273;      /* success: the notice toast */
  --stop: #e15554;    /* errors and destructive actions */
  --blue: #4d9de0;    /* reserved, unused */
  --lilac: #7768ae;   /* reserved, unused */
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.08); /* lifted cards: circle cards, landing email mock */
}

* { box-sizing: border-box; }
body { margin: 0; background: #fff; color: var(--ink); font: 17px/1.5 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
main { max-width: 1040px; margin: 0 auto; padding: 0 24px 80px; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 900; }
h2 { font-size: 1.6rem; font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 700; margin-top: 1.4em; }
mark { background: var(--pop); padding: 0 .12em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.muted { color: var(--gray); }
.small { font-size: .85rem; }
.center { text-align: center; }
.lede { font-size: 1.2rem; max-width: 36em; color: #333; }
.eyebrow { font-weight: 700; color: var(--gray); margin: 0 0 .5em; }
.eyebrow a { text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }

/* chrome */
.topbar { display: flex; justify-content: space-between; align-items: center; max-width: 1040px; margin: 0 auto; padding: 18px 24px; }
.wordmark { display: flex; align-items: center; gap: 8px; font-size: 1.35rem; font-weight: 900; text-decoration: none; letter-spacing: -.03em; }
.wordmark .dot { width: 20px; height: 20px; border-radius: 50%; border: 4px solid var(--ink); background: var(--pop); }
.topbar nav { display: flex; gap: 20px; align-items: center; font-weight: 600; }
.topbar nav a { text-decoration: none; }
.whoami { display: flex; align-items: center; gap: 8px; }
.colophon { text-align: center; color: var(--gray); font-size: .85rem; padding: 40px 24px; }

/* controls */
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 24px; }
.btn { display: inline-block; font-family: inherit; font-size: 1rem; font-weight: 700; padding: 12px 22px; border: 2px solid var(--ink); border-radius: 999px; background: var(--ink); color: #fff; text-decoration: none; cursor: pointer; }
.btn:hover { background: #333; }
.btn.ghost { background: #fff; color: var(--ink); }
.btn.ghost:hover { background: var(--pop); }
.btn.danger { background: #fff; color: var(--ink); }
.btn.danger:hover { background: var(--stop); }
.tag { font-size: .78rem; font-weight: 700; background: var(--soft); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.tag.hot { background: var(--pop); }
.nudge, .chip { font-family: inherit; font-size: .82rem; font-weight: 600; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.nudge { margin-left: auto; }
.nudge:hover, .chip:hover { background: var(--pop); border-color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: .85rem; font-weight: 800; flex: none; }
.avatar.lg { width: 44px; height: 44px; font-size: 1.1rem; }
.avatar.xl { width: 72px; height: 72px; font-size: 1.6rem; }
img.avatar { object-fit: cover; }
.avatar-edit { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.avatar-edit .check, .avatar-edit .attach { margin: 0; }
/* Your own row in the member list opens to edit how you appear; everyone else's is plain. */
.people li.me { display: block; }
.appearance summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.appearance summary::-webkit-details-marker { display: none; }
.appearance .edit-toggle { margin-left: auto; font-size: .82rem; font-weight: 600; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }
.appearance .edit-toggle::before { content: "Edit"; }
.appearance[open] .edit-toggle::before { content: "Close"; }
.appearance summary:hover .edit-toggle { background: var(--pop); border-color: var(--ink); }
.appearance form { margin-top: 14px; }
.appearance[open] { padding-bottom: 8px; }
.hue-0 { background: #ffd6a5; } .hue-1 { background: #caffbf; } .hue-2 { background: #d7c6ff; }
.hue-3 { background: #ffe14d; } .hue-4 { background: #a0e7ff; } .hue-5 { background: #ffadad; }

/* cards */
.card, .panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin: 0 0 20px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cards .card { background: var(--soft); border: 0; margin: 0; }
.cards h3 { margin-top: 0; }
.cards p { margin: 0; color: #333; }

/* landing */
.hero { padding: 64px 0 56px; }
.hero h1 { max-width: 15em; }
.how { padding: 24px 0 56px; }
.split-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; padding: 40px; background: var(--soft); border-radius: 24px; }

/* email mock */
.email { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.email-head { padding: 16px 24px; border-bottom: 1px solid var(--line); font-size: .92rem; }
.email-head p { margin: 0; }
.email-body { padding: 8px 24px 20px; }
.email-body ul { padding-left: 1.2em; }
.email-body li { margin-bottom: .3em; }

/* pages */
.page-head { padding: 40px 0 28px; }
.page-head h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
/* The host's subheading under the newsletter name (decision-014). */
.page-head .sub, .masthead .sub { font-size: 1.4rem; font-weight: 600; color: var(--gray); margin: 0 0 .4em; letter-spacing: -.01em; }
.narrow { max-width: 680px; margin: 0 auto; }
.split { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: start; }
.split > * { min-width: 0; }

.circle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.circle-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-decoration: none; box-shadow: var(--shadow); }
.circle-card:hover { border-color: var(--ink); }
.circle-card.new { background: var(--soft); border: 0; box-shadow: none; justify-content: center; align-items: flex-start; }
.card-top { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.format { color: var(--gray); margin: 0 0 16px; }
.facts { margin: 18px 0 0; }
.facts div { display: flex; justify-content: space-between; padding: 5px 0; font-size: .92rem; }
.facts dt { color: var(--gray); }
.facts dd { margin: 0; display: flex; gap: 6px; align-items: center; font-weight: 600; }

.progress .bar { height: 10px; background: var(--soft); border-radius: 999px; overflow: hidden; }
.progress .bar span { display: block; height: 100%; background: var(--ink); border-radius: 999px; }
.progress small { color: var(--gray); font-size: .82rem; }

/* guided circle setup: done is ink, the current step is pop, later steps are the soft track */
.setup { margin: 0 0 8px; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; counter-reset: s; }
.setup li { counter-increment: s; font-size: .78rem; font-weight: 700; color: var(--gray); }
.setup li::before { content: ""; display: block; height: 6px; border-radius: 999px; background: var(--soft); margin-bottom: 6px; }
.setup li::after { content: counter(s) ". " attr(data-label); }
.setup li.done, .setup li.now { color: var(--ink); }
.setup li.done::before { background: var(--ink); }
.setup li.now::before { background: var(--pop); }

.prompts { padding-left: 1.3em; font-size: 1.1rem; font-weight: 600; }
.prompts li { margin-bottom: .4em; }
.people, .rotation { list-style: none; padding: 0; margin: 0; }
.people li, .rotation li { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.rotation small { margin-left: auto; color: var(--gray); }
.rotation li.current { background: var(--pop); margin: 0 -12px; padding: 8px 12px; border-radius: 10px; font-weight: 700; }
.rotation li.current small { color: var(--ink); }
.avatars { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

/* forms */
fieldset.card { min-width: 0; }
legend { font-size: 1.2rem; font-weight: 800; padding: 0 8px; margin-left: -8px; }
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
input[type=text], input[type=date], input[type=time], textarea { width: 100%; font: inherit; padding: 11px 14px; border: 1px solid #ccc; border-radius: 10px; background: #fff; color: var(--ink); }
input:focus, textarea:focus { outline: 3px solid var(--pop); border-color: var(--ink); }
input[type=radio], input[type=checkbox] { accent-color: var(--ink); margin: 0; }
.question label:first-child { display: block; font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; margin-bottom: 12px; }
.row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.check { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.attach { display: inline-block; margin-top: 12px; font-size: .88rem; font-weight: 600; border: 1px dashed #bbb; border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.attach:hover { background: var(--pop); border: 1px solid var(--ink); }
.formats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.format-option { display: flex; flex-direction: column; gap: 6px; border: 2px solid var(--line); border-radius: 12px; padding: 16px; cursor: pointer; }
.format-option span { font-size: .9rem; color: var(--gray); }
.format-option:has(input:checked) { border-color: var(--ink); background: var(--pop); }
.format-option:has(input:checked) span { color: var(--ink); }
.format-option:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; border-color: var(--ink); }
.format-option strong { display: flex; gap: 10px; align-items: center; }

/* newsletter */
.preview-bar { color: var(--gray); font-size: .88rem; text-align: center; padding: 16px 0; margin: 0; }
.paper { max-width: 640px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 40px 48px; }
.masthead { text-align: center; padding-bottom: 24px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.masthead h1 { font-size: 2.8rem; margin: .1em 0 .3em; }
.masthead h1::after { content: ""; display: block; width: 56px; height: 8px; background: var(--pop); margin: 12px auto 0; border-radius: 4px; }
.edition { display: flex; justify-content: center; gap: 16px; color: var(--gray); font-size: .88rem; margin: 0; }
.host-note { background: var(--soft); border-radius: 12px; padding: 20px 24px; margin-bottom: 36px; }
.host-note h2 { font-size: .9rem; color: var(--gray); }
.host-note p { margin: 0; font-size: 1.05rem; }
.host-note .sig { margin-top: 10px; font-weight: 700; }
.prompt-section { margin-bottom: 36px; }
.prompt-section h2 { font-size: 1.45rem; }
.answer { display: flex; gap: 14px; padding: 12px 0; }
.answer p { margin: 2px 0 0; }
.answer-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 12px 0; }
.answer-card-body { padding: 12px 16px 16px; }
.answer-card-body p { margin: 6px 0 0; }
.byline { display: flex; align-items: center; gap: 10px; margin: 0; }
.photos { border-collapse: collapse; }
.photos td { vertical-align: top; }
.photos td[colspan="1"] img { aspect-ratio: 3 / 4; object-fit: cover; }
.person { border-top: 1px solid var(--line); padding-top: 24px; margin-bottom: 36px; }
.person h2 { font-size: 1.45rem; margin-bottom: 4px; }
.person .question { font-size: .88rem; color: var(--gray); margin: 20px 0 4px; letter-spacing: 0; }
.person .photos { margin-top: 10px; }
.person .photos img { border-radius: 10px; }
.paper-foot { text-align: center; border-top: 1px solid var(--line); padding-top: 20px; color: var(--gray); }
.paper-foot p { margin: 4px 0; }

@media (max-width: 760px) {
  .cards, .split-hero, .split, .formats, .row { grid-template-columns: 1fr; }
  .split-hero { padding: 24px; }
  .paper { padding: 28px 20px; }
  .edition { flex-direction: column; gap: 2px; }
  .setup li:not(.now)::after { content: counter(s); }
}

/* app */
.flash { background: var(--pop); border-radius: 10px; padding: 12px 16px; font-weight: 600; margin: 20px 0 0; }
.flash.alert { background: var(--stop); }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; cursor: pointer; color: inherit; }
.narrow.tight { max-width: 520px; }
.push { margin-left: auto; }
.grow { flex: 1; min-width: 0; }
form.inline, .button_to.inline { display: inline; }
select { font: inherit; padding: 10px 12px; border: 1px solid #ccc; border-radius: 10px; background: #fff; width: 100%; }
input[type=email] { width: 100%; font: inherit; padding: 11px 14px; border: 1px solid #ccc; border-radius: 10px; }
input[type=email]:focus, select:focus { outline: 3px solid var(--pop); border-color: var(--ink); }
.btn[disabled] { opacity: .35; cursor: not-allowed; }
.field input:disabled, .field select:disabled { color: var(--gray); background: var(--soft); cursor: not-allowed; }
.row.two { grid-template-columns: 2fr 1fr; }
.row.pair { grid-template-columns: 1fr 1fr; }
.step { margin: 32px 0 12px; }
.archive { list-style: none; padding: 0; margin: 0; }
.archive li { padding: 8px 0; display: flex; flex-direction: column; }
.archive a { font-weight: 700; }
.people li .button_to { margin-left: auto; }

.prompt-list { list-style: none; padding: 0; margin: 0 0 12px; }
.prompt-list li { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.prompt-list p { margin: 4px 0 0; }
.prompt-list .tag { margin-left: 6px; }
details.add { margin: 16px 0; }
details.add summary { font-weight: 700; cursor: pointer; margin-bottom: 12px; }
.targets { border: 0; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.targets legend { font-weight: 600; margin-bottom: 6px; }
.chips form { display: inline; }

.hidden { opacity: .4; }
.hidden .hidden { opacity: 1; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.thumbs figure { margin: 0; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.thumbs img { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; }

.attach input[type=file] { font: inherit; font-size: .85rem; max-width: 100%; }
.attach input[type=file]::file-selector-button { font: inherit; font-weight: 600; background: #fff; border: 1px solid var(--ink); border-radius: 999px; padding: 5px 12px; margin-right: 10px; cursor: pointer; }
.attach { border: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.attach span { color: var(--gray); font-size: .82rem; }
.attach:hover { background: none; border: 0; }
.photo { display: block; }
.prompt-list li > div { flex: 1; min-width: 0; }
.prompt-list .progress { max-width: 320px; margin-top: 8px; }
.prompt-list .progress .bar { height: 6px; }

/* The host desk (decision-014): each step is a wide work column with a narrow helper beside it.
   The heading sits in the first grid row, so the aside card's top lines up with the work card's. */
.desk-row { display: grid; grid-template-columns: 2fr 1fr; gap: 0 32px; align-items: start; }
.desk-row > :not(aside) { grid-column: 1; }
.desk-row > aside { grid-column: 2; grid-row: 2; }
.desk-row .card { box-shadow: var(--shadow); }
.status { padding: 20px; font-size: .95rem; }
.status h3 { margin: 0 0 10px; font-size: 1rem; }
.status .facts { margin: 0 0 12px; }
.status .facts div { padding: 4px 0; }
.status .actions { margin-top: 14px; gap: 8px; }
.status .nudge { margin-left: 0; text-decoration: none; }
.edit-details summary { list-style: none; display: inline-block; }
.edit-details summary::-webkit-details-marker { display: none; }
.edit-details[open] { flex-basis: 100%; }
.edit-details .card { border: 0; padding: 0; margin: 14px 0 0; box-shadow: none; }
.edit-details .row { grid-template-columns: 1fr; gap: 0; }

/* Put it together is the paper (decision-014): the issue as it reads, one block per section.
   Blocks drag by their grip (sheet_controller.js); Up and Down do the same for keyboard and touch. */
.assemble { background: var(--soft); border-radius: var(--radius); padding: 28px; }
.sheet { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); max-width: 560px; margin: 0 auto; padding: 28px 28px 20px; }
.sheet .mast { font-weight: 900; letter-spacing: -.02em; font-size: 1.5rem; line-height: 1.1; }
.sheet .mast small { display: block; color: var(--gray); font-weight: 600; font-size: 1rem; letter-spacing: -.01em; }
.sheet .mast-bar { height: 4px; width: 64px; background: var(--pop); border-radius: 4px; margin: 10px 0 20px; }
.sheet .note { color: var(--gray); font-style: italic; border-left: 3px solid var(--line); padding-left: 12px; margin: 0 0 20px; }
.sheet .note.empty { font-style: normal; border: 2px dashed var(--line); border-radius: 12px; padding: 12px 14px; }
.sheet .note p { margin: 0; }
.sheet .note p + p { margin-top: .5em; }
.sheet ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.sheet li { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: start; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; }
.sheet li.dragging { opacity: .4; }
.sheet li.over { border-color: var(--ink); outline: 3px solid var(--pop); }
.sheet li.hidden { opacity: .45; border-style: dashed; }
.sheet li.hidden strong { text-decoration: line-through; }
.sheet .grip { color: var(--gray); font-size: 1.1rem; line-height: 1.2; letter-spacing: -2px; user-select: none; cursor: grab; }
.sheet .grip:active { cursor: grabbing; }
.sheet li .meta { color: var(--gray); font-size: .85rem; margin-top: 2px; }
.sheet .row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.sheet .row-actions .nudge { margin-left: 0; }
/* Answers fold out under a block so the host can hide one without leaving the paper. */
.sheet li details { grid-column: 2 / 4; margin-top: 6px; }
.sheet li details summary { font-size: .85rem; font-weight: 600; cursor: pointer; }
.sheet .reply { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: .95rem; }
.sheet .reply p { margin: 0; }
.sheet .reply .tag { flex: none; }
.sheet .reply > .button_to { flex: none; }
.sheet .reply.hidden p { text-decoration: line-through; }
.sheet .add { margin: 16px 0 0; }
.sheet .add summary { font-size: .95rem; }

@media (max-width: 760px) {
  .desk-row { grid-template-columns: 1fr; }
  .desk-row > aside { grid-column: auto; grid-row: auto; order: -1; }
  .assemble { padding: 12px; }
  .sheet { padding: 20px 16px 16px; }
  .sheet li { grid-template-columns: 1fr; gap: 8px; }
  .sheet .grip { display: none; } /* no drag on touch; Up and Down do the job */
  .sheet li details { grid-column: 1; }
  .sheet .reply { flex-wrap: wrap; }
  .sheet .reply .tag { width: 100%; align-self: flex-start; }
  .sheet .reply .grow { flex-basis: 100%; }
  .sheet .reply > form { margin-left: auto; }
}

/* Flash messages float so they're visible wherever the page is scrolled. */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 10; margin: 0; width: max-content; max-width: min(560px, calc(100vw - 32px));
  background: var(--go); color: var(--ink); font-weight: 600; padding: 12px 20px; border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,.18);
  animation: toast-out 4.5s forwards; }
.toast.alert { background: var(--stop); border-radius: 14px; animation: none; }
@keyframes toast-out { 85% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
div.add { margin: 20px 0; padding-top: 16px; border-top: 1px solid var(--line); }
div.add h3 { margin-top: 0; }
.layouts { border: 0; padding: 0; margin: 0 0 16px; }
.layouts legend { font-weight: 600; margin-bottom: 4px; }
.layouts .format-option { margin-top: 10px; }
