/* A distinct provisional imprint, keeping Raptor's discovery/reader structure. */
:root {
  color-scheme: dark;
  --ink: #faf3e7;
  --muted: #bcb1a4;
  --surface: #151511;
  --line: #4a463a;
  --accent: #eac57b;
  --rm-bg: #0e100e;
  --rm-text: var(--ink);
  --rm-muted: var(--muted);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}
body.rm-app {
  margin: 0;
  min-width: 320px;
  background: #0e100e !important;
  color: var(--ink) !important;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
input,
select,
textarea {
  font: inherit;
}
.shell {
  width: min(1240px, calc(100% - 64px));
  margin: auto;
}
.skip {
  position: absolute;
  top: -100px;
  padding: 12px;
  background: white;
  color: black;
  z-index: 20;
}
.skip:focus {
  top: 8px;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
.site-header {
  border-bottom: 1px solid var(--line);
  background: #11130f;
}
.header-shell {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 86px;
}
.wordmark {
  display: inline-block;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 28px;
  line-height: 1.05;
  white-space: nowrap;
}
header.shell {
  padding-block: 24px;
}
.wordmark span {
  display: block;
  font-family: Arial, Helvetica, sans-serif;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.25em;
  margin-top: 7px;
  color: var(--accent);
}
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-left: auto;
  font-size: 14px;
}
nav a {
  padding: 12px 0;
}
.age-mark {
  border: 1px solid #69614e;
  padding: 4px 9px;
  font-weight: bold;
  font-size: 13px;
}
.intro {
  padding: 76px 0 64px;
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
}
h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400;
  font-size: clamp(43px, 6vw, 76px);
  line-height: 1.08;
  margin: 22px 0;
}
h1 em {
  font-weight: 400;
  color: var(--accent);
}
.intro-text {
  max-width: 500px;
  font-size: 18px;
  color: var(--muted);
}
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  padding: 10px 19px;
  border: 1px solid #6c624e;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
}
.primary {
  color: #16170e;
  background: var(--accent);
  border-color: var(--accent);
}
.secondary {
  color: var(--ink);
  background: transparent;
}
.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400;
  font-size: 32px;
  margin: 0;
}
.section-heading span {
  font-size: 13px;
  color: var(--muted);
}
section[id] {
  padding: 42px 0;
  border-bottom: 1px solid var(--line);
}
label {
  display: block;
  font-size: 14px;
  margin-bottom: 8px;
}
.search-row {
  display: flex;
  gap: 10px;
  max-width: 650px;
}
input,
select {
  min-width: 0;
  width: 100%;
  min-height: 46px;
  background: #181b16;
  border: 1px solid #6a6659;
  border-radius: 4px;
  color: var(--ink);
  padding: 10px 13px;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
}
.filters button {
  min-height: 44px;
  padding: 8px 14px;
  color: var(--muted);
  background: transparent;
  border: 1px solid #514d40;
  border-radius: 4px;
  cursor: pointer;
}
.filters button[aria-pressed='true'] {
  color: var(--ink);
  border-color: var(--accent);
  background: #26291e;
}
.empty-library {
  border-top: 1px solid #363a2e;
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: 195px;
}
.empty-library p,
.studio-body > p {
  color: var(--muted);
}
h3 {
  font-size: 21px;
  margin: 0 0 8px;
}
.empty-library p {
  margin: 0;
}
.book-shape {
  width: 78px;
  min-width: 78px;
  height: 105px;
  background: #242b1f;
  border: 1px solid #6d745e;
  border-left: 6px solid #566347;
  display: grid;
  place-items: center;
  font-family: Georgia, serif;
  font-size: 13px;
  letter-spacing: 0.15em;
  color: #b1b99f;
}
.studio-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 44px;
  border-top: 1px solid #363a2e;
  padding-top: 28px;
}
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
}
.steps li {
  padding: 14px 0;
  color: var(--muted);
  border-bottom: 1px solid #363a2e;
  font-size: 14px;
}
.steps li[aria-current] {
  color: var(--accent);
  font-weight: bold;
}
.studio-body {
  max-width: 600px;
}
#draft-form {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}
#draft-form label {
  margin-bottom: 0;
}
#draft-form input,
#draft-form select {
  margin-bottom: 12px;
}
#draft-form button {
  justify-self: start;
  margin-top: 8px;
}
.sign-in-note {
  font-size: 13px;
  color: var(--muted);
}
footer {
  display: flex;
  gap: 30px;
  justify-content: space-between;
  align-items: center;
  padding: 30px 0 !important;
  font-size: 12px;
  color: var(--muted);
}
.small {
  font-size: 22px;
  color: var(--ink);
}
@media (max-width: 900px) {
  .header-shell {
    gap: 20px;
    flex-wrap: wrap;
    padding: 18px 0;
  }
  .age-mark {
    margin-left: auto;
  }
  nav {
    order: 3;
    flex-basis: 100%;
    margin-left: 0;
    gap: 22px;
  }
  .studio-layout {
    grid-template-columns: 200px minmax(0, 1fr);
  }
}
@media (max-width: 600px) {
  .shell {
    width: calc(100% - 32px);
  }
  .intro {
    padding: 42px 0;
  }
  .wordmark {
    font-size: 26px;
  }
  nav {
    gap: 14px;
    font-size: 12px;
  }
  nav a {
    padding: 8px 0;
  }
  .studio-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .steps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
  }
  .steps li {
    font-size: 12px;
  }
  .section-heading {
    align-items: start;
  }
  h2 {
    font-size: 28px;
  }
  .section-heading span {
    font-size: 12px;
    padding-top: 8px;
  }
  .search-row {
    gap: 8px;
  }
  .search-row button {
    padding: 8px 12px;
  }
  .filters {
    gap: 6px;
  }
  .filters button {
    font-size: 12px;
    padding: 8px 10px;
  }
  .empty-library {
    gap: 18px;
  }
  .empty-library h3 {
    font-size: 19px;
  }
  footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  footer p {
    margin: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

html body.rm-app {
  background: #0e100e !important;
}
dialog {
  width: min(520px, calc(100% - 32px));
  background: #151711;
  color: #faf3e7;
  border: 1px solid #73684e;
  padding: 32px;
  border-radius: 6px;
}
dialog::backdrop {
  background: rgba(0, 0, 0, 0.82);
}
dialog p:not(.eyebrow) {
  color: #bcb1a4;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
legend {
  font-weight: bold;
  margin-bottom: 16px;
}
textarea {
  font: inherit;
  width: 100%;
  background: #181b16;
  color: var(--ink);
  border: 1px solid #6a6659;
  padding: 12px;
  min-height: 100px;
}
fieldset label {
  margin-top: 14px;
}
[hidden] {
  display: none !important;
}
#progress {
  color: var(--accent);
}
.intro {
  padding-left: 0;
}
#statement-result {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
}
td,
th {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 600px) {
  .intro {
    padding-left: 0;
  }
  .actions .button {
    flex-grow: 1;
  }
}
.reader-page {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 20px auto;
}
.prose {
  max-width: 70ch;
  font-family: Georgia, serif;
  font-size: 20px;
  line-height: 1.8;
  margin: 36px auto;
  overflow-wrap: anywhere;
}
main :is(h1, h2, h3, h4, p, li) {
  overflow-wrap: anywhere;
}
main nav {
  margin: 24px 0;
  float: none;
}

