:root {
  --ink: #171318;
  --ink-soft: #29222c;
  --paper: #f4efe6;
  --paper-deep: #e9dfd1;
  --paper-light: #fbf8f2;
  --plum: #745169;
  --plum-dark: #55394d;
  --wine: #713e46;
  --muted: #726b70;
  --line: rgba(23, 19, 24, 0.14);
  --serif: Georgia, 'Times New Roman', Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --shadow-soft: 0 22px 55px rgba(40, 31, 34, 0.10);
  --radius: 1.15rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 8%, rgba(116, 81, 105, 0.10), transparent 26rem),
    var(--paper);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a {
  color: inherit;
  text-decoration: none;
}

a:hover { color: var(--plum-dark); }

.site-header {
  position: relative;
  z-index: 20;
  background: var(--ink);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.site-header .navbar { --bs-navbar-padding-y: .35rem; }

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  color: #fff;
  font-family: var(--serif);
  letter-spacing: .02em;
}

.site-brand:hover { color: #fff; }

.site-brand__mark {
  display: inline-grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  border: 1px solid rgba(255,255,255,.48);
  border-radius: 50%;
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.site-brand__text { font-size: 1.08rem; }

.site-header .nav-link {
  color: rgba(255,255,255,.75);
  font-size: .9rem;
  letter-spacing: .04em;
}

.site-header .nav-link:hover { color: #fff; }

.site-main { min-height: 70vh; }

.stories-hero {
  padding: clamp(4.5rem, 8vw, 8rem) 0 clamp(3.75rem, 7vw, 6.75rem);
}

.stories-hero__eyebrow,
.section-kicker,
.story-taxonomy__label {
  color: var(--plum-dark);
  font-size: .73rem;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.stories-hero__title {
  max-width: 850px;
  margin: .65rem 0 1.15rem;
  font-family: var(--serif);
  font-size: clamp(3.4rem, 8vw, 7.6rem);
  font-weight: 400;
  line-height: .92;
  letter-spacing: -.045em;
}

.stories-hero__lead {
  max-width: 690px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
}

.story-count {
  display: inline-flex;
  align-items: baseline;
  gap: .4rem;
  padding: .8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.24);
  font-size: .82rem;
}

.story-count strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.15rem;
}

.stories-section { padding-bottom: 7rem; }

.section-heading {
  display: flex;
  align-items: end;
  gap: 1.5rem;
  margin-bottom: 2.25rem;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400;
}

.section-rule {
  flex: 1;
  height: 1px;
  margin-bottom: .7rem;
  background: var(--line);
}

.empty-state {
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-light);
}

.story-card {
  position: relative;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(251, 248, 242, .82);
  box-shadow: 0 10px 30px rgba(40,31,34,.05);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.story-card:hover {
  transform: translateY(-5px);
  border-color: rgba(116, 81, 105, .35);
  box-shadow: var(--shadow-soft);
}

.story-card__media {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--ink-soft);
}

.story-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease, opacity .45s ease;
}

.story-card:hover .story-card__media img {
  transform: scale(1.025);
  opacity: .92;
}

.story-card__media--placeholder {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(116,81,105,.36), rgba(113,62,70,.18)),
    var(--ink);
  color: rgba(255,255,255,.75);
  font-family: var(--serif);
  font-size: 1.2rem;
  letter-spacing: .08em;
}

.story-card__body { padding: 1.6rem 1.6rem 1.75rem; }

.story-card__categories,
.story-header__categories,
.story-taxonomy__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.story-card__categories span,
.story-header__categories span {
  color: var(--plum-dark);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.story-card__title {
  margin: .7rem 0 .65rem;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  line-height: 1.04;
  letter-spacing: -.025em;
}

.story-card__title a:hover { color: var(--plum-dark); }

.story-card__meta {
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: .8rem;
}

.story-card__preview {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 1.25rem;
  color: #4f494d;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.story-card__link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: var(--plum-dark);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.story-card__link span { transition: transform .2s ease; }
.story-card__link:hover span { transform: translateX(4px); }

@media (min-width: 1200px) {
  .story-card--featured {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, .65fr);
    min-height: 520px;
  }

  .story-card--featured .story-card__media {
    height: 100%;
    aspect-ratio: auto;
  }

  .story-card--featured .story-card__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
  }

  .story-card--featured .story-card__title {
    font-size: clamp(2.6rem, 4vw, 4rem);
  }

  .story-card--featured .story-card__preview { -webkit-line-clamp: 6; }
}

.story-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 7.5rem) 0 7rem;
}

.story-header {
  max-width: 900px;
  margin: 0 auto 3.5rem;
  text-align: center;
}

.story-back {
  display: inline-block;
  margin-bottom: 2.5rem;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
}

.story-back:hover { color: var(--plum-dark); }

.story-header__categories {
  justify-content: center;
  margin-bottom: 1.35rem;
}

.story-header__title {
  margin-bottom: 1.5rem;
  font-family: var(--serif);
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 400;
  line-height: .96;
  letter-spacing: -.045em;
}

.story-header__meta {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}

.story-header__meta strong { color: var(--ink); }

.story-featured-image {
  overflow: hidden;
  margin: 0 auto 4rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.story-featured-image img {
  display: block;
  width: 100%;
  max-height: 720px;
  object-fit: cover;
}

.story-reading-shell {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4.25rem);
  border: 1px solid rgba(23,19,24,.1);
  border-radius: var(--radius);
  background: var(--paper-light);
  box-shadow: 0 18px 50px rgba(40,31,34,.06);
}

.story-content {
  color: #272226;
  font-family: var(--serif);
  font-size: clamp(1.08rem, 1.7vw, 1.24rem);
  line-height: 1.9;
}

.story-content p { margin-bottom: 1.45em; }
.story-content h1,
.story-content h2,
.story-content h3,
.story-content h4,
.story-content h5,
.story-content h6 {
  margin: 1.8em 0 .7em;
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.08;
}
.story-content h2 { font-size: 2.25rem; }
.story-content h3 { font-size: 1.8rem; }
.story-content a {
  color: var(--plum-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}
.story-content blockquote {
  margin: 2.2rem 0;
  padding: .35rem 0 .35rem 1.5rem;
  border-left: 3px solid var(--plum);
  color: #5a5056;
  font-size: 1.14em;
  font-style: italic;
}
.story-content hr {
  width: 5rem;
  margin: 3rem auto;
  border: 0;
  border-top: 1px solid var(--line);
  opacity: 1;
}
.story-content figure { margin: 2.5rem 0; }
.story-content img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 2rem auto;
  border-radius: .7rem;
}
.story-content ul,
.story-content ol { padding-left: 1.4rem; }

.story-taxonomy {
  max-width: 820px;
  margin: 2.5rem auto 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.story-taxonomy__tags span {
  padding: .45rem .72rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.28);
  color: var(--muted);
  font-size: .74rem;
}

.story-end {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  margin-top: 4.5rem;
}

.story-end__ornament { color: var(--plum); font-size: .65rem; }

.btn-literary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: .75rem 1.35rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .04em;
  transition: background .2s ease, transform .2s ease;
}

