:root {
  --paper: #F7F3EA;
  --ink: #24231F;
  --oxblood: #8C1826;
  --gold: #D6A548;
  --rule: #D5D0C5;
  --muted: #79766E;
  --ad: #EFEEE9;
  --ivory: #FBF8F2;
  --panel: #FFFcf7;
  --sans: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  --display: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --canvas: #f6f7f8;
  --surface: #ffffff;
  --line: #e6e2d8;
  --sidebar: 240px;
  --topbar: 64px;
  --workspace: 1440px;
  --settings: 840px;
  --control: 40px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --measure: 42rem;
  --page: 1280px;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --radius: 10px;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}

img {
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--oxblood);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  background: var(--oxblood);
  color: var(--paper);
  font-size: 0.85rem;
  padding: 8px 12px;
  z-index: 20;
  border-radius: 8px;
}

.skip-link:focus {
  top: 12px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(var(--page), calc(100% - 64px));
  margin-inline: auto;
}

.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 243, 234, 0.94);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(8px);
}

.masthead__bar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
}

.utility {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.utility p {
  margin: 0;
}

.brand {
  display: block;
  width: 168px;
  flex: 0 0 auto;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
}

.tagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.masthead-search {
  flex: 1 1 auto;
  min-width: 0;
}

.masthead-search input,
.finder-search input,
.studio-editor input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.studio-editor textarea,
.studio-editor select,
.studio-bar input:not([type="checkbox"]):not([type="radio"]),
.studio-bar select,
.media-card input:not([type="checkbox"]):not([type="radio"]),
.media-card textarea,
.media-card select,
.login-card input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--panel);
}

.nav-toggle {
  display: none;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 18px;
  padding: 0 0 10px;
}

.site-nav a,
.category-nav a,
.footer-links a {
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.category-nav {
  display: contents;
}

.site-nav a[aria-current="page"] {
  color: var(--oxblood);
  box-shadow: inset 0 -2px 0 var(--oxblood);
}

.button,
.filters button,
.pager button,
.nav-toggle,
.finder-result {
  font-family: var(--sans);
  cursor: pointer;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--oxblood);
  border-radius: 8px;
  background: var(--oxblood);
  color: var(--paper);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.button--social {
  flex: 0 0 auto;
}

.button-quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}

.kicker,
.sample-flag,
.ad-slot__label,
.slide__index,
.field-label,
.footer-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--oxblood);
  margin: 0;
}

.sample-flag {
  margin-top: 4px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.lead h1,
.page-head h1,
.story > header h1,
.essay h1,
.home-intro h1 {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  margin: 8px 0 12px;
  overflow-wrap: anywhere;
}

.dek {
  font-size: 1.15rem;
  line-height: 1.55;
  margin: 0;
  color: var(--ink);
}

.meta,
.plate__credit,
.asset-note,
.slide__route,
.empty,
.loading,
.load-error {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.meta,
.loading,
.empty {
  margin: 0;
}

.sample-banner {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--ad);
  font-size: 0.92rem;
  line-height: 1.45;
}

.sample-banner strong {
  color: var(--oxblood);
}

.home-intro {
  max-width: 46rem;
  margin: 28px 0 24px;
}

.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.8fr);
  gap: 16px;
  align-items: stretch;
}

.feature-stack {
  display: grid;
  gap: 16px;
}

.feature-card,
.story-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}

.feature-card {
  min-height: 100%;
}

.feature-card__copy,
.story-card__copy {
  display: grid;
  gap: 8px;
  padding: 16px 16px 18px;
}

.feature-card h2,
.feature-card h3,
.story-card h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.feature-card--lead h2 {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
}

.plate {
  margin: 0;
}

.plate__frame,
.card-frame {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 180px;
  aspect-ratio: 16 / 10;
  background: var(--ad);
  border-bottom: 1px solid var(--rule);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.feature-card--lead .card-frame,
.story .plate__frame {
  aspect-ratio: 16 / 9;
  min-height: 240px;
}

.plate__frame img,
.card-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 42% 30%;
}