#work-editor {
  border-top: 1px solid var(--line);
  margin: 28px 0;
  padding: 24px 0;
}
#work-editor form {
  max-width: 760px;
  margin: 24px 0;
  display: grid;
  gap: 10px;
}
#work-editor input[type='checkbox'] {
  width: 22px;
  min-height: 22px;
  vertical-align: middle;
}
#work-editor button {
  justify-self: start;
}
.work-row,
.page-row {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.work-row span {
  flex: 1;
  min-width: 180px;
}
.page-row img {
  max-width: 120px;
  height: auto;
}
.chapter-preview {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 75ch;
  max-height: 400px;
  overflow: auto;
}
#statement-result {
  overflow-x: auto;
}
#statement-mode {
  max-width: 360px;
  margin-bottom: 20px;
}
td {
  overflow-wrap: anywhere;
  max-width: 300px;
}
.library-work {
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
}
.library-work h3 a {
  text-decoration: underline;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
#work-editor input:disabled,
#work-editor textarea:disabled {
  opacity: 0.8;
}
#editor-state,
#works-status {
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .page-row {
    gap: 12px;
  }
  .page-row img {
    max-width: 80px;
  }
  .work-row .button {
    width: 100%;
  }
  #work-editor form {
    width: 100%;
  }
}

#statement-export,
#statement-load {
  margin: 8px 8px 12px 0;
}
#statement-result:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
#profile-form {
  max-width: 720px;
  display: grid;
  gap: 12px;
  margin: 24px 0;
}
#profile-reviews article {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
#recovery-panel {
  max-width: 760px;
  padding: 24px 0;
}
#recovery-panel button {
  margin-top: 14px;
}
#import-history,
#editor-review-history {
  overflow-wrap: anywhere;
}
#upload-plan-status {
  overflow-wrap: anywhere;
}

#reports form {
  display: grid;
  gap: 12px;
  max-width: 760px;
  margin: 24px 0;
}
#notice-list {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}
#notice-detail {
  overflow-wrap: anywhere;
}
#notice-actions textarea {
  max-width: 760px;
}
#notice-moderator {
  margin: 20px 0;
}
#finance-form {
  display: grid;
  gap: 12px;
  max-width: 760px;
  margin: 24px 0;
}
#finance-result {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#privacy-form {
  max-width: 760px;
  margin: 24px 0;
}
#privacy-form input[type='checkbox'] {
  width: 22px;
  min-height: 22px;
  vertical-align: middle;
}
#privacy-form label {
  padding: 12px 0;
}
#cost-state {
  overflow-wrap: anywhere;
}

#banner-slot iframe {
  display: block;
  width: 300px;
  max-width: 100%;
  height: 250px;
  border: 0;
}
#banner-panel .actions {
  flex-wrap: wrap;
}