.btn-literary:hover {
  transform: translateY(-2px);
  background: var(--plum-dark);
  color: #fff;
}

.site-footer {
  margin-top: 2rem;
  padding: 3.5rem 0 2rem;
  background: var(--ink);
  color: rgba(255,255,255,.78);
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2rem;
}

.site-brand--footer { margin-bottom: .8rem; }
.site-footer__tagline { color: rgba(255,255,255,.5); font-size: .85rem; }

.site-footer__links {
  display: flex;
  gap: 1.3rem;
  font-size: .82rem;
}

.site-footer__links a:hover { color: #fff; }

.site-footer__copyright {
  margin-top: 2.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255,255,255,.09);
  color: rgba(255,255,255,.4);
  font-size: .72rem;
}

#mflash { color: #a53644; }

@media (max-width: 767.98px) {
  .stories-hero { padding-top: 3.75rem; }
  .stories-hero__title { font-size: clamp(3rem, 16vw, 5.3rem); }
  .section-heading { align-items: start; }
  .section-rule { display: none; }
  .story-card__body { padding: 1.35rem; }
  .story-reading-shell { padding: 1.6rem 1.25rem; }
  .site-footer__inner { align-items: start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* --------------------------------------------------------------------------
   HOME
   -------------------------------------------------------------------------- */

.home-hero {
  position: relative;
  overflow: hidden;
  margin-top: 1.5rem;
  padding: clamp(4rem, 8vw, 7rem) clamp(1.5rem, 4vw, 4rem);
  border-radius: calc(var(--radius) + .45rem);
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.home-hero__glow {
  position: absolute;
  inset: auto -12rem -14rem auto;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(116,81,105,.62), rgba(113,62,70,.16) 48%, transparent 72%);
  pointer-events: none;
}

.home-eyebrow,
.home-feature__label,
.home-story-card__category {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.home-eyebrow { color: rgba(255,255,255,.58); }

.home-hero__title {
  max-width: 720px;
  margin: 0 0 1.25rem;
  font-family: var(--serif);
  font-size: clamp(3.45rem, 7.4vw, 7rem);
  font-weight: 400;
  line-height: .92;
  letter-spacing: -.05em;
}

.home-hero__lead {
  max-width: 590px;
  margin-bottom: 2rem;
  color: rgba(255,255,255,.67);
  font-family: var(--serif);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.2rem;
}

.home-hero .btn-literary {
  border-color: #fff;
  background: #fff;
  color: var(--ink);
}

.home-hero .btn-literary:hover {
  border-color: var(--paper-deep);
  background: var(--paper-deep);
  color: var(--ink);
}

.home-text-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: inherit;
  font-size: .83rem;
  font-weight: 800;
  letter-spacing: .03em;
}

.home-text-link:hover { color: var(--plum); }
.home-hero .home-text-link { color: rgba(255,255,255,.78); }
.home-hero .home-text-link:hover { color: #fff; }
.home-text-link span { transition: transform .2s ease; }
.home-text-link:hover span { transform: translateX(4px); }

.home-feature {
  position: relative;
  overflow: hidden;
  min-height: 470px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  background: #241f26;
}

.home-feature__media {
  position: absolute;
  inset: 0;
  display: block;
}

.home-feature__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(23,19,24,.08) 35%, rgba(23,19,24,.88) 100%);
}

.home-feature__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .55s ease, opacity .55s ease;
}

.home-feature:hover .home-feature__media img {
  transform: scale(1.025);
  opacity: .9;
}

.home-feature__media--placeholder {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(116,81,105,.44), rgba(113,62,70,.18)),
    var(--ink-soft);
  color: rgba(255,255,255,.48);
  font-family: var(--serif);
  font-size: 1.2rem;
  letter-spacing: .08em;
}

.home-feature__body {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 2rem;
}

.home-feature__label { color: rgba(255,255,255,.58); }

.home-feature__body h2 {
  max-width: 620px;
  margin-bottom: .65rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 4.4vw, 4rem);
  font-weight: 400;
  line-height: .98;
  letter-spacing: -.035em;
}

.home-feature__body h2 a:hover { color: #fff; }

.home-feature__meta {
  margin: 0;
  color: rgba(255,255,255,.62);
  font-size: .8rem;
}

.home-feature--empty {
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.6);
  font-family: var(--serif);
  font-size: 1.4rem;
}

.home-section { padding: clamp(5rem, 8vw, 8rem) 0 0; }

.home-section__link {
  white-space: nowrap;
  color: var(--plum-dark);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.home-section__link span { transition: transform .2s ease; }
.home-section__link:hover span { display: inline-block; transform: translateX(4px); }

.home-section__intro {
  max-width: 610px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.18rem;
}

.home-story-card {
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(251,248,242,.78);
  box-shadow: 0 10px 30px rgba(40,31,34,.045);
  transition: transform .25s ease, box-shadow .25s ease;
}

.home-story-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-soft);
}

.home-story-card__media {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--ink-soft);
}

.home-story-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease, opacity .45s ease;
}

.home-story-card:hover .home-story-card__media img {
  transform: scale(1.025);
  opacity: .92;
}

.home-story-card__media--placeholder {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(116,81,105,.34), rgba(113,62,70,.16)),
    var(--ink);
  color: rgba(255,255,255,.55);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .18em;
}

.home-story-card__body { padding: 1.55rem 1.55rem 1.7rem; }
.home-story-card__category { margin-bottom: .65rem; color: var(--plum-dark); }

.home-story-card h3 {
  margin-bottom: .7rem;
  font-family: var(--serif);
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -.025em;
}

.home-story-card h3 a:hover { color: var(--plum-dark); }
.home-story-card__meta { color: var(--muted); font-size: .76rem; }

.home-story-card__preview {
  display: -webkit-box;
  overflow: hidden;
  color: #50494e;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.home-section--universes {
  margin-top: clamp(5rem, 9vw, 9rem);
  padding: clamp(3rem, 6vw, 5rem);
  border-radius: calc(var(--radius) + .45rem);
  background: var(--paper-deep);
}

.universe-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(23,19,24,.15);
}

.universe-card {
  position: relative;
  display: flex;
  min-height: 220px;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.6rem;
  border-right: 1px solid rgba(23,19,24,.15);
  transition: background .25s ease, transform .25s ease;
}

.universe-card:last-child { border-right: 0; }

.universe-card:hover {
  background: rgba(251,248,242,.46);
  color: var(--ink);
}