.plate__frame p,
.card-frame p {
  margin: 0;
  padding: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.plate__caption {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.plate__credit {
  margin: 6px 0 0;
  font-size: 0.75rem;
}

.ad-slot {
  background: var(--ad);
  border: 1px solid var(--rule);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  text-align: center;
  padding: 16px;
  min-height: 96px;
  overflow: hidden;
  box-sizing: border-box;
  max-width: 100%;
}

.ad-slot--leader,
.ad-slot--opening,
.ad-slot--feed {
  min-height: 120px;
  margin: 36px 0;
  width: 100%;
}

.ad-slot--inline {
  min-height: 140px;
  margin: 36px 0;
  width: 100%;
}

.ad-slot--sidebar {
  width: min(300px, 100%);
  min-height: 250px;
}

.article-ad {
  margin: 32px 0;
}

.article-ad .ad-slot {
  margin: 0;
}

.continue-reading {
  margin: 32px 0;
}

.ad-slot--anchor {
  min-height: 72px;
  margin: 0;
  width: 100%;
}

.ad-slot__label,
.ad-slot__size,
.ad-slot__id {
  margin: 0;
}

.ad-slot__id {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.ad-slot__size {
  font-size: 0.85rem;
  color: var(--muted);
}

.ad-anchor {
  display: none;
}

.ad-anchor__dismiss {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  min-height: 36px;
  margin-top: 6px;
  padding: 6px 12px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper);
  cursor: pointer;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 740px) 300px;
  gap: 40px;
  align-items: start;
  justify-content: center;
}

.article-sidebar {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 20px;
}

.article-layout .story {
  width: auto;
  max-width: min(var(--measure), 100%);
  min-width: 0;
  margin-inline: 0;
}

.section-heading {
  margin: 8px 0 20px;
}

.section-heading p {
  margin: 8px 0 0;
  max-width: 42rem;
}

.content-note {
  border: 1px solid var(--rule);
  background: var(--ivory);
  color: var(--ink);
  padding: 10px 14px;
  margin: 12px 0 0;
  font-size: 0.95rem;
}

.section-heading h2,
.pass-on h2,
.related h2,
.deck__header h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0;
}

.archive-discovery {
  margin: 28px 0;
}

.archive-discovery h2 {
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  margin: 0 0 8px;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.archive-item,
.category-jump a,
.related__list a,
.sidebar-related a {
  text-decoration: none;
  color: inherit;
}

.story-card .dek,
.archive-item .dek {
  font-size: 1rem;
  color: var(--muted);
}

.story-card:hover h3,
.feature-card:hover h2,
.feature-card:hover h3,
.archive-item:hover h2,
.category-jump a:hover,
.related__list a:hover {
  color: var(--oxblood);
}

.home-section + .home-section {
  margin-top: 36px;
}

.category-jump {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.category-jump a,
.archive-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--panel);
}

.category-jump a span:last-child {
  color: var(--muted);
  font-size: 0.85rem;
}

.asset-note {
  margin-top: 28px;
}

