/* Moonora for Authors. Values copied from the approved mockup
   (Moonora/docs/authors/mockup: SignIn.dc.html, Main.dc.html and the
   shared components of Points, Versions and Pictures). Clean white only. */

:root {
  --ink: #1D1830;
  --ink2: #4F4A63;
  --muted: #6E6984;
  --line: #E7E4EE;
  --field: #D6D1E2;
  --accent: #2D1B69;
  --accent-ink: #4A3597;
  --accent-deep: #3A2585;
  --tint: #EFEBFA;
  --tint-soft: #F3F1F8;
  --surface: #F8F7FB;
  --paper: #FFFDF8;
  --paper-line: #EDE6D6;
  --paper-ink: #2C2416;
  --paper-muted: #6B5A3A;
  --warn: #8A5A00;
  --warn-tint: #FFF4DD;
  --ok: #1E7A4C;
  --ok-tint: #E7F5EE;
  --display: Gelasio, Georgia, serif;
  --body: Figtree, 'Segoe UI', sans-serif;
  --card-shadow: 0 1px 2px rgba(29, 24, 48, 0.04), 0 12px 32px rgba(29, 24, 48, 0.08);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: #FFFFFF;
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
}

a { color: var(--accent-ink); }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }

.page {
  min-height: 100vh;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
}

/* Header ----------------------------------------------------------------- */

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  padding: 10px 32px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  text-decoration: none;
  color: var(--ink);
}
a.brand:hover { color: var(--ink); }
.brand-name { font-family: var(--display); font-size: 22px; font-weight: 600; }
.brand-tag { font-size: 15px; font-weight: 600; color: var(--accent-ink); }

.nav { display: flex; flex-wrap: wrap; gap: 4px; font-size: 14px; }
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink2);
}
.nav-link:hover { color: var(--ink); }
.nav-link[aria-current="page"] { color: var(--ink); background: var(--tint-soft); font-weight: 600; }

.account { margin-left: auto; display: flex; align-items: center; position: relative; }
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--tint);
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 10;
  width: max-content;
  min-width: 240px;
  max-width: min(320px, calc(100vw - 32px));
  padding: 8px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
}
.account-who { padding: 8px 12px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.account-name { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.account-email { font-size: 13px; color: var(--ink2); overflow-wrap: anywhere; }
.menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.menu-item:hover { background: var(--tint-soft); }
.menu-item:disabled { color: var(--muted); cursor: default; }
.menu-note { margin: 6px 12px 4px; font-size: 13px; color: var(--warn); }

/* Shared controls -------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary { min-height: 48px; padding: 0 22px; border: 0; background: var(--accent); color: #FFFFFF; }
a.btn-primary:hover { color: #FFFFFF; }
.btn-outline { min-height: 46px; padding: 0 20px; border: 1px solid var(--field); background: #FFFFFF; color: var(--ink); }
/* Disabled look from the mockup's locked "Send to Moonora" button. */
.btn:disabled { border: 0; background: var(--line); color: var(--muted); cursor: default; }
.btn-outline:disabled { border: 1px solid var(--line); background: #FFFFFF; }

.link-btn {
  align-self: center;
  min-height: 44px;
  background: none;
  border: 0;
  color: var(--accent-ink);
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
}
.link-btn:hover { color: var(--accent); }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.field input {
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--field);
  border-radius: 10px;
  font: inherit;
  font-weight: 400;
  font-size: 15px;
  color: var(--ink);
  background: #FFFFFF;
}
.check { display: flex; align-items: center; gap: 8px; min-height: 32px; font-size: 14px; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }

.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-ink); }

.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--tint-soft);
  color: var(--ink2);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.chip-warn { background: var(--warn-tint); color: var(--warn); font-weight: 700; }

.notice { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 14px; background: var(--warn-tint); color: var(--warn); }
.notice-ok { background: var(--ok-tint); color: var(--ok); }

/* Sign in (SignIn.dc.html) ------------------------------------------------ */