.universe-card__number {
  color: var(--plum-dark);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.universe-card h3 {
  margin-bottom: .35rem;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.03em;
}

.universe-card p { color: var(--muted); font-size: .78rem; }
.universe-card__arrow { position: absolute; top: 1.5rem; right: 1.5rem; color: var(--muted); }

.home-author {
  display: grid;
  grid-template-columns: minmax(220px, .65fr) minmax(0, 1.35fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  margin: clamp(5rem, 9vw, 9rem) 0 0;
  padding: clamp(3rem, 6vw, 5.5rem) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.home-author__portrait {
  display: grid;
  width: min(100%, 330px);
  aspect-ratio: 1;
  place-items: center;
  justify-self: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255,255,255,.13), transparent 27%),
    linear-gradient(135deg, var(--plum), var(--wine) 62%, var(--ink));
  box-shadow: var(--shadow-soft);
}

.home-author__portrait span {
  color: rgba(255,255,255,.88);
  font-family: var(--serif);
  font-size: clamp(3rem, 7vw, 6rem);
  letter-spacing: -.05em;
}

.home-author__copy { max-width: 680px; }

.home-author__bio {
  color: #4f484d;
  font-family: var(--serif);
  font-size: clamp(1.08rem, 2vw, 1.3rem);
  line-height: 1.75;
}

.home-closing {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: clamp(5rem, 9vw, 9rem) 0 6rem;
  padding: clamp(4rem, 8vw, 7rem) 1.5rem;
  border-radius: calc(var(--radius) + .45rem);
  background:
    radial-gradient(circle at 15% 30%, rgba(116,81,105,.3), transparent 24rem),
    var(--ink);
  color: #fff;
  text-align: center;
}

.home-closing h2 {
  max-width: 780px;
  margin-bottom: 2rem;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 6vw, 5.8rem);
  font-weight: 400;
  line-height: .96;
  letter-spacing: -.045em;
}

.home-closing .btn-literary {
  border-color: #fff;
  background: #fff;
  color: var(--ink);
}

.home-closing .btn-literary:hover {
  border-color: var(--paper-deep);
  background: var(--paper-deep);
  color: var(--ink);
}

@media (max-width: 991.98px) {
  .home-feature { min-height: 410px; }
  .universe-grid { grid-template-columns: 1fr; }
  .universe-card {
    min-height: 170px;
    border-right: 0;
    border-bottom: 1px solid rgba(23,19,24,.15);
  }
  .universe-card:last-child { border-bottom: 0; }
}

@media (max-width: 767.98px) {
  .home-hero {
    margin-top: .75rem;
    padding: 3.25rem 1.25rem 1.25rem;
  }
  .home-hero__title { font-size: clamp(3rem, 15vw, 5rem); }
  .home-feature { min-height: 350px; }
  .home-feature__body { padding: 1.35rem; }
  .home-section { padding-top: 4.5rem; }
  .home-section .section-heading { flex-wrap: wrap; }
  .home-section--universes {
    margin-top: 4.5rem;
    padding: 2.25rem 1.25rem;
  }
  .home-author {
    grid-template-columns: 1fr;
    margin-top: 4.5rem;
    padding: 3.5rem 0;
  }
  .home-author__portrait { width: min(72vw, 280px); }
  .home-closing { margin: 4.5rem 0 4rem; padding: 3.5rem 1.2rem; }
}

/* --------------------------------------------------------------------------
   Step 9 — story exploration: category filters + related stories
   -------------------------------------------------------------------------- */

.stories-filter-context {
  color: var(--plum-dark);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.stories-hero__title--filtered {
  font-size: clamp(3rem, 7vw, 6.5rem);
}

.story-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin: -1.75rem 0 clamp(3rem, 6vw, 5.25rem);
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + .25rem);
  background: rgba(251, 248, 242, .72);
  box-shadow: 0 12px 35px rgba(40,31,34,.045);
}

.story-filter {
  display: inline-flex;
  align-items: center;
  gap: .48rem;
  padding: .68rem .9rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(23,19,24,.045);
  font-size: .78rem;
  font-weight: 700;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.story-filter span {
  display: inline-grid;
  min-width: 1.45rem;
  min-height: 1.45rem;
  place-items: center;
  padding: 0 .3rem;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.55);
  font-size: .67rem;
}

.story-filter:hover {
  transform: translateY(-1px);
  color: var(--plum-dark);
  border-color: rgba(116,81,105,.24);
  background: rgba(116,81,105,.08);
}

.story-filter.is-active {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.story-filter.is-active span {
  color: var(--ink);
  background: var(--paper);
}

.story-card__categories a,
.story-header__categories a {
  color: var(--plum-dark);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.story-card__categories a:hover,
.story-header__categories a:hover {
  color: var(--wine);
  text-decoration: underline;
  text-underline-offset: .22em;
}

.related-stories {
  margin-top: clamp(4.5rem, 8vw, 7.5rem);
  padding-top: clamp(3.25rem, 6vw, 5rem);
  border-top: 1px solid var(--line);
}

.related-card {
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(251, 248, 242, .78);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.related-card:hover {
  transform: translateY(-4px);
  border-color: rgba(116,81,105,.32);
  box-shadow: var(--shadow-soft);
}

.related-card__media {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--ink-soft);
}

.related-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease, opacity .4s ease;
}

.related-card:hover .related-card__media img {
  transform: scale(1.025);
  opacity: .93;
}

.related-card__media--placeholder {
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.7);
  background:
    linear-gradient(135deg, rgba(116,81,105,.38), rgba(113,62,70,.18)),
    var(--ink);
  font-family: var(--serif);
  font-size: 1.2rem;
  letter-spacing: .12em;
}

.related-card__body {
  padding: 1.35rem 1.4rem 1.5rem;
}

.related-card__category {
  color: var(--plum-dark);
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.related-card__body h3 {
  margin: .55rem 0 .55rem;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 400;
  line-height: 1.08;
}

.related-card__body > p {
  margin-bottom: .85rem;
  color: var(--muted);
  font-size: .78rem;
}

@media (max-width: 767.98px) {
  .story-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-top: -1rem;
    padding: .8rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .story-filter {
    flex: 0 0 auto;
  }
}

/* --------------------------------------------------------------------------
   Step 10 — author / about page
   -------------------------------------------------------------------------- */

.about-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, .82fr) minmax(0, 1.35fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: center;
  margin: clamp(2rem, 5vw, 4.5rem) 0 0;
  padding: clamp(2.5rem, 6vw, 5.5rem) 0 clamp(3.5rem, 7vw, 6.5rem);
}

.about-hero::after {
  content: '';
  position: absolute;
  right: -10vw;
  top: 4%;
  width: min(42vw, 520px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(116,81,105,.13), rgba(116,81,105,0) 68%);
  pointer-events: none;
}

.about-hero__portrait {
  position: relative;
  z-index: 1;
  display: grid;
  aspect-ratio: 4 / 5;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(116,81,105,.62), rgba(113,62,70,.25) 48%, rgba(23,19,24,.22)),
    var(--ink);
  box-shadow: var(--shadow-soft);
}

.about-hero__portrait::before {
  content: '';
  position: absolute;
  width: 76%;
  aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
}

.about-hero__portrait span {
  position: relative;
  color: rgba(255,255,255,.92);
  font-family: var(--serif);
  font-size: clamp(5rem, 12vw, 9rem);
  font-weight: 400;
  letter-spacing: -.06em;
  line-height: 1;
}