.page-head {
  margin: 28px 0 20px;
  max-width: 46rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.filters button,
.pager button {
  min-height: 40px;
  padding: 6px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
}

.filters button[aria-pressed="true"],
.pager button[aria-pressed="true"] {
  background: var(--oxblood);
  border-color: var(--oxblood);
  color: var(--paper);
}

.archive-results {
  display: grid;
  gap: 16px;
}

.archive-item {
  display: grid;
  gap: 6px;
}

.archive-item h2 {
  margin: 0;
  font-size: 1.45rem;
}

.story > header {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.story__body {
  font-size: 1.1875rem;
  line-height: 1.65;
}

.story__body p {
  margin: 0 0 1.1em;
}

.pullquote {
  margin: 28px 0;
  padding: 8px 0 8px 16px;
  border-left: 2px solid var(--gold);
}

.pullquote p {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.pullquote footer {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sources,
.pass-on,
.related {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}

.sources ul {
  padding-left: 1.1rem;
}

.sources li p {
  margin: 0 0 4px;
}

.sources li p:first-child {
  font-weight: 700;
}

.pass-on p,
.essay p,
.reserved-note {
  line-height: 1.65;
}

.related__list,
.sidebar-related {
  display: grid;
  gap: 10px;
}

.related__list a,
.sidebar-related a {
  display: grid;
  gap: 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

.text-link {
  font-weight: 700;
  color: var(--oxblood);
  text-underline-offset: 3px;
  width: fit-content;
}

.standfirst {
  font-size: 1.05rem;
  line-height: 1.65;
}

.finder-page {
  padding-bottom: 40px;
}

.finder-search {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
  max-width: 40rem;
}

.finder-layout {
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.finder-results {
  display: grid;
  gap: 10px;
}

.finder-result {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 8px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--panel);
}

.finder-result__num {
  display: none;
}

.finder-thumb {
  aspect-ratio: 1;
  background: var(--ad);
  border-radius: 8px;
  display: grid;
  align-content: end;
  padding: 6px;
  overflow: hidden;
}

.finder-thumb__num,
.thumb__num {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--oxblood);
}

.finder-thumb__text,
.thumb__text {
  font-size: 0.72rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.finder-result__copy {
  display: grid;
  align-content: center;
  gap: 4px;
}

.finder-result__title {
  font-weight: 700;
}

.finder-result[aria-current="true"] {
  border-color: var(--oxblood);
}

.thumb-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.thumb,
.thumb-rail button {
  min-width: 92px;
  text-align: left;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--panel);
  padding: 8px;
}

.thumb[aria-current="true"],
.thumb-rail button[aria-current="true"] {
  border-color: var(--oxblood);
}

.slide {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 20px;
  min-height: 220px;
}

.slide__art {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: 42% 30%;
  margin-bottom: 12px;
  border-radius: var(--radius);
}

.slide--cta {
  border-color: var(--oxblood);
}

.slide__route {
  margin-top: 8px;
}

.deck__actions,
.social-actions,
.studio-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
}

.sequence {
  white-space: pre-wrap;
  background: var(--ad);
  border-radius: 8px;
  padding: 12px;
  font-size: 0.85rem;
}

.essay {
  max-width: 46rem;
  padding-bottom: 48px;
}

.essay h2 {
  margin-top: 32px;
}

.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--rule);
  background: #F3EEE4;
  padding: 32px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.footer-brand {
  width: 160px;
  margin-bottom: 12px;
}

.footer-links {
  display: grid;
  gap: 4px;
}

.site-footer p,
.site-footer a {
  color: var(--ink);
}

.footer-note {
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.85rem;
}

.load-error {
  color: var(--oxblood);
}

.pager {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.lead {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.85fr);
  gap: 28px;
}

.search-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ad);
  border: 1px solid var(--rule);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge--published,
.badge--scheduled {
  background: #f4ead2;
  border-color: #e4d3a4;
}

.badge--failed,
.badge--needs_action,
.badge--unknown {
  color: var(--oxblood);
  border-color: #e4c3c7;
  background: #f8eeef;
}

.desk {
  background: var(--ivory);
}

.desk-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}

.studio-nav {
  background: var(--oxblood);
  color: var(--paper);
  padding: 18px 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}

.studio-nav .brand {
  width: 150px;
  margin: 0 8px 16px;
}

.studio-nav a {
  color: var(--paper);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 600;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.studio-nav a[aria-current="page"] {
  background: rgba(247, 243, 234, 0.18);
}

.studio-nav form {
  margin-top: auto;
  padding-top: 12px;
}

.studio-nav .button {
  width: 100%;
  background: transparent;
  color: var(--paper);
  border-color: rgba(247, 243, 234, 0.45);
}

.desk-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: 56px;
  padding: 0 24px;
  border-bottom: 1px solid var(--rule);
  background: var(--ivory);
  position: sticky;
  top: 0;
  z-index: 5;
}