.signin-main {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px;
}
.intro { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.intro-title { margin: 0; font-family: var(--display); font-size: 40px; font-weight: 600; line-height: 1.15; text-wrap: balance; }
.intro-text { margin: 0; font-size: 16px; color: var(--ink2); max-width: 50ch; }
.sample { margin: 8px 0 0; display: flex; flex-direction: column; gap: 10px; }
.sample-page {
  max-width: 454px;
  padding: 24px 26px 18px;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid var(--paper-line);
  box-shadow: 0 12px 32px rgba(45, 27, 105, 0.10);
  color: var(--paper-ink);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sample-page p { margin: 0; }
.sample-foot { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--paper-muted); }
.sample-credit { font-style: italic; }
.sample-num { font-family: var(--body); }
.sample figcaption { font-size: 13.5px; color: var(--ink2); }

.card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
}
/* The mockup sizes this card's content box (420 + 2×28 padding + 2×1
   border = 478 outside); this file uses border-box, so the numbers add up. */
.signin-card { flex: 1 1 398px; max-width: 478px; padding: 28px; }
.card-view, .stack { display: flex; flex-direction: column; gap: 16px; }
.card-title { margin: 0; font-family: var(--display); font-size: 26px; font-weight: 600; }
.card-text { margin: 0; font-size: 14px; color: var(--ink2); }
.divider { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.divider span { flex: 1; height: 1px; background: var(--line); }
.card-foot { margin: 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink2); }

/* My stories (Main.dc.html) ---------------------------------------------- */

/* The mockup's main column is 1120 wide inside 32px padding (content-box),
   which is 1184 in border-box terms. */
.app-main {
  width: 100%;
  max-width: 1184px;
  margin: 0 auto;
  padding: 32px 32px 56px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.title-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 24px; }