.about-hero__portrait small {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  color: rgba(255,255,255,.62);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.about-hero__copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.about-hero__title {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(4rem, 9vw, 8rem);
  font-weight: 400;
  letter-spacing: -.055em;
  line-height: .88;
}

.about-hero__role {
  margin: 1.35rem 0 0;
  color: var(--plum-dark);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.about-hero__bio {
  max-width: 680px;
  margin: 2rem 0 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.3vw, 1.75rem);
  line-height: 1.58;
  white-space: pre-line;
}

.about-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem 1.6rem;
  align-items: center;
  margin-top: 2.4rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  margin-bottom: clamp(4.5rem, 9vw, 8rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(251,248,242,.7);
}

.about-stat {
  padding: clamp(1.6rem, 4vw, 2.6rem);
  border-right: 1px solid var(--line);
}

.about-stat:last-child { border-right: 0; }

.about-stat strong {
  display: block;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(2.6rem, 5vw, 4.5rem);
  font-weight: 400;
  line-height: .9;
}

.about-stat span {
  display: block;
  margin-top: .7rem;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.about-section {
  padding: 0 0 clamp(4.75rem, 9vw, 8rem);
}

.about-world-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  background: var(--ink);
}

.about-world {
  position: relative;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.6rem;
  border-right: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.9);
  background: linear-gradient(145deg, rgba(116,81,105,.14), transparent 55%);
  transition: background .25s ease, transform .25s ease;
}

.about-world:last-child { border-right: 0; }

.about-world:hover {
  color: #fff;
  background: linear-gradient(145deg, rgba(116,81,105,.34), rgba(113,62,70,.1));
}

.about-world__number {
  color: rgba(255,255,255,.4);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .15em;
}

.about-world h3 {
  margin: 0 0 .45rem;
  color: #fff;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 400;
}

.about-world p {
  margin: 0;
  color: rgba(255,255,255,.56);
  font-size: .78rem;
}

.about-world__arrow {
  position: absolute;
  right: 1.3rem;
  top: 1.2rem;
  color: rgba(255,255,255,.42);
  font-size: 1.15rem;
}

.about-work-card {
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(251,248,242,.8);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.about-work-card:hover {
  transform: translateY(-4px);
  border-color: rgba(116,81,105,.3);
  box-shadow: var(--shadow-soft);
}

.about-work-card__media {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--ink-soft);
}

.about-work-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease, opacity .4s ease;
}

.about-work-card:hover .about-work-card__media img {
  transform: scale(1.025);
  opacity: .94;
}

.about-work-card__media--placeholder {
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.68);
  background:
    linear-gradient(135deg, rgba(116,81,105,.34), rgba(113,62,70,.14)),
    var(--ink);
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: .12em;
}

.about-work-card__body { padding: 1.45rem 1.5rem 1.65rem; }

.about-work-card__category {
  color: var(--plum-dark);
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.about-work-card__body h3 {
  margin: .6rem 0 .45rem;
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1.04;
}

.about-work-card__body h3 a { color: var(--ink); }
.about-work-card__body h3 a:hover { color: var(--plum-dark); }

.about-work-card__date {
  margin-bottom: .8rem;
  color: var(--muted);
  font-size: .75rem;
}

.about-work-card__preview {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.7;
}

.about-closing {
  margin: 0 0 clamp(4rem, 8vw, 7rem);
  padding: clamp(3.25rem, 7vw, 6rem) clamp(1.4rem, 7vw, 6rem);
  border-radius: var(--radius);
  text-align: center;
  color: rgba(255,255,255,.9);
  background:
    radial-gradient(circle at 15% 10%, rgba(116,81,105,.5), transparent 42%),
    linear-gradient(145deg, var(--ink-soft), var(--ink));
}

.about-closing h2 {
  max-width: 850px;
  margin: 0 auto 2rem;
  color: #fff;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6vw, 5.5rem);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: .98;
}

.about-closing .home-eyebrow { color: rgba(255,255,255,.56); }
.about-closing .btn-literary { border-color: var(--paper); background: var(--paper); color: var(--ink); }
.about-closing .btn-literary:hover { border-color: var(--paper-deep); background: var(--paper-deep); color: var(--ink); }

@media (max-width: 991.98px) {
  .about-hero {
    grid-template-columns: minmax(220px, .75fr) minmax(0, 1.25fr);
    gap: 2.5rem;
  }

  .about-world-grid { grid-template-columns: 1fr; }
  .about-world {
    min-height: 170px;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.12);
  }
  .about-world:last-child { border-bottom: 0; }
}

@media (max-width: 767.98px) {
  .about-hero {
    grid-template-columns: 1fr;
    padding-top: 2rem;
  }

  .about-hero__portrait {
    width: min(78vw, 310px);
    margin-inline: auto;
  }

  .about-hero__copy { text-align: center; }
  .about-hero__bio { margin-inline: auto; }
  .about-hero__actions { justify-content: center; }

  .about-stats { grid-template-columns: 1fr; }
  .about-stat {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    text-align: center;
  }
  .about-stat:last-child { border-bottom: 0; }

  .about-section .section-heading { flex-wrap: wrap; }
}

/* =========================================================
   AUTHENTICATED DASHBOARD
   ========================================================= */
.dashboard-shell {
  padding: clamp(2.5rem, 6vw, 5.75rem) 0 clamp(4rem, 8vw, 8rem);
}

.dashboard-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(1.75rem, 4vw, 3.5rem);
  margin-bottom: 1.5rem;
  color: #fff;
  background:
    radial-gradient(circle at 85% 15%, rgba(116,81,105,.62), transparent 25rem),
    linear-gradient(135deg, var(--ink-soft), var(--ink));
  border-radius: calc(var(--radius) + .35rem);
  box-shadow: var(--shadow-soft);
}

.dashboard-hero h1 {
  max-width: 820px;
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: clamp(2.65rem, 6vw, 5.4rem);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: .96;
}

.dashboard-hero p:not(.section-kicker) {
  max-width: 720px;
  margin: 0;
  color: rgba(255,255,255,.68);
  font-size: 1.02rem;
}

.dashboard-hero .section-kicker { color: rgba(255,255,255,.54); }
.dashboard-hero .btn-literary { border-color: var(--paper); background: var(--paper); color: var(--ink); }
.dashboard-hero .btn-literary:hover { border-color: var(--paper-deep); background: var(--paper-deep); color: var(--ink); }

.dashboard-hero__actions {
  display: flex;
  min-width: max-content;
  flex-direction: column;
  align-items: flex-end;
  gap: .8rem;
}

.dashboard-coming-soon {
  color: rgba(255,255,255,.48);
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  margin-bottom: 1.5rem;
  background: var(--paper-light);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 35px rgba(40,31,34,.05);
}

.dashboard-stat {
  min-height: 170px;
  padding: 1.6rem;
  border-right: 1px solid var(--line);
}

.dashboard-stat:last-child { border-right: 0; }
.dashboard-stat--feature { background: rgba(116,81,105,.07); }

.dashboard-stat span,
.dashboard-stat small {
  display: block;
}

.dashboard-stat span {
  color: var(--plum-dark);
  font-size: .73rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.dashboard-stat strong {
  display: block;
  margin: .25rem 0 .2rem;
  font-family: var(--serif);
  font-size: clamp(2.7rem, 5vw, 4.4rem);
  font-weight: 400;
  line-height: 1;
}

.dashboard-stat small { color: var(--muted); }

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(270px, .72fr);
  gap: 1.5rem;
}

.dashboard-main,
.dashboard-sidebar {
  min-width: 0;
}