.desk-main {
  padding: 8px 24px 48px;
  min-width: 0;
}

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

.studio-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 16px;
}

.studio-tabs a,
.studio-tabs button {
  min-height: 40px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}

.studio-tabs a[aria-current="page"],
.studio-tabs button[aria-selected="true"] {
  background: var(--oxblood);
  color: var(--paper);
  border-color: var(--oxblood);
}

.studio-counts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.studio-counts li,
.metric {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 14px;
}

.studio-counts strong {
  display: block;
  font-size: 1.6rem;
}

.studio-editor,
.studio-block {
  display: grid;
  gap: 8px;
}

.editor-layout,
.carousel-layout,
.media-layout,
.composer-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 280px;
  gap: 16px;
  align-items: start;
}

.editor-layout > aside {
  grid-column: 1;
  grid-row: 1;
}

.editor-layout [data-tab-panel="article"] {
  grid-column: 2;
  grid-row: 1;
}

.editor-layout [data-tab-panel="details"] {
  grid-column: 3;
  grid-row: 1;
}

.editor-layout [data-tab-panel="sources"],
.editor-layout [data-tab-panel="images"],
.editor-layout [data-tab-panel="carousel"],
.editor-layout [data-tab-panel="preview"] {
  grid-column: 2 / span 2;
}

.editor-layout aside button {
  display: block;
  width: 100%;
  text-align: left;
  margin-top: 8px;
  border: 0;
  background: transparent;
  padding: 6px 0;
  cursor: pointer;
}

.media-layout,
.composer-layout {
  grid-template-columns: minmax(0, 1fr) 320px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 16px;
  min-width: 0;
}

.social-grid {
  display: grid;
  gap: 16px;
}

.social-card,
.social-panel {
  border: 1px solid var(--rule);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.social-card h2,
.social-panel h2 {
  font-size: 1.35rem;
  margin: 0 0 8px;
}

.social-card p,
.social-panel p,
.social-note {
  color: var(--muted);
}

.status-line {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 8px;
  color: var(--oxblood);
}

.blocker {
  color: var(--oxblood);
}

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 480px);
}

.login-art {
  background:
    linear-gradient(160deg, rgba(140, 24, 38, 0.92), rgba(36, 35, 31, 0.78)),
    var(--oxblood);
  color: var(--paper);
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
}

.login-art .brand {
  width: 220px;
  margin-bottom: auto;
}

.login-kicker {
  color: var(--gold);
}

.login-art h1 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  color: var(--paper);
}

.sheet-table {
  display: block;
  overflow-x: auto;
}

.login-panel {
  display: grid;
  align-content: center;
  padding: 40px 32px;
  background: var(--paper);
}

.login-card {
  display: grid;
  gap: 12px;
  max-width: 380px;
}

.dropzone {
  border: 1px dashed var(--rule);
  background: var(--ad);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}

.dropzone.is-over {
  border-color: var(--oxblood);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.media-card {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.media-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--ad);
  border-radius: 8px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-cell {
  min-height: 92px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--panel);
  padding: 6px;
  font-size: 0.78rem;
}

.calendar-cell button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 2px 0;
  cursor: pointer;
}

table.sheet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.sheet-table th,
.sheet-table td {
  border-bottom: 1px solid var(--rule);
  text-align: left;
  padding: 8px;
  vertical-align: top;
}

@media (min-width: 800px) {
  .social-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1024px) {
  .story-grid,
  .category-jump {
    grid-template-columns: 1fr 1fr;
  }

  .editor-layout,
  .carousel-layout {
    grid-template-columns: 1fr;
  }

  .footer-grid,
  .search-layout,
  .login-screen,
  .media-layout,
  .composer-layout {
    grid-template-columns: 1fr;
  }

  .login-art {
    min-height: 220px;
  }
}

@media (max-width: 899px) {
  .feature-grid,
  .lead,
  .finder-layout,
  .article-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .article-sidebar {
    display: grid;
    position: static;
    width: 100%;
    margin-top: 12px;
  }

  .ad-slot--sidebar {
    width: 100%;
  }

  .story-grid {
    gap: 16px;
  }
}

