:root {
  color-scheme: light;
  --paper: #f5f5f7;
  --paper-raised: #ffffff;
  --paper-deep: #e8e8ed;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --blue: #0066cc;
  --blue-dark: #004f9e;
  --green: #18794e;
  --red: #b42318;
  --amber: #8a5a00;
  --line: #d2d2d7;
  --line-strong: #aeaeb2;
  --focus: rgba(0, 113, 227, 0.42);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.025), 0 4px 18px rgba(0, 0, 0, 0.035);
  --shadow-md: 0 14px 42px rgba(0, 0, 0, 0.065);
  --radius-sm: 0.75rem;
  --radius: 1.25rem;
  --radius-lg: 1.75rem;
  --shell: 78rem;
  --measure: 68ch;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

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

html {
  min-width: 20rem;
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.55 var(--sans);
  letter-spacing: -0.01em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--blue);
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.18em;
}

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

h1,
h2,
h3,
p,
dl,
dd {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

img {
  max-width: 100%;
}

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

button,
.button,
.btn {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.15rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

button:hover,
.button:hover,
.btn:hover {
  border-color: #000;
  background: #000;
  color: #fff;
}

button:active,
.button:active,
.btn:active {
  transform: scale(0.98);
}

.button.secondary,
.secondary-button,
.btn-ghost {
  border-color: var(--line);
  background: var(--paper-raised);
  color: var(--blue);
  box-shadow: var(--shadow-sm);
}

.button.secondary:hover,
.secondary-button:hover,
.btn-ghost:hover {
  border-color: #b8b8bd;
  background: #fafafa;
  color: var(--blue-dark);
}

.btn-sm {
  min-height: 2.25rem;
  padding: 0.5rem 0.8rem;
  font-size: 0.8rem;
}

.btn-square {
  width: 2.5rem;
  padding: 0;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-raised);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.5rem;
}

.bg-base-100 {
  background: var(--paper-raised);
}

.dropdown {
  position: relative;
}

.dropdown > summary {
  list-style: none;
}

.dropdown > summary::-webkit-details-marker {
  display: none;
}

.dropdown-content {
  position: absolute;
  z-index: 60;
  display: none;
}

.dropdown[open] > .dropdown-content {
  display: flex;
}

.dropdown-end > .dropdown-content {
  right: 0;
}

.rounded-box {
  border-radius: var(--radius-sm);
}

.shadow-lg {
  box-shadow: var(--shadow-md);
}

.danger-button {
  border-color: var(--red);
  background: var(--red);
}

.danger-button:hover {
  border-color: #8f1b13;
  background: #8f1b13;
}

.text-button {
  min-height: 2.5rem;
  justify-content: flex-start;
  padding: 0.55rem 0.75rem;
  border-color: transparent;
  border-radius: 0.65rem;
  background: transparent;
  color: var(--blue);
  box-shadow: none;
  font-weight: 500;
}

.text-button:hover {
  border-color: transparent;
  background: rgba(0, 113, 227, 0.08);
  color: var(--blue-dark);
}

.compact-action {
  min-height: 2rem;
  padding-block: 0.35rem;
  font-size: 0.75rem;
}

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

::selection {
  background: #b9ddff;
  color: var(--ink);
}

.shell {
  width: min(calc(100% - 3rem), var(--shell));
  margin-inline: auto;
}

.narrow {
  width: min(calc(100% - 3rem), var(--measure));
  margin-inline: auto;
}

.muted,
.fine,
.helper,
.field-hint,
small {
  color: var(--muted);
}

.fine,
.field-hint,
small {
  font-size: 0.78rem;
}

code,
.proof {
  font: 0.76rem/1.55 var(--mono);
  overflow-wrap: anywhere;
}

/* Public pages and shared navigation */
.site-header,
.workspace-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(250, 250, 252, 0.82);
  color: var(--ink);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

.site-header .shell,
.workspace-header .shell {
  min-height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-lockup {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-signal {
  width: 0.58rem;
  height: 0.58rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 0.28rem rgba(0, 113, 227, 0.1);
}

.wordmark,
.app-wordmark {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wordmark:hover,
.app-wordmark:hover {
  color: var(--ink);
}

.wordmark span {
  color: var(--muted);
  font-weight: 450;
}

.site-nav,
.site-nav-links {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.15rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.site-nav a,
.site-nav-links a {
  padding: 0.55rem 0.68rem;
  border-radius: 999px;
  color: #424245;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav-links a:hover {
  background: rgba(0, 0, 0, 0.045);
  color: var(--ink);
}

.theme-toggle {
  width: 2.25rem;
  min-height: 2.25rem;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  box-shadow: none;
}

.theme-toggle:hover {
  border-color: rgba(20, 124, 229, 0.3);
  background: #fff;
  color: var(--blue-dark);
}

.theme-icon {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.theme-icon-moon,
:root[data-theme="dark"] .theme-icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-icon-moon {
  display: block;
}

.site-footer {
  margin-top: clamp(4rem, 8vw, 7rem);
  border-top: 1px solid var(--line);
  background: var(--paper-deep);
  color: var(--muted);
}

.site-footer .shell {
  min-height: 6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  font-size: 0.76rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.site-footer a {
  color: #424245;
  text-decoration: none;
}

.eyebrow,
.page-kicker,
.publication-meta,
.article-publication,
.offer-publication {
  margin-bottom: 1rem;
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.welcome {
  min-height: calc(100svh - 9.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(18rem, 0.65fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: center;
  padding-block: clamp(5rem, 12vw, 10rem);
}

.welcome-copy h1,
.page-intro h1,
.article-head h1,
.offer-layout h1 {
  max-width: 17ch;
  margin-bottom: 0;
  font-size: clamp(3rem, 6.5vw, 6rem);
  font-weight: 650;
  line-height: 0.98;
  letter-spacing: -0.065em;
  text-wrap: balance;
}

.welcome .overview,
.page-intro .lede {
  max-width: 46rem;
  margin: 1.6rem 0 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  letter-spacing: -0.025em;
  line-height: 1.45;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.75rem;
}

.system-panel,
.purchase-panel,
.reader-gate,
.create-card,
.account-panel {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-lg);
  background: var(--paper-raised);
  box-shadow: var(--shadow-md);
}

.system-panel {
  align-self: center;
  overflow: hidden;
}

.system-panel > p,
.article-rail > p {
  margin: 0;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.system-panel dl,
.article-rail dl,
.offer-terms,
.settings-readonly {
  margin: 0;
}

.system-panel dl div,
.article-rail dl div,
.offer-terms div,
.settings-readonly div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.system-panel dt,
.article-rail dt,
.offer-terms dt,
.settings-readonly dt {
  color: var(--muted);
}

.system-panel dd,
.article-rail dd,
.offer-terms dd,
.settings-readonly dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

.system-panel > a,
.article-rail > a {
  display: block;
  padding: 1rem 1.1rem;
  font-size: 0.82rem;
  font-weight: 550;
  text-decoration: none;
}

.page-intro {
  padding: clamp(5rem, 10vw, 8rem) 0 clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 3.25rem 0 1rem;
  border-bottom: 1px solid var(--line-strong);
}

.section-head h2 {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.record-list,
.offer-list,
.publication-list,
.document-list,
.media-library,
.revision-history ol,
.scope-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.record {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) minmax(10rem, auto);
  gap: 1.5rem;
  align-items: start;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--line);
}

.record-number,
.record-meta,
.registry-latest {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.record h3 {
  margin: 0;
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
}

.record h3 a {
  color: var(--ink);
  text-decoration: none;
}

.record h3 a:hover {
  color: var(--blue);
}

.record p {
  max-width: var(--measure);
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.record-meta {
  text-align: right;
}

.registry-latest span {
  color: var(--blue);
  font-weight: 600;
}

.empty,
.workspace-empty {
  padding: 2.5rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  text-align: center;
}

.empty h2,
.workspace-empty h2 {
  margin-bottom: 0.5rem;
}

.empty p:last-child,
.workspace-empty p:last-child {
  margin-bottom: 0;
}

.lifecycle {
  display: grid;
  grid-template-columns: minmax(13rem, 0.55fr) minmax(0, 1fr);
  gap: clamp(3rem, 8vw, 8rem);
  padding: clamp(3.5rem, 7vw, 6rem) 0;
  border-bottom: 1px solid var(--line);
}

.lifecycle h2 {
  margin-bottom: 0.8rem;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
}

.lifecycle-summary,
.about-copy {
  color: var(--muted);
}

.about-copy {
  max-width: var(--measure);
  font-size: 1.05rem;
  line-height: 1.7;
}

.article-page {
  padding-block: clamp(2.5rem, 6vw, 5rem);
}

.article-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12rem, 18rem);
  gap: 1.2rem 4rem;
  padding-bottom: clamp(1.75rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
}

.article-publication,
.article-head h1,
.article-head .summary {
  grid-column: 1;
}

.article-head .summary {
  max-width: 48rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.5;
}

.article-meta {
  grid-column: 2;
  grid-row: 1 / span 3;
  display: grid;
  align-content: end;
  gap: 0.4rem;
  margin: 0;
  padding-left: 1.25rem;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.article-grid {
  display: grid;
  grid-template-columns: minmax(0, var(--measure)) minmax(14rem, 18rem);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
  padding-top: clamp(1.75rem, 4vw, 3rem);
}

.article-body {
  font-size: clamp(1.05rem, 1.4vw, 1.15rem);
  line-height: 1.75;
}

.article-body p {
  margin-bottom: 1.5em;
}

/* Rich Markdown shared by published documents, gated previews, offers, and the editor. */
.markdown-content {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
}

.markdown-content > :first-child {
  margin-top: 0;
}

.markdown-content > :last-child {
  margin-bottom: 0;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
  margin: 1.8em 0 0.65em;
  color: var(--ink);
  line-height: 1.18;
  text-wrap: balance;
}

.markdown-content h1 {
  font-size: 2em;
}

.markdown-content h2 {
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--line);
  font-size: 1.55em;
}

.markdown-content h3 {
  font-size: 1.3em;
}

.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
  font-size: 1em;
}

.markdown-content p,
.markdown-content ul,
.markdown-content ol,
.markdown-content blockquote,
.markdown-content pre,
.markdown-content table,
.markdown-content details {
  margin-block: 1.15em;
}

.markdown-content ul,
.markdown-content ol {
  padding-left: 1.5em;
}

.markdown-content li {
  margin-block: 0.38em;
  padding-left: 0.18em;
}

.markdown-content li > ul,
.markdown-content li > ol {
  margin-block: 0.35em;
}

.markdown-content blockquote {
  padding: 0.15em 0 0.15em 1.15em;
  border-left: 0.22em solid var(--blue);
  color: var(--muted);
}

.markdown-content blockquote > :first-child,
.markdown-content blockquote > :last-child {
  margin-block: 0;
}

.markdown-content code,
.markdown-content kbd {
  border: 1px solid var(--line);
  border-radius: 0.38em;
  background: var(--paper-deep);
  font: 0.88em/1.5 var(--mono);
}

.markdown-content code {
  padding: 0.12em 0.36em;
}

.markdown-content kbd {
  padding: 0.12em 0.42em;
  box-shadow: 0 1px 0 var(--line-strong);
}

.markdown-content pre {
  max-width: 100%;
  padding: 1em 1.1em;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #202124;
  color: #f5f5f7;
  tab-size: 2;
}

.markdown-content pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 0.88em;
}

.markdown-content a {
  color: var(--blue-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.markdown-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5em auto;
  border-radius: var(--radius-sm);
}

.markdown-content table {
  width: 100%;
  display: block;
  overflow-x: auto;
  border-spacing: 0;
  border-collapse: collapse;
  font-size: 0.92em;
}

.markdown-content th,
.markdown-content td {
  min-width: 8rem;
  padding: 0.65em 0.8em;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.markdown-content th {
  background: var(--paper-deep);
  font-weight: 650;
}

.markdown-content hr {
  margin-block: 2.25em;
  border: 0;
  border-top: 1px solid var(--line-strong);
}

.markdown-content input[type="checkbox"] {
  width: 1em;
  min-height: 1em;
  margin: 0 0.45em 0 -1.4em;
}

.markdown-content details {
  padding: 0.8em 1em;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.markdown-content summary {
  font-weight: 650;
  cursor: pointer;
}

.article-rail {
  position: sticky;
  top: 5rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-raised);
  box-shadow: var(--shadow-sm);
  font-size: 0.78rem;
}

.gate-preview {
  position: relative;
  max-height: 25rem;
  margin-top: 3rem;
  overflow: hidden;
}

.gate-preview::after {
  position: absolute;
  inset: auto 0 0;
  height: 9rem;
  background: linear-gradient(transparent, var(--paper));
  content: "";
}

.reader-gate {
  max-width: var(--measure);
  margin-top: 2rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.reader-gate h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.offer-layout {
  min-height: calc(100svh - 9.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 26rem);
  gap: clamp(3rem, 9vw, 9rem);
  align-items: center;
  padding-block: clamp(4rem, 9vw, 8rem);
}

.offer-description {
  max-width: var(--measure);
  margin-top: 1.75rem;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
  white-space: pre-wrap;
}

.purchase-panel {
  padding: 1.5rem;
}

.purchase-panel h2 {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.price {
  margin: 1.25rem 0 1.5rem;
  font-size: clamp(2.25rem, 5vw, 3rem);
  font-weight: 650;
  letter-spacing: -0.05em;
  line-height: 1;
}

.notice,
.status,
.workspace-notice {
  padding: 0.9rem 1rem;
  border: 1px solid #b8d9f7;
  border-radius: var(--radius-sm);
  background: #edf7ff;
  color: #17486f;
}

.offer-copy .notice {
  margin-top: 1.5rem;
}

/* Authentication and MCP consent */
.auth-layout {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(20rem, 0.85fr) minmax(24rem, 1.15fr);
  background: var(--paper-raised);
}

.auth-context {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(2rem, 6vw, 5rem);
  background: #1d1d1f;
  color: #f5f5f7;
}

.auth-context .app-wordmark,
.mobile-app-header .app-wordmark {
  color: #fff;
}

.auth-context > div {
  max-width: 32rem;
}

.auth-context h2 {
  margin-bottom: 1.25rem;
  color: #f5f5f7;
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  line-height: 0.98;
}

.auth-context p:not(.eyebrow),
.auth-context > a:last-child {
  color: #b6b6bb;
}

.auth-main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}

.auth-main > header {
  min-height: 3.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
}

.auth-main > header strong {
  color: var(--ink);
}

.auth-panel {
  width: min(100% - 3rem, 32rem);
  margin: auto;
  padding-block: 3rem;
}

.create-card,
.account-panel {
  padding: clamp(1.5rem, 4vw, 2.25rem);
}

.create-card h1,
.account-panel h1 {
  overflow-wrap: anywhere;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
}

.workspace-main {
  padding-block: clamp(3rem, 8vw, 6rem);
}

.workspace-main .create-card {
  margin-inline: auto;
}

.scope-list {
  display: grid;
  gap: 0.6rem;
  margin-block: 1.25rem;
}

.scope-list li {
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

/* Workspace shell */
.app-shell {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 14.5rem minmax(0, 1fr);
  background: var(--paper);
  font-size: 0.9rem;
}

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 14.5rem;
  display: flex;
  flex-direction: column;
  padding: 0.7rem 0.55rem;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: #424245;
}

.app-identity {
  display: grid;
  gap: 0.25rem;
  padding: 0.3rem 0.55rem 0.65rem;
  border-bottom: 1px solid var(--line);
}

.app-identity span {
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.publication-switcher {
  position: relative;
  margin: 0.65rem 0 0;
}

.publication-switcher summary {
  position: relative;
  display: grid;
  gap: 0.1rem;
  padding: 0.75rem 2rem 0.75rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  list-style: none;
  cursor: pointer;
}

.publication-switcher summary::-webkit-details-marker {
  display: none;
}

.publication-switcher summary::after {
  position: absolute;
  top: 50%;
  right: 0.8rem;
  color: var(--muted);
  content: "+";
  font-size: 1rem;
  transform: translateY(-50%);
}

.publication-switcher[open] summary::after {
  content: "-";
}

.publication-switcher summary small {
  color: var(--muted);
}

.publication-switcher ul {
  margin: 0.4rem 0 0;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow-md);
  list-style: none;
}

.publication-switcher li a,
.switcher-all {
  display: grid;
  padding: 0.6rem 0.7rem;
  border-radius: 0.55rem;
  color: #424245;
  text-decoration: none;
}

.publication-switcher li a:hover,
.publication-switcher li a.selected-publication,
.switcher-all:hover {
  background: var(--paper);
  color: var(--ink);
}

.publication-switcher li a.selected-publication {
  font-weight: 600;
}

.switcher-all {
  margin-top: 0.35rem;
  border: 1px solid var(--line);
  font-size: 0.78rem;
  text-align: center;
}

.publication-nav {
  display: grid;
  gap: 0.15rem;
  margin-top: 0.65rem;
}

.publication-nav .nav-group {
  display: grid;
  gap: 0.1rem;
  margin-top: 0.45rem;
}

.publication-nav .nav-group > p {
  margin: 0 0 0.2rem;
  padding: 0 0.65rem;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.publication-nav a,
.app-sidebar .text-button {
  min-height: 2.4rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.65rem;
  color: #424245;
  font-size: 0.82rem;
  text-decoration: none;
}

.navigation-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.publication-switcher summary,
.publication-switcher li a,
.switcher-all,
.mobile-publication-nav a,
.dashboard-links a,
.publication-name {
  align-items: center;
  gap: 0.6rem;
}

.publication-switcher summary,
.publication-switcher li a,
.switcher-all,
.mobile-publication-nav a {
  display: flex;
}

.publication-switcher li a > span {
  min-width: 0;
  display: grid;
}

.publication-nav a:hover,
.app-sidebar .text-button:hover,
.publication-nav a[aria-current="page"] {
  background: #e9e9ed;
  color: var(--ink);
}

.publication-nav a[aria-current="page"] {
  color: var(--blue-dark);
  font-weight: 600;
}

.publication-nav .view-live {
  justify-content: center;
  margin-top: 0.8rem;
  border: 1px solid var(--line);
  background: #fff;
}

.app-topbar form,
.mobile-more form {
  margin: 0;
}

.app-content {
  grid-column: 2;
  min-width: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  position: sticky;
  z-index: 15;
  top: 0;
  min-height: 3.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(245, 245, 247, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

.app-topbar > div:first-child {
  min-width: 0;
  display: grid;
  gap: 0.05rem;
}

.app-topbar > div:first-child strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-topbar span {
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.app-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.app-topbar-actions a,
.app-topbar-actions .text-button {
  min-height: 2.2rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  text-decoration: none;
}

.role-indicator {
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.mobile-app-header,
.mobile-publication-nav {
  display: none;
}

.workspace-page {
  width: min(100% - 2rem, 76rem);
  flex: 1;
  margin-inline: auto;
  padding-block: clamp(1.25rem, 3vw, 2rem) 2.5rem;
}

.editor-workspace-page {
  width: calc(100% - 1.5rem);
  max-width: none;
}

.workspace-title {
  max-width: 50rem;
  padding-bottom: 1rem;
}

.workspace-title h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  text-wrap: balance;
}

.workspace-title > p:last-child {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.workspace-title-row,
.editor-header,
.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.new-post-link {
  flex: 0 0 auto;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 0 0 1.5rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  box-shadow: var(--shadow-sm);
}

.summary-strip > div,
.summary-strip > a {
  display: grid;
  gap: 0.25rem;
  padding: 1.3rem;
  background: #fff;
}

.summary-strip > a {
  color: var(--ink);
  text-decoration: none;
}

.summary-strip > a:hover {
  background: #fafafa;
}

.summary-strip strong {
  font-size: 1.65rem;
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1;
}

.summary-strip span {
  color: var(--muted);
  font-size: 0.75rem;
}

.workspace-section,
.workspace-form-section,
.post-editor-form,
.post-preview,
.editor-actions,
.revision-history {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.workspace-section,
.workspace-form-section {
  margin-top: 0.7rem;
  padding: 1rem;
}

.workspace-form-section {
  max-width: 54rem;
}

.workspace-section h2,
.workspace-form-section h2,
.section-title h2 {
  margin: 0;
  font-size: 1.02rem;
}

.section-title p {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
}

.dashboard-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.dashboard-links a {
  display: grid;
  gap: 0.25rem;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.dashboard-links a:hover {
  border-color: rgba(0, 113, 227, 0.35);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.dashboard-links span {
  color: var(--muted);
  font-size: 0.8rem;
}

.publication-list,
.document-list,
.workspace-page > section[aria-label="Posts"],
.workspace-page > section[aria-label="Pages"] {
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.publication-row,
.document-list > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, auto);
  gap: 2rem;
  align-items: center;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

.publication-row:last-child,
.document-list > li:last-child {
  border-bottom: 0;
}

.publication-row:hover,
.document-list > li:hover {
  background: #fafafa;
}

.publication-name,
.document-list h2 {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.publication-row p,
.document-list p {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.publication-row-meta,
.document-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.status-label,
.visibility-pill,
.relationship-pill {
  display: inline-flex;
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #515154;
  font-size: 0.65rem;
  font-weight: 650;
  line-height: 1;
  text-transform: uppercase;
}

.visibility-pill {
  border-color: #b8d9f7;
  background: #edf7ff;
  color: #17486f;
}

.relationship-pill {
  border-color: #b7ddcd;
  background: #eef8f3;
  color: #17603f;
}

.media-library {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.media-library li {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.media-library li > strong,
.media-library li > p {
  display: block;
  padding-inline: 0.7rem;
}

.media-library li > strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-library p {
  margin: 0.4rem 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.media-thumbnail {
  display: block;
  aspect-ratio: 4 / 3;
  margin-bottom: 0.65rem;
  overflow: hidden;
  border-radius: 0.65rem;
  background: var(--paper-deep);
}

.media-upload {
  position: relative;
}

.media-upload summary {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  list-style: none;
}

.media-upload summary::-webkit-details-marker {
  display: none;
}

.media-upload[open] form {
  position: absolute;
  z-index: 5;
  top: 2.5rem;
  right: 0;
  width: min(24rem, calc(100vw - 3rem));
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow-lg);
}

.media-thumbnail img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 220ms ease;
}

.media-thumbnail:hover img {
  transform: scale(1.02);
}

/* Forms and editor */
form {
  margin-top: 1rem;
}

label {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.7rem;
  color: #424245;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

input,
textarea,
select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.7rem;
  background: #fff;
  color: var(--ink);
  font: 400 0.92rem/1.4 var(--sans);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

input:hover,
textarea:hover,
select:hover {
  border-color: #77777c;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
  outline: 0;
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

input:disabled,
textarea:disabled,
select:disabled,
input:read-only {
  border-color: var(--line);
  background: var(--paper);
  color: var(--muted);
  cursor: not-allowed;
}

input[type="radio"],
input[type="checkbox"] {
  accent-color: var(--blue);
}

form > button,
form > .button {
  margin-top: 1rem;
}

.split,
.navigation-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.navigation-form {
  grid-template-columns: minmax(10rem, 1fr) 6rem auto;
  align-items: end;
  padding-top: 0.5rem;
}

.navigation-form button,
.document-meta form,
.document-meta form button,
.app-topbar form,
.app-topbar form button {
  margin: 0;
}

.editor-header {
  align-items: end;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
}

.editor-header-actions,
.editor-layout-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
}

.mobile-editor-preview {
  display: none;
}

.rail-toggle {
  min-height: 2.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.5rem 0.7rem;
}

.rail-toggle svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.rail-toggle.is-collapsed {
  border-color: var(--blue);
  color: var(--blue-dark);
}

.editor-header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.editor-back,
.editor-save-status {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.editor-save-status {
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.editor-save-status[data-save-state="saved"] {
  border-color: #b7ddcd;
  color: var(--green);
}

.editor-save-status[data-save-state="dirty"],
.editor-save-status[data-save-state="saving"] {
  border-color: #e3c77c;
  color: var(--amber);
}

.editor-save-status[data-save-state="error"],
.editor-save-status[data-save-state="conflict"] {
  border-color: #e4b4af;
  color: var(--red);
}

.post-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 25rem);
  gap: 0.75rem;
  align-items: start;
  margin-top: 0.75rem;
}

.post-editor-form,
.post-preview,
.editor-actions,
.revision-history {
  margin: 0;
  padding: 0.8rem;
}

.body-editor {
  min-height: 28rem;
  margin-top: 0;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-family: var(--mono);
  font-size: 0.84rem;
  line-height: 1.65;
}

.markdown-editor {
  margin-top: 1rem;
}

.rich-editor {
  margin-top: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper-raised);
}

.rich-editor .markdown-toolbar {
  position: sticky;
  z-index: 4;
  top: 3.25rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: color-mix(in srgb, var(--paper-raised) 90%, transparent);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.rich-editor-canvas {
  min-height: max(34rem, 68svh);
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 6vw, 5rem);
  background: var(--paper-raised);
  cursor: text;
  font-size: clamp(1rem, 1.25vw, 1.12rem);
  line-height: 1.75;
  outline: 0;
}

.rich-editor-canvas:focus {
  box-shadow: inset 0 0 0 2px var(--blue);
}

.rich-editor-canvas > h1:first-child {
  margin: 0 0 0.08em;
  border: 0;
  font-size: clamp(2.4rem, 6vw, 4.75rem);
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.rich-editor-summary {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.45;
}

.rich-editor-summary + * {
  margin-top: 0;
}

.rich-editor-canvas [data-placeholder]:empty::before {
  color: var(--line-strong);
  content: attr(data-placeholder);
  pointer-events: none;
}

.rich-editor-status {
  margin: 0;
  padding: 0.45rem 0.65rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
}

.markdown-editor > label {
  margin-bottom: 0.45rem;
}

.markdown-toolbar {
  display: flex;
  gap: 0.15rem;
  padding: 0.3rem;
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--paper);
  scrollbar-width: thin;
}

.markdown-toolbar button {
  width: 2.75rem;
  min-height: 2.75rem;
  flex: 0 0 auto;
  margin: 0;
  padding: 0.35rem;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  font-size: 0.7rem;
}

.markdown-toolbar svg {
  width: 1.375rem;
  height: 1.375rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.markdown-toolbar button:hover,
.markdown-toolbar button:focus-visible {
  border-color: var(--line);
  background: var(--paper-raised);
  color: var(--ink);
}

.editor-fields-section,
.editor-advanced,
.editor-actions,
.revision-history {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}

.editor-actions,
.revision-history {
  border-top-color: rgba(0, 0, 0, 0.08);
}

.editor-fields-section h2,
.editor-actions h2,
.revision-history h2 {
  font-size: 0.95rem;
}

.visibility-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin: 0.7rem 0;
  padding: 0;
  border: 0;
}

.visibility-options legend {
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 650;
  text-transform: uppercase;
}

.visibility-option {
  position: relative;
  margin: 0;
}

.visibility-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.visibility-option span {
  min-height: 5.5rem;
  display: grid;
  align-content: start;
  gap: 0.4rem;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  cursor: pointer;
}

.visibility-option input:checked + span {
  border-color: var(--blue);
  background: #edf7ff;
  box-shadow: inset 0 0 0 1px var(--blue);
}

.visibility-option input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.visibility-option small {
  font-weight: 400;
}

.public-access-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 0.9rem;
}

.public-access-fields label:last-child {
  grid-column: 1 / -1;
}

.editor-advanced summary,
.workspace-section details summary {
  padding: 0.75rem 0;
  font-weight: 600;
  cursor: pointer;
}

.seo-panel > summary {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.seo-panel-content {
  display: grid;
  gap: 0.9rem;
  padding-bottom: 0.3rem;
}

.seo-search-preview {
  display: grid;
  gap: 0.2rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

.seo-search-preview small {
  overflow: hidden;
  color: var(--green);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seo-search-preview strong {
  color: var(--blue-dark);
  font-size: 1.05rem;
  font-weight: 500;
}

.seo-search-preview p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.seo-checks,
.seo-generation,
.seo-generation button {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.seo-checks span {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.7rem;
}

.seo-checks span[data-state="ready"] {
  border-color: #b7ddcd;
  color: var(--green);
}

.seo-generation {
  align-items: flex-start;
}

.seo-generation button svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.seo-generation > p {
  min-height: 1.5rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
}

[data-seo-suggestions] {
  width: 100%;
  display: grid;
  gap: 0.55rem;
}

[data-seo-suggestions][hidden] {
  display: none;
}

.seo-suggestion {
  display: grid;
  gap: 0.45rem;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

.seo-suggestion p {
  margin: 0;
  font-size: 0.78rem;
}

.editor-recovery-controls,
.editor-actions > div,
.preview-toolbar,
.preview-toolbar > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.editor-recovery-controls[hidden] {
  display: none;
}

.post-preview {
  position: sticky;
  top: 5rem;
}

.preview-toolbar {
  justify-content: space-between;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}

.preview-label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.preview-toolbar button {
  min-height: 2rem;
  margin: 0;
  padding: 0.4rem 0.6rem;
  border-color: var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 0.7rem;
}

.preview-toolbar button[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.preview-frame {
  margin-top: 0.9rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  transition: max-width 180ms ease;
}

.preview-frame-mobile {
  max-width: 22rem;
  margin-inline: auto;
}

.preview-frame h2 {
  font-size: 1.4rem;
}

.preview-summary,
.preview-body,
.preview-frame dl {
  color: var(--muted);
  font-size: 0.8rem;
}

.preview-frame dl div,
.revision-history li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--line);
}

.preview-body.markdown-content {
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.65;
}

.preview-body[data-preview-state="stale"]::before {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--red);
  content: "Preview could not refresh. The last safe render is shown.";
  font-size: 0.72rem;
}

@media (min-width: 801px) {
  .app-shell[data-left-rail="collapsed"] {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-shell[data-left-rail="collapsed"] .app-sidebar {
    display: none;
  }

  .app-shell[data-left-rail="collapsed"] .app-content {
    grid-column: 1;
  }
}

@media (min-width: 1001px) {
  .editor-app-shell[data-right-rail="collapsed"] .post-editor-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.editor-app-shell[data-right-rail="collapsed"] .post-preview {
  display: none;
}

.preview-frame dd {
  margin: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

.revision-history li {
  grid-template-columns: 1fr auto auto;
  font-size: 0.76rem;
}

.offer-list > li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.offer-list > li:last-child {
  border-bottom: 0;
}

.offer-list > li > div {
  display: grid;
}

.payment-status,
.settings-readonly {
  margin-top: 1rem;
}

.payment-status .ready,
.ready {
  color: var(--green);
  font-weight: 600;
}

.verification-controls fieldset {
  display: grid;
  gap: 0.7rem;
  margin: 1.25rem 0;
  padding: 0;
  border: 0;
}

.verification-controls fieldset label {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  margin: 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

.verification-controls fieldset input {
  width: auto;
  min-height: 0;
}

.verification-history {
  display: grid;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.verification-history li {
  display: grid;
  grid-template-columns: minmax(9rem, 0.8fr) minmax(12rem, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.verification-history li > div:first-child,
.verification-artifact {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.verification-history p {
  margin: 0;
}

.verification-history .status {
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  font-size: 0.65rem;
}

.account-page {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: var(--paper);
}

.account-panel {
  width: min(100%, 34rem);
}

.mobile-more {
  position: relative;
}

.mobile-more summary {
  padding: 0.55rem 0.7rem;
  border-radius: 999px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.mobile-more summary::-webkit-details-marker {
  display: none;
}

.mobile-more[open] > div {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.45rem);
  right: 0;
  width: min(19rem, calc(100vw - 1.5rem));
  display: grid;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.mobile-more[open] a,
.mobile-more[open] .text-button {
  padding: 0.65rem;
  border-radius: 0.55rem;
  color: #424245;
  text-decoration: none;
}

.mobile-more[open] a:hover,
.mobile-more[open] .text-button:hover {
  background: var(--paper);
}

.mobile-more form,
.mobile-more .text-button {
  width: 100%;
}

@media (max-width: 1000px) {
  .post-editor-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .post-preview {
    position: static;
  }

  .article-grid {
    grid-template-columns: minmax(0, 1fr) 15rem;
    gap: 3rem;
  }
}

@media (max-width: 800px) {
  [data-toggle-left-rail] {
    display: none;
  }

  .mobile-editor-preview {
    display: inline-flex;
  }

  .shell,
  .narrow {
    width: min(calc(100% - 1.5rem), var(--shell));
  }

  .site-header .shell {
    min-height: 3.5rem;
    gap: 0.75rem;
  }

  .site-nav {
    min-width: 0;
    max-width: 68vw;
    justify-content: flex-start;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav-links {
    justify-content: flex-start;
  }

  .welcome,
  .offer-layout,
  .auth-layout,
  .lifecycle,
  .article-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .welcome {
    min-height: auto;
    gap: 3rem;
    padding-block: 4.5rem 2rem;
  }

  .system-panel {
    width: 100%;
    max-width: 32rem;
  }

  .article-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .article-meta {
    grid-column: 1;
    grid-row: auto;
    padding: 1rem 0 0;
    border: 0;
    border-top: 1px solid var(--line);
  }

  .article-rail {
    position: static;
  }

  .auth-context {
    min-height: 20rem;
    padding: 2rem;
  }

  .auth-context h2 {
    font-size: clamp(2.3rem, 10vw, 3.5rem);
  }

  .auth-main {
    min-height: 30rem;
  }

  .app-shell {
    display: block;
  }

  .app-sidebar,
  .app-topbar {
    display: none;
  }

  .app-content {
    min-width: 0;
  }

  .mobile-app-header {
    min-height: 3.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 0.8rem;
    background: #1d1d1f;
    color: #fff;
  }

  .mobile-app-header > a:not(.app-wordmark) {
    color: #fff;
  }

  .mobile-app-header .publication-switcher {
    width: min(13rem, 52vw);
    margin: 0;
  }

  .mobile-header-actions {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.45rem;
  }

  .mobile-app-header .user-menu > summary {
    border-color: #454549;
    background: #2c2c2e;
    color: #fff;
  }

  .mobile-app-header .publication-switcher summary {
    border-color: #454549;
    background: #2c2c2e;
    color: #fff;
  }

  .mobile-publication-nav {
    position: sticky;
    z-index: 12;
    top: 0;
    display: flex;
    gap: 0.15rem;
    padding: 0.45rem 0.75rem;
    overflow-x: auto;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(250, 250, 252, 0.88);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
  }

  .mobile-publication-nav > a,
  .mobile-more summary,
  .mobile-publication-nav .text-button {
    min-height: 2.35rem;
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.7rem;
    border-radius: 999px;
    color: #424245;
    font-size: 0.78rem;
    text-decoration: none;
    white-space: nowrap;
  }

  .mobile-publication-nav > a[aria-current="page"] {
    background: var(--ink);
    color: #fff;
  }

  .workspace-page {
    width: min(100% - 1.5rem, 74rem);
    padding-block: 2rem 3rem;
  }

  .publication-row,
  .document-list > li {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.8rem;
  }

  .publication-row-meta,
  .document-meta {
    justify-content: flex-start;
  }

  .visibility-options,
  .public-access-fields,
  .dashboard-links {
    grid-template-columns: minmax(0, 1fr);
  }

  .public-access-fields label:last-child {
    grid-column: auto;
  }

  .verification-history li {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .site-header .brand-signal {
    display: none;
  }

  .wordmark span {
    display: none;
  }

  .welcome-copy h1,
  .page-intro h1,
  .article-head h1,
  .offer-layout h1 {
    font-size: clamp(2.5rem, 13vw, 3.7rem);
  }

  .site-nav a,
  .site-nav-links a {
    padding-inline: 0.55rem;
  }

  .record {
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0.85rem;
  }

  .record-meta {
    grid-column: 2;
    text-align: left;
  }

  .summary-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .workspace-title-row,
  .editor-header,
  .section-title {
    display: grid;
    gap: 0.9rem;
  }

  .new-post-link {
    width: 100%;
  }

  .split,
  .navigation-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .revision-history li {
    grid-template-columns: 1fr auto;
  }

  .revision-history time {
    grid-column: 1 / -1;
  }

  .site-footer .shell {
    min-height: 7rem;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
  }
}

/* Apple-like public surfaces adapted from the mari-os Swift layout. */
.apple-hold {
  width: min(calc(100% - 3rem), 61.25rem);
  margin-inline: auto;
}

.public-shell {
  background: var(--paper-raised);
}

.public-shell .site-header {
  min-height: 3rem;
  padding: 0;
  background: color-mix(in srgb, var(--paper-raised) 82%, transparent);
}

.public-shell .site-header .shell {
  width: min(calc(100% - 2rem), 61.25rem);
  min-height: 3rem;
}

.public-shell .site-footer .shell {
  width: min(calc(100% - 3rem), 61.25rem);
}

.public-shell .site-nav-links {
  flex-wrap: nowrap;
  padding: 0;
}

.public-shell .site-nav-links a {
  min-height: 2rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.72rem;
}

.public-menu {
  display: none;
}

.public-menu > summary {
  list-style: none;
}

.public-menu > summary::-webkit-details-marker {
  display: none;
}

.public-menu > summary svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.apple-hero {
  overflow: hidden;
  padding: clamp(5rem, 11vw, 8rem) 0 0;
  background: #0b0b0d;
  text-align: center;
}

.apple-hero .apple-hold {
  display: grid;
  justify-items: center;
}

.apple-hero .eyebrow {
  margin-bottom: 0.4rem;
  color: #2997ff;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  letter-spacing: 0.011em;
  text-transform: none;
}

.apple-hero h1 {
  max-width: 14ch;
  margin: 0;
  color: #f5f5f7;
  font-size: clamp(2.5rem, 4.2vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.07143;
  text-wrap: balance;
}

.apple-hero .overview {
  max-width: 38rem;
  margin: 1.5rem 0 0;
  color: #f5f5f7;
  font-size: clamp(1.3rem, 2vw, 1.75rem);
  letter-spacing: 0.004em;
  line-height: 1.10722;
}

.apple-hero .actions {
  justify-content: center;
  margin-top: 1.7rem;
}

.publication-stage {
  width: min(100%, 54rem);
  min-height: 28rem;
  margin-top: clamp(3.5rem, 8vw, 6rem);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  border-bottom: 0;
  border-radius: 1.4rem 1.4rem 0 0;
  background: #fff;
  color: #1d1d1f;
  box-shadow: 0 2.5rem 6rem rgba(0, 0, 0, 0.13);
  text-align: left;
}

.stage-toolbar {
  height: 3rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 245, 247, 0.86);
}

.stage-toolbar span {
  width: 4.5rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--paper-deep);
}

.stage-toolbar strong {
  font-size: 0.72rem;
  font-weight: 600;
}

.stage-toolbar i {
  width: 1.5rem;
  height: 1.5rem;
  justify-self: end;
  border-radius: 50%;
  background: var(--blue);
}

.publication-stage article {
  width: min(100% - 3rem, 38rem);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5rem) 0;
}

.publication-stage article > p:first-child {
  margin-bottom: 0.75rem;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.publication-stage h2 {
  max-width: 13ch;
  margin-bottom: 1rem;
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 600;
  color: #1d1d1f;
  letter-spacing: -0.055em;
}

.publication-stage article > p:nth-child(3) {
  max-width: 31rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.publication-stage article > div {
  height: 0.65rem;
  margin-top: 0.75rem;
  border-radius: 999px;
  background: var(--paper-deep);
}

.publication-stage article > div:nth-last-child(2) {
  width: 82%;
}

.publication-stage article > div:last-child {
  width: 58%;
}

.apple-band {
  padding-block: clamp(4.5rem, 10vw, 8rem);
}

.apple-band-dark {
  background: #000;
  color: #f5f5f7;
}

.apple-band-dark h2 {
  max-width: 18ch;
  margin: 0;
  color: #f5f5f7;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.apple-band-dark .eyebrow {
  color: #a1a1a6;
}

.apple-hero.apple-band-dark .eyebrow {
  color: #2997ff;
}

.apple-band-dark .publication-stage h2 {
  color: #1d1d1f;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}

.apple-capabilities h2 {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.apple-capabilities .eyebrow {
  color: var(--blue);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  letter-spacing: 0.011em;
  text-transform: none;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: clamp(3rem, 7vw, 5rem);
  background: var(--line);
}

.capability-grid article {
  padding: 1.5rem 1.5rem 1.5rem 0;
  background: var(--paper);
}

.capability-grid strong {
  font-size: 1.15rem;
}

.capability-grid p {
  max-width: 16rem;
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.2381;
}

.apple-band-light {
  background: var(--paper);
}

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

.apple-callout h2 {
  max-width: 17ch;
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.apple-page-intro,
.publication-intro {
  padding: clamp(5rem, 11vw, 8rem) 0 clamp(3rem, 7vw, 5rem);
  border-bottom: 0;
  background: var(--paper);
}

.apple-page-intro h1,
.publication-intro h1 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(2.5rem, 4.2vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.07143;
}

.apple-page-intro .lede,
.publication-intro .lede {
  max-width: 40rem;
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
}

.public-index {
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

.public-index .section-head {
  padding-top: 2.5rem;
}

.public-index .record {
  grid-template-columns: 2.25rem minmax(0, 1fr) auto;
  padding-block: 1.6rem;
}

.public-index .record h3 {
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
}

.apex-shell {
  background: #000;
  color: #f5f5f7;
}

.apex-landing {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.25rem, 4vw, 3rem);
}

.apex-landing .wordmark,
.apex-landing h1 {
  color: #f5f5f7;
}

.apex-landing > div {
  width: min(100%, 61.25rem);
  margin-inline: auto;
}

.apex-landing h1 {
  margin: 0;
  font-size: clamp(2.5rem, 4.2vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.07143;
}

.apex-landing > div > p:last-child,
.apex-landing > span {
  color: #a1a1a6;
}

.article-shell .article-page {
  padding-top: clamp(4rem, 9vw, 7rem);
}

.article-shell .article-head {
  grid-template-columns: minmax(0, 1fr);
  max-width: 50rem;
  gap: 0.9rem;
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

.article-shell .article-head h1 {
  max-width: 14ch;
  font-size: clamp(2.5rem, 4.2vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.07143;
}

.article-shell .article-meta {
  grid-column: 1;
  grid-row: auto;
  display: flex;
  gap: 1rem;
  padding: 0;
  border: 0;
}

.article-shell .article-grid {
  grid-template-columns: minmax(0, 43rem) minmax(13rem, 16rem);
  justify-content: space-between;
}

.article-shell .article-body {
  font-size: clamp(1.05rem, 1.5vw, 1.18rem);
}

.offer-shell {
  background: var(--paper);
}

.offer-shell .purchase-panel {
  border-radius: 1.25rem;
}

.offer-shell .offer-copy h1 {
  font-weight: 600;
}

.platform-shell .page-intro,
.platform-shell .lifecycle {
  width: min(calc(100% - 3rem), 61.25rem);
}

.platform-shell .page-intro h1 {
  font-size: clamp(2.5rem, 4.2vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.07143;
}

@media (max-width: 800px) {
  .apple-hold {
    width: min(calc(100% - 1.5rem), 61.25rem);
  }

  .public-shell .site-nav-links {
    display: none;
  }

  .public-shell .site-nav:has(.public-menu) > .account-menu {
    display: none;
  }

  .public-menu {
    display: block;
  }

  .public-menu .dropdown-content {
    right: 0;
    width: min(18rem, calc(100vw - 1rem));
    padding: 0.5rem;
    border: 1px solid var(--line);
  }

  .public-menu .dropdown-content a {
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-field, 0.5rem);
    color: var(--ink);
    text-decoration: none;
  }

  .capability-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .capability-grid article {
    padding: 1.25rem 0;
  }

  .apple-callout {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-index .record {
    grid-template-columns: 2rem minmax(0, 1fr);
  }

  .public-index .record-meta {
    grid-column: 2;
    text-align: left;
  }

  .article-shell .article-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* DaisyUI application surfaces */
.user-menu {
  position: relative;
}

.user-menu > summary {
  width: 2.35rem;
  min-height: 2.35rem;
  list-style: none;
}

.user-menu > summary::-webkit-details-marker {
  display: none;
}

.user-menu > summary svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.user-menu-panel {
  position: absolute;
  z-index: 50;
  top: calc(100% + 0.45rem);
  right: 0;
  width: min(18rem, calc(100vw - 1rem));
  display: none;
  padding: 0.45rem;
  border: 1px solid var(--line);
  color: var(--ink);
}

.user-menu[open] .user-menu-panel {
  display: grid;
}

.user-menu-identity {
  padding: 0.65rem;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-panel > a,
.user-menu-panel .rail-toggle,
.user-menu-panel .text-button,
.user-menu-appearance {
  width: 100%;
  min-height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  margin: 0;
  padding: 0.55rem 0.65rem;
  border: 0;
  border-radius: var(--radius-field, 0.5rem);
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: normal;
  text-decoration: none;
  text-transform: none;
}

.user-menu-panel > a:hover,
.user-menu-panel .rail-toggle:hover,
.user-menu-panel .text-button:hover {
  background: var(--paper-deep);
  color: var(--ink);
}

.user-menu-panel .rail-toggle.is-collapsed {
  color: var(--ink);
}

.user-menu-panel form {
  width: 100%;
  margin: 0;
}

.user-menu-appearance {
  justify-content: space-between;
}

.app-topbar .user-menu-panel span,
.user-menu-appearance > span {
  color: inherit;
  font-size: inherit;
  letter-spacing: normal;
  text-transform: none;
}

.account-menu {
  position: relative;
}

.account-menu > summary {
  width: 2.35rem;
  min-height: 2.35rem;
  list-style: none;
}

.account-menu > summary::-webkit-details-marker {
  display: none;
}

.account-menu > summary svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.account-menu-panel {
  position: absolute;
  z-index: 50;
  top: calc(100% + 0.45rem);
  right: 0;
  width: min(14rem, calc(100vw - 1rem));
  display: none;
  padding: 0.45rem;
  border: 1px solid var(--line);
  color: var(--ink);
}

.account-menu[open] .account-menu-panel {
  display: grid;
}

.account-menu-panel > a,
.account-menu-panel .text-button,
.account-menu-appearance {
  width: 100%;
  min-height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  margin: 0;
  padding: 0.55rem 0.65rem;
  border: 0;
  border-radius: var(--radius-field, 0.5rem);
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
}

.account-menu-panel > a:hover,
.account-menu-panel .text-button:hover {
  background: var(--paper-deep);
  color: var(--ink);
}

.account-menu-panel form {
  margin: 0;
}

.account-menu-appearance {
  justify-content: space-between;
}

.editor-app-shell .app-topbar {
  min-height: 3rem;
  padding-inline: 0.75rem;
}

.editor-workspace-page {
  width: 100%;
  min-height: calc(100svh - 3rem);
  margin: 0;
  padding: 0;
}

.editor-workspace-page .editor-header {
  min-height: 3.1rem;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid var(--line);
}

.editor-workspace-page .editor-back,
.editor-workspace-page .editor-save-status {
  margin: 0;
}

.editor-workspace-page .post-editor-layout {
  gap: 0;
  align-items: stretch;
  min-height: calc(100svh - 6.1rem);
  margin: 0;
}

.editor-workspace-page .post-editor-layout > div:first-child {
  min-width: 0;
}

.editor-workspace-page .post-editor-form {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--paper-raised);
  box-shadow: none;
}

.editor-workspace-page .rich-editor {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: var(--paper-raised);
}

.editor-workspace-page .rich-editor .markdown-toolbar {
  top: 3rem;
  justify-content: center;
  min-height: 3.35rem;
  padding: 0.3rem 0.75rem;
}

.editor-workspace-page .markdown-toolbar .btn {
  width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  border-radius: var(--radius-field, 0.5rem);
}

.editor-workspace-page .rich-editor-canvas {
  width: min(100%, 62rem);
  min-height: calc(100svh - 9rem);
  margin-inline: auto;
  padding: clamp(2rem, 6vw, 5.5rem) clamp(1.25rem, 8vw, 7rem);
  box-shadow: none;
}

.editor-workspace-page .rich-editor-canvas:focus {
  box-shadow: none;
}

.editor-workspace-page .rich-editor-status {
  width: min(100% - 2rem, 48rem);
  margin-inline: auto;
  border: 0;
  text-align: center;
}

.editor-workspace-page .post-preview {
  min-height: calc(100svh - 6.1rem);
  padding: 0.75rem;
  border-width: 0 0 0 1px;
  border-radius: 0;
  box-shadow: none;
}

.editor-workspace-page .editor-actions,
.editor-workspace-page .revision-history {
  width: min(100% - 2rem, 48rem);
  margin: 1rem auto;
}

:root {
  --swift-text-primary: #1d1d1f;
  --swift-text-secondary: #6e6e73;
  --swift-text-inverse: #f5f5f7;
  --swift-paper: #ffffff;
  --swift-ink: #0b0b0d;
  --swift-hair: #d2d2d7;
  --swift-hold: 980px;
  --swift-weight-regular: 400;
  --swift-weight-semibold: 600;
  --swift-nav-size: 12px;
  --swift-nav-line: 1.33337;
  --swift-nav-track: -0.01em;
  --swift-hero-title-size: clamp(40px, 4.2vw, 56px);
  --swift-hero-title-line: 1.07143;
  --swift-hero-title-track: -0.035em;
  --swift-hero-subtitle-size: clamp(21px, 2vw, 28px);
  --swift-hero-subtitle-line: 1.10722;
  --swift-hero-subtitle-track: 0.004em;
  --swift-cta-size: 17px;
  --swift-cta-line: 1.23536;
  --swift-cta-track: -0.022em;
  --swift-footer-size: 12px;
  --swift-footer-line: 1.33337;
  --swift-footer-track: -0.01em;
}

.swift-page {
  min-height: 100svh;
  margin: 0;
  background: var(--swift-paper);
  color: var(--swift-text-primary);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: var(--swift-weight-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.swift-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--swift-paper) 82%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--swift-hair) 60%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
}

.swift-nav-inner {
  max-width: var(--swift-hold);
  height: 48px;
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 0 auto;
  padding: 0 22px;
}

.swift-nav-brand {
  color: var(--swift-text-primary);
  font-size: 17px;
  font-weight: var(--swift-weight-semibold);
  letter-spacing: -0.022em;
  text-decoration: none;
}

.swift-nav-links {
  display: flex;
  gap: 1.75rem;
  margin-left: auto;
}

.swift-nav-link {
  color: rgb(0 0 0 / 80%);
  font-size: var(--swift-nav-size);
  font-weight: var(--swift-weight-regular);
  letter-spacing: var(--swift-nav-track);
  line-height: var(--swift-nav-line);
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms;
}

.swift-nav-link:hover {
  color: var(--swift-text-primary);
}

.swift-band {
  padding: clamp(4.5rem, 11vw, 9rem) 22px;
}

.swift-band-dark {
  background: var(--swift-ink);
  color: var(--swift-paper);
}

.swift-hold {
  max-width: var(--swift-hold);
  margin: 0 auto;
}

.swift-center {
  text-align: center;
}

.swift-eyebrow {
  margin: 0 0 6px;
  color: inherit;
  font-size: 21px;
  font-weight: var(--swift-weight-semibold);
  letter-spacing: 0.011em;
  line-height: 1.19048;
}

.swift-hero-title {
  margin: 0;
  color: var(--swift-text-primary);
  font-size: var(--swift-hero-title-size);
  font-weight: var(--swift-weight-semibold);
  letter-spacing: var(--swift-hero-title-track);
  line-height: var(--swift-hero-title-line);
}

.swift-lede {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--swift-text-primary);
  font-size: var(--swift-hero-subtitle-size);
  font-weight: var(--swift-weight-regular);
  letter-spacing: var(--swift-hero-subtitle-track);
  line-height: var(--swift-hero-subtitle-line);
}

.swift-center .swift-lede {
  max-width: 560px;
  margin-right: auto;
  margin-left: auto;
}

.swift-band-dark .swift-hero-title,
.swift-band-dark .swift-lede {
  color: var(--swift-text-inverse);
}

.swift-cta {
  display: inline-block;
  margin-top: 16px;
  padding: 12px 22px;
  border-radius: 980px;
  background: var(--swift-ink);
  color: var(--swift-paper);
  font-size: var(--swift-cta-size);
  font-weight: var(--swift-weight-regular);
  letter-spacing: var(--swift-cta-track);
  line-height: var(--swift-cta-line);
  text-decoration: none;
  transition: opacity 160ms;
}

.swift-page .swift-cta:hover {
  color: var(--swift-paper);
  opacity: 0.85;
}

.swift-auth-page {
  background: #f5f5f7;
}

.swift-auth-page main {
  min-height: calc(100svh - 48px);
}

.swift-auth-band {
  min-height: calc(100svh - 48px);
  display: grid;
  place-items: center;
  padding: clamp(2rem, 8vw, 5rem) 22px;
}

.swift-auth-panel {
  width: min(100%, 28rem);
}

.swift-auth-panel .swift-eyebrow {
  color: var(--swift-text-secondary);
}

.swift-auth-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(100%, 22rem);
  margin: 28px auto 0;
}

.swift-provider-button {
  min-height: 48px;
  display: grid;
  grid-template-columns: 24px 1fr 24px;
  align-items: center;
  padding: 11px 18px;
  border: 1px solid var(--swift-ink);
  border-radius: 980px;
  font-size: 17px;
  font-weight: var(--swift-weight-medium, 500);
  letter-spacing: var(--swift-cta-track);
  line-height: var(--swift-cta-line);
  text-decoration: none;
  transition: opacity 160ms;
}

.swift-provider-button span {
  grid-column: 2;
}

.swift-provider-apple,
.swift-page .swift-provider-apple:hover {
  background: var(--swift-ink);
  color: var(--swift-paper);
}

.swift-provider-google,
.swift-page .swift-provider-google:hover {
  background: var(--swift-paper);
  color: var(--swift-ink);
}

.swift-provider-button:hover {
  opacity: 0.82;
}

.swift-provider-icon {
  width: 22px;
  height: 22px;
}

.swift-auth-fine {
  margin: 18px 0 0;
  color: var(--swift-text-secondary);
  font-size: var(--swift-nav-size);
  letter-spacing: var(--swift-nav-track);
  line-height: var(--swift-nav-line);
}

.swift-footer {
  border-top: 1px solid var(--swift-hair);
  background: var(--swift-text-inverse);
  color: #424245;
  font-size: var(--swift-footer-size);
  font-weight: var(--swift-weight-regular);
  letter-spacing: var(--swift-footer-track);
  line-height: var(--swift-footer-line);
}

.swift-footer-inner {
  max-width: var(--swift-hold);
  margin: 0 auto;
  padding: 1.25rem 22px;
}

.swift-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.swift-footer-copy,
.site-footer > .swift-footer-copy {
  width: min(100% - 44px, var(--swift-hold));
  margin: 0 auto;
  padding: 1rem 0;
  border-top: 1px solid var(--swift-hair);
  color: #424245;
  font-size: var(--swift-footer-size);
  font-weight: var(--swift-weight-regular);
  letter-spacing: var(--swift-footer-track);
  line-height: var(--swift-footer-line);
}

.account-details {
  display: grid;
  margin: 0.75rem 0;
  border-block: 1px solid var(--line);
}

.account-details > div {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}

.account-details > div:last-child {
  border: 0;
}

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

.account-details dd {
  overflow-wrap: anywhere;
}

@media (max-width: 800px) {
  .editor-app-shell .mobile-app-header {
    background: var(--paper-raised);
    color: var(--ink);
  }

  .editor-app-shell .mobile-app-header .app-wordmark {
    color: var(--ink);
  }

  .editor-app-shell .mobile-publication-nav {
    display: none;
  }

  .editor-workspace-page {
    min-height: calc(100svh - 3.75rem);
  }

  .editor-workspace-page .rich-editor .markdown-toolbar {
    top: 3.75rem;
    justify-content: flex-start;
  }

  .account-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    padding-top: 3rem;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #1c1c1e;
  --paper-raised: #262629;
  --paper-deep: #161618;
  --ink: #f2f2f4;
  --muted: #aaaab0;
  --blue: #64a8f2;
  --blue-dark: #87bcf5;
  --green: #70c99b;
  --red: #ff8a80;
  --amber: #e7be69;
  --line: #3a3a3e;
  --line-strong: #55555b;
  --focus: rgba(100, 168, 242, 0.48);
  --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.14);
  --shadow-md: 0 18px 48px rgba(0, 0, 0, 0.22);
}

:root[data-theme="dark"] .site-header,
:root[data-theme="dark"] .workspace-header,
:root[data-theme="dark"] .app-topbar,
:root[data-theme="dark"] .mobile-publication-nav {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(28, 28, 30, 0.82);
}

:root[data-theme="dark"] .site-nav a,
:root[data-theme="dark"] .site-nav-links a,
:root[data-theme="dark"] .site-footer a,
:root[data-theme="dark"] .publication-nav a,
:root[data-theme="dark"] .app-sidebar .text-button,
:root[data-theme="dark"] .publication-row-meta,
:root[data-theme="dark"] .document-meta {
  color: #c7c7cc;
}

:root[data-theme="dark"] .site-nav a:hover,
:root[data-theme="dark"] .site-nav-links a:hover,
:root[data-theme="dark"] .publication-nav a:hover,
:root[data-theme="dark"] .app-sidebar .text-button:hover,
:root[data-theme="dark"] .publication-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

:root[data-theme="dark"] .theme-toggle,
:root[data-theme="dark"] .role-indicator,
:root[data-theme="dark"] .app-sidebar,
:root[data-theme="dark"] .publication-switcher ul,
:root[data-theme="dark"] .publication-nav .view-live,
:root[data-theme="dark"] .summary-strip > div,
:root[data-theme="dark"] .summary-strip > a,
:root[data-theme="dark"] .workspace-section,
:root[data-theme="dark"] .workspace-form-section,
:root[data-theme="dark"] .post-editor-form,
:root[data-theme="dark"] .post-preview,
:root[data-theme="dark"] .editor-actions,
:root[data-theme="dark"] .revision-history,
:root[data-theme="dark"] .publication-list,
:root[data-theme="dark"] .document-list,
:root[data-theme="dark"] .workspace-page > section[aria-label="Posts"],
:root[data-theme="dark"] .workspace-page > section[aria-label="Pages"],
:root[data-theme="dark"] .dashboard-links a,
:root[data-theme="dark"] .media-library li,
:root[data-theme="dark"] input,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] select,
:root[data-theme="dark"] .preview-toolbar button,
:root[data-theme="dark"] .mobile-more[open] > div {
  background: var(--paper-raised);
  color: var(--ink);
}

:root[data-theme="dark"] .system-panel,
:root[data-theme="dark"] .purchase-panel,
:root[data-theme="dark"] .reader-gate,
:root[data-theme="dark"] .create-card,
:root[data-theme="dark"] .account-panel,
:root[data-theme="dark"] .article-rail {
  border-color: rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"] .publication-row:hover,
:root[data-theme="dark"] .document-list > li:hover,
:root[data-theme="dark"] .summary-strip > a:hover {
  background: rgba(255, 255, 255, 0.035);
}

:root[data-theme="dark"] .notice,
:root[data-theme="dark"] .status,
:root[data-theme="dark"] .workspace-notice,
:root[data-theme="dark"] .visibility-option input:checked + span {
  border-color: #315f8d;
  background: #20364d;
  color: #b8dafa;
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --muted: #4b4b4f;
    --line: #8a8a8f;
    --line-strong: #3a3a3c;
  }

  .site-header,
  .workspace-header,
  .app-topbar,
  .mobile-publication-nav {
    background: #fff;
  }
}