.dashboard-sidebar {
  display: grid;
  align-content: start;
  gap: 1.5rem;
}

.dashboard-panel {
  overflow: hidden;
  padding: clamp(1.4rem, 3vw, 2.25rem);
  background: rgba(251,248,242,.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 35px rgba(40,31,34,.045);
}

.dashboard-panel__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.dashboard-panel__heading--stacked { align-items: flex-start; }

.dashboard-panel__heading h2,
.dashboard-panel > h2,
.dashboard-next h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -.025em;
}

.dashboard-panel__heading > span {
  color: var(--muted);
  font-size: .82rem;
}

.dashboard-story-list { margin-inline: -2.25rem; }

.dashboard-story-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 2.25rem;
  border-bottom: 1px solid var(--line);
}

.dashboard-story-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.dashboard-story-row__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
  margin-bottom: .35rem;
  color: var(--muted);
  font-size: .77rem;
}

.dashboard-story-row__meta > span:not(.dashboard-status) + span:not(.dashboard-status)::before {
  content: '·';
  margin-right: .6rem;
}

.dashboard-story-row h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.3vw, 1.75rem);
  font-weight: 400;
  letter-spacing: -.02em;
}

.dashboard-status {
  display: inline-flex;
  align-items: center;
  min-height: 1.65rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .63rem;
  font-weight: 850;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;
}

.dashboard-status--published { color: #365444; background: #e1eadf; }
.dashboard-status--draft { color: #6a5631; background: #eee5cf; }
.dashboard-status--private { color: #72434a; background: #eedcdf; }

.dashboard-story-row__action a,
.dashboard-story-row__action span {
  white-space: nowrap;
  font-size: .78rem;
  font-weight: 750;
}

.dashboard-story-row__action a { color: var(--plum-dark); }
.dashboard-story-row__action span { color: var(--muted); opacity: .7; }

.dashboard-empty {
  padding: 3rem 0 1rem;
  color: var(--muted);
}

.dashboard-library__list {
  margin: 0;
}

.dashboard-library__list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.dashboard-library__list > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.dashboard-library__list dt {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
}

.dashboard-library__list dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.65rem;
  line-height: 1;
}

.dashboard-next {
  color: #fff;
  background:
    radial-gradient(circle at 90% 5%, rgba(116,81,105,.5), transparent 18rem),
    var(--ink-soft);
  border-color: transparent;
}

.dashboard-next .section-kicker { color: rgba(255,255,255,.48); }
.dashboard-next h2 { color: #fff; }
.dashboard-next p,
.dashboard-next li { color: rgba(255,255,255,.68); }
.dashboard-next ul { margin: 1.1rem 0 0; padding-left: 1.1rem; }
.dashboard-next li + li { margin-top: .35rem; }

@media (max-width: 991.98px) {
  .dashboard-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-hero__actions {
    align-items: flex-start;
    min-width: 0;
  }

  .dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-stat:nth-child(2) { border-right: 0; }
  .dashboard-stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 575.98px) {
  .dashboard-stats { grid-template-columns: 1fr; }
  .dashboard-stat,
  .dashboard-stat:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .dashboard-stat:last-child { border-bottom: 0; }

  .dashboard-story-list { margin-inline: -1.4rem; }
  .dashboard-story-row {
    grid-template-columns: 1fr;
    padding-inline: 1.4rem;
  }
  .dashboard-story-row:last-child { padding-bottom: 0; }
}

/* =========================================================
   Story Manager / Story Editor — Step 11C
   ========================================================= */
.story-manager-shell,
.story-editor-shell,
.story-preview-shell {
  padding-block: clamp(2rem, 5vw, 4.5rem) 5rem;
}

.manager-hero,
.editor-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.manager-hero h1,
.editor-header h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 6vw, 5.6rem);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: .94;
}

.manager-hero p,
.editor-legacy-note {
  max-width: 52rem;
  margin: .8rem 0 0;
  color: var(--muted);
}

.manager-hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .65rem;
}

.btn-literary--ghost {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-strong, var(--line));
}

.btn-literary--ghost:hover { color: #fff; }

.manager-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1rem;
}

.manager-filters a {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .65rem .9rem;
  color: var(--muted);
  background: rgba(255,255,255,.32);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 750;
}

.manager-filters a span {
  min-width: 1.45rem;
  padding: .08rem .4rem;
  color: var(--ink);
  background: rgba(116,81,105,.1);
  border-radius: 999px;
  text-align: center;
}

.manager-filters a.is-active {
  color: #fff;
  background: var(--ink-soft);
  border-color: var(--ink-soft);
}

.manager-filters a.is-active span {
  color: #fff;
  background: rgba(255,255,255,.12);
}

.manager-panel,
.editor-card {
  background: rgba(251,248,242,.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 35px rgba(40,31,34,.045);
}

.manager-panel { overflow: hidden; }

.manager-story-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1.15rem 1.35rem;
  border-bottom: 1px solid var(--line);
}

.manager-story-row:last-child { border-bottom: 0; }

.manager-story-thumb {
  display: grid;
  overflow: hidden;
  width: 86px;
  aspect-ratio: 4 / 3;
  place-items: center;
  color: rgba(255,255,255,.65);
  background: var(--ink-soft);
  border-radius: .65rem;
  font-family: var(--serif);
  letter-spacing: .12em;
}

.manager-story-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.manager-story-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-bottom: .35rem;
  color: var(--muted);
  font-size: .72rem;
}

.manager-story-meta > span:not(.dashboard-status) + span:not(.dashboard-status)::before {
  content: '·';
  margin-right: .55rem;
}

.manager-story-copy h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.5vw, 1.85rem);
  font-weight: 400;
}

.manager-story-copy h2 a { color: var(--ink); }
.manager-story-copy p { margin: .18rem 0 0; color: var(--muted); font-size: .76rem; }

.manager-story-actions {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: .45rem;
  min-width: 4.2rem;
}

.manager-story-actions a {
  color: var(--plum-dark);
  font-size: .78rem;
  font-weight: 800;
}

.manager-empty { padding: 4rem 2rem; text-align: center; color: var(--muted); }
.manager-empty a { color: var(--plum-dark); font-weight: 800; }

.editor-back {
  color: var(--plum-dark);
  font-size: .82rem;
  font-weight: 800;
}

.editor-notice {
  margin-bottom: 1rem;
  padding: 1rem 1.15rem;
  border-radius: .7rem;
}

.editor-notice--success { color: #365444; background: #e1eadf; }
.editor-notice--error { color: #72434a; background: #f2e1e3; }
.editor-notice ul { margin: .5rem 0 0; }

.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(290px, .65fr);
  gap: 1.35rem;
}

.editor-main-column,
.editor-sidebar {
  display: grid;
  align-content: start;
  gap: 1.35rem;
  min-width: 0;
}

.editor-card { padding: clamp(1.25rem, 2.5vw, 2rem); }
.editor-card--primary { display: grid; gap: 1.25rem; }

.editor-card h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 400;
}

.editor-card-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.editor-card-heading--compact { margin-bottom: .75rem; }

.editor-field { display: grid; gap: .45rem; }
.editor-field > span { font-size: .78rem; font-weight: 800; }
.editor-field > span small { color: var(--muted); font-weight: 500; }