.title-block { flex: 1 1 420px; }
.page-title { margin: 0; font-family: var(--display); font-size: 34px; font-weight: 600; line-height: 1.2; }
.page-lede { margin: 6px 0 0; color: var(--ink2); max-width: 60ch; }
.new-story { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.list { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.list-head { display: flex; align-items: baseline; gap: 8px; padding: 12px 20px; background: var(--surface); }
.list-head h2 { margin: 0; font-size: 14px; font-weight: 700; }
.list-count { font-size: 13px; color: var(--muted); }
.list-empty { display: flex; flex-direction: column; gap: 4px; padding: 28px 20px; border-top: 1px solid var(--line); }
.list-empty-title { font-family: var(--display); font-size: 18px; font-weight: 600; }
.list-empty-text { font-size: 14px; color: var(--ink2); max-width: 60ch; }

.block { display: flex; flex-direction: column; gap: 12px; }
.block-title { margin: 0; font-family: var(--display); font-size: 20px; font-weight: 600; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
/* 150px content + 2×14 padding + 2×1 border, as in the mockup. */
.step { flex: 1 1 180px; display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.step-num { width: 26px; height: 26px; border-radius: 50%; background: var(--tint); color: var(--accent-deep); display: grid; place-items: center; font-size: 12.5px; font-weight: 700; }
.step-label { font-size: 14px; font-weight: 600; }
.step-who { font-size: 13px; color: var(--ink2); }
.tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.tip { padding: 16px 18px; border-radius: 12px; background: var(--surface); }
.tip-title { font-size: 15px; font-weight: 700; }
.tip-body { margin-top: 4px; font-size: 14px; color: var(--ink2); }

/* Agreement --------------------------------------------------------------- */

.reading { max-width: 824px; gap: 20px; }
.intro-block { display: flex; flex-direction: column; gap: 10px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 13px; color: var(--ink2); }
/* Tall enough to read comfortably, short enough that the accept bar below
   stays on screen. */
.doc-box {
  max-height: max(320px, calc(100vh - 400px));
  overflow-y: auto;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #FFFFFF;
}
.doc { font-size: 15px; line-height: 1.6; }
.doc > :first-child { margin-top: 0; }
.doc h2 { margin: 22px 0 6px; font-family: var(--display); font-size: 19px; font-weight: 600; line-height: 1.3; }
.doc h3 { margin: 18px 0 6px; font-size: 15px; font-weight: 700; }
.doc p { margin: 0 0 12px; }
.doc ul, .doc ol { margin: 0 0 12px; padding-left: 20px; }
.doc li { margin: 4px 0; }
.doc blockquote { margin: 0 0 16px; padding: 12px 14px; border-radius: 10px; background: var(--warn-tint); color: var(--warn); font-weight: 600; }
.doc blockquote p { margin: 0; }
.doc-end { height: 1px; }
.action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.action-text { flex: 1 1 280px; }
.action-title { font-weight: 600; }
.action-hint { font-size: 13px; color: var(--ink2); }
.action-bar .btn-outline { min-height: 46px; }
.action-bar .btn-primary { min-height: 46px; }

/* My stories: the list and "Needs you" (Main.dc.html) --------------------- */

.needs-you {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding: 18px 20px;
  border-radius: 14px;
  background: #F3F0FB;
  border: 1px solid #DCD4F2;
}
.needs-you-text { flex: 1 1 360px; }
.needs-you-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-ink); }
.needs-you-line { margin-top: 2px; font-size: 16px; }
.needs-you-title { font-family: var(--display); font-weight: 600; }
.needs-you-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  background: var(--accent);
  color: #FFFFFF;
  font-weight: 600;
  text-decoration: none;
}
a.needs-you-btn:hover { color: #FFFFFF; }

.story-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding: 16px 20px; border-top: 1px solid var(--line); }
.story-row-main { flex: 1 1 300px; min-width: 0; }
.story-row-title { font-family: var(--display); font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.story-row-meta { font-size: 13px; color: var(--ink2); }
.status-chip {
  display: inline-block;
  min-width: 128px;
  padding: 5px 12px;
  border-radius: 999px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
}
.status-needs { background: var(--warn-tint); color: var(--warn); }
.status-moonora { background: #EAF0FF; color: #2D4BA0; }
.status-done { background: var(--ok-tint); color: var(--ok); }
.status-draft { background: var(--tint-soft); color: var(--ink2); }
.story-row-updated { min-width: 84px; font-size: 13px; color: var(--muted); }
.story-row-action {
  min-width: 96px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

/* Story screens: shared (Points.dc.html, Versions.dc.html) ----------------- */

/* The mockup's column is 1160 wide inside 32px padding (content-box). */
.story-main { max-width: 1224px; padding: 20px 32px 48px; gap: 20px; }
.story-head { display: flex; flex-direction: column; gap: 10px; }
.back-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  text-decoration: none;
}
.story-title { margin: 0; font-family: var(--display); font-size: 32px; font-weight: 600; line-height: 1.2; text-wrap: balance; overflow-wrap: anywhere; }
.story-lede { margin: 0; color: var(--ink2); max-width: 66ch; }
.flow-steps { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.flow-step { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.flow-step-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  font-size: 12.5px;
  font-weight: 700;
  background: #FFFFFF;
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--field);
}
.flow-step.done { color: var(--ink); }
.flow-step.done .flow-step-dot { background: var(--ok-tint); color: var(--ok); box-shadow: none; }
.flow-step[aria-current="step"] { color: var(--ink); font-weight: 600; }
.flow-step[aria-current="step"] .flow-step-dot { background: var(--accent); color: #FFFFFF; box-shadow: none; }

.account { gap: 14px; }
.save-state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink2); }
.save-state.unsaved { color: var(--warn); }
.save-state.unsaved svg, .save-state.saving svg { display: none; }

.field-col { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.field-hint { font-weight: 400; color: var(--muted); }
.text-input {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--field);
  border-radius: 10px;
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  background: #FFFFFF;
}
.text-input-15 { font-size: 15px; }

/* Story points (Points.dc.html) ----------------------------------------------- */

.panel { padding: 20px 22px; border: 1px solid var(--line); border-radius: 14px; }
.about { display: flex; flex-wrap: wrap; gap: 18px 24px; }
.about > .field-col { flex: 2 1 300px; }
.about > .world-field { flex: 1 1 160px; }
.select {
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--field);
  border-radius: 10px;
  font: inherit;
  font-weight: 400;
  font-size: 15px;
  color: var(--ink);
  background: #FFFFFF;
}
.choice-group { flex: 2 1 300px; min-width: 0; border: 0; margin: 0; padding: 0; }
.choice-group legend { padding: 0; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
/* 150px content + 2×12 padding + borders, as in the mockup (the chosen card
   has a 2px border, the others 1px and a 1px margin). */
.age-option {
  flex: 1 1 176px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 1px;
  padding: 10px 12px;
  border: 1px solid var(--field);
  border-radius: 10px;
  background: #FFFFFF;
  cursor: pointer;
}
.age-option.on { flex-basis: 178px; margin: 0; border: 2px solid var(--accent); background: #F3F0FB; }
.age-option-main { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.age-option-sub { padding-left: 24px; font-size: 12.5px; font-weight: 400; color: var(--ink2); }
.age-option input, .mood-option input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.mood-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 1px;
  padding: 0 14px;
  border: 1px solid var(--field);
  border-radius: 999px;
  background: #FFFFFF;
  color: var(--ink2);
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
}
.mood-option.on { margin: 0; border: 2px solid var(--accent); background: #F3F0FB; color: var(--ink); font-weight: 600; }

.opening { display: flex; flex-direction: column; gap: 6px; }
.opening-label { font-family: var(--display); font-size: 20px; font-weight: 600; }
.opening-help { font-size: 13.5px; color: var(--ink2); }
.opening-input {
  margin-top: 4px;
  padding: 12px 14px;
  border: 1px solid var(--field);
  border-radius: 10px;
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: #FFFFFF;
  resize: vertical;
}

.editor-row { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
/* 560 + 2×22 padding + 2×1 border. */
.page-editor {
  flex: 999 1 606px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--field);
  border-radius: 16px;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(29, 24, 48, 0.04), 0 10px 28px rgba(29, 24, 48, 0.07);
}
.page-editor-top { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.page-editor-heading { flex: 1 1 260px; min-width: 0; }
.page-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-ink); }
.page-hint { margin: 4px 0 0; font-family: var(--display); font-size: 22px; font-weight: 600; line-height: 1.3; }
.page-nav { display: flex; gap: 8px; }
.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--field);
  background: #FFFFFF;
  color: var(--ink);
  font: inherit;
  font-size: 18px;
  cursor: pointer;
}
.prev-line { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--surface); font-size: 13.5px; color: var(--ink2); }
.prev-line-text { color: var(--ink); }
.point-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.point { display: flex; align-items: center; gap: 10px; }
.point-num {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 50%;
  background: #F3F0FB;
  color: var(--accent-deep);
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 700;
}
.point .text-input { flex: 1; min-width: 0; }
.remove-btn {
  width: 44px;
  height: 44px;
  flex: none;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.add-point { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.add-input {
  flex: 1 1 260px;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px dashed #B9B1CF;
  border-radius: 10px;
  font: inherit;
  color: var(--ink);
  background: #FCFBFE;
}
.name-btn {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--field);
  background: #FFFFFF;
  color: var(--accent-deep);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.add-btn {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  border: 0;
  background: var(--accent);
  color: #FFFFFF;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.name-btn:disabled, .add-btn:disabled { border: 0; background: var(--line); color: var(--muted); cursor: default; }
.points-tip { margin: 0; font-size: 13px; color: var(--muted); }

/* 300 + 2×18 padding. */
.page-list {
  flex: 1 1 336px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border-radius: 16px;
  background: var(--surface);
}
.page-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.page-list-head h2 { margin: 0; font-size: 15px; font-weight: 700; }
.page-list-count { font-size: 13px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.progress { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.progress-fill { height: 100%; width: 0; border-radius: 3px; background: var(--accent); }
.outline { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.outline-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.outline-btn[aria-current="page"] { background: #FFFFFF; border: 1px solid var(--accent); font-weight: 600; }
.outline-dot {
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  background: #FFFFFF;
  color: var(--muted);
  border: 1px dashed #B9B1CF;
}
.outline-btn.has .outline-dot { background: var(--tint); color: var(--accent-deep); border: 0; }
.outline-btn[aria-current="page"] .outline-dot { background: var(--accent); color: #FFFFFF; border: 0; }
.outline-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.outline-count { flex: none; font-size: 12px; font-weight: 400; color: var(--muted); }

/* Characters: the component from Pictures.dc.html, without the pictures. */
.characters { display: flex; flex-direction: column; gap: 14px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.section-title { margin: 0; font-family: var(--display); font-size: 24px; font-weight: 600; }
.section-text { flex-basis: 100%; margin: 0; font-size: 14px; color: var(--ink2); max-width: 78ch; }
.character-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 14px; }
.character-grid:empty { display: none; }
.character { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 14px; background: #FFFFFF; border: 1px solid var(--line); }
.character-head { display: flex; align-items: flex-end; gap: 8px; }
.character-head .field-col { flex: 1; min-width: 0; }
.details-input {
  padding: 10px 12px;
  border: 1px solid var(--field);
  border-radius: 10px;
  font: inherit;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  background: #FFFFFF;
  resize: vertical;
}
.add-character {
  align-self: flex-start;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px dashed #B9B1CF;
  background: #FFFFFF;
  color: var(--accent-deep);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* The bar at the bottom of the points (the same values as .action-bar). */
.story-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 14px; }
.story-bar-text { flex: 1 1 280px; }
.story-bar-title { font-weight: 600; }
.story-bar-hint { font-size: 13px; color: var(--ink2); }
.story-bar .btn { min-height: 46px; }
.notice ul { margin: 6px 0 0; padding-left: 18px; }

/* Two versions (Versions.dc.html) ----------------------------------------------- */

.version-row { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }
/* 460 + 2×22 padding + 2×1 border; Improved has 21 and 2. */
.version {
  flex: 1 1 506px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  border-radius: 16px;
  background: #FFFFFF;
  border: 1px solid var(--line);
}
.version.suggested { padding: 21px; border: 2px solid var(--accent); box-shadow: 0 10px 28px rgba(45, 27, 105, 0.10); }
.version-head { display: flex; align-items: flex-start; gap: 10px; }
.version-head > div { flex: 1; }
.version-name { margin: 0; font-family: var(--display); font-size: 24px; font-weight: 600; }
.version-sub { font-size: 13.5px; color: var(--ink2); }
.chip-suggested { padding: 4px 12px; border-radius: 999px; background: var(--tint); color: var(--accent-deep); font-size: 12.5px; font-weight: 700; }
.paper {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 22px;
  border-radius: 10px;
  background: var(--paper);
  border: 1px solid var(--paper-line);
  color: var(--paper-ink);
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.6;
}
.paper-label { font-family: var(--body); font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--paper-muted); }
.paper-text { margin: 4px 0 0; overflow-wrap: anywhere; }
.paper mark { background: #FBF0D5; color: inherit; padding: 0 2px; }
.paper-note { margin-top: 6px; font-family: var(--body); font-size: 12.5px; color: var(--paper-muted); }
.paper-link {
  align-self: flex-start;
  min-height: 44px;
  padding: 0;
  background: none;
  border: 0;
  font-family: var(--body);
  font-size: 14px;
  font-weight: 600;
  color: #7A5A14;
  text-decoration: underline;
  cursor: pointer;
}
.paper-link:disabled { color: var(--paper-muted); text-decoration: none; cursor: default; }
.notes { display: flex; flex-wrap: wrap; gap: 16px; }
.notes > div { flex: 1 1 200px; }
.notes-title { margin: 0 0 8px; font-size: 14px; font-weight: 700; }
.note-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--ink); }
.note-list li { display: flex; gap: 8px; align-items: flex-start; }
.note-list svg { flex: none; margin-top: 3px; }
.change-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
/* The mockup's links size their content box: 46 + the 1px border = 48 for
   the outlined one, 46 for the filled one. */
.use-btn {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 10px;
  border: 1px solid var(--field);
  background: #FFFFFF;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.use-btn.primary { min-height: 46px; border: 0; background: var(--accent); color: #FFFFFF; }
.use-btn:disabled { border: 0; background: var(--line); color: var(--muted); cursor: default; }

.checks { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.checks-title { margin: 0 6px 0 0; font-size: 14px; font-weight: 700; }
.check-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--ok-tint);
  color: var(--ok);
  font-size: 13px;
  font-weight: 600;
}
.check-pill svg { flex: none; }
.check-pill.warn { background: var(--warn-tint); color: var(--warn); }
.checks-text { font-size: 14px; color: var(--ink2); }
.check-btn { min-height: 44px; }

.ask { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 18px 20px; border-radius: 14px; background: var(--surface); }
.ask > .field-col { flex: 1 1 360px; }
.ask-btn.btn-outline { min-height: 44px; }
.ask-status { flex-basis: 100%; margin: 0; font-size: 13px; color: var(--ink2); }

.waiting-time { margin-top: 4px; font-size: 13px; color: var(--ink2); }

/* Your story: the picked version, its checks and the send bar ------------------- */

/* One story on paper reads best at the agreement's reading width. */
.story-main.story-reading { max-width: 824px; }

.paper-page-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.paper-page-head .paper-link { align-self: auto; }
.page-edit { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.page-edit .opening-input { margin-top: 0; font-size: 16px; line-height: 1.6; }
.page-edit-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.page-edit-actions .btn { min-height: 44px; font-family: var(--body); }
.review-note { white-space: pre-line; overflow-wrap: anywhere; }
/* The bottom bar from Pictures.dc.html. */
.send-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 18px 20px; border-radius: 14px; border: 1px solid var(--line); }
.send-bar-text { flex: 1 1 420px; display: flex; flex-direction: column; gap: 2px; }
.send-bar-title { font-weight: 600; font-variant-numeric: tabular-nums; }
.send-bar-hint { font-size: 13.5px; color: var(--ink2); }
.credit { font-family: var(--display); font-style: italic; color: var(--ink); }
.send-btn { padding: 0 24px; }

/* Simple message pages ----------------------------------------------------- */

.message-main { max-width: 704px; }
.message-main p { margin: 0; color: var(--ink2); }

/* Phones ------------------------------------------------------------------ */

@media (max-width: 640px) {
  .topbar { padding: 10px 16px; gap: 4px 16px; }
  .signin-main { padding: 32px 16px 40px; gap: 32px; }
  .intro-title { font-size: 32px; }
  .signin-card { padding: 24px 20px; }
  .app-main { padding: 24px 16px 48px; }
  .page-title { font-size: 30px; }
  /* On phones the page itself scrolls and the accept bar stays in reach. */
  .doc-box { padding: 16px; max-height: none; overflow: visible; }
  .action-bar { position: sticky; bottom: 0; padding: 16px; background: #FFFFFF; box-shadow: 0 -8px 24px rgba(29, 24, 48, 0.06); }
  .action-bar .btn { flex: 1 1 auto; }
  /* My stories rows: the chip, the day and the link share one line. */
  .story-row { column-gap: 12px; }
  .story-row-updated { min-width: 0; }
  .story-row-action { min-width: 0; margin-left: auto; }
  /* Story screens: the page's side margins, as on the other pages. */
  .story-main { padding: 20px 16px 48px; }
  .story-title { font-size: 28px; }
  .story-bar .btn, .send-bar .btn, .needs-you-btn { flex: 1 1 auto; justify-content: center; }
}
