/* Folio's catalogue shell. Raptor layout reference only; no shared runtime or data. */
:root {
  --ink: #f2f2f4;
  --muted: #afb0b9;
  --accent: #ff9aa9;
  --surface: #19191f;
  --line: #393941;
}
html body.rm-app {
  background: #101014 !important;
}
body.rm-app {
  font-family: 'Segoe UI', Arial, sans-serif;
}
.shell {
  width: min(1440px, calc(100% - 64px));
}
h1,
h2,
h3,
h4 {
  font-family: 'Segoe UI', Arial, sans-serif;
  font-weight: 650;
}
.site-header {
  background: #15151b;
  border-bottom: 1px solid var(--line);
}
.header-shell {
  min-height: 80px;
  gap: 32px;
}
.wordmark {
  display: inline-block;
  line-height: 0;
}
.wordmark img {
  display: block;
  width: 190px;
  height: auto;
}
.main-nav {
  gap: 25px;
  font-size: 13px;
  font-weight: 600;
}
.main-nav a[aria-current] {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 10px;
}
.age-mark {
  background: #451d28;
  color: #ffd9df;
  border: 1px solid #9f5363;
  padding: 5px 9px;
  font-size: 14px;
}
.preview-badge {
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 7px 10px;
  border-radius: 4px;
  font-size: 10px;
  white-space: nowrap;
}
.age-mark span {
  display: block;
  font-size: 8px;
  letter-spacing: 0.08em;
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  margin: 26px 0 0;
  padding: 28px 32px;
  background: #1e1920;
  border: 1px solid #49323d;
}
.intro h1 {
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 12px 0;
}
.intro p {
  color: #c6bec8;
  max-width: 65ch;
  font-size: 14px;
  margin: 8px 0;
}
.eyebrow {
  color: var(--accent) !important;
  text-transform: uppercase;
  font-size: 10px !important;
  letter-spacing: 0.12em;
  font-weight: 700;
}
.intro .actions {
  margin-top: 20px;
}
.mature-label {
  border-left: 1px solid #68414f;
  padding-left: 32px;
  min-width: 220px;
}
.mature-label strong {
  font-size: 42px;
  line-height: 1;
  color: #ffc1cc;
}
.mature-label span {
  display: block;
  font-size: 9px;
  letter-spacing: 0.12em;
  margin-top: 10px;
}
.mature-label p {
  font-size: 11px;
  margin: 10px 0 0;
}
.button {
  border-radius: 5px;
  border-color: #64646e;
  min-height: 42px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
}
.primary {
  background: #a92d4c;
  color: #fff;
  border-color: #d45c78;
}
.primary:hover {
  background: #be3759;
}
.secondary {
  background: #23232b;
  color: var(--ink);
}
input,
select,
textarea {
  background: #15151c;
  color: var(--ink);
  border-color: #62626f;
  border-radius: 5px;
}
input::placeholder {
  color: #acacb7;
  opacity: 1;
}
.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 30px;
  align-items: start;
}
#library {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 1fr);
  gap: 0 20px;
}
#library > .filters,
#library > .empty-library,
#library-results,
#library > .actions {
  grid-column: 1 / -1;
}
section[id] {
  padding: 30px 0;
}
.section-heading {
  margin-bottom: 20px;
}
.section-heading h2 {
  font-size: 23px;
  letter-spacing: -0.025em;
}
.section-heading .eyebrow {
  margin: 0 0 7px;
}
.section-heading > span {
  font-size: 11px;
}
#search-form label {
  font-size: 11px;
  color: var(--muted);
}
.search-row {
  max-width: none;
}
.filters {
  margin: 18px 0;
  gap: 8px;
}
.filters button {
  border: 1px solid #51515c;
  background: #1a1a22;
  border-radius: 5px;
  padding: 8px 13px;
  font-size: 12px;
  min-height: 38px;
}
.filters button[aria-pressed='true'] {
  color: #ffdce3;
  background: #452333;
  border-color: #b1667d;
}
.empty-library {
  min-height: 0;
  gap: 12px;
  border: 0;
  margin: 16px 0 22px;
}
.library-seal {
  display: none;
}
.empty-library h3 {
  font-size: 12px;
  margin: 0;
}
.empty-library p {
  font-size: 11px;
  margin: 3px 0;
}
#library-results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px 16px;
}
.library-work {
  min-width: 0;
}
.cover-link {
  display: block;
  position: relative;
  border: 1px solid #48424d;
  border-radius: 7px;
  overflow: hidden;
  background: #201c25;
  aspect-ratio: 2/3;
}
.cover-link:hover {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  text-decoration: none;
}
.cover-link img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.cover-fallback {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  background: #2a2331;
  color: #eee1e5;
}
.cover-fallback strong {
  font-size: 22px;
  line-height: 1.2;
  font-family: Georgia, serif;
}
.cover-fallback small {
  font-size: 10px;
  letter-spacing: 0.12em;
}
.cover-format {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 7px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  background: #15151a;
  color: white;
  border: 1px solid #8f7785;
  border-radius: 3px;
}
.library-work h3 {
  font-size: 14px;
  line-height: 1.4;
  margin: 10px 0 5px;
}
.library-work p {
  font-size: 11px;
  color: var(--muted);
  margin: 4px 0;
}
.library-work .work-tags {
  color: #c9a7b6;
}
.catalogue-sidebar {
  padding-top: 30px;
}
.catalogue-sidebar section {
  border: 1px solid var(--line);
  background: #19191f;
  padding: 19px;
  margin-bottom: 18px;
  border-radius: 6px;
}
.catalogue-sidebar h2 {
  font-size: 16px;
  margin: 0 0 12px;
}
.catalogue-sidebar p {
  font-size: 11px;
  color: var(--muted);
}
.catalogue-sidebar nav {
  display: grid;
  gap: 0;
  margin: 0;
  font-size: 12px;
}
.catalogue-sidebar nav a {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.recent-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 9px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.recent-item > span {
  color: var(--accent);
  font-size: 16px;
  font-weight: 600;
}
.recent-item small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.preview-note a {
  color: var(--accent);
  font-size: 12px;
}
.studio-masthead {
  padding: 28px 0 0;
  border-bottom: 1px solid var(--line);
}
.studio-masthead h1 {
  font-size: 30px;
  letter-spacing: -0.035em;
  margin: 10px 0;
}
.studio-masthead p {
  font-size: 13px;
  color: var(--muted);
}
.studio-masthead nav {
  margin-top: 24px;
  gap: 28px;
  font-size: 13px;
}
.studio-masthead nav a {
  padding: 13px 0;
}
.studio-masthead nav a[aria-current] {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}
body[data-enhanced] .studio-masthead {
  display: none;
}
body[data-view='browse'] .studio-surface {
  display: none;
}
body[data-view='studio'] .intro,
body[data-view='studio'] .home-layout {
  display: none;
}
body[data-view='studio'] .studio-masthead {
  display: block;
}
body[data-enhanced][data-view='studio'] .studio-surface:not([data-panel-active]) {
  display: none;
}
.studio-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  background: #1b1b23;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 24px 0;
}
.summary-item {
  padding: 20px 28px;
  min-width: 160px;
  flex: 1;
  border-right: 1px solid var(--line);
}
.summary-item:last-child {
  border: 0;
}
.summary-item strong {
  display: block;
  font-size: 28px;
  font-weight: 650;
}
.summary-item span {
  font-size: 11px;
  color: var(--muted);
}
.work-toolbar {
  margin: 16px 0;
}
.work-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  background: #1a1a22;
  border: 1px solid var(--line);
  padding: 17px 20px;
  margin: 10px 0;
  border-radius: 6px;
}
.work-emblem {
  display: grid;
  place-items: center;
  width: 44px;
  height: 60px;
  color: #ffc9d4;
  border: 1px solid #895269;
  background: #422333;
  font-size: 20px;
}
.work-description strong {
  display: block;
  font-size: 14px;
}
.work-description p {
  margin: 5px 0 0;
  font-size: 11px;
  color: var(--muted);
}
.state-label {
  color: #f6c1ce;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 10px;
  margin-right: 12px;
}
#new-work-panel {
  margin: 28px 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #181820;
  padding: 20px;
}
#new-work-panel > summary {
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
}
.studio-layout {
  padding: 22px 0 0;
  border-color: var(--line);
  gap: 30px;
}
.studio-body {
  max-width: 760px;
  width: 100%;
}
.studio-surface > form {
  padding: 24px;
  background: #191921;
  border: 1px solid var(--line);
  border-radius: 6px;
}
#work-editor {
  background: #17171e;
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: 6px;
}
dialog {
  background: #1b1820;
  color: var(--ink);
  border: 1px solid #8b6172;
  border-radius: 8px;
}
dialog::backdrop {
  background: rgba(7, 7, 11, 0.91);
}
header.shell {
  padding-block: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
#reading {
  max-width: 1060px;
}
#reading h1 {
  font-size: clamp(32px, 5vw, 50px);
  letter-spacing: -0.03em;
}
#reading .prose {
  font-family: Georgia, serif;
  font-size: 20px;
  line-height: 1.9;
  max-width: 65ch;
}
footer .wordmark img {
  width: 160px;
}
footer {
  font-size: 11px;
}
@media (min-width: 1500px) {
  #library-results {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
@media (max-width: 1100px) {
  .header-shell {
    flex-wrap: wrap;
    padding-block: 16px;
    gap: 14px 24px;
  }
  .main-nav {
    order: 3;
    width: 100%;
    margin: 0;
  }
  .age-mark {
    margin-left: auto;
  }
  .preview-badge {
    margin-left: auto;
  }
  .home-layout {
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 22px;
  }
  #library-results {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 800px) {
  .home-layout {
    grid-template-columns: 1fr;
  }
  .catalogue-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding-top: 0;
  }
  .catalogue-sidebar .preview-note {
    grid-column: 1/-1;
  }
  .intro {
    padding: 24px;
  }
  .intro h1 {
    font-size: 30px;
  }
  .mature-label {
    min-width: 170px;
    padding-left: 24px;
  }
}
@media (max-width: 600px) {
  #library {
    grid-template-columns: 1fr;
  }
  .shell {
    width: calc(100% - 32px);
  }
  .main-nav {
    gap: 8px 20px;
    font-size: 12px;
    flex-wrap: wrap;
  }
  .wordmark img {
    width: 170px;
  }
  .intro {
    display: block;
    margin-top: 18px;
    padding: 22px;
  }
  .mature-label {
    display: none;
  }
  .intro h1 {
    font-size: 29px;
  }
  .intro p {
    font-size: 12px;
  }
  .intro .actions {
    gap: 8px;
  }
  .intro .button {
    font-size: 11px;
  }
  #library-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 13px;
  }
  .catalogue-sidebar {
    grid-template-columns: 1fr;
  }
  .cover-fallback strong {
    font-size: 20px;
  }
  .section-heading h2 {
    font-size: 21px;
  }
  .summary-item {
    min-width: 50%;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
  }
  .summary-item strong {
    font-size: 24px;
  }
  .work-row {
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 16px;
    gap: 12px;
  }
  .work-row > button {
    grid-column: 2;
    justify-self: start;
  }
  .work-emblem {
    width: 36px;
    height: 52px;
  }
  .studio-masthead h1 {
    font-size: 26px;
  }
  .studio-masthead nav {
    gap: 16px;
    font-size: 11px;
  }
  .studio-layout {
    grid-template-columns: 1fr;
  }
  #work-editor {
    padding: 18px;
  }
}