.editor-field input[type="text"],
.editor-field textarea,
.editor-field select,
.editor-filter-input {
  width: 100%;
  padding: .82rem .9rem;
  color: var(--ink);
  background: rgba(255,255,255,.58);
  border: 1px solid var(--line);
  border-radius: .6rem;
  outline: none;
}

.editor-field input:focus,
.editor-field textarea:focus,
.editor-field select:focus,
.editor-filter-input:focus {
  border-color: rgba(116,81,105,.55);
  box-shadow: 0 0 0 3px rgba(116,81,105,.09);
}

.editor-slug-input {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
  background: rgba(255,255,255,.58);
  border: 1px solid var(--line);
  border-radius: .6rem;
}

.editor-slug-input > span { padding-left: .85rem; color: var(--muted); font-size: .82rem; }
.editor-slug-input input { border: 0 !important; background: transparent !important; box-shadow: none !important; }

.story-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: .55rem;
  padding: .55rem;
  background: rgba(116,81,105,.055);
  border: 1px solid var(--line);
  border-radius: .6rem .6rem 0 0;
}

.story-toolbar button,
.editor-preview-button {
  padding: .42rem .65rem;
  color: var(--ink-soft);
  background: rgba(255,255,255,.7);
  border: 1px solid var(--line);
  border-radius: .4rem;
  font-size: .72rem;
  font-weight: 750;
}

.story-toolbar button:hover,
.editor-preview-button:hover { border-color: rgba(116,81,105,.55); }

.editor-field--content textarea {
  min-height: 610px;
  border-radius: 0 0 .6rem .6rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .82rem;
  line-height: 1.65;
  tab-size: 2;
}

.editor-help { margin: .8rem 0 0; color: var(--muted); font-size: .78rem; }
.editor-save { width: 100%; margin-top: 1rem; }
.editor-public-link { display: block; margin-top: .8rem; color: var(--plum-dark); text-align: center; font-size: .78rem; font-weight: 800; }

.editor-check-list {
  display: grid;
  max-height: 320px;
  overflow: auto;
  margin-top: .8rem;
  border-top: 1px solid var(--line);
}

.editor-check-list label {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .68rem .1rem;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  font-size: .82rem;
}

.editor-check-list input { accent-color: var(--plum); }
.editor-check-list--tags { max-height: 360px; }
.editor-filter-input { margin-top: .75rem; font-size: .82rem; }

.media-choice {
  position: relative;
  display: grid;
  gap: .35rem;
  cursor: pointer;
}

.media-choice input { position: absolute; opacity: 0; pointer-events: none; }
.media-choice--none { display: flex; align-items: center; gap: .6rem; margin: .8rem 0; padding: .7rem; border: 1px solid var(--line); border-radius: .55rem; }
.media-choice--none input { position: static; opacity: 1; pointer-events: auto; accent-color: var(--plum); }

.editor-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem;
  max-height: 520px;
  overflow: auto;
  padding-right: .2rem;
}

.media-choice__image {
  display: block;
  overflow: hidden;
  aspect-ratio: 1;
  border: 2px solid transparent;
  border-radius: .55rem;
  background: var(--paper-dark, #eee8df);
}

.media-choice__image img { width: 100%; height: 100%; object-fit: cover; }
.media-choice input:checked + .media-choice__image { border-color: var(--plum); box-shadow: 0 0 0 2px rgba(116,81,105,.15); }
.media-choice__title { overflow: hidden; color: var(--muted); font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }

.preview-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1rem 1.2rem;
  color: #fff;
  background: var(--ink-soft);
  border-radius: var(--radius);
}
.preview-banner button { padding: .5rem .8rem; color: #fff; background: transparent; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; }

.dashboard-public-link { color: rgba(255,255,255,.72); font-size: .78rem; font-weight: 750; }
.dashboard-story-row__action--stacked { display: grid; gap: .35rem; text-align: right; }
.dashboard-next__link { display: inline-block; margin-top: .75rem; color: #fff; font-weight: 800; }

@media (max-width: 991.98px) {
  .manager-hero,
  .editor-header { align-items: flex-start; flex-direction: column; }
  .manager-hero__actions { justify-content: flex-start; }
  .editor-layout { grid-template-columns: 1fr; }
  .editor-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor-publish-card { grid-column: 1 / -1; }
}

@media (max-width: 767.98px) {
  .manager-story-row { grid-template-columns: 64px minmax(0, 1fr); }
  .manager-story-thumb { width: 64px; }
  .manager-story-actions { grid-column: 2; align-items: flex-start; flex-direction: row; }
  .editor-sidebar { grid-template-columns: 1fr; }
  .editor-publish-card { grid-column: auto; }
}

@media (max-width: 575.98px) {
  .manager-story-row { grid-template-columns: 1fr; }
  .manager-story-thumb { width: 100%; aspect-ratio: 16 / 7; }
  .manager-story-actions { grid-column: auto; }
  .editor-card-heading { align-items: flex-start; flex-direction: column; }
}

/* =========================================================
   STEP 11D — MEDIA MANAGER
   ========================================================= */
.media-manager-shell,
.media-edit-shell {
  width: min(1440px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3.5rem 0 5rem;
}

.manager-hero {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-end;
  margin-bottom: 2rem;
}

.manager-hero h1,
.media-edit-panel h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 5.4rem);
  line-height: .92;
  letter-spacing: -.045em;
  margin: 0 0 1rem;
}

.manager-hero > div:first-child { max-width: 760px; }
.manager-hero p { color: var(--muted); max-width: 680px; }
.manager-hero__actions { display: flex; gap: .9rem; align-items: center; flex-wrap: wrap; }

.manager-notice,
.manager-errors {
  border: 1px solid rgba(96, 45, 71, .22);
  background: rgba(96, 45, 71, .06);
  padding: 1rem 1.15rem;
  border-radius: 1rem;
  margin-bottom: 1.2rem;
}
.manager-notice--success { border-color: rgba(44, 102, 67, .25); background: rgba(44, 102, 67, .07); }
.manager-errors { border-color: rgba(133, 50, 50, .3); background: rgba(133, 50, 50, .07); }
.manager-errors ul { margin: .5rem 0 0; }

.media-manager-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 1.5rem;
  align-items: start;
}

.media-upload-panel,
.media-library-panel,
.media-edit-panel {
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  box-shadow: var(--shadow-soft);
}

.media-upload-panel { padding: 1.5rem; position: sticky; top: 6rem; }
.media-upload-panel h2,
.media-library-panel h2 { font-family: var(--font-display); margin-bottom: .6rem; }
.media-upload-panel > p { color: var(--muted); }
.media-library-panel { padding: 1.4rem; }

.media-upload-form,
.media-edit-form { display: grid; gap: 1rem; }
.manager-field { display: grid; gap: .45rem; font-weight: 700; font-size: .86rem; letter-spacing: .02em; }
.manager-field span small { color: var(--muted); font-weight: 500; }
.manager-field input,
.manager-field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  border-radius: .8rem;
  padding: .8rem .9rem;
  font: inherit;
  font-weight: 500;
  letter-spacing: 0;
}
.manager-field input[type="file"] { padding: .65rem; background: rgba(255,255,255,.45); }
.manager-field textarea { resize: vertical; }