@media (max-width: 719px) {
  .wrap {
    width: min(var(--page), calc(100% - 40px));
  }

  .masthead__bar {
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .masthead-search {
    order: 3;
    flex-basis: 100%;
  }

  .desk-header__meta {
    display: none;
  }

  .desk-shell {
    display: block;
  }

  .studio-nav {
    display: none;
    position: fixed;
    inset: 0 auto 0 0;
    width: min(280px, 86vw);
    height: 100vh;
    z-index: 30;
  }

  .studio-nav.is-open {
    display: flex;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 14px;
    border: 1px solid var(--rule);
    border-radius: 8px;
    background: var(--panel);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .desk .nav-toggle {
    margin-right: auto;
    background: transparent;
  }

  .site-nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 12px;
  }

  .site-nav.is-open {
    display: flex;
  }

  .category-nav {
    display: flex;
    flex-direction: column;
  }

  body.has-ad-anchor {
    padding-bottom: 200px;
  }

  .ad-anchor {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    background: var(--paper);
    border-top: 1px solid var(--rule);
  }

  .ad-anchor[hidden] {
    display: none;
  }

  .home-intro h1,
  .page-head h1,
  .story > header h1,
  .essay h1 {
    font-size: clamp(2rem, 9vw, 2.6rem);
  }

  .story__body {
    font-size: 1.0625rem;
  }

  .story-grid,
  .category-jump,
  .social-grid {
    grid-template-columns: 1fr;
  }

  .calendar-grid {
    grid-template-columns: 1fr;
  }
}

.analytics-controls,
.analytics-custom,
.analytics-actions,
.analytics-section-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

.analytics-custom[hidden] {
  display: none;
}

.analytics-controls {
  margin: 0 0 16px;
}

.analytics-controls label,
.analytics-custom label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.85rem;
}

.analytics-check {
  display: flex;
  gap: 8px;
  align-items: center;
  align-self: center;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.analytics-span {
  grid-column: 1 / -1;
}

.analytics-chart svg {
  width: 100%;
  height: auto;
}

.analytics-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.analytics-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 8px;
}

.analytics-story {
  display: flex;
  gap: 10px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  min-width: 12rem;
}

.analytics-story img,
.analytics-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--ad);
  flex: 0 0 auto;
}

.analytics-notes {
  color: var(--muted);
  margin-top: 16px;
}

.sheet-scroll {
  overflow-x: auto;
}

.tip {
  position: relative;
  display: inline-flex;
}

.tip button {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--muted);
  padding: 0;
}

.tip__text {
  display: none;
  position: absolute;
  z-index: 5;
  left: 0;
  top: 1.6rem;
  width: min(16rem, 70vw);
  padding: 8px 10px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.tip:hover .tip__text,
.tip:focus-within .tip__text {
  display: block;
}

.paste-surface,
.divider-marker,
.media-group,
.video-block,
.video-fallback,
.continue-reading {
  border: 1px solid var(--rule);
  background: var(--ivory);
  border-radius: var(--radius);
  padding: 12px;
}

.paste-surface {
  min-height: 7rem;
  white-space: pre-wrap;
}

.paste-surface:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
}

.divider-marker {
  border-color: var(--gold);
  background: #f8f1df;
}

.divider-marker p:first-child {
  color: var(--oxblood);
  font-weight: 700;
}

.optional-tools {
  margin-top: 16px;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--ink);
}

.video-frame iframe,
#social-upload-player,
#social-player {
  width: 100%;
  max-width: 100%;
  height: auto;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.continue-reading button {
  background: var(--oxblood);
  color: var(--paper);
}

#article-rest:focus {
  outline: 2px solid var(--oxblood);
}