/* Folio Afterhours visual pass: editorial ink, paper, and red accents. */
:root {
  --ink: #f6f0e8;
  --muted: #b9b0aa;
  --accent: #e35b68;
  --accent-soft: #3b2028;
  --paper: #efe4d5;
  --surface: #1b1719;
  --surface-raised: #241d20;
  --line: #4a363b;
  --line-soft: #32272a;
  --focus: #f1b36a;
}

html body.rm-app {
  background: #111012 !important;
  color: var(--ink);
}

body.rm-app {
  font-family: Arial, sans-serif;
  letter-spacing: 0.005em;
}

.shell {
  width: min(1360px, calc(100% - 48px));
}
.site-header {
  background: rgba(17, 16, 18, 0.97);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-shell {
  min-height: 70px;
  gap: 24px;
}
.wordmark img {
  width: 174px;
}
.main-nav {
  gap: 18px;
  font-size: 12px;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}
.main-nav a {
  color: #d9ceca;
}
.main-nav a:hover,
.main-nav a[aria-current] {
  color: var(--paper);
}
.main-nav a[aria-current] {
  text-decoration-color: var(--accent);
  text-underline-offset: 8px;
}
.age-mark {
  background: var(--accent-soft);
  color: #ffe0dc;
  border-color: #a64d5c;
}
.preview-badge {
  border-color: var(--line);
  background: #191519;
}

.intro {
  background: linear-gradient(105deg, #21191d 0%, #1b1719 70%);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  padding: 30px 34px;
  margin-top: 32px;
}
.intro h1 {
  font-family: Georgia, serif;
  font-weight: 600;
  font-size: clamp(34px, 4vw, 52px);
  letter-spacing: -0.045em;
}
.intro p {
  color: #c8beb8;
  font-size: 15px;
  line-height: 1.65;
}
.eyebrow {
  color: #f08b91 !important;
  letter-spacing: 0.16em;
}
.mature-label {
  border-left-color: #67404a;
}
.mature-label strong {
  color: #f2a4aa;
  font-family: Georgia, serif;
}
.button {
  border-radius: 3px;
  min-height: 44px;
}
.primary {
  background: var(--accent);
  border-color: #f0838b;
  color: #210e12;
}
.primary:hover {
  background: #f2757f;
}
.secondary {
  background: #2b2226;
  border-color: #6b4a51;
}
input,
select,
textarea {
  background: #151316;
  border-color: #6b555a;
  border-radius: 3px;
}

section[id] {
  padding: 38px 0;
}
.section-heading {
  margin-bottom: 24px;
}
.section-heading h2 {
  font-family: Georgia, serif;
  font-size: 28px;
  font-weight: 600;
}
.filters {
  gap: 6px;
}
.filters button {
  border-radius: 3px;
  background: #1e191c;
  border-color: #5a454a;
}
.filters button[aria-pressed='true'] {
  background: var(--accent-soft);
  border-color: var(--accent);
}
#library-results {
  gap: 30px 18px;
}
.cover-link {
  border-color: #60484e;
  border-radius: 3px;
  background: #271f23;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease;
}
.cover-link:hover {
  outline: none;
  border-color: #ed8d94;
  transform: translateY(-3px);
}
.cover-fallback {
  background: #30232a;
}
.cover-fallback strong {
  font-family: Georgia, serif;
  font-size: 25px;
}
.cover-format {
  background: #1a1115;
  border-color: #b56b77;
}
.library-work h3 {
  font-family: Georgia, serif;
  font-size: 16px;
  font-weight: 600;
}
.library-work p {
  line-height: 1.5;
}
.library-work .work-tags {
  color: #df9aa1;
}
.catalogue-sidebar section {
  background: #191519;
  border-radius: 3px;
}
.catalogue-sidebar h2 {
  font-family: Georgia, serif;
  font-size: 18px;
}
.recent-item > span {
  color: var(--accent);
}
.preview-note a {
  color: #f08b91;
}

.studio-summary,
.work-row,
#new-work-panel,
.studio-surface > form,
#work-editor {
  background: var(--surface-raised);
  border-color: var(--line);
  border-radius: 3px;
}
.studio-summary {
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.03);
}
.summary-item strong {
  font-family: Georgia, serif;
  color: var(--paper);
}
.work-row {
  transition:
    border-color 0.18s ease,
    background 0.18s ease;
}
.work-row:hover {
  border-color: #8e5b64;
  background: #2a2024;
}
.work-emblem {
  background: var(--accent-soft);
  border-color: #965260;
}
.studio-masthead h1 {
  font-family: Georgia, serif;
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .cover-link,
  .work-row {
    transition: none;
  }
}