.media-library-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .55rem;
  margin: 1.4rem 0 0;
}
.media-library-stats div { border-top: 1px solid var(--line); padding-top: .7rem; }
.media-library-stats dt { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; }
.media-library-stats dd { margin: .15rem 0 0; font-family: var(--font-display); font-size: 1.55rem; }

.media-library-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.media-card { min-width: 0; border: 1px solid var(--line); border-radius: 1rem; overflow: hidden; background: var(--paper); transition: transform .2s ease, box-shadow .2s ease; }
.media-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.media-card__image { aspect-ratio: 4 / 3; display: block; background: var(--ink-soft); overflow: hidden; }
.media-card__image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.media-card:hover .media-card__image img { transform: scale(1.025); }
.media-card__body { padding: .85rem; }
.media-card__eyebrow { display: flex; justify-content: space-between; gap: .5rem; color: var(--muted); font-size: .67rem; text-transform: uppercase; letter-spacing: .08em; }
.media-card h3 { margin: .45rem 0 .25rem; font-family: var(--font-display); font-size: 1.12rem; line-height: 1.05; }
.media-card h3 a { color: inherit; text-decoration: none; }
.media-card p { margin: 0; color: var(--muted); font-size: .75rem; }

.media-edit-toolbar { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.media-edit-toolbar a { color: var(--plum); font-weight: 700; text-decoration: none; }
.media-edit-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 1.5rem; align-items: start; }
.media-edit-preview { margin: 0; border-radius: 1.35rem; overflow: hidden; background: var(--ink-soft); border: 1px solid var(--line); min-height: 420px; display: grid; place-items: center; }
.media-edit-preview img { display: block; max-width: 100%; max-height: 78vh; width: auto; height: auto; object-fit: contain; }
.media-edit-panel { padding: 1.6rem; }
.media-edit-panel h1 { font-size: clamp(2.1rem, 4vw, 3.7rem); }
.media-detail-list { display: grid; gap: 0; margin: 1.5rem 0 0; }
.media-detail-list div { display: grid; grid-template-columns: 120px 1fr; gap: 1rem; border-top: 1px solid var(--line); padding: .8rem 0; }
.media-detail-list dt { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; }
.media-detail-list dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.media-detail-list code { font-size: .76rem; color: var(--ink); }
.media-hash { word-break: break-all; }
.media-delete-note { color: var(--muted); border-top: 1px solid var(--line); margin-top: 1.1rem; padding-top: 1rem; font-size: .86rem; }
.dashboard-tool-links { display: grid; gap: .55rem; }

@media (max-width: 1100px) {
  .media-library-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .media-edit-grid { grid-template-columns: 1fr; }
  .media-edit-preview { min-height: 300px; }
}

@media (max-width: 820px) {
  .manager-hero { display: grid; align-items: start; }
  .media-manager-grid { grid-template-columns: 1fr; }
  .media-upload-panel { position: static; }
  .media-library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .media-manager-shell,
  .media-edit-shell { width: min(100% - 1rem, 1440px); padding-top: 2rem; }
  .media-library-grid { grid-template-columns: 1fr 1fr; gap: .65rem; }
  .media-card__body { padding: .7rem; }
  .media-detail-list div { grid-template-columns: 1fr; gap: .25rem; }
  .media-edit-toolbar { flex-direction: column; }
}

/* =========================================================
   STEP 11E — PAGE MANAGER + PUBLIC STATIC PAGES
   ========================================================= */
.page-manager-shell,
.page-editor-shell,
.page-preview-shell {
  width: min(1440px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3.5rem 0 5rem;
}

.page-manager-row .manager-story-thumb span {
  font-size: .68rem;
  letter-spacing: .14em;
}

.page-route-note p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: .86rem;
}

.page-route-note code {
  color: var(--plum);
  font-weight: 800;
}

.static-page {
  width: min(980px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 7rem) 0 6rem;
}

.static-page__header {
  max-width: 820px;
  margin: 0 auto 2.2rem;
  text-align: center;
}

.static-page__header h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: .9;
  letter-spacing: -.05em;
}

.static-page__deck {
  max-width: 720px;
  margin: 1.4rem auto 0;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.5vw, 1.55rem);
  line-height: 1.5;
}

.static-page__status {
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.static-page__feature {
  overflow: hidden;
  margin: 0 0 2rem;
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  background: var(--ink-soft);
  box-shadow: var(--shadow-soft);
}

.static-page__feature img {
  display: block;
  width: 100%;
  max-height: 620px;
  object-fit: cover;
}

.static-page__surface {
  padding: clamp(1.5rem, 5vw, 4rem);
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  box-shadow: var(--shadow-soft);
}

.static-page__surface .story-content {
  max-width: 760px;
  margin: 0 auto;
}

@media (max-width: 575.98px) {
  .page-manager-shell,
  .page-editor-shell,
  .page-preview-shell {
    width: min(100% - 1rem, 1440px);
    padding-top: 2rem;
  }

  .static-page {
    width: min(100% - 1rem, 980px);
    padding-top: 3rem;
  }

  .static-page__surface {
    padding: 1.25rem;
  }
}

/* =========================================================
   STEP 11F — TRASH + RESTORE
   ========================================================= */
.manager-filter-trash {
  margin-left: auto;
}

.manager-filter-trash.is-active {
  background: #3a2029;
  border-color: #3a2029;
  color: #fff;
}

.manager-story-row--trashed {
  opacity: .88;
  background: color-mix(in srgb, var(--paper) 92%, #7a2f48 8%);
}

.dashboard-status--trash {
  background: #ead7de;
  color: #6b2039;
}

.trash-timestamp {
  margin-top: .35rem !important;
  font-size: .74rem !important;
  color: var(--muted) !important;
}

.manager-inline-form {
  margin: 0;
}

.manager-action-button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--plum);
  font: inherit;
  font-size: .8rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.manager-action-button:hover,
.manager-action-button:focus-visible {
  text-decoration: underline;
}

.manager-action-button--trash,
.editor-trash-button {
  color: #8b304e;
}

.manager-action-button--restore {
  color: #365f48;
}

.editor-trash-button {
  width: 100%;
  margin-top: 1rem;
  padding: .8rem 1rem;
  border: 1px solid rgba(139, 48, 78, .35);
  border-radius: .75rem;
  background: rgba(139, 48, 78, .06);
  font-weight: 850;
  cursor: pointer;
}

.editor-trash-button:hover,
.editor-trash-button:focus-visible {
  background: rgba(139, 48, 78, .12);
  border-color: rgba(139, 48, 78, .6);
}

.editor-trash-note {
  margin: .55rem 0 0;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .manager-filter-trash { margin-left: 0; }
}

/* =========================================================
   STEP 11G — ACCOUNT + PROFILE MANAGEMENT
   ========================================================= */
.account-shell {
  width: min(100% - 2rem, 1320px);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) 0 6rem;
}