.is-cover {
  box-shadow: inset 3px 0 0 var(--gold);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media (max-width: 720px) {
  .paste-surface,
  .studio-block,
  .social-panel,
  .video-frame {
    min-width: 0;
  }

  .studio-bar {
    flex-wrap: wrap;
  }
}

.consent-banner {
  position: fixed;
  z-index: 30;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 34rem;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 16px;
}

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 800px) {
  .analytics-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

.desk {
  background: var(--paper);
}

.desk-shell {
  grid-template-columns: 248px minmax(0, 1fr);
  background: var(--paper);
}

.studio-nav {
  background: #fbf8f2;
  color: var(--ink);
  border-right: 1px solid var(--rule);
  padding: 16px 12px 20px;
  gap: 18px;
}

.nav-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.studio-nav .brand {
  width: 148px;
  margin: 0;
}

#nav-collapse {
  border: 0;
  background: transparent;
  color: var(--muted);
  min-height: 28px;
  padding: 0;
  font-size: 0.78rem;
  cursor: pointer;
}

.account-menu summary,
.preview-dialog__bar button {
  border: 1px solid var(--rule);
  background: var(--panel);
  color: var(--ink);
  border-radius: 8px;
  min-height: 32px;
  padding: 4px 8px;
  font-size: 0.78rem;
  cursor: pointer;
}

.nav-group {
  display: grid;
  gap: 2px;
}

.nav-label {
  margin: 0 10px 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.nav-group--quiet .nav-label,
.nav-group--quiet a {
  color: var(--muted);
}

.studio-nav a {
  color: var(--ink);
  gap: 10px;
  padding: 8px 10px;
  font-weight: 600;
  font-size: 0.92rem;
}

.studio-nav a svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.studio-nav a[aria-current="page"] {
  background: #f3e4e6;
  color: var(--oxblood);
  box-shadow: inset 3px 0 0 var(--oxblood);
}

.desk-shell.is-collapsed {
  grid-template-columns: 76px minmax(0, 1fr);
}

.desk-shell.is-collapsed .studio-nav a span,
.desk-shell.is-collapsed .nav-label,
.desk-shell.is-collapsed .brand {
  display: none;
}

.desk-shell.is-collapsed .studio-nav a {
  justify-content: center;
}

.desk-workspace {
  min-width: 0;
}

.desk-top {
  justify-content: flex-start;
  gap: 16px;
  background: rgba(247, 243, 234, 0.92);
  backdrop-filter: blur(8px);
}

.desk-context {
  min-width: 0;
}

.desk-context p,
#desk-title {
  margin: 0;
}

#desk-kicker {
  color: var(--muted);
  font-size: 0.75rem;
}

#desk-title {
  font-size: 1.05rem;
  line-height: 1.2;
}

#desk-search {
  margin-left: auto;
  width: min(280px, 34vw);
}

#desk-search input,
.account-menu summary {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--panel);
  padding: 8px 12px;
}

.account-menu {
  position: relative;
}

.account-menu summary {
  width: auto;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  list-style: none;
  cursor: pointer;
}

.account-menu form {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 10px 30px rgba(36, 35, 31, 0.08);
  z-index: 8;
}

.desk .page-head h1 {
  font-size: clamp(1.6rem, 2vw, 2rem);
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
}

.desk .page-head .studio-bar {
  position: sticky;
  top: 64px;
  z-index: 4;
  background: var(--paper);
  padding: 8px 0;
}

.desk .field-label,
.desk .footer-label {
  font-size: 0.86rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}

.desk input[type="checkbox"],
.desk input[type="radio"] {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0.2rem 0 0;
  accent-color: var(--oxblood);
  flex: 0 0 auto;
}

.desk label:has(> input[type="checkbox"]),
.desk label:has(> input[type="radio"]) {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.desk-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.desk-metrics li,
.work-card,
.attention-card,
.desk-panel {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: 0 1px 0 rgba(36, 35, 31, 0.03);
}

.desk-metrics li {
  padding: 14px 16px;
}

.desk-metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
}

.desk-metrics strong {
  display: block;
  margin-top: 4px;
  font-size: 1.5rem;
}

.desk-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.work-list,
.attention-list {
  display: grid;
  gap: 10px;
}

.work-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  color: inherit;
  text-decoration: none;
}

.work-card img,
.work-card .work-fallback {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--ad);
}

.work-card h3,
.attention-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.work-card p,
.attention-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.attention-card {
  padding: 12px 14px;
}

.desk-skeleton {
  height: 72px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--ad), #f7f3ea, var(--ad));
  background-size: 200% 100%;
}

/* Flow stepper styles are owned by the React Bits component and studio.css. */

.story-url {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.story-url code {
  overflow-wrap: anywhere;
}

.platform-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.platform-tabs button[aria-pressed="true"] {
  background: var(--oxblood);
  color: var(--paper);
  border-color: var(--oxblood);
}

.flow-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 16px;
  align-items: start;
}

.preview-dialog {
  width: min(1100px, calc(100vw - 32px));
  height: min(860px, calc(100vh - 32px));
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 0;
  background: var(--paper);
}

.preview-dialog__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
}

.preview-dialog__bar div {
  display: flex;
  gap: 8px;
  align-items: center;
}

.preview-dialog iframe {
  width: 100%;
  height: calc(100% - 58px);
  border: 0;
  background: var(--paper);
}

.preview-dialog iframe[data-width="mobile"] {
  width: 390px;
  margin: 0 auto;
  display: block;
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}

.button[aria-busy="true"] {
  opacity: 0.75;
}

.spinner {
  width: 0.85rem;
  height: 0.85rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  vertical-align: -0.1em;
  animation: desk-spin 0.7s linear infinite;
}

@keyframes desk-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
  .desk-metrics,
  .desk-columns,
  .flow-layout,
  .work-card {
    grid-template-columns: 1fr;
  }

  #desk-search {
    display: none;
  }

  .desk-shell,
  .desk-shell.is-collapsed {
    display: block;
  }

  .studio-nav {
    display: none;
    position: fixed;
    inset: 0 auto 0 0;
    width: min(280px, 86vw);
    height: 100vh;
    z-index: 30;
  }

  .studio-nav.is-open {
    display: flex;
  }

  .desk .nav-toggle {
    letter-spacing: 0;
    text-transform: none;
  }
}

.split-host h1 {
  margin-top: 0;
}

[data-reveal="group"] {
  display: block;
}

[data-reveal="group"] > div {
  display: contents;
}

.reveal-item {
  min-width: 0;
}

.spotlight-host {
  display: flex;
  min-width: 0;
  height: 100%;
}

.spotlight-card--editorial {
  flex: 1;
  height: 100%;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: var(--radius);
}

.spotlight-slot,
.spotlight-slot > .feature-card {
  height: 100%;
}

.spotlight-card--editorial .spotlight-card__light {
  z-index: 3;
  mix-blend-mode: soft-light;
}

.spotlight-card--editorial .spotlight-card__border,
.spotlight-card--editorial .spotlight-card__edge {
  z-index: 4;
}

.feature-card:focus-visible {
  outline: 2px solid var(--oxblood);
  outline-offset: 3px;
}

.reading-progress {
  position: fixed;
  z-index: 40;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  pointer-events: none;
}

.reading-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--oxblood);
  transform: scaleX(0);
  transform-origin: left center;
}

.image-preview__source {
  cursor: zoom-in;
}

.image-preview {
  width: min(920px, 92vw);
  max-height: 92vh;
  padding: 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
}

.image-preview img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(92vh - 64px);
  object-fit: contain;
}

.image-preview__close {
  margin-bottom: 8px;
}

.image-preview::backdrop {
  background: rgba(36, 35, 31, 0.72);
}

.desk .stepper--rail {
  width: 100%;
  max-width: 46rem;
  margin: 8px 0 18px;
  background: transparent;
  box-shadow: none;
}

.desk .stepper--rail .stepper__body {
  display: none;
}

.slide-view {
  min-width: 0;
}

@media (prefers-reduced-motion: reduce) {
  .reading-progress span,
  #article-rest {
    transition: none;
  }
}