.account-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.account-identity {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.account-hero h1 {
  margin: 0 0 .35rem;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  line-height: .98;
}

.account-role { color: var(--muted); }

.account-avatar {
  width: 96px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 1.8rem;
  border: 4px solid var(--paper-strong);
  box-shadow: 0 0 0 1px var(--line), var(--shadow-soft);
}

.account-avatar--image img,
.home-author__portrait--image img,
.about-hero__portrait--image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-author__portrait--image,
.about-hero__portrait--image { overflow: hidden; padding: 0; }

.account-notice,
.account-error {
  padding: .9rem 1rem;
  margin-bottom: 1.25rem;
  border-radius: .8rem;
  font-size: .9rem;
}

.account-notice {
  background: #e5eee7;
  color: #275238;
  border: 1px solid #bdd2c2;
}

.account-error {
  background: #f2dfe5;
  color: #70253d;
  border: 1px solid #dfb5c3;
}

.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, .8fr);
  gap: 1.5rem;
  align-items: start;
}

.account-sidebar { display: grid; gap: 1.5rem; }

.account-panel {
  padding: clamp(1.35rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: var(--paper-strong);
  box-shadow: var(--shadow-soft);
}

.account-panel__heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.5rem;
}

.account-panel__heading--stacked { display: block; }
.account-panel__heading h2 { margin: 0; font-family: var(--font-display); }
.account-panel__heading > span { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; }

.account-form { display: grid; gap: 1.25rem; }
.account-form--compact { gap: .7rem; }
.account-form label,
.account-avatar-picker legend { font-weight: 800; font-size: .82rem; }
.account-form small,
.account-avatar-picker > p { color: var(--muted); font-size: .76rem; }

.account-form input[type="text"],
.account-form input[type="password"],
.account-form textarea {
  width: 100%;
  margin-top: .35rem;
  padding: .8rem .9rem;
  border: 1px solid var(--line);
  border-radius: .7rem;
  background: #fffdf8;
  color: var(--ink);
}

.account-form textarea { resize: vertical; min-height: 150px; }
.account-form input:focus,
.account-form textarea:focus { outline: 2px solid color-mix(in srgb, var(--plum) 38%, transparent); border-color: var(--plum); }

.account-avatar-picker {
  border: 0;
  padding: 1.25rem 0 0;
  margin: 0;
  border-top: 1px solid var(--line);
}

.account-avatar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: .75rem;
  margin: 1rem 0 .25rem;
  max-height: 390px;
  overflow: auto;
  padding: .15rem;
}

.account-avatar-choice {
  position: relative;
  cursor: pointer;
  text-align: center;
}

.account-avatar-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.account-avatar-choice__preview {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 50%;
  background: #ece4e2;
  color: var(--plum);
  font-weight: 900;
}

.account-avatar-choice__preview img { width: 100%; height: 100%; object-fit: cover; }
.account-avatar-choice small { display: block; margin-top: .4rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-avatar-choice input:checked + .account-avatar-choice__preview { border-color: var(--plum); box-shadow: 0 0 0 3px color-mix(in srgb, var(--plum) 18%, transparent); }
.account-avatar-choice input:focus-visible + .account-avatar-choice__preview { outline: 3px solid var(--plum); outline-offset: 2px; }
.account-avatar-choice--none .account-avatar-choice__preview { font-size: .8rem; }

.account-details { margin: 0; }
.account-details > div { padding: .8rem 0; border-bottom: 1px solid var(--line); }
.account-details > div:last-child { border-bottom: 0; }
.account-details dt { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; }
.account-details dd { margin: .15rem 0 0; font-weight: 750; overflow-wrap: anywhere; }
.account-detail-note,
.account-security-meta { margin: 1rem 0 0; color: var(--muted); font-size: .75rem; line-height: 1.55; }

@media (max-width: 900px) {
  .account-grid { grid-template-columns: 1fr; }
  .account-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 650px) {
  .account-shell { width: min(100% - 1rem, 1320px); padding-top: 2rem; }
  .account-hero { align-items: flex-start; flex-direction: column; }
  .account-sidebar { grid-template-columns: 1fr; }
  .account-avatar { width: 78px; }
  .account-avatar-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* =========================================================
   STEP 12 — CMS POLISH
   ========================================================= */

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 9999;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: var(--paper-light);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

.skip-link:focus { transform: translateY(0); }

.site-header .nav-link.active,
.site-header .nav-link[aria-current='page'] {
  color: #fff;
}

.site-header .nav-link.active::after,
.site-header .nav-link[aria-current='page']::after {
  content: '';
  display: block;
  width: 1.25rem;
  height: 2px;
  margin: 0.18rem auto 0;
  border-radius: 99px;
  background: rgba(255,255,255,0.7);
}

.workspace-nav {
  margin-top: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(251, 248, 242, 0.78);
  box-shadow: 0 12px 35px rgba(40, 31, 34, 0.06);
  backdrop-filter: blur(10px);
  overflow-x: auto;
  scrollbar-width: thin;
}

.workspace-nav__inner {
  min-width: max-content;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem;
}

.workspace-nav__label {
  padding: 0.45rem 0.8rem 0.45rem 1rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.workspace-nav a {
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.workspace-nav a:hover,
.workspace-nav a:focus-visible {
  background: var(--paper-deep);
  color: var(--ink);
}

.workspace-nav a.is-active,
.workspace-nav a[aria-current='page'] {
  background: var(--ink);
  color: var(--paper-light);
}

.manager-search {
  margin: 1.2rem 0 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(251, 248, 242, 0.72);
}

.manager-search--media { margin-bottom: 1.4rem; }

.manager-search > label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.manager-search__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.55rem;
  align-items: center;
}

.manager-search input[type='search'] {
  width: 100%;
  min-height: 2.8rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(23, 19, 24, 0.2);
  border-radius: 0.75rem;
  background: #fff;
  color: var(--ink);
}

.manager-search button,
.manager-search__row > a {
  min-height: 2.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.62rem 0.9rem;
  border: 1px solid var(--ink);
  border-radius: 0.75rem;
  font-weight: 750;
}

.manager-search button {
  background: var(--ink);
  color: var(--paper-light);
}

.manager-search__row > a { background: transparent; }

.manager-search__summary {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.editor-header__tools {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
}

.editor-save-state {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.62rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(251, 248, 242, 0.75);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.editor-save-state::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #739072;
}

.editor-save-state.is-dirty {
  color: var(--wine);
  border-color: rgba(113, 62, 70, 0.25);
  background: rgba(113, 62, 70, 0.08);
}

.editor-save-state.is-dirty::before { background: var(--wine); }

.editor-save-hint {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.editor-save-hint kbd {
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 0.35rem;
  background: var(--paper-light);
  color: var(--ink-soft);
  box-shadow: none;
  font-family: var(--sans);
  font-size: 0.72rem;
}

:where(a, button, input, textarea, select):focus-visible {
  outline: 3px solid rgba(116, 81, 105, 0.38);
  outline-offset: 3px;
}

#main-content:focus { outline: none; }

@media (max-width: 720px) {
  .manager-search__row {
    grid-template-columns: 1fr 1fr;
  }

  .manager-search input[type='search'] {
    grid-column: 1 / -1;
  }

  .editor-header__tools {
    align-items: flex-start;
  }
}
