:root {
  color-scheme: dark;
  --radius: 16px;
  font-family: Inter, Arial, Helvetica, sans-serif;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
header {
  height: 82px;
  padding: 0 max(24px, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 44px;
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 10;
  backdrop-filter: blur(10px);
}
.brand {
  font-size: 27px;
  letter-spacing: -1.5px;
  font-weight: 800;
  white-space: nowrap;
}
.brand span {
  color: var(--accent);
}
header nav {
  display: flex;
  gap: 26px;
  align-items: center;
  flex: 1;
}
header nav a {
  font-size: 14px;
  color: var(--muted);
}
header nav a.active,
header nav a:hover {
  color: var(--text);
}
header .account {
  display: flex;
  gap: 12px;
  align-items: center;
}
.avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-weight: bold;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  background: var(--accent);
  color: var(--text);
  border: 1px solid var(--accent);
}
.btn.secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}
.btn.subtle {
  background: var(--panel2);
  border-color: var(--panel2);
  color: var(--text);
}
.btn.danger {
  background: transparent;
  border-color: var(--bad);
  color: var(--bad);
}
.btn:hover {
  filter: brightness(1.12);
}
.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 44px 24px 80px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2.3px;
  font-weight: bold;
  color: var(--accent);
  text-transform: uppercase;
  margin: 0 0 18px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 42px;
  letter-spacing: -1.8px;
  line-height: 1.14;
  margin-bottom: 18px;
}
h2 {
  font-size: 25px;
  letter-spacing: -0.6px;
}
h3 {
  font-size: 18px;
  line-height: 1.4;
}
p {
  color: var(--muted);
}
.hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 34px 0 52px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 36px;
}
.hero h1 {
  font-size: 66px;
  letter-spacing: -3.5px;
  max-width: 650px;
}
.hero h1 span {
  color: var(--accent);
}
.hero p {
  max-width: 480px;
  font-size: 17px;
}
.hero-visual {
  position: relative;
  height: 310px;
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
}
.visual-stack {
  width: 255px;
  height: 285px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px;
  background: var(--panel);
  transform: rotate(-7deg);
  box-shadow: var(--shadow);
}
.visual-stack .number {
  font-size: 78px;
  line-height: 1.1;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -6px;
}
.visual-stack .rule {
  height: 1px;
  background: var(--panel);
  margin: 20px 0;
}
.visual-tag {
  position: absolute;
  bottom: 14px;
  left: 12px;
  background: var(--panel2);
  border: 1px solid var(--line);
  padding: 13px 20px;
  border-radius: 6px;
  font-size: 13px;
  box-shadow: var(--shadow);
}
.row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.between {
  justify-content: space-between;
}
.muted {
  color: var(--muted);
}
.tiny {
  font-size: 12px;
}
.accent {
  color: var(--accent);
}
.toolbar {
  display: flex;
  gap: 12px;
  margin: 24px 0;
}
.toolbar input {
  flex: 1;
}
.chips {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin: 16px 0 28px;
}
.chip,
.pill {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text);
  background: transparent;
}
.chip {
  min-height: 38px;
  cursor: pointer;
}
.chip.active {
  border-color: var(--accent);
  color: var(--good);
  background: var(--accent-soft);
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition:
    transform 0.2s,
    border-color 0.2s;
}
.card:hover {
  border-color: var(--line);
  transform: translateY(-3px);
}
.card-cover {
  height: 160px;
  background: var(--panel);
  padding: 0;
  position: relative;
  overflow: hidden;
}
.card-cover:after {
  content: none;
  position: absolute;
  width: 160px;
  height: 160px;
  right: -30px;
  bottom: -40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: var(--shadow);
}
.cover-glyph {
  font-size: 60px;
  font-weight: bold;
  color: var(--accent);
  letter-spacing: -5px;
  line-height: 1.3;
}
.card-body {
  padding: 24px;
}
.card-body p {
  font-size: 14px;
  min-height: 44px;
}
.card-bottom {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.price {
  font-size: 19px;
  font-weight: 700;
}
.empty {
  padding: 50px 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
  margin: 22px 0;
}
.empty h3 {
  margin-bottom: 10px;
}
.empty p {
  max-width: 540px;
  margin: 0 auto 20px;
}
.feature {
  border-top: 1px solid var(--line);
  padding: 24px 0;
}
.feature b {
  display: block;
  font-size: 16px;
  margin: 12px 0;
}
.feature p {
  font-size: 14px;
}
.feature .num {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}
.space-top {
  margin-top: 48px;
}
.layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 40px;
}
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-self: start;
  position: sticky;
  top: 110px;
}
.sidebar a {
  padding: 12px 15px;
  border-radius: 5px;
  color: var(--muted);
  font-size: 14px;
}
.sidebar a.active {
  background: var(--accent-soft);
  color: var(--good);
  border-left: 2px solid var(--accent);
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 22px;
}
.panel h3 {
  margin-bottom: 18px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0;
}
.stat {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 22px;
  border-radius: 8px;
}
.stat .value {
  font-size: 30px;
  letter-spacing: -1px;
  margin: 8px 0;
  color: var(--text);
  font-weight: 700;
}
.stat .label {
  font-size: 13px;
  color: var(--muted);
}
label {
  display: block;
  font-size: 14px;
  margin-bottom: 18px;
}
input,
select,
textarea {
  display: block;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--text);
  padding: 11px 13px;
  width: 100%;
  margin-top: 7px;
  min-height: 46px;
}
textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.65;
}
input[type='checkbox'] {
  display: inline;
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin: 0 8px 0 0;
  accent-color: var(--accent);
}
input[type='file'] {
  padding: 12px;
  font-size: 13px;
}
.field-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  display: block;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}
.full {
  grid-column: 1/-1;
}
.notice {
  border-left: 3px solid var(--accent);
  padding: 14px 18px;
  background: var(--accent-soft);
  margin: 18px 0;
  font-size: 14px;
  color: var(--text);
}
.error {
  color: var(--bad);
  padding: 12px 0;
  white-space: pre-wrap;
}
.success {
  color: var(--good);
}
.summary-line {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  gap: 20px;
}
.summary-line.total {
  font-size: 20px;
  border: 0;
  font-weight: bold;
}
.auth {
  max-width: 460px;
  margin: 24px auto;
}
.auth h1 {
  font-size: 32px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  text-align: left;
  font-weight: 500;
  color: var(--muted);
}
td,
th {
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
td:first-child,
th:first-child {
  padding-left: 0;
}
td .btn {
  white-space: nowrap;
}
td small {
  display: block;
  color: var(--muted);
}
.status {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
  background: var(--panel2);
  color: var(--text);
  white-space: nowrap;
}
.status.paid,
.status.clean,
.status.published,
.status.done {
  background: var(--good-soft);
  color: var(--good);
}
.status.error,
.status.rejected,
.status.blocked {
  background: var(--bad-soft);
  color: var(--bad);
}
.reading {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 40px;
}
.reading .outline {
  align-self: start;
  position: sticky;
  top: 110px;
}
.outline a {
  display: block;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--muted);
  border-left: 2px solid var(--line);
}
.outline a.active {
  border-color: var(--accent);
  color: var(--text);
  background: var(--accent-soft);
}
.reader-body {
  font-size: 18px;
  line-height: 1.85;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.reader-body img,
.media img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 16px auto;
}
.media video {
  width: 100%;
  max-height: 650px;
  background: #000;
  border-radius: 5px;
}
.watermark {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  margin: 15px 0;
}
.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 40px;
}
.purchase-panel {
  position: sticky;
  top: 110px;
  align-self: start;
}
.purchase-panel .price {
  font-size: 36px;
}
.purchase-panel .btn {
  width: 100%;
  margin-top: 16px;
}
.lesson-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.lesson-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 14px;
}
.lesson-list li span {
  color: var(--accent);
  font-size: 13px;
  padding-top: 4px;
}
.stepper {
  display: flex;
  gap: 6px;
  margin: 24px 0;
}
.stepper button {
  flex: 1;
  border: 0;
  border-bottom: 2px solid var(--line);
  padding: 12px 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}
.stepper button.active {
  color: var(--accent);
  border-color: var(--accent);
}
.editor-step[hidden] {
  display: none;
}
.lesson-edit {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px;
  margin: 18px 0;
}
.lesson-edit h3 {
  margin-bottom: 12px;
}
.note {
  font-size: 13px;
  color: var(--muted);
}
.loading {
  padding: 80px;
  text-align: center;
  color: var(--muted);
}
footer {
  max-width: 1240px;
  margin: auto;
  padding: 35px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 30px;
}
footer p {
  font-size: 12px;
  margin: 0;
  flex: 1;
}
footer nav {
  display: flex;
  gap: 20px;
  font-size: 12px;
  align-items: center;
}
dialog {
  width: min(540px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  padding: 30px;
  max-height: 85vh;
  overflow: auto;
}
dialog::backdrop {
  background: #000b;
  backdrop-filter: blur(4px);
}
.close {
  float: right;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 26px;
  width: 40px;
  height: 40px;
}
.dialog-content {
  clear: both;
}
.break {
  overflow-wrap: anywhere;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 13px 22px;
  z-index: 30;
  max-width: 90vw;
  display: none;
  font-size: 14px;
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 20px;
  top: 10px;
  z-index: 100;
  background: var(--panel);
  padding: 12px;
}
.hidden {
  display: none !important;
}
.narrow {
  max-width: 820px;
}
.rule-page p,
.rule-page li {
  color: var(--text);
}
.link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}
@media (max-width: 950px) {
  header {
    gap: 24px;
    padding: 0 24px;
  }
  header nav {
    gap: 16px;
  }
  .hero {
    gap: 25px;
  }
  .hero h1 {
    font-size: 50px;
  }
  .hero-visual {
    transform: scale(0.85);
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .layout {
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 20px;
  }
  .product-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 24px;
  }
  .stats {
    grid-template-columns: 1fr;
  }
  .stat .value {
    font-size: 25px;
  }
  .reading {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 24px;
  }
}
@media (max-width: 680px) {
  header {
    height: auto;
    min-height: 76px;
    padding: 15px 18px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .brand {
    font-size: 25px;
  }
  header .account {
    margin-left: auto;
  }
  header nav {
    order: 3;
    width: 100%;
    flex: none;
    overflow: auto;
    gap: 25px;
    padding-top: 8px;
  }
  header nav a {
    white-space: nowrap;
  }
  .page {
    padding: 28px 18px 50px;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 16px 0 28px;
    gap: 0;
  }
  .hero h1 {
    font-size: 47px;
    letter-spacing: -2.5px;
  }
  .hero-visual {
    display: none;
  }
  .hero p {
    font-size: 15px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .grid.features {
    gap: 0;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .toolbar input {
    min-width: 180px;
  }
  h1 {
    font-size: 32px;
  }
  .layout {
    display: block;
  }
  .sidebar {
    position: static;
    flex-direction: row;
    overflow: auto;
    margin-bottom: 24px;
  }
  .sidebar a {
    white-space: nowrap;
  }
  .panel {
    padding: 20px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .product-layout {
    display: flex;
    flex-direction: column-reverse;
  }
  .purchase-panel {
    position: static;
  }
  .reading {
    display: block;
  }
  .reading .outline {
    position: static;
    margin-bottom: 28px;
  }
  .outline nav {
    max-height: 180px;
    overflow: auto;
  }
  .reader-body {
    font-size: 17px;
  }
  .stepper {
    flex-wrap: wrap;
  }
  .stepper button {
    min-width: 25%;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 16px;
  }
  footer {
    flex-wrap: wrap;
    gap: 14px;
  }
  footer nav {
    width: 100%;
    justify-content: space-between;
  }
  footer p {
    font-size: 11px;
  }
  .card-cover {
    height: 140px;
  }
  .auth {
    margin-top: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.telegram-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
}
.telegram-link svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
  flex-shrink: 0;
}
.messages {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 24px 0;
}
.message {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  max-width: 92%;
  overflow-wrap: anywhere;
}
.message.staff {
  align-self: flex-end;
  border-color: var(--line);
  background: var(--panel);
}
.message p {
  margin-bottom: 0;
}
.conversation-card {
  display: block;
  margin-top: 14px;
  color: inherit;
  text-decoration: none;
}
.audit-json {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 500px;
  overflow: auto;
}
#draft-state {
  min-height: 20px;
}

/* 0.4 — responsive cabinets and author workflow */
[hidden] {
  display: none !important;
}
main {
  min-height: 65vh;
}
section,
article,
.account {
  min-width: 0;
}
h1,
h2,
h3,
.tag,
.notification {
  overflow-wrap: anywhere;
}
header {
  gap: 24px;
}
header nav {
  gap: 18px;
}
.notification-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}
[data-unread]:not(:empty) {
  position: absolute;
  right: -5px;
  top: 0;
  background: var(--accent);
  color: var(--text);
  border-radius: 20px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: bold;
}
.card-cover,
.product-cover {
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
  background: var(--panel2);
  height: auto;
}
.card-cover img,
.product-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.card-cover .pill,
.product-cover .pill {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--panel);
}
.product-cover {
  border-radius: 12px;
  margin-bottom: 24px;
}
.cover-preview {
  display: block;
  width: 100%;
  max-width: 640px;
  aspect-ratio: 16/9;
  object-fit: contain;
  background: var(--panel2);
  border-radius: 8px;
  margin: 16px 0;
}
.cover-file-row,
.task-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.cover-file-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.tag {
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 30px;
  font-size: 13px;
}
.tag:hover {
  background: var(--accent-soft);
}
.card-tags {
  padding: 0 22px;
}
progress {
  accent-color: var(--accent);
  width: 100%;
  height: 7px;
  display: block;
  margin: 10px 0;
}
.notification.unread {
  border-left: 3px solid var(--accent);
}
.stepper {
  overflow-x: auto;
  gap: 8px;
  scrollbar-width: thin;
}
.stepper button {
  min-height: 44px;
  flex-shrink: 0;
  padding: 10px 14px;
}
.editor-step {
  scroll-margin-top: 100px;
}
.form-error:not(:empty) {
  padding: 12px;
  border: 1px solid var(--bad);
  border-radius: 6px;
  margin-top: 16px;
}
input[type='file'] {
  max-width: 100%;
  padding: 12px;
  font-size: 14px;
}
input[type='file']::file-selector-button {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px;
  margin-right: 12px;
}
@media (max-width: 1100px) {
  header {
    height: auto;
    min-height: 82px;
    flex-wrap: wrap;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 12px;
  }
  header nav {
    order: 3;
    flex-basis: 100%;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 4px;
  }
  header .account {
    margin-left: auto;
  }
}
@media (max-width: 680px) {
  .page {
    padding: 24px 16px;
  }
  header {
    position: relative;
    padding: 12px 16px;
  }
  header nav {
    display: flex;
    gap: 18px;
  }
  header nav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  header .account {
    gap: 8px;
    flex-wrap: wrap;
  }
  input,
  select,
  textarea {
    font-size: 16px;
  }
  .sidebar {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    white-space: nowrap;
    gap: 8px;
    position: static;
  }
  .sidebar a {
    flex: 0 0 auto;
    min-height: 44px;
  }
  .product-layout,
  .layout,
  .reading,
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .purchase-panel {
    position: static;
  }
  .purchase-panel > .btn {
    width: 100%;
  }
  .task-card,
  .cover-file-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .stepper {
    margin-inline: -16px;
    padding-inline: 16px;
  }
  .table-wrap {
    max-width: 100%;
  }
  .stats {
    grid-template-columns: minmax(0, 1fr);
  }
  .stat {
    padding: 20px;
  }
  .loading {
    padding: 48px 16px;
  }
  dialog {
    padding: 20px;
    max-height: calc(100dvh - 32px);
  }
  footer {
    flex-wrap: wrap;
  }
  .outline {
    position: static;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}

/* 0.5: living editorial design; all motion respects reduced-motion. */
body {
  background: var(--bg);
}
.hero {
  position: relative;
  isolation: isolate;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--panel);
  pointer-events: none;
}
.visual-stack {
  box-shadow: var(--shadow);
  animation: float-card 8s ease-in-out infinite;
}
.visual-tag {
  animation: float-card 8s ease-in-out infinite reverse;
}
.card,
.discovery-card {
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}
.card:hover,
.discovery-card:hover {
  transform: translateY(-4px);
  border-color: var(--line);
  box-shadow: var(--shadow);
}
.card-cover img {
  transition: transform 0.45s ease;
}
.card:hover .card-cover img {
  transform: scale(1.025);
}
.btn {
  transition:
    background 0.18s ease,
    box-shadow 0.18s ease;
}
.btn:not(.secondary):hover {
  box-shadow: var(--shadow);
}
.page {
  animation: page-in 0.28s ease both;
}
.discovery {
  padding: 24px 0 52px;
  border-top: 1px solid var(--line);
}
.discovery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.discovery-card {
  display: flex;
  gap: 22px;
  padding: 28px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.discovery-number {
  color: var(--accent);
  font-size: 24px;
  font-weight: 700;
}
.discovery-card h3 {
  margin-top: 0;
}
.discovery-card p {
  font-size: 14px;
}
.reader-shell {
  --paper: #1b1b1b;
  --ink: #e6e3de;
  --reader-muted: #b9bbae;
  --reader-line: #3d3933;
  background: #141414;
  color: var(--ink);
  padding-bottom: 32px;
}
.reader-shell.reader-light {
  --paper: #fff;
  --ink: #242424;
  --reader-muted: #5b5b55;
  --reader-line: #d6d6d6;
  background: #f0f1f3;
  color-scheme: dark;
}
.reader-shell.reader-warm {
  --paper: #f4ecd9;
  --ink: #382f24;
  --reader-muted: #5f594e;
  --reader-line: #d5c8b0;
  background: #e8dfcd;
  color-scheme: dark;
}
.reader-topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding-block: 22px;
}
.reader-tools {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.reader-tools label {
  font-size: 12px;
  margin: 0;
}
.reader-tools select {
  min-height: 44px;
  min-width: 100px;
  margin: 4px 0 0;
}
.reading {
  padding-top: 10px;
  align-items: start;
}
.reading-paper {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--reader-line);
  border-radius: 16px;
  padding: 40px;
  min-width: 0;
  box-shadow: var(--shadow);
}
.reader-shell .reader-body {
  color: var(--ink);
  font-size: var(--reader-font, 18px);
  line-height: 1.9;
  max-width: 72ch;
  margin: 30px auto;
  overflow-wrap: anywhere;
}
.reader-size-16 {
  --reader-font: 16px;
}
.reader-size-18 {
  --reader-font: 18px;
}
.reader-size-20 {
  --reader-font: 20px;
}
.reader-size-22 {
  --reader-font: 22px;
}
.reader-size-24 {
  --reader-font: 24px;
}
.reader-shell p,
.reader-shell .muted,
.reader-byline {
  color: var(--reader-muted);
}
.reader-shell .eyebrow,
.reader-shell .link {
  color: var(--accent);
}
.reader-dark .eyebrow,
.reader-dark .link {
  color: var(--accent);
}
.reader-shell .panel,
.reader-shell input,
.reader-shell select,
.reader-shell textarea,
.reader-shell .btn.secondary {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--reader-line);
}
.reader-shell .outline a {
  color: var(--ink);
  border-radius: 6px;
  padding: 12px;
}
.reader-shell .outline a.active {
  color: var(--ink);
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
}
.reader-shell .outline h3 {
  line-height: 1.4;
}
.reader-byline {
  font-size: 13px;
  margin-top: -10px;
}
.reader-notes summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 32px;
}
.reader-notes form {
  margin-top: 16px;
}
.document-viewer {
  margin-top: 28px;
  padding: 18px;
}
.document-toolbar {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.document-toolbar label {
  font-size: 12px;
  margin: 0;
}
.document-toolbar select {
  min-height: 44px;
  margin: 4px 0 0;
}
.document-scroll {
  overflow: auto;
  max-height: 80vh;
  background: var(--panel);
  border: 1px solid var(--reader-line);
}
.document-sheet {
  width: 100%;
  position: relative;
  margin: 0;
  min-height: 180px;
}
.document-sheet img {
  display: block;
  width: 100%;
  height: auto;
}
.zoom-125 .document-sheet {
  width: 125%;
}
.zoom-150 .document-sheet {
  width: 150%;
}
.document-watermark {
  position: absolute;
  bottom: 18px;
  right: 10px;
  padding: 5px 9px;
  background: #111a;
  color: #fff;
  font-size: 11px;
  pointer-events: none;
}
.video-speed {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.video-speed select {
  width: auto;
  margin: 0;
}
/* Imported documents inherit the selected reader theme. */
.imported-document {
  min-width: 0;
  max-width: 100%;
  margin-block: 24px;
  overflow-wrap: anywhere;
}
.imported-prose {
  font-size: var(--reader-font, 18px);
  line-height: 1.8;
}
.imported-prose .import-paragraph,
.imported-prose blockquote {
  white-space: pre-wrap;
  color: var(--ink, var(--text));
}
.imported-prose h4 {
  margin-block: 24px 12px;
  font-size: 1.2em;
  color: var(--ink, var(--text));
}
.import-warnings {
  padding: 12px;
  margin-bottom: 20px;
  border: 1px solid var(--reader-line, var(--line));
  border-radius: 8px;
  color: var(--ink, var(--text));
  font-size: 14px;
}
.import-warnings summary {
  cursor: pointer;
  min-height: 32px;
  font-weight: 600;
}
.import-grid {
  max-height: 520px;
  max-width: 100%;
  margin-block: 16px;
  border: 1px solid var(--reader-line, var(--line));
  overscroll-behavior: contain;
}
.import-grid table {
  font-size: 15px;
  line-height: 1.6;
}
.import-grid td,
.import-grid th {
  min-width: 100px;
  max-width: 360px;
  padding: 12px;
  color: var(--ink, var(--text));
  border-color: var(--reader-line, var(--line));
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.import-grid th:first-child {
  min-width: 52px;
}
.import-grid thead th {
  position: sticky;
  top: 0;
  background: var(--paper, var(--bg));
  font-weight: 600;
}
.imported-document .document-toolbar label {
  flex: 1 1 180px;
}
.imported-document .document-toolbar input,
.imported-document .btn {
  min-height: 44px;
}
.reader-shell .imported-document .tiny {
  color: var(--reader-muted);
}
.reader-focus > header,
.reader-focus > footer {
  display: none;
}
.reader-focus .outline {
  display: none;
}
.reader-focus .reading {
  grid-template-columns: minmax(0, 900px);
  justify-content: center;
}
@keyframes float-card {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -8px;
  }
}
@keyframes page-in {
  from {
    opacity: 0.35;
    translate: 0 7px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}
@media (max-width: 900px) {
  .discovery-grid {
    grid-template-columns: 1fr;
  }
  .discovery-card {
    padding: 22px;
  }
  .reading-paper {
    padding: 24px;
  }
  .reader-topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 680px) {
  .reading-paper {
    padding: 22px 16px;
    border-radius: 10px;
  }
  .reader-tools {
    width: 100%;
  }
  .reader-tools label {
    flex: 1;
  }
  .reader-tools select {
    width: 100%;
  }
  .document-toolbar {
    gap: 8px;
  }
  .document-viewer {
    padding: 12px;
  }
  .reader-next .btn {
    width: 100%;
  }
  .reader-shell .outline {
    display: block;
  }
  .reader-focus .outline {
    display: none;
  }
  .reader-topbar {
    padding-bottom: 0;
  }
  .discovery {
    padding-bottom: 30px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Native article studio: one typography system for editor preview and reading. */
.article-editor {
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  color: var(--text);
  overflow: hidden;
}
.article-editor-top {
  padding: 24px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: space-between;
  background: var(--panel2);
  border-bottom: 1px solid var(--line);
}
.article-editor-top h3 {
  margin: 6px 0;
}
.article-editor .tiny {
  color: var(--muted);
}
.article-blocks {
  padding: 20px;
}
.article-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 0 0 16px;
  padding: 18px;
  background: var(--panel);
}
.article-block:focus-within {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.article-block-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
  gap: 12px;
}
.article-block-head .row,
.article-format {
  gap: 6px;
  flex-wrap: wrap;
}
.article-format {
  display: flex;
  margin-bottom: 8px;
}
.article-editable {
  min-height: 110px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-size: 18px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.article-editable a {
  color: var(--text);
  text-decoration: underline;
}
.article-editable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.article-block[data-type='heading'] .article-editable {
  font-size: 25px;
  font-weight: 650;
  min-height: 65px;
}
.article-insert {
  padding: 20px 24px;
  background: var(--panel2);
  align-items: end;
  border-top: 1px solid var(--line);
}
.article-insert label {
  flex: 1;
  min-width: 180px;
  margin: 0;
}
.article-editor > .tiny {
  padding: 0 24px 16px;
}
.article-media-settings {
  border-left: 3px solid var(--line);
  padding-left: 16px;
  margin-bottom: 16px;
}
.article-table {
  max-width: 100%;
  overflow-x: auto;
  margin: 24px 0;
}
.article-table table {
  border-collapse: collapse;
  width: 100%;
}
.article-table td,
.article-table th {
  border: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}
.article-table input {
  min-width: 110px;
  margin: 0;
}
.native-article {
  line-height: 1.8;
  overflow-wrap: anywhere;
  color: inherit;
}
.native-article p,
.native-article ul,
.native-article ol {
  margin: 1.1em 0;
}
.native-article h2 {
  font-size: 1.65em;
  line-height: 1.3;
  margin: 1.6em 0 0.7em;
  color: inherit;
}
.native-article h3 {
  font-size: 1.3em;
  margin: 1.4em 0 0.65em;
  color: inherit;
}
.native-article a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.native-article blockquote {
  margin: 1.5em 0;
  border-left: 3px solid var(--line);
  padding: 0.6em 1.2em;
  color: inherit;
}
.native-article figure {
  margin: 0;
}
.native-article img,
.native-article video {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: var(--panel);
}
.native-article figcaption {
  font-size: 0.83em;
  line-height: 1.6;
  margin-top: 10px;
  color: inherit;
}
.native-article .article-image {
  max-width: 80%;
  margin: 2em auto;
}
.native-article .image-wide {
  max-width: 100%;
}
.native-article .article-video {
  margin: 2em 0;
}
.native-article pre {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  overflow-x: auto;
  white-space: pre-wrap;
}
.article-callout {
  margin: 1.5em 0;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: 10px;
  color: inherit;
}
.article-callout > p {
  margin: 0.5em 0 0;
}
.article-callout.tone-warning {
  border-left-color: var(--line);
}
.article-callout.tone-task {
  border-left-color: var(--line);
}
.article-media-text {
  margin: 2em 0;
  display: flow-root;
}
.article-media-text.width-33 {
  --article-media-width: 33%;
}
.article-media-text.width-50 {
  --article-media-width: 50%;
}
.article-media-text.wrap-text figure {
  width: var(--article-media-width);
  margin-bottom: 14px;
}
.article-media-text.wrap-text.side-left figure {
  float: left;
  margin-right: 24px;
}
.article-media-text.wrap-text.side-right figure {
  float: right;
  margin-left: 24px;
}
.article-media-text.columns-text {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.article-media-text.columns-text.side-right {
  flex-direction: row-reverse;
}
.article-media-text.columns-text figure {
  flex: 0 0 calc(var(--article-media-width) - 12px);
}
.article-media-text.columns-text .article-copy {
  flex: 1;
  min-width: 0;
}
.article-missing {
  padding: 24px;
  border: 1px dashed var(--line);
  color: inherit;
  border-radius: 8px;
}
.article-preview {
  max-width: 900px;
  margin: 20px auto;
  background: var(--panel);
  color: var(--text);
  font-size: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.article-preview .reading-paper {
  padding: 28px;
  margin: 0;
}
.article-preview.preview-phone {
  max-width: 390px;
}
.article-history-preview {
  max-height: 55vh;
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.reader-light .native-article a,
.reader-warm .native-article a {
  color: var(--text);
}
.reader-light .native-article th,
.reader-warm .native-article th {
  background: var(--panel);
  color: var(--text);
}
.native-article th {
  color: inherit;
  background: transparent;
}
.preview-phone .article-media-text {
  display: block;
}
.preview-phone .article-media-text figure {
  float: none !important;
  width: 100% !important;
  margin: 0 0 18px !important;
}
@media (max-width: 680px) {
  .article-blocks {
    padding: 10px;
  }
  .article-block {
    padding: 12px;
  }
  .article-editor-top,
  .article-insert {
    padding: 16px;
  }
  .article-block-head {
    align-items: flex-start;
  }
  .article-media-text {
    display: block !important;
  }
  .article-media-text figure {
    float: none !important;
    width: 100% !important;
    margin: 0 0 18px !important;
  }
  .native-article .article-image {
    max-width: 100%;
  }
  .article-preview .reading-paper {
    padding: 18px;
  }
}
dialog:has(.article-preview),
dialog:has(.article-history-preview) {
  width: min(1100px, 96vw);
  max-width: 96vw;
}
/* Native articles follow the reader's font size and keep body text at full contrast. */
.reader-shell .native-article {
  color: var(--ink);
  font-size: var(--reader-font, 18px);
}
.reader-shell .native-article p,
.reader-shell .native-article li,
.reader-shell .native-article td {
  color: var(--ink);
}
.reader-shell .native-article figcaption {
  color: var(--reader-muted);
}

/* 0.8.1 — coherent workspace, readable controls and visible file transfers. */
:root {
  --radius: 16px;
}
[hidden] {
  display: none !important;
}
body {
  background: var(--bg);
}
body,
input,
textarea,
select {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Arial,
    sans-serif;
}
main {
  min-height: 65vh;
}
header {
  background: var(--panel);
  border-color: var(--line);
  gap: clamp(16px, 3vw, 38px);
}
header nav {
  gap: clamp(12px, 2vw, 24px);
}
header nav a {
  line-height: 1.3;
}
header .account {
  flex-shrink: 0;
}
header .brand {
  letter-spacing: -1px;
}
.page {
  max-width: 1320px;
  padding: 42px 28px 80px;
  animation: none;
}
h1 {
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1.14;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
h2 {
  letter-spacing: -0.02em;
  line-height: 1.25;
}
h3 {
  letter-spacing: -0.01em;
}
p {
  line-height: 1.65;
}
.eyebrow {
  color: var(--accent);
  letter-spacing: 0.13em;
  font-size: 11px;
  margin-bottom: 12px;
}
.btn {
  text-align: center;

  color: var(--text);
}
.btn.secondary,
.btn.subtle {
  color: var(--text);
  border-color: var(--line);
  background: var(--panel2);
}
.btn.danger {
  color: var(--bad);
  background: var(--bad-soft);
  border-color: var(--bad);
}
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.btn:not(.secondary):hover {
  box-shadow: none;
}
.btn:hover {
  filter: brightness(1.07);
}
.layout {
  grid-template-columns: 205px minmax(0, 1fr);
  gap: 32px;
}
.layout > section,
.layout > aside,
.form-grid > *,
.grid > *,
.row > *,
.article-media-settings,
.card-body {
  min-width: 0;
}
.sidebar {
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  top: 104px;
}
.sidebar a {
  border: 1px solid transparent;
  border-radius: 9px;
  line-height: 1.4;
  padding: 11px 12px;
}
.sidebar a.active {
  background: var(--accent-soft);
  color: var(--good);
  border: 1px solid var(--accent);
}
.sidebar a:hover {
  color: var(--accent);
  background: var(--panel);
}
.panel {
  padding: clamp(18px, 2.2vw, 28px);
  border-color: var(--line);
  border-radius: 16px;
}
.panel h3 {
  margin-bottom: 12px;
}
.panel > :last-child {
  margin-bottom: 0;
}
.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
}
label {
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 20px;
}
label:has(> input[type='checkbox']) {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
input,
select,
textarea {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 14px;
  min-width: 0;
  max-width: 100%;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
select {
  text-overflow: ellipsis;
}
textarea {
  min-height: 128px;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
}
input[type='checkbox'] {
  flex: 0 0 18px;
  margin: 3px 0 0;
  accent-color: var(--accent);
}
input[type='file'] {
  white-space: normal;
  overflow: hidden;
}
input[type='file']::file-selector-button {
  color: var(--text);
  background: var(--panel);
  border-color: var(--line);
  border-radius: 7px;
  padding: 8px 12px;
}
.field-hint,
.tiny {
  line-height: 1.55;
}
.field-hint {
  color: var(--muted);
}
.form-error:empty {
  display: none;
}
.form-error:not(:empty) {
  background: var(--bad-soft);
  color: var(--bad);
  border-color: var(--bad);
}
.notice {
  color: var(--text);
  background: var(--accent-soft);
  border-color: var(--line);
  border-radius: 0 10px 10px 0;
}
.status {
  line-height: 1.4;
  white-space: normal;
  text-align: center;
  padding: 6px 10px;
  flex-shrink: 0;
  background: var(--panel2);
  color: var(--text);
}
.status.clean,
.status.published,
.status.paid,
.status.done,
.status.active {
  background: var(--good-soft);
  color: var(--good);
}
.status.queued,
.status.processing,
.status.uploading,
.status.review {
  background: var(--warning-soft);
  color: var(--text);
}
.status.error,
.status.blocked,
.status.rejected {
  background: var(--bad-soft);
  color: var(--bad);
}
.table-wrap {
  max-width: 100%;
  border-radius: 14px;
  border-color: var(--line);
}
th,
td {
  vertical-align: middle;
}
td {
  overflow-wrap: anywhere;
}
td .btn + .btn {
  margin-left: 6px;
}
.card {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: var(--panel);
  border-color: var(--line);
  overflow: hidden;
}
.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 22px;
}
.card-body h3 {
  overflow-wrap: anywhere;
}
.card-body > p {
  flex: 1;
}
.card-bottom {
  margin-top: auto;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.card-cover {
  aspect-ratio: 16/9;
  height: auto;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card:hover,
.discovery-card:hover {
  transform: translateY(-2px);
  border-color: var(--line);
  box-shadow: var(--shadow);
}
.hero {
  gap: 32px;
}
.hero h1 {
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: -0.04em;
}
.visual-stack,
.visual-tag {
  animation: none;
}
.stats {
  align-items: stretch;
}
.stat {
  border-radius: 14px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.stat .value {
  font-size: clamp(24px, 2.6vw, 32px);
  overflow-wrap: anywhere;
}
.stat p {
  margin-bottom: 0;
}
.auth {
  width: min(100%, 500px);
  margin: 20px auto;
}
.auth form {
  margin-top: 28px;
}
.auth button[type='submit'] {
  width: 100%;
}
.auth .row {
  row-gap: 16px;
}
dialog {
  width: min(820px, calc(100% - 32px));
  max-height: calc(100dvh - 40px);
  border-radius: 18px;
  background: var(--panel);
  color: var(--text);
  border-color: var(--line);
  padding: 30px;
}
dialog .close {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
}
#dialog-body {
  min-width: 0;
  padding-top: 16px;
}
#toast {
  border-radius: 12px;
  max-width: min(520px, calc(100% - 32px));
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
}
.breadcrumb {
  display: inline-block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 22px;
}
.studio-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}
.studio-heading > div {
  min-width: 0;
}
.studio-heading > .pill {
  margin-top: 54px;
  flex-shrink: 0;
}
.studio-heading h1 {
  font-size: clamp(28px, 3vw, 40px);
}
.studio-intro {
  max-width: 660px;
  margin: 12px 0 32px;
}
.studio-intro h1 {
  font-size: clamp(34px, 4vw, 52px);
}
.creation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}
.creation-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  transition:
    border-color 0.18s,
    transform 0.18s;
}
.creation-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}
.creation-card:first-child {
  background: var(--panel);
  border-color: var(--line);
}
.creation-card h2 {
  margin: 10px 0 0;
  font-size: 25px;
}
.creation-card p {
  margin: 0;
  font-size: 14px;
}
.creation-number {
  font-size: 24px;
  color: var(--accent);
  font-weight: 650;
}
.creation-cta {
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--accent);
  font-weight: 650;
  font-size: 14px;
}
.creation-card .pill {
  font-size: 11px;
  background: var(--panel);
  color: var(--text);
}
.studio-note {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 22px;
  margin: 22px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--accent-soft);
}
.studio-note p {
  margin: 6px 0 0;
  font-size: 14px;
}
.studio-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 8px;
}
.save-strip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 0;
  font-size: 13px;
  color: var(--muted);
}
.save-strip .studio-dot {
  margin-top: 6px;
}
.stepper {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: visible;
  gap: 8px;
  margin: 12px 0 24px;
  padding: 0;
}
.stepper button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  min-height: 56px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: var(--panel2);
  font-size: 13px;
  white-space: normal;
  text-align: left;
}
.stepper button.active {
  background: var(--panel2);
  border-color: var(--accent);
  color: var(--good);
}
.step-number {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 8px;
  background: var(--panel2);
  color: var(--text);
}
.active .step-number {
  background: var(--panel2);
  color: var(--good);
}
.editor-step {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  padding: clamp(18px, 2.7vw, 32px);
  scroll-margin-top: 115px;
}
.section-heading {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.section-heading h2 {
  margin-bottom: 10px;
  font-size: 26px;
}
.section-heading p {
  margin-bottom: 0;
  max-width: 680px;
}
.editor-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding: 18px 0;
}
.editor-actions .row {
  gap: 8px;
}
.cover-editor {
  background: var(--panel2);
  margin: 28px 0 0;
}
.cover-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.cover-placeholder {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  aspect-ratio: 16/9;
  padding: 20px;
  background: var(--panel2);
  border: 1px dashed var(--line);
  border-radius: 12px;
  text-align: center;
  color: var(--muted);
}
.cover-placeholder > span {
  font-size: 40px;
  line-height: 1;
  color: var(--muted);
}
.cover-placeholder small {
  color: var(--muted);
}
#selected-cover .cover-preview {
  width: 100%;
  max-width: none;
  aspect-ratio: 16/9;
  height: auto;
  object-fit: cover;
  border-radius: 12px;
  margin: 0;
}
.cover-file-row {
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.cover-file-row > span {
  overflow-wrap: anywhere;
}
.file-picker {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--panel2);
}
.file-picker input {
  border: 0;
  background: transparent;
  padding: 6px 0;
  min-height: 40px;
}
.file-picker .field-hint {
  overflow-wrap: anywhere;
}
.lesson-edit {
  margin: 0 0 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  background: var(--panel);
}
.lesson-heading {
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 22px;
}
.lesson-heading h3 {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0;
}
.lesson-number {
  display: grid;
  place-items: center;
  background: var(--panel);
  border-radius: 8px;
  min-width: 30px;
  height: 30px;
  font-size: 13px;
}
.lesson-method {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  flex-wrap: wrap;
  background: var(--panel2);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 20px;
}
.lesson-method p {
  margin: 5px 0 0;
}
.lesson-files {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 16px;
}
summary {
  cursor: pointer;
  color: var(--muted);
  line-height: 1.5;
  padding: 8px 0;
}
.lesson-attachments {
  margin: 12px 0;
}
.asset-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  margin: 8px 0;
  background: var(--panel2);
  border-radius: 10px;
}
.asset-choice > span:not(.file-type) {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.asset-choice small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.file-library {
  background: var(--panel2);
  border-style: dashed;
  scroll-margin-top: 110px;
}
.file-library .eyebrow {
  margin-bottom: 6px;
}
.file-library h3 {
  margin: 0;
}
.format-guide {
  margin: 20px 0;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--line);
}
.format-guide p {
  font-size: 13px;
  margin: 8px 0;
}
.file-empty {
  padding: 24px 12px;
  text-align: center;
  color: var(--text);
  font-size: 14px;
}
.asset-row {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.asset-info {
  flex: 1 1 180px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.asset-info small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}
.asset-info .error {
  margin: 8px 0 0;
}
.file-type {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  align-self: flex-start;
  min-width: 42px;
  padding: 8px;
  border-radius: 8px;
  background: var(--panel2);
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.article-editor {
  border-color: var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.article-editor-top,
.article-insert {
  background: var(--panel2);
  border-color: var(--line);
  padding: 20px;
}
.article-editor-top .row {
  align-items: center;
}
.article-editor-top h3 {
  font-size: 22px;
}
.article-blocks {
  padding: 16px;
}
.article-block {
  background: var(--panel);
  border-color: var(--line);
  padding: 16px;
}
.article-block-head {
  border-color: var(--line);
}
.article-editable {
  background: var(--panel);
  color: var(--text);
  border-color: var(--line);
  font-size: 17px;
  min-height: 150px;
  padding: 18px;
}
.article-editable:empty::before {
  content: 'Начните писать здесь…';
  color: var(--text);
  pointer-events: none;
}
.article-editor .tiny {
  color: var(--muted);
}
.article-format .btn {
  background: var(--panel);
  color: var(--text);
  border-color: var(--line);
}
.article-media-settings {
  border-color: var(--line);
}
.article-insert label {
  min-width: min(180px, 100%);
}
.article-table {
  width: 100%;
  overflow-x: auto;
}
.upload-center {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 35;
  width: min(420px, calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
  color: var(--text);
  overflow: hidden;
}
.upload-center-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: var(--panel2);
}
.upload-center-head > div {
  display: flex;
  gap: 4px;
  flex-direction: column;
}
.upload-center-head .tiny {
  color: var(--muted);
}
.upload-center-list {
  max-height: min(480px, 55dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.upload-task {
  padding: 16px;
  border-top: 1px solid var(--line);
}
.upload-filename {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
}
.upload-message {
  color: var(--muted);
  font-size: 13px;
  margin: 10px 0;
}
.upload-task.error .upload-message,
.upload-task.blocked .upload-message {
  color: var(--bad);
}
.upload-task.clean .upload-message {
  color: var(--good);
}
.upload-meter {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  margin: 12px 0;
}
.upload-meter progress {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 9px;
  border-radius: 9px;
  accent-color: var(--accent);
  background: var(--panel);
  border: 0;
  overflow: hidden;
}
.upload-meter progress::-webkit-progress-bar {
  background: var(--panel2);
  border-radius: 9px;
}
.upload-meter progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: 9px;
}
.upload-meter progress::-moz-progress-bar {
  background: var(--accent);
  border-radius: 9px;
}
.transfer-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  margin: 14px 0;
  font-size: 10px;
}
.transfer-steps li {
  color: var(--muted);
  border-top: 2px solid var(--line);
  padding-top: 7px;
}
.transfer-steps .reached {
  color: var(--text);
  border-color: var(--accent);
}
.processing-line {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.processing-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: studio-pulse 1.4s ease-in-out infinite;
}
.upload-inline {
  border-left: 3px solid var(--line);
  background: var(--accent-soft);
  border-radius: 0 8px 8px 0;
  padding: 12px 14px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text);
}
.has-uploads {
  padding-bottom: 110px;
}
@keyframes studio-pulse {
  50% {
    opacity: 0.35;
  }
}
@media (max-width: 1100px) {
  .creation-grid {
    grid-template-columns: 1fr;
  }
  .creation-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 24px;
  }
  .creation-card > .row {
    grid-column: 1/-1;
  }
  .creation-card h2 {
    margin: 0;
  }
  .creation-card p {
    grid-row: span 2;
  }
  .creation-cta {
    margin-top: 0;
    padding-top: 6px;
  }
  .stepper button {
    flex-direction: column;
    align-items: flex-start;
  }
  .cover-workspace {
    grid-template-columns: 1fr;
  }
  #selected-cover {
    max-width: 480px;
  }
}
@media (max-width: 900px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .sidebar {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding: 8px;
    gap: 6px;
  }
  .sidebar a {
    flex-shrink: 0;
    white-space: nowrap;
    min-height: 44px;
  }
  .reading {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 680px) {
  .page {
    padding: 24px 16px 48px;
  }
  header {
    position: relative;
    padding: 12px 16px;
    gap: 12px;
  }
  header .brand {
    font-size: 25px;
  }
  header .account {
    margin-left: auto;
    max-width: 100%;
    flex-shrink: 1;
  }
  .form-grid,
  .stats,
  .creation-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .studio-heading > .pill {
    margin-top: 0;
  }
  .studio-heading {
    flex-direction: column;
    gap: 0;
    margin-bottom: 10px;
  }
  .studio-heading p {
    margin-bottom: 12px;
  }
  .creation-card {
    display: flex;
    padding: 22px;
    gap: 16px;
  }
  .creation-card p {
    font-size: 15px;
  }
  .stepper {
    display: flex;
    overflow-x: auto;
    margin: 12px -2px 20px;
    padding: 2px;
    scroll-snap-type: x proximity;
  }
  .stepper button {
    min-width: 112px;
    flex-direction: row;
    align-items: center;
    scroll-snap-align: start;
    min-height: 50px;
  }
  .editor-step {
    padding: 18px 14px;
    border-radius: 14px;
  }
  .section-heading h2 {
    font-size: 23px;
  }
  .lesson-edit {
    padding: 16px 12px;
  }
  .lesson-method {
    padding: 14px;
  }
  .lesson-method .row,
  .editor-actions > .row {
    width: 100%;
  }
  .lesson-method .btn,
  .editor-actions .btn {
    flex: 1 1 120px;
  }
  .editor-actions {
    padding: 14px 0;
    gap: 12px;
  }
  .cover-editor,
  .file-library {
    padding: 16px 12px;
  }
  .article-editor-top,
  .article-insert {
    padding: 16px 12px;
  }
  .article-blocks {
    padding: 10px;
  }
  .article-block {
    padding: 12px;
  }
  .article-editable {
    padding: 14px;
    font-size: 17px;
  }
  .article-insert {
    display: grid;
    grid-template-columns: 1fr;
  }
  .article-insert label {
    min-width: 0;
  }
  .upload-center {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    width: calc(100% - 24px);
  }
  .upload-center-list {
    max-height: 38dvh;
  }
  dialog {
    padding: 22px 16px;
    max-height: calc(100dvh - 24px);
  }
  .table-wrap {
    overflow-x: auto;
  }
  td .btn + .btn {
    margin: 6px 0 0;
  }
  .hero {
    gap: 24px;
  }
  .hero h1 {
    font-size: 40px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .processing-dot {
    animation: none;
  }
  .creation-card,
  .card,
  .btn {
    transition: none;
  }
}
.card > a {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}
.asset-preview-media {
  display: block;
  width: 100%;
  max-height: 65dvh;
  object-fit: contain;
  border-radius: 10px;
}

/* 0.8.2: a calm writing canvas, contextual tools and one task per step. */
main {
  overflow-anchor: none;
}
.studio-heading-v2 {
  align-items: center;
  margin-bottom: 24px;
}
.studio-format {
  display: grid;
  gap: 7px;
  padding: 18px 22px;
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 700;
}
.studio-format small {
  font-weight: 400;
  color: var(--muted);
  font-size: 12px;
}
.studio-paper {
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(18px, 3vw, 36px);
  box-shadow: var(--shadow);
}
.studio-paper .section-heading h2 {
  color: var(--text);
  font-size: clamp(24px, 2.4vw, 32px);
}
.studio-paper .eyebrow {
  color: var(--accent);
}
.studio-step-help {
  padding: 12px 16px;
  background: var(--accent-soft);
  border-radius: 12px;
  color: var(--text);
  margin-bottom: 24px;
  font-size: 14px;
}
.studio-paper input:not([type='checkbox']):not([type='radio']),
.studio-paper textarea,
.studio-paper select {
  background: var(--panel);
  color: var(--text);
  border-color: var(--line);
  box-shadow: none;
}
.studio-paper input::placeholder,
.studio-paper textarea::placeholder {
  color: var(--muted);
}
.studio-paper input[type='checkbox'],
.studio-paper input[type='radio'] {
  accent-color: var(--accent);
}
.studio-paper .btn.secondary,
.studio-paper .btn.subtle {
  background: var(--panel2);
  color: var(--text);
  border-color: var(--line);
}
.studio-paper .btn:focus-visible,
.studio-paper summary:focus-visible,
.studio-paper input:focus-visible,
.studio-paper textarea:focus-visible,
.studio-paper select:focus-visible,
.studio-paper .article-editable:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.studio-paper .studio-note,
.studio-paper .notice,
.studio-paper .panel,
.studio-paper .file-empty,
.studio-paper .file-picker,
.studio-paper .lesson-method {
  background: var(--accent-soft);
  color: var(--text);
  border-color: var(--line);
}
.studio-paper .studio-note p,
.studio-paper .field-hint,
.studio-paper .tiny,
.studio-paper label {
  color: var(--muted);
}
.studio-paper .link {
  color: var(--accent);
}
.studio-paper .lesson-edit {
  background: var(--panel);
  border-color: var(--line);
  padding: 22px;
}
.studio-paper .article-editor {
  background: transparent;
  border: 0;
  padding: 0;
}
.studio-paper .article-editor-top {
  background: transparent;
  padding: 12px 0 18px;
  border-bottom: 1px solid var(--line);
}
.studio-paper .article-block {
  border: 1px solid transparent;
  background: var(--panel);
  padding: 12px 0;
  border-bottom-color: var(--line);
  border-radius: 0;
}
.studio-paper .article-block:focus-within {
  border-bottom-color: var(--accent);
}
.studio-paper .article-block-head > b {
  font-size: 12px;
  color: var(--text);
  font-weight: 500;
}
.studio-paper .article-editable {
  color: var(--text);
  background: var(--panel);
  border-color: var(--line);
  padding: 16px;
  min-height: 110px;
  line-height: 1.8;
  font-size: 16px;
}
.studio-paper .article-format {
  background: transparent;
  padding: 6px 0;
  border: 0;
  gap: 5px;
}
.studio-paper .article-format .btn {
  border: 0;
}
.block-actions {
  position: relative;
  font-size: 12px;
}
.block-actions summary,
.studio-more summary,
.article-advanced summary {
  cursor: pointer;
  color: var(--muted);
  padding: 10px 2px;
}
.block-actions > .row {
  padding: 8px;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.article-quick-add {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 8px;
  padding: 16px;
  background: var(--panel2);
  border-radius: 14px;
}
.article-quick-add > span {
  flex-basis: 100%;
  font-size: 12px;
  color: var(--text);
  margin-bottom: 4px;
}
.studio-paper .article-insert {
  background: var(--panel2);
  border-color: var(--line);
  border-radius: 12px;
  padding: 14px;
}
.studio-paper .editor-actions {
  border-top-color: var(--line);
  background: transparent;
  position: static;
  padding-bottom: 0;
}
.studio-paper .asset-row,
.studio-paper .attachment-option {
  background: var(--panel2);
  color: var(--text);
  border-color: var(--line);
}
.studio-paper .cover-picker {
  background: var(--panel2);
  border-color: var(--line);
}
.studio-paper .cover-placeholder {
  color: var(--muted);
  background: var(--panel2);
}
.pricing-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.pricing-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 22px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  cursor: pointer;
}
.pricing-option:has(input:checked) {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.pricing-option input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 3px 0 0;
}
.pricing-option span {
  display: grid;
  gap: 8px;
}
.pricing-option b {
  color: var(--text);
  font-size: 18px;
}
.pricing-option small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
#paid-price {
  max-width: 460px;
}
@media (max-width: 680px) {
  .studio-heading-v2 {
    display: block;
  }
  .studio-format {
    display: inline-grid;
    padding: 10px 16px;
    margin: 12px 0;
  }
  .studio-format small {
    display: none;
  }
  .studio-paper {
    padding: 16px;
    border-radius: 16px;
  }
  .studio-paper .lesson-edit {
    padding: 12px;
  }
  .pricing-options {
    grid-template-columns: 1fr;
  }
  .studio-paper .article-editor-top {
    display: block;
  }
  .article-editor-top > .row {
    margin-top: 12px;
  }
  .article-quick-add {
    padding: 12px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .pricing-option,
  .creation-card {
    transition:
      border-color 0.16s,
      background-color 0.16s;
  }
}
.row {
  gap: 10px;
}
.panel > .btn + .btn {
  margin-inline-start: 8px;
}
.row > .btn + .btn {
  margin-inline-start: 0;
}
.task-card {
  padding: 18px 22px;
  min-height: 84px;
  margin-bottom: 12px;
  gap: 20px;
}
.task-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}
.card-more {
  position: relative;
}
.card-more summary {
  padding: 8px 10px;
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
}
.card-more[open] > .btn {
  margin-top: 6px;
}
.studio-more {
  position: relative;
}
.studio-more[open] {
  display: grid;
  gap: 8px;
}
.studio-more .btn {
  justify-self: start;
}
.security-actions {
  margin-top: 18px;
}
.account-email {
  display: grid;
  gap: 4px;
  overflow-wrap: anywhere;
}
.security-disable-zone {
  display: grid;
  gap: 16px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.security-disable-zone h3,
.security-disable-zone p {
  margin: 0;
}
.security-disable-zone p {
  margin-top: 8px;
}
.security-disable-zone > .btn {
  justify-self: start;
  max-width: 100%;
}
.security-session-list {
  list-style: none;
  margin: 16px 0;
  padding: 0;
}
.security-session-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.security-session-list p {
  margin: 8px 0 0;
}
@media (pointer: coarse) {
  .card-more summary,
  .block-actions summary {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}
@media (max-width: 680px) {
  .task-card {
    padding: 16px;
    flex-wrap: wrap;
  }
  .task-card > .row {
    width: 100%;
  }
}
.studio-paper .btn.danger {
  color: var(--bad);
  background: var(--bad-soft);
  border-color: var(--bad);
}
.studio-paper .status {
  color: var(--text);
  background: var(--panel2);
}
.studio-paper .status.blocked,
.studio-paper .status.error {
  color: var(--bad);
  background: var(--bad-soft);
}

/* school.art 0.8.4 — Muses warm graphite, orange and readable surfaces. */
:root {
  color-scheme: dark;
  --bg: #151311;
  --panel: #211e1b;
  --panel2: #2d2925;
  --text: #f7f3ed;
  --muted: #c8bfb5;
  --line: #61564a;
  --accent: #ffa35c;
  --accent-soft: #38291f;
  --good: #b3e4c4;
  --good-soft: #263e32;
  --bad: #ffc0bc;
  --bad-soft: #492d35;
  --warning: #ffda9b;
  --warning-soft: #453922;
  --shadow: 0 8px 28px #00000024;
  --radius: 14px;
}

body {
  background: var(--bg);
  font-size: 16px;
}
header {
  background: var(--panel);
}
h1,
h2,
h3,
h4 {
  color: var(--text);
  text-wrap: balance;
}
p,
li {
  overflow-wrap: anywhere;
}
label,
summary {
  color: var(--text);
}
p {
  line-height: 1.7;
}
::selection {
  color: #24180e;
  background: #ffa35c;
}
.btn {
  background: var(--accent);
  color: #24180e;
  border-color: var(--accent);
}
.btn.secondary,
.btn.subtle,
.studio-paper .btn.secondary,
.studio-paper .btn.subtle {
  background: var(--panel);
  color: var(--text);
  border-color: var(--line);
}
.btn:not(.secondary):not(.subtle):not(.danger):not(:disabled):hover {
  background: #ffb579;
  color: #24180e;
  box-shadow: none;
}
.btn.secondary:hover,
.btn.subtle:hover {
  background: var(--panel2);
}
.btn.danger,
.studio-paper .btn.danger {
  color: var(--bad);
  background: var(--bad-soft);
  border-color: var(--bad);
}
.btn:disabled {
  opacity: 1;
  color: var(--muted);
  background: var(--panel2);
  border-color: var(--line);
  cursor: not-allowed;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.studio-paper :is(button, a, summary, input, textarea, select, .article-editable):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.link,
.native-article a,
.article-editable a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.chip,
.pill {
  color: var(--muted);
  background: var(--panel);
}
.chip.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}
.card-cover .pill,
.product-cover .pill {
  background: var(--panel);
  color: var(--text);
}
.hero {
  position: relative;
}
.hero::before {
  background: radial-gradient(ellipse at 80% 40%, #5f3b242e 0%, transparent 65%);
}
.hero-visual {
  background: transparent;
}
.visual-stack {
  background: linear-gradient(145deg, #352a21, #211e1b);
  border-color: #8a7060;
  box-shadow: 14px 14px 0 #30251e;
}
.visual-tag {
  background: #38291f;
  color: #ffdbb3;
  border-color: #8a7358;
  box-shadow: var(--shadow);
}
.card-cover {
  background: linear-gradient(135deg, #302722, #24201c);
}
.cover-glyph,
.cover-placeholder > span {
  color: var(--accent);
}
.discovery-card {
  background: var(--panel);
}
.creation-card {
  background: var(--panel);
}
.creation-card:first-child {
  background: #29221c;
}
.creation-card:nth-child(2) {
  background: #24221e;
}
.creation-card:nth-child(3) {
  background: #292328;
}
.creation-card .pill {
  color: var(--text);
  background: var(--panel);
}
.creation-cta,
.creation-number {
  color: var(--accent);
}
.sidebar a:hover {
  background: var(--panel2);
  color: var(--text);
}
.sidebar a.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}
.studio-paper {
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
}
.studio-paper .editor-step {
  background: var(--panel);
  border-color: var(--line);
}
.studio-paper .section-heading h2,
.studio-paper .pricing-option b {
  color: var(--text);
}
.studio-paper .eyebrow {
  color: var(--accent);
}
.studio-paper :is(.tiny, .field-hint),
.studio-paper .studio-note p {
  color: var(--muted);
}
.studio-paper label {
  color: var(--text);
}
.studio-paper .studio-note,
.studio-paper .notice,
.studio-step-help {
  color: var(--text);
  background: var(--accent-soft);
}
.studio-paper .panel {
  background: var(--panel2);
  color: var(--text);
}
.stepper button {
  background: var(--panel);
  color: var(--muted);
}
.stepper button.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}
.step-number {
  background: var(--panel2);
  color: var(--text);
}
.active .step-number {
  background: var(--accent);
  color: #24180e;
}
input,
textarea,
select {
  background: var(--panel);
  color: var(--text);
  border-color: #9d8c7a;
}
input::placeholder,
textarea::placeholder,
.article-editable:empty::before {
  color: var(--muted);
  opacity: 1;
}
input[type='radio'],
input[type='checkbox'] {
  accent-color: var(--accent);
}
input[type='file']::file-selector-button {
  color: var(--text);
  background: var(--panel2);
}
.article-format .btn {
  background: var(--panel);
  color: var(--text);
  border-color: var(--line);
}
.article-preview {
  background: var(--panel);
  color: var(--text);
}
.native-article pre {
  background: var(--panel2);
  color: var(--text);
}
.status,
.studio-paper .status {
  color: var(--muted);
  background: var(--panel2);
}
.status.clean,
.status.published,
.status.paid,
.status.done,
.status.active,
.studio-paper .status.clean,
.studio-paper .status.published {
  color: var(--good);
  background: var(--good-soft);
}
.status.queued,
.status.processing,
.status.uploading,
.status.review {
  color: var(--warning);
  background: var(--warning-soft);
}
.status.error,
.status.blocked,
.status.rejected,
.studio-paper .status.error,
.studio-paper .status.blocked {
  color: var(--bad);
  background: var(--bad-soft);
}
.notice,
.studio-note,
.upload-inline {
  color: var(--text);
  background: var(--accent-soft);
}
.form-error:not(:empty) {
  color: var(--bad);
  background: var(--bad-soft);
}
.upload-center {
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 12px 40px #00000050;
}
.upload-center-head {
  background: var(--panel2);
}
.upload-meter progress,
.upload-meter progress::-webkit-progress-bar {
  background: var(--panel2);
}
.transfer-steps .reached {
  color: var(--accent);
  border-color: var(--accent);
}
#toast {
  background: #2d2925;
  color: #24180e;
  border-color: #9d8c7a;
}
.reader-shell {
  --text: var(--ink);
  --muted: var(--reader-muted);
  --panel: var(--paper);
  --panel2: var(--paper);
  --line: var(--reader-line);
  color-scheme: dark;
}
.reader-dark {
  --accent: #ffa35c;
  --accent-soft: #38291f;
  --good: #b3e4c4;
  --bad: #ffb7b0;
}
.reader-light,
.reader-warm {
  --accent: #ffa35c;
  --accent-soft: #38291f;
  color-scheme: dark;
}
.reader-shell .btn:not(.secondary) {
  background: #ffa35c;
  color: #24180e;
  border-color: #ffa35c;
}
.reader-shell .eyebrow,
.reader-shell .link,
.reader-shell .native-article a {
  color: var(--accent);
}
.reader-shell .notice {
  background: var(--paper);
  color: var(--ink);
}
.reader-shell .outline a.active {
  color: var(--ink);
  background: var(--accent-soft);
}
.reader-light .native-article th,
.reader-warm .native-article th {
  background: var(--paper);
  color: var(--ink);
}
.pagination {
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--muted);
}
.pagination .btn {
  white-space: nowrap;
}
@media (prefers-reduced-motion: no-preference) {
  .btn,
  .chip,
  .sidebar a {
    transition:
      background-color 0.15s,
      border-color 0.15s;
  }
  .card:hover,
  .creation-card:hover {
    transform: translateY(-2px);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
@media (max-width: 680px) {
  input,
  textarea,
  select {
    font-size: 16px;
  }
  .pagination {
    flex-wrap: wrap;
  }
  .studio-paper .editor-step {
    padding: 18px 12px;
  }
}
/* The panel never forces a narrow filename or a one-word control to break. */
.btn {
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  flex-shrink: 0;
}
.cover-file-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.cover-file-row > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.cover-file-row > .btn {
  margin-left: auto;
}
#upload-reopen {
  position: fixed;
  z-index: 60;
  bottom: 18px;
  right: 18px;
  box-shadow: var(--shadow);
}
.upload-center-head {
  gap: 12px;
  flex-wrap: wrap;
}

/* Reader themes are intentional complete palettes, never mixed nested surfaces. */
.reader-light,
.reader-warm {
  --accent: #93430e;
  --accent-soft: #f5dfc5;
  color-scheme: light;
}
.reader-dark {
  color-scheme: dark;
}
#toast {
  color: var(--text);
}
::selection {
  background: #ffa35c;
  color: #24180e;
}
.studio-paper input:not([type='checkbox']):not([type='radio']),
.studio-paper textarea,
.studio-paper select {
  border-color: #9d8c7a;
}
.studio-paper input:focus,
.studio-paper textarea:focus,
.studio-paper select:focus {
  border-color: var(--accent);
}
.reader-shell.reader-light,
.reader-shell.reader-warm {
  color-scheme: light;
}
[data-unread]:not(:empty) {
  color: #24180e;
}
.btn {
  max-inline-size: 100%;
  white-space: normal;
}
.form-grid > *,
.layout > section,
.card-body,
.lesson-heading > div {
  min-width: 0;
}

/* Shared control system: the same size in the header, forms, editor and uploads.
   Minimum height grows with text zoom; labels never get clipped. */
:root {
  --control-height: 44px;
  --control-radius: 10px;
  --control-font: 14px;
  --control-pad: 4px 14px;
  --card-radius: 16px;
}
.btn,
.btn.small,
.stepper button,
dialog .close,
.card-more > summary,
.studio-more > summary,
.block-actions > summary {
  min-height: var(--control-height);
  border-radius: var(--control-radius);
  padding: var(--control-pad);
  font-size: var(--control-font);
  line-height: 1.2;
  font-weight: 650;
  text-align: center;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.btn,
.btn.small {
  min-inline-size: 104px;
  filter: none;
}
.btn:hover {
  filter: none;
}
.btn.secondary,
.btn.subtle {
  background: var(--panel2);
}
.btn.secondary:hover,
.btn.subtle:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.btn.danger:hover {
  border-color: var(--bad);
  background: var(--bad-soft);
}
.btn:disabled:hover {
  background: var(--panel2);
  color: var(--muted);
  border-color: var(--line);
}
dialog .close {
  width: var(--control-height);
  height: var(--control-height);
  padding: 0;
  background: var(--panel2);
  color: var(--text);
  border: 1px solid var(--line);
  font-size: 24px;
}
input:not([type='radio']):not([type='checkbox']):not([type='hidden']):not([type='file']),
select {
  min-height: var(--control-height);
  padding: 9px 12px;
  border-radius: var(--control-radius);
}
input[type='file']::file-selector-button {
  min-height: var(--control-height);
  padding: var(--control-pad);
  border-radius: var(--control-radius);
  border: 1px solid var(--line);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.action-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}
.action-pair > .btn {
  width: 100%;
  min-width: 0;
  margin: 0;
}
.hero .action-pair {
  max-width: 420px;
}
.editor-actions > .action-pair {
  flex: 1 1 300px;
  max-width: 480px;
}
.card-more > summary,
.studio-more > summary,
.block-actions > summary {
  display: flex;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--text);
  list-style: none;
}
.card-more > summary::-webkit-details-marker,
.studio-more > summary::-webkit-details-marker,
.block-actions > summary::-webkit-details-marker {
  display: none;
}
.card-more > summary::after,
.studio-more > summary::after,
.block-actions > summary::after {
  content: '⌄';
  color: var(--accent);
}
.studio-more[open],
.card-more[open] {
  display: grid;
  gap: 8px;
}
.studio-more .btn,
.card-more .btn {
  width: 100%;
  justify-self: stretch;
  margin: 0;
}
.article-format .btn,
.studio-paper .article-format .btn {
  min-width: 44px;
  border: 1px solid var(--line);
}
.article-format {
  gap: 8px;
}
.block-actions > .row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.stepper button {
  flex-direction: row;
  text-align: left;
  justify-content: flex-start;
  padding: 4px 8px;
  gap: 7px;
}
.step-number {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}
.stepper button:hover {
  border-color: var(--accent);
}
.page {
  max-width: 1280px;
}
header {
  background: var(--bg);
  border-bottom-color: var(--line);
  box-shadow: 0 4px 24px #00000018;
}
header nav a {
  padding-block: 10px;
}
header nav a.active {
  color: var(--accent);
}
.hero {
  gap: 48px;
  padding-block: 32px 48px;
}
.hero h1 {
  font-size: clamp(38px, 5.2vw, 66px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 800;
}
.hero h1 span {
  color: var(--accent);
}
.hero p {
  max-width: 560px;
}
.hero .eyebrow,
.studio-intro .eyebrow {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--accent-soft);
  letter-spacing: 0.08em;
}
.visual-stack {
  transform: rotate(-4deg);
  border-radius: 18px;
}
.visual-stack .number {
  letter-spacing: -4px;
  margin-block: 12px;
}
.visual-stack .rule {
  background: var(--line);
}
.visual-tag {
  border-radius: 10px;
}
.card,
.panel,
.creation-card,
.sidebar,
.lesson-edit,
.auth,
.stat {
  border-radius: var(--card-radius);
}
.card,
.creation-card,
.stat {
  box-shadow: 0 5px 18px #00000014;
}
.card:hover,
.creation-card:hover {
  border-color: var(--accent);
}
.card-body {
  padding: 22px;
  gap: 12px;
}
.card-body h3 {
  font-size: 19px;
  line-height: 1.4;
}
.creation-card {
  gap: 16px;
}
.creation-cta {
  border-top: 1px solid var(--line);
  margin-top: auto;
}
.creation-card .pill {
  border-color: var(--line);
}
.stat {
  border-top: 2px solid var(--accent);
}
.sidebar a {
  min-height: var(--control-height);
}
.studio-paper {
  padding: clamp(16px, 2.4vw, 28px);
  border-radius: var(--card-radius);
}
.studio-paper .editor-step {
  border: 0;
  padding: 4px 0 16px;
}
.studio-step-help {
  border-left: 3px solid var(--accent);
}
.studio-paper .file-picker,
.studio-paper .lesson-method,
.studio-paper .file-empty {
  background: var(--panel2);
}
.studio-paper .lesson-edit {
  padding: 20px;
  background: var(--bg);
}
.studio-paper .article-editable {
  background: var(--panel2);
  border-color: #9d8c7a;
}
.section-heading {
  margin-bottom: 24px;
  padding-bottom: 20px;
}
.section-heading h2 {
  max-width: 26ch;
}
.field-hint,
.tiny {
  line-height: 1.65;
}
.toolbar {
  align-items: end;
  gap: 12px;
}
.toolbar > label {
  margin-bottom: 0;
}
.toolbar > input {
  margin: 0;
}
.upload-center {
  border-top: 2px solid var(--accent);
}
.upload-center-head {
  align-items: center;
}
.upload-task .row {
  align-items: center;
}
.reader-shell .btn.secondary {
  background: var(--paper);
}
.reader-shell .btn.secondary:hover {
  background: var(--accent-soft);
}
@media (prefers-reduced-motion: no-preference) {
  .btn,
  .stepper button,
  summary {
    transition:
      background-color 0.16s ease,
      border-color 0.16s ease;
  }
}
@media (max-width: 1100px) {
  .stepper {
    display: flex;
    overflow-x: auto;
    padding: 3px;
  }
  .stepper button {
    flex: 1 0 160px;
  }
}
@media (max-width: 680px) {
  .hero {
    gap: 28px;
    padding-block: 12px 32px;
  }
  .hero h1 {
    font-size: clamp(34px, 9vw, 46px);
  }
  .hero p {
    font-size: 16px;
  }
  .hero .action-pair {
    max-width: none;
  }
  .hero .eyebrow {
    font-size: 10px;
  }
  .creation-card {
    padding: 20px;
  }
  .editor-actions > .action-pair {
    width: 100%;
    max-width: none;
    flex-basis: 100%;
  }
  .studio-paper .editor-step {
    padding: 0 0 12px;
  }
  .studio-paper .lesson-edit {
    padding: 14px;
  }
  header .account {
    flex-wrap: wrap;
    gap: 8px;
  }
  header .account .btn {
    min-width: 88px;
  }
  .security-actions {
    grid-template-columns: 1fr;
  }
  .upload-center-head > div {
    flex: 1 1 180px;
  }
  .upload-center-head > .btn {
    margin-left: auto;
  }
  .block-actions > .row {
    grid-template-columns: 1fr;
  }
}

/* Action boundaries are stronger than decorative card separators. */
.btn.secondary,
.btn.subtle,
.studio-paper .btn.secondary,
.studio-paper .btn.subtle,
.card-more > summary,
.studio-more > summary,
.block-actions > summary,
.article-format .btn,
.studio-paper .article-format .btn {
  border-color: #9d8c7a;
}
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-height);
  border-radius: var(--control-radius);
}
header {
  padding-inline: max(28px, calc((100vw - 1224px) / 2));
}
@media (max-width: 680px) {
  header {
    padding-inline: 16px;
  }
}

/* 0.8.5 — import is a visible workspace, not a hidden action in a file list. */
.import-workspace {
  border-style: solid;
  background: var(--bg);
}
.studio-paper .import-workspace {
  background: var(--bg);
}
.import-workspace > .row h3 {
  margin: 0;
  font-size: 24px;
}
.import-entry {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 24px;
  margin-block: 24px;
}
.import-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  padding: 24px;
  background: var(--panel);
  border: 1px dashed var(--accent);
  border-radius: var(--card-radius);
  min-width: 0;
}
.import-drop.drag-over {
  background: var(--accent-soft);
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.import-symbol {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  font-size: 28px;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--accent-soft);
}
.import-drop .file-picker {
  width: 100%;
  margin: 0;
  border: 0;
  padding: 0;
  text-align: left;
}
.import-drop input[type='file'] {
  max-width: 100%;
  min-width: 0;
}
.import-explainer {
  padding: 12px 0;
}
.import-explainer ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: import-step;
  display: grid;
  gap: 20px;
}
.import-explainer li {
  position: relative;
  padding-left: 36px;
}
.import-explainer li::before {
  counter-increment: import-step;
  content: counter(import-step);
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 700;
}
.import-explainer b,
.import-explainer span {
  display: block;
}
.import-explainer span {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}
.import-selection {
  display: grid;
  gap: 8px;
}
.import-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.import-choice > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.import-choice span,
.import-choice small {
  display: block;
  font-size: 13px;
  color: var(--muted);
}
.import-choice.invalid {
  border-color: var(--bad);
}
.import-choice .error {
  color: var(--bad);
}
.import-actions {
  margin-top: 18px;
  align-items: center;
}
.import-actions > span {
  flex: 1 1 240px;
}
.import-results-head {
  margin-block: 24px 12px;
}
.import-empty {
  padding: 32px 20px;
  display: grid;
  justify-items: center;
  gap: 12px;
}
.import-empty > span {
  font-size: 32px;
  color: var(--accent);
}
.import-empty p {
  max-width: 480px;
  margin: 0;
}
.import-start {
  padding: 24px;
  border-radius: 14px;
  background: var(--accent-soft);
}
.analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.analysis-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);
  border-radius: var(--card-radius);
}
.analysis-card.is-error {
  border-top-color: var(--bad);
}
.analysis-card h4 {
  margin: 0;
  font-size: 17px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.analysis-card p {
  margin: 0;
}
.analysis-card .file-type {
  min-width: 48px;
  background: var(--accent-soft);
  color: var(--accent);
}
.analysis-stage {
  color: var(--text);
  font-size: 14px;
}
.analysis-card.is-error .analysis-stage {
  color: var(--bad);
}
.analysis-card.is-ready .analysis-stage {
  color: var(--good);
}
.analysis-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.analysis-facts span {
  font-size: 12px;
  color: var(--text);
  background: var(--panel2);
  border-radius: 6px;
  padding: 4px 8px;
}
.analysis-suggestion {
  padding: 12px;
  border-left: 2px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 8px 8px 0;
}
.analysis-suggestion span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}
.analysis-suggestion b {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.analysis-card details {
  font-size: 13px;
}
.analysis-card summary {
  color: var(--text);
}
.analysis-card ul,
.analysis-card ol {
  padding-left: 20px;
  color: var(--muted);
}
.analysis-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.analysis-actions .btn {
  min-width: 0;
  width: 100%;
}
.analysis-actions > :only-child {
  grid-column: 1/-1;
}
.analysis-linked {
  color: var(--good);
  grid-column: 1/-1;
  font-size: 13px;
  padding-block: 8px;
}
.analysis-card .card-more {
  margin-top: auto;
}
.analysis-warnings {
  border-top: 1px solid var(--line);
}
.pdf-author-preview {
  max-height: 65dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.pdf-author-preview figure {
  margin: 0 0 16px;
}
.pdf-author-preview img {
  width: 100%;
  display: block;
  height: auto;
  background: #fff;
}
.pdf-author-preview figcaption {
  text-align: center;
  color: var(--muted);
  padding: 8px;
}
@media (max-width: 1100px) {
  .analysis-grid,
  .import-entry {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 680px) {
  .import-workspace {
    padding: 16px 12px;
  }
  .import-drop {
    padding: 18px 12px;
  }
  .analysis-card {
    padding: 16px;
  }
  .import-choice {
    flex-wrap: wrap;
    padding: 12px;
  }
  .import-choice > div {
    flex: 1 1 180px;
  }
  .import-results-head > .btn {
    width: 100%;
  }
}

/* 0.8.6: readable security instructions without exposing keys after closing. */
.security-guide {
  padding-left: 24px;
  line-height: 1.7;
}
.security-guide li + li {
  margin-top: 8px;
}
.mfa-secret {
  font-family: monospace;
  letter-spacing: 0.06em;
  overflow-wrap: anywhere;
  user-select: all;
}

/* 0.8.7 — one spacing scale, quiet nested surfaces and aligned controls. */
.review-field-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.security-setup-guide {
  margin-block: 16px;
}
.security-setup-guide > summary {
  min-height: 44px;
  padding-block: 10px;
  cursor: pointer;
}
.security-setup-guide .security-guide {
  margin-block: 12px;
}
:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --page-gutter: 28px;
  --section-gap: 24px;
  --surface-padding: 24px;
  --line: #51483f;
  --card-radius: 14px;
}
header {
  height: 76px;
  gap: 24px;
  box-shadow: 0 3px 18px #00000012;
}
header nav {
  gap: 18px;
}
.page {
  padding: 32px var(--page-gutter) 56px;
}
.page-heading {
  margin-bottom: var(--section-gap);
  max-width: 70ch;
}
.page-heading .eyebrow {
  margin-bottom: 8px;
}
.page-heading h1 {
  font-size: clamp(28px, 3vw, 38px);
  margin-bottom: 10px;
  line-height: 1.18;
  letter-spacing: -0.025em;
}
.page-heading > :last-child {
  margin-bottom: 0;
}
h2 {
  margin-bottom: 14px;
}
h3 {
  margin-bottom: 10px;
}
.row > :is(h2, h3, p) {
  margin-bottom: 0;
}
.space-top {
  margin-top: var(--section-gap);
}
p.tiny.space-top {
  margin-top: 16px;
}
.layout {
  gap: 28px;
  grid-template-columns: 200px minmax(0, 1fr);
}
.sidebar {
  top: 96px;
  gap: 4px;
  max-height: calc(100dvh - 116px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.sidebar a {
  padding: 10px 12px;
}
.panel {
  padding: var(--surface-padding);
  margin-bottom: 16px;
  box-shadow: none;
}
.panel > :first-child {
  margin-top: 0;
}
.panel > :last-child {
  margin-bottom: 0;
}
.grid {
  gap: 20px;
}
.stats {
  gap: 16px;
  margin: 20px 0;
}
.stats:has(> :nth-child(2):last-child) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.stat {
  padding: 20px;
  border-top-width: 1px;
  box-shadow: none;
}
.stat .value {
  margin-block: 8px;
}
.task-card {
  gap: 16px;
  padding: 16px 20px;
  min-height: 76px;
}
.empty {
  margin-block: 20px;
  padding: 32px 24px;
}
.empty p {
  margin-bottom: 16px;
}
.toolbar {
  margin-block: 20px 12px;
}
.chips {
  margin-block: 12px 24px;
  gap: 8px;
}
.hero {
  gap: 32px;
  padding-block: 16px 32px;
  margin-bottom: 28px;
}
.hero h1 {
  font-size: clamp(38px, 4.6vw, 58px);
  line-height: 1.1;
  margin-bottom: 20px;
}
.hero p {
  margin-bottom: 24px;
}
.hero .eyebrow {
  margin-bottom: 16px;
}
.hero-visual {
  height: 288px;
}
.visual-stack {
  height: 264px;
  padding: 24px;
}
.features {
  gap: 24px;
}
.feature {
  padding-block: 20px 0;
}
.feature b {
  margin-block: 8px;
}
.feature p {
  margin-bottom: 0;
}
.card {
  box-shadow: 0 3px 12px #00000012;
}
.card > a {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}
.card-body {
  padding: 20px;
  gap: 10px;
}
.card-body :is(h3, p) {
  margin: 0;
}
.card-body h3 {
  font-size: 18px;
}
.card-body > p {
  min-height: 0;
}
.card-author {
  line-height: 1.5;
}
.card-bottom {
  padding-top: 14px;
  margin-top: 4px;
}
.card-tags {
  padding: 0 20px 16px;
}
.card-tags .tags {
  margin: 0;
}
.tag {
  padding: 4px 9px;
  border-radius: 8px;
}
.product-layout {
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) 320px;
}
.product-layout > section {
  min-width: 0;
}
.purchase-panel {
  top: 96px;
}
.purchase-panel .price {
  margin-bottom: 12px;
  font-size: 32px;
}
.product-layout .reader-body {
  font-size: 16px;
  line-height: 1.75;
}
.btn,
.btn.small {
  min-inline-size: 96px;
}
.row > .btn + .btn,
td .row > .btn + .btn {
  margin: 0;
}
.panel > .btn + .btn {
  margin-inline-start: 8px;
}
label {
  margin-bottom: 16px;
}
.form-grid {
  gap: 0 16px;
}
textarea {
  min-height: 112px;
}
.field-hint {
  margin-top: 6px;
}
.notice {
  margin-block: 16px;
  padding: 12px 16px;
}
.auth {
  width: min(100%, 440px);
  margin: 12px auto;
}
.auth .page-heading {
  margin-bottom: 20px;
}
.auth form {
  margin-top: 0;
}
.auth .panel {
  padding: 24px;
}
.auth .row {
  gap: 12px;
}
.studio-intro {
  margin: 0 0 24px;
}
.studio-intro h1 {
  font-size: clamp(30px, 3.5vw, 42px);
}
.studio-intro > p {
  margin-bottom: 0;
}
.creation-grid {
  gap: 16px;
  margin-bottom: 20px;
}
.creation-card {
  padding: 22px;
  gap: 12px;
  box-shadow: none;
}
.creation-card h2 {
  font-size: 22px;
  line-height: 1.25;
  margin: 0;
}
.creation-card p {
  line-height: 1.65;
}
.creation-number {
  font-size: 20px;
}
.creation-cta {
  padding-top: 14px;
}
.studio-note {
  padding: 16px 18px;
  margin-block: 20px;
}
.studio-heading-v2 {
  margin-bottom: 4px;
  gap: 20px;
}
.studio-heading .page-heading {
  margin-bottom: 0;
}
.studio-heading .breadcrumb {
  display: inline-block;
  margin-bottom: 12px;
  background: transparent;
}
.studio-format {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.save-strip {
  padding-block: 10px;
}
.stepper {
  margin-block: 8px 20px;
  gap: 8px;
}
.stepper button {
  flex-direction: row;
  align-items: center;
}
.studio-paper {
  padding: var(--surface-padding);
  box-shadow: none;
}
.studio-paper .editor-step {
  padding: 0;
}
.section-heading {
  margin-bottom: 20px;
  padding-bottom: 16px;
}
.section-heading .eyebrow {
  margin-bottom: 6px;
}
.studio-paper .section-heading h2 {
  font-size: clamp(22px, 2.2vw, 26px);
  margin-bottom: 8px;
  max-width: none;
}
.section-heading p {
  max-width: 66ch;
  font-size: 14px;
}
.cover-editor {
  margin-top: 20px;
}
.studio-paper .cover-editor,
.studio-paper .import-workspace {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 20px 0 0;
  margin-bottom: 0;
}
.cover-editor > .row {
  margin-bottom: 16px;
}
.cover-editor > .row .eyebrow {
  margin-bottom: 4px;
}
.cover-workspace {
  gap: 20px;
}
.cover-workspace .cover-preview {
  margin-top: 0;
}
.cover-workspace .file-picker {
  padding: 12px;
  margin-bottom: 12px;
}
.cover-workspace p {
  font-size: 14px;
}
.studio-paper .lesson-edit {
  padding: 18px;
  margin-bottom: 16px;
}
.lesson-method {
  padding: 14px;
  gap: 12px;
}
.lesson-method p {
  margin-bottom: 0;
}
.studio-paper .article-editor-top {
  padding-block: 8px 12px;
  gap: 12px;
}
.article-blocks {
  padding: 0;
}
.studio-paper .article-editable {
  min-height: 120px;
}
.article-quick-add {
  padding: 12px;
  margin-block: 16px 8px;
}
.article-format {
  gap: 6px;
}
.editor-actions {
  margin-top: 20px;
  padding-top: 16px;
  gap: 12px;
}
.editor-actions > .action-pair {
  flex: 0 1 auto;
  max-width: none;
}
.editor-actions .studio-more {
  min-width: 0;
}
.pricing-options {
  margin-block: 16px;
  gap: 12px;
}
.pricing-option {
  margin-bottom: 0;
  padding: 18px;
  border-width: 1px;
  border-radius: 12px;
}
.pricing-option span {
  gap: 4px;
}
.pricing-option b {
  font-size: 16px;
}
.import-entry {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-block: 16px;
}
.import-workspace > .row h3 {
  font-size: 21px;
}
.import-workspace > p {
  font-size: 14px;
  margin-block: 12px;
  max-width: 66ch;
}
.import-drop {
  padding: 18px;
  gap: 8px;
}
.import-symbol {
  width: 40px;
  height: 40px;
  font-size: 24px;
  border-radius: 10px;
}
.import-explainer {
  padding: 0;
}
.import-explainer > summary {
  min-height: 44px;
  padding-block: 10px;
  cursor: pointer;
  font-size: 14px;
}
.import-explainer ol {
  gap: 14px;
  padding-block: 8px;
}
.import-actions {
  margin-top: 12px;
}
.import-empty {
  padding: 24px 16px;
  gap: 8px;
}
.import-results-head {
  margin-block: 20px 12px;
}
.analysis-grid {
  gap: 16px;
}
.analysis-card {
  padding: 18px;
  border-top-width: 1px;
  gap: 10px;
}
.reader-topbar {
  padding-block: 16px;
  gap: 16px;
}
.reading {
  gap: 28px;
  grid-template-columns: 232px minmax(0, 1fr);
}
.reading-paper {
  padding: clamp(24px, 3vw, 36px);
}
.reader-shell .reader-body {
  margin-block: 24px;
  line-height: 1.85;
}
.reading .outline {
  top: 96px;
}
dialog {
  padding: 24px;
}
#dialog-body {
  padding-top: 20px;
}
.dialog-content > h2:first-child {
  padding-right: 32px;
}
.dialog-content > :last-child {
  margin-bottom: 0;
}
#modal-error:empty {
  display: none;
}
footer {
  padding-block: 28px;
  gap: 20px;
}
.sr-only,
.studio-paper .studio-step-help.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 1100px) {
  header {
    height: auto;
    min-height: 76px;
    gap: 8px 16px;
  }
  header nav {
    gap: 18px;
    padding-bottom: 0;
  }
  .stepper button {
    flex-basis: 136px;
  }
  .creation-card {
    gap: 12px 20px;
  }
}
@media (max-width: 900px) {
  .layout,
  .reading {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .sidebar {
    max-height: none;
    overflow-y: visible;
    overflow-x: auto;
    padding: 6px;
  }
  .product-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .purchase-panel {
    position: static;
  }
}
@media (max-width: 680px) {
  :root {
    --page-gutter: 16px;
    --section-gap: 20px;
    --surface-padding: 16px;
  }
  .page {
    padding-top: 20px;
    padding-bottom: 40px;
  }
  .page-heading h1 {
    font-size: 28px;
  }
  .panel {
    margin-bottom: 12px;
  }
  .stats,
  .stats:has(> :nth-child(2):last-child) {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .stat {
    padding: 16px;
  }
  .grid {
    gap: 16px;
  }
  .hero {
    padding-block: 8px 24px;
    margin-bottom: 24px;
    gap: 24px;
  }
  .hero h1 {
    font-size: clamp(34px, 9vw, 46px);
  }
  .hero-visual {
    height: 264px;
  }
  .features {
    gap: 20px;
  }
  .card-body {
    padding: 18px;
  }
  .card-tags {
    padding: 0 18px 14px;
  }
  .auth {
    margin-top: 4px;
  }
  .auth .panel {
    padding: 20px;
  }
  .creation-card {
    padding: 18px;
  }
  .studio-intro h1 {
    font-size: 32px;
  }
  .studio-heading-v2 {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
  }
  .studio-format {
    margin: 0;
    padding: 6px 10px;
  }
  .studio-paper {
    padding: 16px;
  }
  .section-heading {
    margin-bottom: 16px;
    padding-bottom: 14px;
  }
  .cover-workspace {
    gap: 16px;
  }
  .studio-paper .lesson-edit {
    padding: 14px;
  }
  .editor-actions > .action-pair {
    width: 100%;
    flex-basis: 100%;
  }
  .editor-actions > .action-pair:has(> :only-child) {
    grid-template-columns: minmax(0, 1fr);
  }
  .lesson-method .row {
    width: 100%;
  }
  .import-drop {
    padding: 16px 12px;
  }
  .analysis-card {
    padding: 16px;
  }
  .reading-paper {
    padding: 20px 16px;
  }
  .reader-shell .reader-body {
    margin-block: 20px;
  }
  dialog {
    padding: 20px 16px;
  }
  footer {
    padding: 24px 16px;
    gap: 16px;
  }
}

/* 0.8.9 — warm glass controls; solid text surfaces and quiet decoration. */
:root {
  --glass-solid: #2d2925;
  --glass-tint: rgba(45, 41, 37, 0.76);
  --glass-sheen: rgba(255, 255, 255, 0.075);
  --glass-hover-sheen: rgba(255, 255, 255, 0.11);
  --glass-edge: #9d8c7a;
  --glass-ink: var(--text);
  --glass-shadow: 0 4px 12px #00000018, inset 0 1px 0 #ffffff22;
  --primary-fill: #ffa35c;
  --primary-ink: #24180e;
  --primary-edge: #ffc18e;
  --primary-sheen: rgba(255, 255, 255, 0.22);
  --primary-shade: rgba(152, 64, 15, 0.12);
}
.reader-light,
.reader-warm {
  --glass-solid: var(--paper);
  --glass-tint: rgba(255, 255, 255, 0.72);
  --glass-sheen: rgba(255, 255, 255, 0.24);
  --glass-hover-sheen: rgba(255, 255, 255, 0.36);
  --glass-edge: #93836e;
  --glass-ink: var(--ink);
  --glass-shadow: 0 3px 10px #3024150d, inset 0 1px 0 #ffffffa3;
  --primary-fill: #93430e;
  --primary-ink: #fffaf5;
  --primary-edge: #813807;
  --primary-sheen: rgba(255, 255, 255, 0.08);
  --primary-shade: rgba(80, 29, 0, 0.12);
}
.btn.secondary,
.btn.subtle,
.studio-paper .btn.secondary,
.studio-paper .btn.subtle,
.reader-shell .btn.secondary,
.card-more > summary,
.studio-more > summary,
.block-actions > summary,
.stepper button:not(.active),
.chip:not(.active),
dialog .close {
  background-color: var(--glass-solid);
  background-color: var(--glass-tint);
  background-image: linear-gradient(180deg, var(--glass-sheen), transparent 75%);
  border-color: var(--glass-edge);
  color: var(--glass-ink);
  box-shadow: var(--glass-shadow);
}
.btn:not(.secondary):not(.subtle):not(.danger) {
  background-color: var(--primary-fill);
  background-image: linear-gradient(
    180deg,
    var(--primary-sheen),
    transparent 52%,
    var(--primary-shade)
  );
  border-color: var(--primary-edge);
  color: var(--primary-ink);
  box-shadow:
    0 4px 12px #8c471519,
    inset 0 1px 0 #ffffff69;
}
/* Formatting tools are intentionally quiet and retain their full hit area. */
.article-format .btn,
.studio-paper .article-format .btn {
  background-color: var(--panel);
  background-image: none;
  box-shadow: none;
}
header {
  background-color: #151311;
  background-image: linear-gradient(180deg, #ffffff05, transparent);
  border-bottom-color: #75604b;
  box-shadow: 0 4px 20px #00000016;
}
dialog,
.upload-center {
  background-color: var(--panel);
  background-image: linear-gradient(160deg, #ffffff06, transparent 45%);
  box-shadow:
    0 18px 48px #00000038,
    inset 0 1px 0 #ffffff14;
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  header {
    background-color: rgba(21, 19, 17, 0.92);
    -webkit-backdrop-filter: blur(12px) saturate(115%);
    backdrop-filter: blur(12px) saturate(115%);
  }
  dialog,
  .upload-center {
    background-color: rgba(33, 30, 27, 0.96);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
}
.creation-card,
.creation-card:first-child,
.creation-card:nth-child(2),
.creation-card:nth-child(3) {
  background: var(--panel);
}
.stat {
  border-top-color: var(--line);
}
.card:hover,
.creation-card:hover,
.card:hover .card-cover img {
  transform: none;
}
.card-cover::after {
  opacity: 0.45;
  box-shadow: none;
}
.visual-stack {
  box-shadow: 8px 8px 0 #30251e;
}
.visual-tag {
  box-shadow: 0 5px 14px #0000001c;
}
@media (hover: hover) and (pointer: fine) {
  .btn.secondary:not(:disabled):hover,
  .btn.subtle:not(:disabled):hover,
  .studio-paper .btn.secondary:not(:disabled):hover,
  .studio-paper .btn.subtle:not(:disabled):hover,
  .reader-shell .btn.secondary:not(:disabled):hover,
  .card-more > summary:hover,
  .studio-more > summary:hover,
  .block-actions > summary:hover,
  .chip:not(.active):hover,
  dialog .close:not(:disabled):hover {
    background-color: var(--glass-tint);
    background-image: linear-gradient(180deg, var(--glass-hover-sheen), transparent 85%);
    border-color: var(--accent);
    color: var(--glass-ink);
    box-shadow:
      0 5px 16px #00000020,
      inset 0 1px 0 #ffffff30;
  }
  .btn:not(.secondary):not(.subtle):not(.danger):not(:disabled):hover {
    background-color: var(--primary-fill);
    background-image: linear-gradient(180deg, var(--primary-sheen), transparent 75%);
    color: var(--primary-ink);
    box-shadow:
      0 5px 16px #8c47152b,
      inset 0 1px 0 #ffffff80;
  }
  .card:hover,
  .creation-card:hover {
    transform: none;
    border-color: #8a6b4e;
    box-shadow: 0 8px 24px #0000001f;
  }
  .card:hover .card-cover img {
    transform: none;
  }
  .article-format .btn:not(:disabled):hover,
  .studio-paper .article-format .btn:not(:disabled):hover {
    background-color: var(--panel2);
    background-image: none;
    box-shadow: none;
    border-color: var(--accent);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .btn,
  .card-more > summary,
  .studio-more > summary,
  .block-actions > summary {
    transition:
      background-color 140ms ease,
      border-color 140ms ease,
      box-shadow 140ms ease;
  }
}
.btn:not(:disabled):active {
  box-shadow: inset 0 2px 5px #00000020;
}
.btn.danger,
.studio-paper .btn.danger,
.reader-shell .btn.danger {
  background: var(--bad-soft);
  color: var(--bad);
  border-color: var(--bad);
  box-shadow: none;
}
.btn:disabled,
.btn:disabled:hover,
.studio-paper .btn:disabled,
.studio-paper .btn:disabled:hover,
.reader-shell .btn:disabled,
.reader-shell .btn:disabled:hover,
dialog .close:disabled,
.stepper button:disabled {
  background: var(--panel2);
  color: var(--muted);
  border-color: var(--line);
  box-shadow: none;
  transform: none;
  opacity: 1;
  cursor: not-allowed;
}
@media (max-width: 680px) {
  header {
    background-color: #151311;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
@media (prefers-reduced-transparency: reduce) {
  header,
  dialog,
  .upload-center {
    background-color: var(--panel);
    background-image: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .btn.secondary,
  .btn.subtle,
  .studio-paper .btn.secondary,
  .studio-paper .btn.subtle,
  .reader-shell .btn.secondary,
  .card-more > summary,
  .studio-more > summary,
  .block-actions > summary,
  .stepper button:not(.active),
  .chip:not(.active),
  dialog .close {
    background-color: var(--glass-solid) !important;
    background-image: none !important;
    box-shadow: none !important;
  }
}
@media (forced-colors: active) {
  .btn,
  .studio-paper .btn,
  .reader-shell .btn,
  .card-more > summary,
  .studio-more > summary,
  .block-actions > summary,
  .stepper button,
  .chip,
  dialog .close {
    background: ButtonFace !important;
    color: ButtonText !important;
    border-color: ButtonText !important;
    box-shadow: none !important;
    forced-color-adjust: auto;
  }
  :is(a, button, summary, input, textarea, select):focus-visible {
    outline-color: Highlight;
  }
  .btn:disabled,
  .studio-paper .btn:disabled,
  .reader-shell .btn:disabled {
    color: GrayText !important;
    border-color: GrayText !important;
  }
}

/* 0.9.0: clear priorities and private learning conversations. */
.account-change-actions {
  margin-bottom: 20px;
}
.editor-next-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  margin-bottom: 24px;
  border: 1px solid #83705b;
  border-radius: 12px;
  background: #f6f1e8;
  color: #28241f;
}
.editor-next-action[hidden] {
  display: none;
}
.editor-next-action p {
  margin: 6px 0 0;
}
.editor-next-action .eyebrow {
  color: #66513d;
}
.editor-next-action .btn {
  flex-shrink: 0;
}
.import-outcome {
  display: grid;
  gap: 6px;
  margin-block: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.import-outcome span {
  font-size: 14px;
}
.attention-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}
.attention-list li {
  display: grid;
  gap: 6px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.attention-list li > span {
  font-size: 13px;
  color: var(--muted);
}
.evolution-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-block: 20px;
}
.evolution-metrics > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.evolution-metrics b {
  font-size: 24px;
}
.evolution-metrics span {
  font-size: 13px;
  color: var(--muted);
}
.evolution-pager {
  margin-block: 20px;
}
.question-card {
  overflow-wrap: anywhere;
}
.question-card blockquote {
  margin: 12px 0;
  padding: 12px;
  border-left: 3px solid var(--accent);
  background: rgba(128, 128, 128, 0.08);
  white-space: pre-wrap;
}
.question-card .question-text,
.question-answer p {
  white-space: pre-wrap;
}
.question-answer {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 16px;
}
.question-card form {
  margin-block: 16px;
}
.lesson-questions .row {
  margin-bottom: 16px;
}
.lesson-questions .question-card {
  margin-top: 16px;
  background: transparent;
  color: inherit;
}
.update-entry {
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
}
.material-preview > summary {
  cursor: pointer;
  min-height: 44px;
  padding-block: 12px;
}
@media (max-width: 680px) {
  .editor-next-action {
    align-items: stretch;
    flex-direction: column;
  }
  .evolution-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .account-change-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* Author pages: calm contrast, fixed controls and restrained decorative layers. */
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.profile-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.profile-entry h2,
.profile-entry p {
  margin: 0;
}
.profile-entry p {
  margin-top: 6px;
}
.author-hero {
  --profile-surface: #fbf8f2;
  --profile-ink: #29251f;
  --profile-muted: #655b4c;
  --profile-accent: #765e3b;
  border: 1px solid #b1a28a;
  border-radius: 24px;
  overflow: hidden;
  background: var(--profile-surface);
  color: var(--profile-ink);
  margin: 24px 0 36px;
  box-shadow: 0 16px 48px #372b1710;
}
.profile-theme-sage {
  --profile-surface: #f0f5ef;
  --profile-ink: #223027;
  --profile-muted: #4b6151;
  --profile-accent: #395a44;
}
.profile-theme-night {
  --profile-surface: #252a30;
  --profile-ink: #f4f2ec;
  --profile-muted: #d3c8b5;
  --profile-accent: #e4c38e;
  border-color: #6e7680;
}
.author-banner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 80% 20%, #f0dfb5 0, transparent 50%),
    linear-gradient(125deg, #c8b79a, #a58c6c);
  overflow: hidden;
}
.profile-theme-sage .author-banner {
  background:
    radial-gradient(ellipse at 75% 10%, #d7e5c7 0, transparent 55%),
    linear-gradient(125deg, #798f7b, #b4c9ae);
}
.profile-theme-night .author-banner {
  background:
    radial-gradient(ellipse at 75% 15%, #6b6151 0, transparent 55%),
    linear-gradient(125deg, #303b48, #595666);
}
.author-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.author-banner-mark {
  position: absolute;
  right: 28px;
  top: 24px;
  font-size: 32px;
  letter-spacing: -1.5px;
  color: #302b25;
  font-weight: 650;
}
.profile-theme-night .author-banner-mark {
  color: #f4eee1;
}
.author-identity {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  padding: 0 32px 24px;
  position: relative;
  margin-top: -45px;
}
.author-portrait {
  flex: 0 0 144px;
  width: 144px;
  height: 144px;
  border: 5px solid var(--profile-surface);
  border-radius: 28px;
  background: var(--profile-surface);
  box-shadow: 0 4px 16px #0002;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--profile-ink);
  font-size: 42px;
}
.author-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.author-heading {
  flex: 1;
  min-width: 0;
  padding-top: 60px;
}
.author-heading h1 {
  font-size: clamp(24px, 3.5vw, 38px);
  line-height: 1.18;
  margin: 6px 0 10px;
  color: var(--profile-ink);
  overflow-wrap: anywhere;
  letter-spacing: -0.7px;
}
.author-heading .eyebrow {
  color: var(--profile-muted);
}
.author-headline {
  color: var(--profile-muted);
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.55;
}
.author-share {
  padding-bottom: 2px;
}
.author-hero .btn.secondary {
  color: var(--profile-ink);
  border-color: var(--profile-muted);
  background: var(--profile-surface);
  box-shadow: inset 0 1px #fff2;
}
.author-about {
  padding: 0 32px 30px;
  max-width: 850px;
}
.author-about h2 {
  font-size: 16px;
  margin: 12px 0;
  color: var(--profile-ink);
}
.author-about p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.75;
  color: var(--profile-ink);
  margin: 0;
}
.author-materials > .row {
  margin-bottom: 20px;
}
.public-author .pagination {
  justify-content: center;
  gap: 12px;
  display: flex;
  margin-top: 24px;
}
.appearance-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 24px;
  align-items: start;
}
.appearance-layout > *,
.profile-state > * {
  min-width: 0;
}
.appearance-layout aside {
  position: sticky;
  top: 24px;
}
.appearance-layout .author-hero {
  margin-top: 0;
}
.appearance-layout .author-hero {
  --author-banner-space: 140px;
}
.appearance-layout .author-identity {
  padding-left: 20px;
  padding-right: 20px;
  gap: 16px;
  align-items: flex-start;
}
.appearance-layout .author-portrait {
  width: 112px;
  height: 112px;
  flex-basis: 112px;
  border-radius: 22px;
}
.appearance-layout .author-heading {
  padding-top: 60px;
}
.appearance-layout .author-heading h1 {
  font-size: 25px;
}
.appearance-layout .author-about {
  padding-left: 20px;
  padding-right: 20px;
}
#appearance-form fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
#appearance-form legend {
  font-size: 18px;
  font-weight: 650;
  padding: 0 0 20px;
}
#appearance-form fieldset:disabled {
  opacity: 0.7;
}
.profile-upload-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}
.profile-upload-field {
  border: 1px solid var(--line, #c8bca7);
  border-radius: 14px;
  padding: 16px;
  min-width: 0;
}
.profile-upload-field .btn {
  margin: 4px 4px 0 0;
}
.profile-upload-field p {
  line-height: 1.55;
}
.profile-file-label {
  position: relative;
  overflow: hidden;
  display: inline-flex !important;
  cursor: pointer;
}
.profile-file-label input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}
.profile-file-label:focus-within {
  outline: 3px solid #886b3b;
  outline-offset: 3px;
}
.profile-state {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}
.profile-state p {
  margin: 6px 0 0;
}
.profile-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.65;
  margin-bottom: 18px;
}
.profile-consent input {
  flex: 0 0 18px;
  width: 18px;
  margin-top: 4px;
}
.profile-media-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line, #c8bca7);
}
.profile-media-row:last-child {
  border: 0;
}
.profile-media-row > img,
.profile-media-placeholder {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
  flex: 0 0 64px;
}
.profile-media-placeholder {
  display: grid;
  place-items: center;
  background: #e9e1d5;
  font-size: 28px;
  color: #554632;
}
.profile-media-row > div {
  min-width: 0;
}
.profile-media-row p {
  margin: 4px 0;
  overflow-wrap: anywhere;
}
.profile-media-actions {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.profile-qr {
  display: block;
  width: 240px;
  max-width: 100%;
  height: auto;
  margin: 16px auto;
  background: #fff;
  border: 1px solid #b2a58f;
  border-radius: 8px;
}
.profile-review-bio {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.profile-review-images {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0;
}
.profile-review-images img {
  max-width: 100%;
  width: 240px;
  height: 140px;
  object-fit: contain;
  background: #eee8de;
  border-radius: 12px;
}
.profile-review-card form {
  margin-top: 20px;
}
@media (max-width: 1050px) {
  .appearance-layout {
    grid-template-columns: 1fr;
  }
  .appearance-layout aside {
    position: static;
    grid-row: 1;
  }
  .appearance-layout .author-hero {
    --author-banner-space: 160px;
  }
  .profile-upload-fields {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 680px) {
  .author-identity {
    padding: 0 20px 20px;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: -36px;
  }
  .author-portrait {
    width: 104px;
    height: 104px;
    flex-basis: 104px;
    border-radius: 24px;
  }
  .author-heading {
    padding-top: 50px;
    flex-basis: calc(100% - 120px);
  }
  .author-share {
    width: 100%;
  }
  .author-share .btn {
    width: 100%;
  }
  .author-about {
    padding: 0 20px 24px;
  }
  .author-heading h1 {
    font-size: 25px;
  }
  .profile-entry,
  .profile-state {
    flex-direction: column;
    align-items: stretch;
  }
  .profile-upload-fields {
    grid-template-columns: 1fr;
  }
  .profile-media-row {
    flex-wrap: wrap;
  }
  .profile-media-actions {
    width: 100%;
    margin-left: 76px;
    justify-content: flex-start;
  }
  .author-materials > .row {
    align-items: flex-start;
    gap: 12px;
  }
}

.profile-address-field {
  margin: 20px 0;
  padding: 16px;
  border: 1px solid var(--line, #c8bca7);
  border-radius: 14px;
  min-width: 0;
}
.profile-address-field p {
  overflow-wrap: anywhere;
}
#appearance-form [aria-invalid='true'] {
  border-color: #9a312c;
  outline: 1px solid #9a312c;
}
@media (max-width: 680px) {
  .appearance-layout .author-portrait {
    width: 104px;
    height: 104px;
    flex-basis: 104px;
  }
}

/* Learning-only states and progress. Layout uses the shared material-card component. */
.card-cover {
  display: grid;
  place-items: center;
}
.card-cover img {
  position: absolute;
  inset: 0;
}
.library-learning-state {
  color: var(--accent);
}
.library-learning-state.is-complete {
  color: var(--good);
}
.library-progress-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.library-progress progress {
  display: block;
  appearance: none;
  width: 100%;
  height: 6px;
  margin: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel2);
  color: var(--accent);
  accent-color: var(--accent);
}
.library-progress progress::-webkit-progress-bar {
  background: var(--panel2);
  border-radius: 10px;
}
.library-progress progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: 10px;
}
.library-progress progress::-moz-progress-bar {
  background: var(--accent);
  border-radius: 10px;
}
.learning-card .library-access-note {
  margin: 0;
  min-height: 0;
  color: var(--muted);
  font-size: 13px;
}
#cover-frame-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  margin: 16px 0;
  background: var(--panel2);
}
.cover-frame-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.cover-frame-controls input[type='range'] {
  padding: 0;
  height: 32px;
  accent-color: var(--accent);
}
@media (max-width: 680px) {
  .cover-frame-controls {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
}

/* Full author background and shared public/learning card layout (0.9.5). */
.author-hero {
  --author-banner-space: 180px;
  --profile-reading-surface: rgba(251, 248, 242, 0.92);
  position: relative;
  isolation: isolate;
  padding-top: var(--author-banner-space);
}
.profile-theme-sage {
  --profile-reading-surface: rgba(240, 245, 239, 0.92);
}
.profile-theme-night {
  --profile-reading-surface: rgba(37, 42, 48, 0.92);
}
.author-hero > .author-banner {
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.author-banner img {
  object-position: center;
}
.author-hero .author-identity {
  position: relative;
  z-index: 1;
  padding: 24px;
  margin: 0;
  align-items: center;
  background: var(--profile-reading-surface);
}
.author-hero .author-heading {
  padding-top: 0;
}
.author-hero .author-about {
  position: relative;
  z-index: 1;
  max-width: none;
  padding: 0 24px 24px;
  background: var(--profile-reading-surface);
}
.author-about p {
  max-width: 76ch;
}
/* 0.9.6 — cover is the background of the entire card, including the content. */
.material-card {
  --material-visual-space: 160px;
  --material-reading-start: rgba(21, 19, 17, 0.8);
  --material-reading-end: rgba(21, 19, 17, 0.9);
  position: relative;
  isolation: isolate;
  padding: var(--material-visual-space) 12px 12px;
  background: linear-gradient(145deg, #3c3027, var(--panel));
}
.material-card > .material-cover-link,
.material-card > .card-cover {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
}
.material-card .card-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  background: transparent;
}
.material-card .card-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.material-card .cover-glyph {
  position: absolute;
  top: 68px;
  left: 20px;
  font-size: 48px;
  opacity: 0.5;
}
.material-card .card-cover .pill {
  max-width: calc(100% - 32px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  background: var(--panel);
}
.material-card:focus-within {
  border-color: var(--accent);
}
.material-grid,
.library-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}
.material-card > .material-cover-link {
  display: block;
  flex: 0 0 auto;
}
.material-cover-link:focus-visible {
  outline-offset: -4px;
}
.material-card .card-body {
  position: relative;
  z-index: 1;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--material-reading-start), var(--material-reading-end));
}
.material-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.material-rating {
  color: var(--accent);
  white-space: nowrap;
}
.material-card h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.material-card-author {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.material-card-author a {
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}
.material-card .material-card-summary {
  flex: 0 0 auto;
  min-height: 0;
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.material-card-footer {
  margin-top: auto;
  padding-top: 6px;
  display: grid;
  gap: 14px;
}
.material-card-tags,
.material-card-tags .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  min-width: 0;
}
.material-card-tags .tags {
  display: contents;
}
.material-card-tags .tag {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.material-more-tags {
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 9px;
  font-size: 12px;
}
.material-card-offer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.material-price {
  color: var(--text);
  font-size: 20px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.material-price.is-free {
  color: var(--accent);
}
.material-card .material-card-action {
  height: 40px;
  min-height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  line-height: 1.3;
  white-space: normal;
  width: 100%;
}
@media (hover: hover) and (pointer: fine) {
  .material-card h3 a:hover,
  .material-card-author a:hover,
  .material-more-tags:hover {
    color: var(--accent);
  }
}
@media (max-width: 1050px) {
  .material-grid,
  .library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}
@media (max-width: 680px) {
  .material-card {
    --material-visual-space: 140px;
  }
  .author-hero,
  .appearance-layout .author-hero {
    --author-banner-space: 120px;
  }
  .author-hero .author-identity {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
  }
  .author-hero .author-heading {
    flex-basis: auto;
    width: 100%;
  }
  .author-hero .author-about {
    padding: 0 20px 20px;
  }
  .material-grid,
  .library-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .material-card .material-card-action {
    height: 44px;
    min-height: 44px;
  }
}

/* 0.9.7 — native radio choices with vector stars, shared with published ratings. */
.rating-star-icon {
  display: block;
  flex: 0 0 auto;
  color: var(--muted);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: round;
  pointer-events: none;
  transition: color 0.15s, filter 0.15s;
}
.rating-star-icon.is-filled,
.rating-option.is-filled .rating-star-icon {
  color: var(--accent);
  fill: currentColor;
}
.review-rating {
  border: 0;
  padding: 0;
  margin: 0 0 16px;
  min-width: 0;
}
.review-rating legend {
  padding: 0;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}
.review-rating-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.review-rating-options {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
}
.review-rating .rating-option {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
}
.review-rating .rating-option input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}
.rating-option .rating-star-icon {
  width: 32px;
  height: 32px;
}
.rating-option.is-filled .rating-star-icon {
  filter: drop-shadow(0 2px 4px rgba(255, 163, 92, 0.16));
}
.review-rating .rating-option:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.review-rating-caption {
  flex: 1 1 190px;
  min-width: 0;
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.rating-stars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.rating-stars .rating-star-icon {
  width: 20px;
  height: 20px;
}
.review-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.review-card-heading b {
  min-width: 0;
  overflow-wrap: anywhere;
}
.material-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.material-rating > .rating-star-icon {
  width: 16px;
  height: 16px;
}
@media (hover: hover) and (pointer: fine) {
  .review-rating .rating-option:hover {
    background: rgba(255, 163, 92, 0.08);
  }
}
@media (max-width: 480px) {
  form[data-form='review'] {
    padding: 16px;
  }
  .review-rating-options {
    gap: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rating-star-icon {
    transition: none;
  }
}

/* 0.10.0 — document-style writing, with the existing school.art palette. */
.article-editor.article-studio {
  overflow: visible;
  border-radius: 16px;
  background: var(--panel);
}
.article-studio .article-editor-top {
  padding: 20px 24px;
  border-radius: 16px 16px 0 0;
  gap: 12px;
}
.article-studio .article-editor-top h3 { font-size: 20px; }
.article-studio .article-blocks {
  max-width: 800px;
  margin: 0 auto;
  padding: 28px clamp(16px, 3vw, 36px);
  color: var(--text);
  font-size: 18px;
  line-height: 1.75;
}
.article-studio .article-block {
  position: relative;
  margin: 0 0 8px;
  padding: 8px 40px 8px 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
}
.article-studio .article-block:focus-within { border-color: var(--line); box-shadow: none; }
.article-studio .article-block-head {
  position: absolute;
  top: 4px;
  right: 4px;
  padding: 0;
  margin: 0;
  border: 0;
  width: 32px;
  min-height: 32px;
  z-index: 3;
}
.article-studio .article-block-head > b { display: none; }
.article-studio .block-actions > summary {
  display: grid;
  place-items: center;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}
.article-studio .block-actions[open] { z-index: 15; }
.article-studio .block-actions > .row { width: min(270px, 72vw); }
.article-editor.article-studio .article-editable,
.studio-paper .article-editor.article-studio .article-editable {
  min-height: 1.8em;
  margin: 0;
  padding: 4px 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  font-size: inherit;
  line-height: 1.75;
  white-space: pre-wrap;
}
.article-studio .article-editable:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
  pointer-events: none;
}
.article-studio .article-editable:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }
.article-studio .article-block[data-type='heading'] { margin-top: 16px; }
.article-studio .article-block[data-type='heading'] .article-editable { font-size: 1.5em; line-height: 1.3; font-weight: 700; }
.article-studio .article-block[data-type='heading'] > label,
.article-studio .article-block[data-type='callout'] > label { max-width: 230px; font-size: 12px; margin-bottom: 8px; }
.article-studio .article-block[data-type='quote'] .article-editable { border-left: 3px solid var(--accent); padding-left: 16px; }
.article-studio .article-block[data-type='callout'] { padding: 18px 40px 18px 18px; background: var(--panel2); border-left: 3px solid var(--accent); }
.article-studio .article-format {
  display: none;
  position: fixed;
  z-index: 90;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 5px;
  max-width: min(280px, calc(100vw - 16px));
  margin: 0;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 28px #0005;
}
.article-studio .has-text-selection .article-format { display: flex; }
.article-studio .article-format .btn { min-width: 36px; min-height: 36px; height: 36px; padding: 0 8px; font-size: 14px; }
.article-studio .article-format [data-format='bold'] { font-weight: 800; }
.article-studio .article-format [data-format='italic'] { font-style: italic; }
.article-studio .article-format [data-format='underline'] { text-decoration: underline; }
.article-photo-tools { margin-bottom: 16px; font-size: 14px; }
.article-photo-tools .row { flex-wrap: wrap; gap: 8px; }
.article-photo-tools p { margin: 8px 0; }
.article-photo-layout { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.article-photo-layout [aria-pressed='true'] { color: var(--accent); border-color: var(--accent); background-color: var(--accent-soft); }
.article-studio .article-media-canvas { margin: 16px 0; }
.article-studio .article-media-canvas:not(.article-media-text) > figure { max-width: 80%; margin: 0 auto; }
.article-studio .article-media-canvas.photo-wide > figure { max-width: 100%; }
.article-studio .article-media-text > figure { max-width: none; margin: 0 0 14px; }
.article-studio .article-media-text .article-copy { font-size: 18px; }
.article-photo-visual img,
.article-photo-visual video { display: block; width: 100%; max-width: 100%; height: auto; border-radius: 10px; background: var(--panel2); }
.article-photo-caption { margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.article-photo-placeholder { display: grid; gap: 8px; place-items: center; align-content: center; padding: 24px 16px; min-height: 160px; background: var(--panel2); border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); text-align: center; font-size: 13px; }
.article-photo-placeholder > span[aria-hidden] { color: var(--accent); font-size: 32px; }
.article-photo-upload { position: relative; cursor: pointer; margin: 0; }
.article-studio .article-photo-upload input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.article-photo-upload:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.article-photo-meta { margin: 16px 0 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.article-photo-meta > summary { cursor: pointer; color: var(--muted); }
.article-photo-meta[open] > summary { margin-bottom: 16px; }
.article-photo-meta label { font-size: 13px; }
.article-photo-gallery { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin: 12px 0 20px; }
.article-photo-choice { display: grid; min-width: 0; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel2); color: var(--text); cursor: pointer; text-align: left; }
.article-photo-choice[aria-pressed='true'] { border-color: var(--accent); }
.article-photo-choice img { width: 100%; height: 72px; object-fit: cover; border-radius: 6px; }
.article-photo-choice span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.article-writing-status { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; max-width: 800px; margin: 0 auto; padding: 12px 24px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }
.article-studio .article-quick-add { flex-wrap: wrap; gap: 8px; padding: 16px 24px; }
.article-slash-menu { position: fixed; z-index: 95; width: 280px; max-width: calc(100vw - 24px); max-height: min(45vh,320px); overflow-y: auto; padding: 6px; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px #0005; }
.article-slash-menu > button { display: grid; gap: 3px; width: 100%; min-height: 48px; margin: 0; padding: 10px 12px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.article-slash-menu > button small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.article-slash-menu > button.is-active,
.article-slash-menu > button:hover { border-color: var(--line); background: var(--panel2); }
.article-focus .article-quick-add,
.article-focus .article-advanced,
.article-focus .article-writing-hint,
.article-focus .article-editor-top p { display: none; }
.native-article { line-height: 1.75; font-size: inherit; }
.native-article > p { max-width: 72ch; margin: 1em 0; }
.native-article h2 { font-size: 1.6em; line-height: 1.3; margin: 1.5em 0 0.6em; }
.native-article h3 { font-size: 1.25em; line-height: 1.4; }
.native-article blockquote { border-left-width: 3px; background: var(--panel2); border-radius: 0 10px 10px 0; }
.native-article figcaption { color: var(--muted); }
.article-missing { color: var(--text); background: var(--panel2); border-color: var(--line); }
@media (max-width: 680px) {
  .article-studio .article-editor-top { padding: 16px; }
  .article-studio .article-blocks { padding: 18px 10px; font-size: 17px; }
  .article-studio .article-block { padding-left: 4px; padding-right: 36px; }
  .article-studio .article-format .btn { min-height: 44px; height: 44px; min-width: 44px; }
  .article-photo-layout .btn { min-height: 40px; }
  .article-photo-gallery { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .article-studio .article-media-canvas > figure,
  .article-studio .article-media-text > figure { float: none; width: 100%; max-width: 100%; margin: 0 0 16px; }
  .article-studio .article-media-text { display: block; }
  .article-studio .article-media-text .article-copy { font-size: 17px; }
  .article-writing-status { padding: 12px 16px; }
}

/* 0.10.1 — writing on the left, a stable live reader on the right. */
.page.layout:has(#editor-form) { max-width: 1600px; }
.material-extra,
.lesson-title-options,
.article-import-more { margin: 12px 0 20px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; }
.material-extra > summary,
.lesson-title-options > summary,
.article-import-more > summary { color: var(--muted); cursor: pointer; font-size: 14px; }
.material-extra[open] > summary,
.lesson-title-options[open] > summary { margin-bottom: 16px; }
.material-extra > :last-child,
.lesson-title-options > :last-child { margin-bottom: 0; }
.article-import-more > .import-workspace { margin-bottom: 0; }
.article-workspace { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 0; align-items: start; }
.article-compose,
.article-live-preview { min-width: 0; }
.article-pane-switch { display: none; }
.article-live-preview { position: sticky; top: 96px; border-left: 1px solid var(--line); background: var(--panel2); border-radius: 0 0 16px 0; padding: 20px; }
.article-live-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.article-live-heading h4 { margin: 4px 0 0; font-size: 16px; line-height: 1.4; }
.article-live-heading .eyebrow { font-size: 10px; }
.article-live-heading .btn { min-height: 40px; padding: 6px 10px; font-size: 12px; }
.article-live-note { margin: 12px 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.article-live-scroll { max-height: calc(100dvh - 220px); min-height: min(260px,55dvh); overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; scrollbar-width: thin; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.article-live-paper { min-height: 260px; padding: 24px 20px; background: var(--panel); color: var(--text); font-size: 17px; line-height: 1.75; overflow-wrap: anywhere; }
.article-live-paper.preview-phone { max-width: 390px; margin-inline: auto; }
.article-live-title { margin: 0 0 24px; font-size: 24px; line-height: 1.3; }
.article-live-empty { padding: 16px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 14px; }
.article-workspace .article-blocks { padding: 24px 16px; font-size: 17px; }
.article-workspace .article-media-text .article-copy { font-size: 17px; }
.article-workspace .article-photo-gallery { grid-template-columns: repeat(2,minmax(0,1fr)); }
.article-workspace .article-quick-add { margin: 0; padding: 16px; gap: 8px; }
.article-workspace .article-quick-add > span { flex-basis: auto; margin: 0; }
.article-workspace .article-quick-add .btn { min-inline-size: 80px; }
.article-workspace .article-writing-status { padding: 12px 16px; }
.article-compose > .article-advanced { margin: 16px; }
.article-compose > .article-writing-hint { margin: 16px; padding: 0; }
@media (min-width: 1280px) {
  .article-focus .article-workspace { grid-template-columns: minmax(0,1fr); }
  .article-focus .article-live-preview { display: none; }
}
@media (max-width: 1279px) {
  .article-workspace { display: block; }
  .article-pane-switch { display: flex; padding: 12px 16px; gap: 8px; border-bottom: 1px solid var(--line); }
  .article-pane-switch .btn { flex: 1; min-inline-size: 0; }
  .article-pane-switch [aria-pressed='true'] { border-color: var(--accent); color: var(--accent); background-color: var(--accent-soft); }
  .article-editor[data-article-pane='edit'] .article-live-preview,
  .article-editor[data-article-pane='preview'] .article-compose { display: none; }
  .article-live-preview { position: static; border-left: 0; border-radius: 0 0 16px 16px; padding: 16px; }
  .article-live-scroll { max-height: 70dvh; }
}
@media (max-width: 680px) {
  .article-workspace .article-blocks { padding: 18px 10px; }
  .article-live-paper { padding: 20px 14px; }
  .article-live-title { font-size: 22px; }
  .article-live-heading .btn { min-height: 44px; }
  .article-live-preview { padding: 12px; }
}

@media (max-width: 680px) {
  .studio-paper .lesson-edit:has(.article-studio) { padding: 0; border: 0; background: transparent; }
  .article-studio .article-editor-top > .row { gap: 6px; }
  .article-studio .article-editor-top > .row .btn { flex: 1 1 calc(50% - 6px); min-inline-size: 0; font-size: 13px; white-space: normal; }
}

/* 0.11.0 — a calm writing surface and explicit publication/recovery. */
.studio-unified { background: var(--panel); }
.studio-unified .studio-intro { max-width: 900px; margin-bottom: 20px; }
.studio-unified .studio-intro [name='title'] { font-size: 23px; font-weight: 700; }
.studio-unified > .editor-step[data-step='1'] > .section-heading { display: none; }
.studio-unified .lesson-edit:has(.article-editor) { padding: 0; border: 0; background: transparent; }
.studio-unified .article-editor { border: 0; margin-top: 12px; }
.studio-unified .article-editor-top { padding: 16px; border-radius: 10px; background: var(--panel); border-bottom: 1px solid var(--line); }
.studio-unified .article-block { box-shadow: none; }
.studio-publication { margin-top: 24px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.studio-publication > summary { cursor: pointer; font-size: 18px; font-weight: 700; }
.studio-publication > summary span { display: block; color: var(--muted); font-size: 13px; font-weight: 400; margin: 6px 0 0 20px; }
.studio-publication[open] > summary { margin-bottom: 24px; }
.studio-publication .editor-step { margin-bottom: 24px; }
.studio-unified .editor-actions > .action-pair:last-child { display: none; }
#draft-recovery { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 16px; align-items: center; }
#draft-recovery > p { flex-basis: 100%; font-size: 13px; }
#draft-state[data-phase='conflict'],#draft-state[data-phase='error'],#draft-state[data-phase='offline'] { color: var(--warning); }
.draft-comparison { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; }
.draft-comparison textarea { min-height: 280px; resize: vertical; white-space: pre-wrap; }
.article-gap { position: relative; height: 14px; display: flex; align-items: center; justify-content: center; }
.article-gap .btn { position: absolute; z-index: 2; min-inline-size: 30px; width: 30px; min-height: 30px; padding: 0; border-radius: 50%; opacity: 0; font-size: 20px; }
.article-gap:hover .btn,.article-gap:focus-within .btn { opacity: 1; }
.article-compose .article-block { margin-bottom: 0; }
.article-photo-stage { position: relative; }
.article-photo-progress { position: absolute; inset: 0; display: grid; place-content: center; gap: 12px; padding: 16px; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; font-size: 13px; text-align: center; }
.article-photo-progress progress { width: 100%; accent-color: var(--accent); }
.article-live-body [data-live-block] { border-left: 2px solid transparent; padding-left: 8px; }
.article-live-body [data-live-block].is-editing { border-left-color: var(--accent); }
.article-live-heading .row { gap: 6px; }
.article-live-heading [aria-pressed='true'] { border-color: var(--accent); color: var(--accent); }
.article-photo-layout { margin-top: 8px; }
@media (hover: none) {
  .article-gap { height: 26px; }
  .article-gap .btn { opacity: 1; width: 44px; min-height: 44px; }
}
@media (max-width: 680px) {
  .studio-publication { padding: 16px; }
  .draft-comparison { grid-template-columns: minmax(0,1fr); }
  .studio-unified .studio-intro [name='title'] { font-size: 20px; }
}
.studio-unified .section-heading .eyebrow,
.studio-unified .editor-step[data-step='0'] > .section-heading > p { display: none; }
.studio-publication .review-field-link { min-inline-size: 0; white-space: normal; background: transparent; box-shadow: none; }

/* 0.12.0 — one document, familiar tools, no competing panels. */
.text-align-left,.text-align-left>.article-editable{text-align:left}
.text-align-center,.text-align-center>.article-editable{text-align:center}
.text-align-right,.text-align-right>.article-editable{text-align:right}
.text-align-justify,.text-align-justify>.article-editable{text-align:justify}
.word-form .editor-next-action,.word-form>.editor-step>.section-heading,.word-document .article-editor-top,.word-document .article-pane-switch,.word-document .article-quick-add,.word-document .article-advanced,.word-document .article-writing-hint,.word-document .article-gap{display:none!important}
.word-form .lesson-heading,.word-form [data-article-single]>.lesson-title-options{display:none}
.word-form .studio-intro{max-width:900px;margin:0 auto;padding:28px 42px 10px;background:#faf9f6;color:#20242c;border-radius:8px 8px 0 0;width:100%}
.word-form .studio-intro label{font-size:0;gap:0}
.word-form .studio-intro input{background:transparent;color:#20242c;border:0;border-radius:0;padding:8px 0;font-size:30px;font-weight:700;box-shadow:none;line-height:1.3}
.word-form .lesson-edit{border:0;background:transparent;padding:0;margin:0;box-shadow:none}
.word-form #lesson-editors{display:block;max-width:none}
.word-document{border:0;background:transparent;padding:0;box-shadow:none;overflow:visible;max-width:1100px;margin:0 auto}
.word-document .article-workspace{display:block!important}
.word-document .article-live-preview{display:none!important}
.word-document .article-compose{max-width:900px;margin:0 auto;background:#faf9f6;color:#20242c;padding:32px 42px;border:1px solid #dddcd7;border-radius:8px;box-shadow:0 10px 36px #0002;min-height:55vh}
.word-document .article-compose .studio-intro{padding:0 0 20px;border-radius:0}
.word-document .article-blocks{gap:0;display:block}
.word-document .article-block{border:0!important;border-radius:0;background:transparent!important;box-shadow:none!important;padding:0;margin:0 0 10px;position:relative;color:#20242c}
.word-document .article-block-head{position:absolute;right:-32px;top:0;min-height:0;width:28px;opacity:0;z-index:3}
.word-document .article-block-head>b{display:none}
.word-document .article-block:focus-within .article-block-head,.word-document .article-block:hover .article-block-head{opacity:1}
.word-document .block-actions>summary{color:#424b5b;background:#ecebe6;border-radius:5px;padding:2px 8px}
.word-document .block-actions[open]{background:#242a34;color:#f4f3ef;padding:6px;border-radius:6px}
.word-document .block-actions[open]>.row{min-width:180px}
.word-document .article-editable{padding:2px 0!important;border:0!important;border-radius:0!important;background:transparent!important;color:#20242c!important;min-height:1.6em;font-size:17px;line-height:1.75;box-shadow:none!important;outline-offset:4px;overflow-wrap:anywhere}
.word-document .article-editable:focus{outline:1px solid #b66c34}
.word-document [data-type="heading"]>.article-editable{font-size:26px;font-weight:700;line-height:1.35;margin:20px 0 8px}
.word-document [data-type="quote"]>.article-editable{border-left:3px solid #ad622b!important;padding-left:16px!important;font-style:italic;color:#4b5360!important}
.word-document .article-format{display:none!important}
.word-document [data-type="heading"]>label,.word-document [data-type="callout"]>label{font-size:12px;color:#505867;max-width:210px}
.word-document [data-type="heading"]>label{display:none}
.word-document .article-writing-status{border-top:1px solid #deded8;margin-top:30px;padding-top:12px;color:#505867;font-size:12px}
.word-document .article-writing-status>span+span{display:none}
.word-toolbar{position:sticky;top:12px;z-index:20;display:flex;flex-wrap:wrap;align-items:end;gap:8px;padding:10px 12px;margin-bottom:18px;border:1px solid var(--line);border-radius:10px;background:#242a34f5;backdrop-filter:blur(12px);box-shadow:0 6px 20px #0002;color:#f1f2f4;text-align:left}
.word-toolbar .btn,.word-toolbar summary{height:36px;min-height:36px;font-size:13px;padding:7px 10px;border-radius:6px;white-space:nowrap;margin:0}
.word-tool-group{display:flex;gap:4px;align-items:center}
.word-select{display:flex;flex-direction:column;gap:3px;margin:0;font-size:10px;color:#c8ccd4;min-width:130px}
.word-select select{height:36px;min-height:36px;padding:5px 26px 5px 9px;margin:0;font-size:13px;width:100%;background:#303846;color:#f1f2f4;border:1px solid #647084;border-radius:6px}
.word-insert{position:relative;margin:0}
.word-insert>summary{cursor:pointer;list-style:none;background:#303846;border:1px solid #647084;color:#f1f2f4}
.word-insert-menu{position:absolute;top:calc(100% + 8px);right:0;width:260px;max-height:60vh;overflow:auto;display:grid;gap:4px;padding:8px;background:#242a34;border:1px solid #647084;border-radius:8px;box-shadow:0 10px 32px #0006;z-index:30}
.word-insert-menu .btn{justify-content:flex-start;white-space:normal;height:auto;text-align:left}
.word-form .studio-publication{max-width:1000px;margin:28px auto;border:1px solid var(--line);border-radius:10px;padding:18px;background:var(--panel)}
.word-form .studio-publication>label{margin:18px 0}
.word-form .editor-actions{max-width:1000px;margin:20px auto}
.word-form .lesson-files{max-width:900px;margin:12px auto}
.word-document .article-photo-tools{padding:8px;background:#eeeee8;color:#424b5b;border-radius:6px;text-align:left}
.word-document .article-photo-tools .muted{color:#4f5865}
.word-document .article-photo-status{color:#424b5b}
.word-document .article-photo-tools .btn{height:34px;min-height:34px;padding:6px 10px;font-size:12px;background:#303846;color:#f1f2f4}
.word-document .article-photo-placeholder{background:#eeeee8;color:#4b5360;border-color:#b7bec7}
.word-document .article-photo-placeholder span{color:#4b5360}
.word-document [data-af="alt"],.word-document [data-af="caption"]{background:#fff;color:#20242c;border-color:#9ca6b2}
.word-document .article-photo-meta,.word-document .article-block>label{color:#4b5360;font-size:12px;text-align:left}
.word-document .article-photo-meta{margin:8px 0 18px}
.word-document .article-photo-meta>summary{color:#4b5360}
.word-document .article-media-canvas{border:0;background:transparent;padding:0;color:#20242c}
.word-document .article-photo-layout{padding-top:8px;gap:4px}
.word-document .article-photo-layout .btn[aria-pressed="true"]{outline:2px solid #a75c28;outline-offset:1px}
.word-document .article-photo-caption{color:#4b5360}
.word-lesson-nav{max-width:900px;margin:16px auto;display:flex;gap:12px;align-items:center;font-size:13px}
.word-lesson-nav select{max-width:520px;margin:0}
.word-document.word-reading .article-compose{display:none!important}
.word-document.word-reading .article-live-preview{display:block!important;border:0;background:transparent;padding:0;max-width:900px;margin:auto}
.word-document.word-reading .article-live-heading,.word-document.word-reading .article-live-note{display:none}
.word-document.word-reading .article-live-scroll{max-height:none;overflow:visible;border:0;background:transparent}
.word-document.word-reading .article-live-paper{background:#faf9f6;color:#20242c;border:1px solid #dddcd7;padding:32px 42px;max-width:none;min-height:55vh}
.word-document.word-reading .article-live-paper .native-article,.word-document.word-reading .article-live-title{color:#20242c}
.word-document.word-reading .word-toolbar>*:not([data-act="article-word-view"]){display:none}
@media(hover:none){.word-document .article-block-head{opacity:1}}
@media(max-width:680px){.word-toolbar{top:4px;gap:6px;padding:8px;border-radius:6px}.word-select{min-width:0;flex:1 1 120px}.word-toolbar .btn{padding:6px 8px}.word-document .article-compose,.word-document.word-reading .article-live-paper{padding:22px 20px;border-radius:6px;min-height:50vh}.word-form .studio-intro{padding:20px}.word-form .studio-intro input{font-size:25px}.word-document .article-editable{font-size:16px}.word-document .article-block-head{right:-18px;width:22px}.word-form .studio-publication{padding:12px}.word-insert-menu{left:0;right:auto;width:min(260px,75vw)}.word-lesson-nav{padding:0 8px}.word-document [data-type="heading"]>.article-editable{font-size:23px}}
.word-document .article-block:has([data-photo-ready]:not([hidden])):not(.word-selected):not(:focus-within) .article-photo-tools,.word-document .article-block:has([data-photo-ready]:not([hidden])):not(.word-selected):not(:focus-within)>label,.word-document .article-block:has([data-photo-ready]:not([hidden])):not(.word-selected):not(:focus-within)>.article-photo-meta{display:none}
.word-document .article-block[data-type="image"]:not(.word-selected) figure img,.word-document .article-block[data-type="mediaText"]:not(.word-selected) figure img{cursor:pointer}
body:has(.word-form) .studio-heading{max-width:1100px;margin:0 auto 8px;display:flex;align-items:center;gap:16px;padding:10px 0}
body:has(.word-form) .studio-heading h1,body:has(.word-form) .studio-heading .title-block,body:has(.word-form) .studio-heading>.studio-format{display:none}
body:has(.word-form) .studio-heading>.word-publish{margin-left:auto;min-width:140px;height:40px;min-height:40px}
body:has(.word-form) .save-strip{max-width:1100px;margin:0 auto 14px;padding:8px 0;border:0;background:transparent;box-shadow:none;font-size:12px}
.word-document.word-reading .article-live-paper .native-article [data-live-block].is-editing{border-left-color:transparent}
@media(max-width:680px){.word-toolbar .btn,.word-toolbar summary,.word-select select{height:44px;min-height:44px}.word-toolbar .word-insert-menu .btn{height:auto;min-height:44px}body:has(.word-form) .studio-heading>.word-publish{min-width:120px;height:44px;min-height:44px}}
.word-document .article-editable:empty::before,.word-form .studio-intro input::placeholder{color:#626b78;opacity:1}
.word-document .article-editable a,.word-document.word-reading .native-article a{color:#8c4017;text-decoration:underline}
.word-document.word-reading .native-article figcaption,.word-document.word-reading .article-live-empty{color:#4b5360}
.word-document.word-reading .article-callout{background:#eeeee8;color:#20242c;border-color:#ad622b}
.word-document.word-reading .native-article table{color:#20242c}
.word-document.word-reading .native-article th{background:#e7e7e0;color:#20242c}
.word-document.word-reading .native-article pre{background:#303846;color:#f1f2f4}
body:has(.word-form) .studio-heading .page-heading{display:none}
body:has(.word-form) .studio-heading>.word-save{margin-left:auto;height:40px;min-height:40px;padding:8px 16px}
body:has(.word-form) .studio-heading>.word-publish{margin-left:0}
@media(max-width:680px){body:has(.word-form) .studio-heading{flex-wrap:wrap;gap:8px}body:has(.word-form) .studio-heading>.word-save{height:44px;min-height:44px}.word-form .studio-intro input{min-width:0;width:100%}}
.word-form[data-studio-kind="course"] .lesson-heading{display:flex;justify-content:flex-end;min-height:0;margin:0 0 8px}
.word-form[data-studio-kind="course"] .lesson-heading h3,.word-form[data-studio-kind="course"] .lesson-heading:not(:has(button)){display:none}
.word-document [data-type="heading"]:has([data-af="level"] option[value="3"]:checked)>.article-editable{font-size:21px;margin-top:16px}

/* 0.12.1: complete light document palette; form specificity must not darken inputs. */
#editor-form.word-form .word-document .article-compose,
#editor-form.word-form .word-document.word-reading .article-live-paper{
 --panel:#faf9f6;--panel2:#eeeee8;--text:#20242c;--muted:#505867;--accent:#8c4017;--line:#b6bec8;color-scheme:light;background:#faf9f6;color:#20242c;
}
#editor-form.word-form .studio-intro input[type="text"]{
 background:transparent;background-image:none;color:#20242c;-webkit-text-fill-color:#20242c;border:0;border-radius:0;box-shadow:none;min-height:56px;padding:8px 0;font-weight:700;
}
#editor-form.word-form .studio-intro input[type="text"]::placeholder{color:#626b78;-webkit-text-fill-color:#626b78;opacity:1}
#editor-form.word-form .word-document .article-block-head{display:none!important}
#editor-form.word-form .word-document .article-block{padding-right:0}
.word-edit-menu{position:relative;margin:0}
.word-edit-menu>summary{cursor:pointer;list-style:none;display:flex;align-items:center;height:36px;min-height:36px;padding:7px 10px;background:#303846;color:#f1f2f4;border:1px solid #647084;border-radius:6px;font-size:13px;white-space:nowrap}
.word-edit-menu>summary::after{content:'⌄';margin-left:8px}
.word-edit-actions{position:absolute;left:0;top:calc(100% + 8px);width:min(270px,75vw);max-height:60vh;overflow:auto;display:grid;gap:5px;padding:10px;background:#242a34;color:#f1f2f4;border:1px solid #647084;border-radius:8px;box-shadow:0 10px 30px #0005;z-index:30}
.word-edit-actions p{margin:0 0 6px;font-size:12px;line-height:1.5;color:#c8ccd4}
.word-toolbar .word-edit-actions .btn{width:100%;height:auto;min-height:36px;text-align:left;justify-content:flex-start;background:#303846;background-image:none;color:#f1f2f4;border-color:#647084;box-shadow:none;white-space:normal}
.word-toolbar .word-edit-actions [data-command="delete"]{color:#ffd0c7;border-color:#aa776e}
@media(max-width:680px){.word-edit-menu>summary,.word-toolbar .word-edit-actions .btn{min-height:44px;height:auto}#editor-form.word-form .studio-intro input[type="text"]{min-height:50px}}

/* 0.12.2 — calm document controls use the established complete local palette. */
#editor-form.word-form .word-document .article-compose{min-height:320px;padding:24px 36px;cursor:text}
#editor-form.word-form .word-document .article-blocks{padding:0;max-width:none;margin:0}
#editor-form.word-form .word-document .studio-intro{padding:0 0 12px}
#editor-form.word-form .word-document .article-writing-status{margin-top:20px;padding:10px 0 0;cursor:text}
#editor-form.word-form .word-document .article-block{margin-bottom:8px}
#editor-form.word-form .word-document .article-photo-tools{padding:7px 9px;background:#eeeee8;border:1px solid #b6bec8;box-shadow:none;max-width:100%;border-radius:6px}
#editor-form.word-form .word-document .article-photo-tools .row{gap:6px;flex-wrap:wrap}
#editor-form.word-form .word-document [data-photo-legacy-clear]{display:none!important}
#editor-form.word-form .word-document .article-photo-tools:has([data-photo-ready]:not([hidden]))>.muted{display:none}
#editor-form.word-form .word-document .article-photo-meta{font-size:12px;margin:8px 0}
.word-publication-check{padding:0 0 18px}
.word-publication-check>p{font-size:13px;color:var(--muted)}
.word-publication-check>ul{list-style:none;padding:0;margin:12px 0;display:grid;gap:1px;border:1px solid var(--line);border-radius:8px;overflow:hidden}
.word-publication-check li{display:flex;align-items:center;gap:10px;padding:10px 12px;background:var(--panel2)}
.word-publication-check li>span{width:20px;color:var(--muted)}
.word-publication-check li.is-ready>span{color:var(--accent)}
.word-publication-check li>b{font-size:14px;font-weight:500;min-width:0;overflow-wrap:anywhere}
.word-publication-check li>.btn{margin-left:auto;min-height:36px;height:36px;padding:6px 10px;font-size:12px}
.word-offer-preview{padding:12px;border:1px solid var(--line);border-radius:8px;margin:0 0 16px}
.word-offer-preview>summary{cursor:pointer;font-size:14px}
.word-offer-preview[open]>summary{margin-bottom:16px}
#editor-form.word-form .word-toolbar{gap:6px;padding:8px 10px;align-items:end}
#editor-form.word-form .word-toolbar .word-select{min-width:120px;flex:0 1 150px}
#editor-form.word-form .word-edit-actions{max-height:min(65vh,520px)}
@media(max-width:680px){#editor-form.word-form .word-document .article-compose{min-height:240px;padding:18px 20px}#editor-form.word-form .word-toolbar .word-select{flex:1 1 120px}.word-publication-check li{padding:10px 8px}.word-publication-check li>.btn{min-height:44px;height:44px}}
/* 0.12.3 — visible context and stable native toolbar controls. */
.word-target-note{flex-basis:100%;font-size:11px;line-height:1.4;color:#c8ccd4;padding:2px 0}
.word-toolbar [data-act="article-word-format"][aria-pressed="true"]{background:#70431f!important;background-image:none!important;color:#fff6ed!important;border-color:#e8a267!important;box-shadow:inset 0 0 0 1px #e8a267}
.word-toolbar select:disabled,.word-toolbar button:disabled{opacity:.65}
/* 0.13.0 — the same safe heading classes in inputs, preview and reader. */
#editor-form.word-form input.word-title-bold,.word-title-bold{font-weight:700}
#editor-form.word-form input.word-title-normal,.word-title-normal{font-weight:400}
#editor-form.word-form input.word-title-italic,.word-title-italic{font-style:italic}
#editor-form.word-form input.word-title-underline,.word-title-underline{text-decoration:underline}
#editor-form.word-form input.text-align-left{text-align:left}
#editor-form.word-form input.text-align-center{text-align:center}
#editor-form.word-form input.text-align-right{text-align:right}
#editor-form.word-form input.text-align-justify{text-align:justify}
#editor-form.word-form .article-block.text-align-center>label textarea{text-align:center}
#editor-form.word-form .article-block.text-align-right>label textarea{text-align:right}
#editor-form.word-form .article-block.text-align-justify>label textarea{text-align:justify}
#editor-form.word-form .article-block.text-align-left>label textarea{text-align:left}
#editor-form.word-form input[name="title"].word-title-bold,#editor-form.word-form input[name="lesson-title"].word-title-bold{font-weight:700}
#editor-form.word-form input[name="title"].word-title-normal,#editor-form.word-form input[name="lesson-title"].word-title-normal{font-weight:400}
#editor-form.word-form input[name="title"].word-title-italic,#editor-form.word-form input[name="lesson-title"].word-title-italic{font-style:italic}
#editor-form.word-form input[name="title"].word-title-underline,#editor-form.word-form input[name="lesson-title"].word-title-underline{text-decoration:underline}
.reading-paper .page-heading h1.word-title-normal,.article-live-paper h2.word-title-normal,.outline h3.word-title-normal{font-weight:400}
.reading-paper .page-heading h1.word-title-bold,.article-live-paper h2.word-title-bold,.outline h3.word-title-bold{font-weight:700}
.reading-paper .page-heading h1.text-align-center,.article-live-paper h2.text-align-center,.outline h3.text-align-center{text-align:center}
.reading-paper .page-heading h1.text-align-right,.article-live-paper h2.text-align-right,.outline h3.text-align-right{text-align:right}
.reading-paper .page-heading h1.text-align-left,.article-live-paper h2.text-align-left,.outline h3.text-align-left{text-align:left}
.reading-paper .page-heading h1.text-align-justify,.article-live-paper h2.text-align-justify,.outline h3.text-align-justify{text-align:justify}
#editor-form.word-form input[name="title"].word-title-size-normal,#editor-form.word-form input[name="lesson-title"].word-title-size-normal{font-size:18px}
#editor-form.word-form input[name="title"].word-title-size-title,#editor-form.word-form input[name="lesson-title"].word-title-size-title{font-size:clamp(24px,3vw,30px)}
#editor-form.word-form input[name="title"].word-title-size-subtitle,#editor-form.word-form input[name="lesson-title"].word-title-size-subtitle{font-size:22px}
.reading-paper .page-heading h1.word-title-size-normal,.article-live-paper h2.word-title-size-normal,.outline h3.word-title-size-normal{font-size:18px}
.reading-paper .page-heading h1.word-title-size-title,.article-live-paper h2.word-title-size-title{font-size:clamp(24px,3vw,30px)}
.reading-paper .page-heading h1.word-title-size-subtitle,.article-live-paper h2.word-title-size-subtitle,.outline h3.word-title-size-subtitle{font-size:22px}


/* 0.13.1 — fields on the left, a persistent live reader on the right. */
.page.layout:has(#editor-form.word-split-form){max-width:1760px}
#editor-form.word-split-form{padding:20px;overflow:visible}
#editor-form.word-split-form .word-split-layout{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:24px;align-items:start}
#editor-form.word-split-form .word-edit-column,#editor-form.word-split-form .word-live-rail{min-width:0}
#editor-form.word-split-form .word-document,#editor-form.word-split-form .studio-intro,#editor-form.word-split-form .lesson-files,#editor-form.word-split-form .studio-publication,#editor-form.word-split-form .editor-actions{width:100%;max-width:none;margin-left:0;margin-right:0}
#editor-form.word-split-form .word-document .article-compose{width:100%;max-width:none;margin:0;padding:24px 28px;min-height:400px}
#editor-form.word-split-form .studio-intro{padding:24px 28px 12px}
#editor-form.word-split-form .article-compose .studio-intro{padding:0 0 12px}
#editor-form.word-split-form .studio-publication{margin-top:20px;margin-bottom:20px}
#editor-form.word-split-form .word-live-rail{position:sticky;top:96px;align-self:start}
#editor-form.word-split-form .word-live-rail .article-live-preview{display:block;position:static;padding:16px;background:#242a34;border:1px solid #596273;border-radius:10px;color:#f1f2f4;max-width:none;margin:0}
#editor-form.word-split-form .word-live-rail .article-live-preview[hidden]{display:none!important}
#editor-form.word-split-form .article-live-heading{gap:10px;align-items:flex-start}
#editor-form.word-split-form .article-live-heading h4{color:#f1f2f4;margin:0;font-size:16px}
#editor-form.word-split-form .article-live-heading .eyebrow{color:#dcb285}
#editor-form.word-split-form .article-live-note{color:#c8ccd4;margin:10px 0 12px}
#editor-form.word-split-form .article-live-heading .row{gap:6px;flex-wrap:wrap}
#editor-form.word-split-form .article-live-heading .btn{min-height:36px;height:36px;min-inline-size:0;padding:6px 9px;font-size:12px}
#editor-form.word-split-form .word-live-rail .article-live-scroll{max-height:calc(100dvh - 240px);min-height:min(400px,calc(100dvh - 260px));border:1px solid #dddcd7;border-radius:7px;background:#f1f0ec;overflow:auto;overscroll-behavior:contain}
#editor-form.word-split-form .word-live-rail .article-live-paper{background:#faf9f6;color:#20242c;min-height:400px;padding:26px 28px;font-size:17px;line-height:1.75}
#editor-form.word-split-form .word-live-rail .article-live-paper .native-article,#editor-form.word-split-form .word-live-rail .article-live-title{color:#20242c}
#editor-form.word-split-form .word-live-rail .article-live-paper.preview-phone{max-width:390px;margin-inline:auto}
#editor-form.word-split-form .word-live-rail .native-article a{color:#8c4017;text-decoration:underline}
#editor-form.word-split-form .word-live-rail .native-article :is(figcaption,blockquote),#editor-form.word-split-form .article-live-empty{color:#4b5360}
#editor-form.word-split-form .word-live-rail .native-article .article-callout{background:#eeeee8;color:#20242c;border-color:#ad622b}
#editor-form.word-split-form .word-live-rail .native-article th{background:#e7e7e0;color:#20242c}
#editor-form.word-split-form .word-live-rail .native-article pre{background:#303846;color:#f1f2f4}
#editor-form.word-split-form .word-layout-switch,#editor-form.word-split-form .word-preview-return{display:none}
#editor-form.word-split-form.word-preview-expanded .word-split-layout{grid-template-columns:minmax(0,1fr)}
#editor-form.word-split-form.word-preview-expanded .word-edit-column{display:none}
#editor-form.word-split-form.word-preview-expanded .word-live-rail{position:static;max-width:1000px;width:100%;margin:auto}
#editor-form.word-split-form.word-preview-expanded .word-preview-return{display:flex;margin-bottom:12px}
#editor-form.word-split-form.word-preview-expanded .word-live-rail .article-live-scroll{max-height:none;overflow:visible}
#editor-form.word-split-form .word-toolbar{top:96px;z-index:8}
@media(min-width:1181px){#editor-form.word-split-form .word-edit-column{display:block}}
@media(max-width:1180px){
 #editor-form.word-split-form{padding:16px}
 #editor-form.word-split-form .word-split-layout{grid-template-columns:minmax(0,1fr);gap:0}
 #editor-form.word-split-form .word-layout-switch{display:flex;gap:8px;position:sticky;top:84px;z-index:9;background:var(--panel);padding:8px 0;margin-bottom:12px}
 #editor-form.word-split-form .word-layout-switch .btn{flex:1;min-inline-size:0;min-height:44px}
 #editor-form.word-split-form .word-layout-switch [aria-pressed="true"]{border-color:#e8a267;background:#70431f;color:#fff6ed}
 #editor-form.word-split-form[data-workspace-pane="edit"] .word-live-rail{display:none}
 #editor-form.word-split-form[data-workspace-pane="preview"] .word-edit-column{display:none}
 #editor-form.word-split-form .word-live-rail{position:static}
 #editor-form.word-split-form .word-live-rail .article-live-scroll{max-height:none;overflow:visible;min-height:300px}
 #editor-form.word-split-form .word-toolbar{top:148px;z-index:8}
}
@media(max-width:680px){
 #editor-form.word-split-form{padding:10px}
 #editor-form.word-split-form .word-document .article-compose{padding:20px 18px;min-height:300px}
 #editor-form.word-split-form .studio-intro{padding:20px 18px 10px}
 #editor-form.word-split-form .word-live-rail .article-live-preview{padding:12px}
 #editor-form.word-split-form .word-live-rail .article-live-paper{padding:22px 18px;min-height:300px}
 #editor-form.word-split-form .article-live-heading .btn{height:44px;min-height:44px}
}

#editor-form.word-split-form .word-live-rail .article-live-paper{--panel:#faf9f6;--panel2:#eeeee8;--text:#20242c;--muted:#4b5360;--line:#b8b8af;--accent:#8c4017;color-scheme:light}
#editor-form.word-split-form .word-live-rail .native-article blockquote{background:#eeeee8;border-color:#ad622b}


/* 0.14.0 — calm page palettes and proportional photo sizing. */
[data-page-background="white"]{--sheet-bg:#faf9f6;--sheet-text:#20242c;--sheet-muted:#4b5360;--sheet-surface:#eeeee8;--sheet-line:#b8b8af;--sheet-link:#8c4017}
[data-page-background="cream"]{--sheet-bg:#f5efdf;--sheet-text:#20242c;--sheet-muted:#4b5360;--sheet-surface:#eae1cd;--sheet-line:#b5a78b;--sheet-link:#8c4017}
[data-page-background="mist"]{--sheet-bg:#edf1f5;--sheet-text:#20242c;--sheet-muted:#4b5360;--sheet-surface:#dee5ed;--sheet-line:#a4afbd;--sheet-link:#813b15}
[data-page-background="rose"]{--sheet-bg:#f7ecef;--sheet-text:#20242c;--sheet-muted:#4b5360;--sheet-surface:#ecdde2;--sheet-line:#b8a5ad;--sheet-link:#803b17}
#editor-form.word-form [data-article-single]>.lesson-title-options{display:block;max-width:none;margin:0 0 12px;padding:10px 14px}
#editor-form.word-form .lesson-title-options>summary{color:var(--text);font-size:13px}
#editor-form.word-form .lesson-title-options[open]>summary{margin-bottom:12px}
#editor-form.word-form .lesson-title-options input{color:var(--text);-webkit-text-fill-color:var(--text);background:var(--panel2);border:1px solid var(--line)}
#editor-form.word-form .lesson-title-options .btn{height:36px;min-height:36px;font-size:12px}
#editor-form.word-form .word-page-appearance{display:flex;align-items:center;flex-wrap:wrap;gap:10px 16px;margin:0 0 16px;padding:10px 12px;border:1px solid var(--line);border-radius:8px;background:var(--panel2)}
#editor-form.word-form .word-page-appearance label{display:flex;align-items:center;gap:10px;margin:0;min-width:0;font-size:12px}
#editor-form.word-form .word-page-appearance select{margin:0;width:145px;min-height:36px;height:36px;padding:5px 28px 5px 10px;font-size:13px}
#editor-form.word-form .word-page-appearance>span{font-size:11px;flex:1 1 200px}
#editor-form.word-form .word-document .article-compose[data-page-background],#editor-form.word-form .studio-intro[data-page-background],#editor-form.word-form .word-live-rail .article-live-paper[data-page-background],.reader-shell .reading-paper[data-page-background]:not([data-page-background=""]){
 --panel:var(--sheet-bg);--panel2:var(--sheet-surface);--text:var(--sheet-text);--muted:var(--sheet-muted);--line:var(--sheet-line);--accent:var(--sheet-link);--reader-muted:var(--sheet-muted);--ink:var(--sheet-text);--paper:var(--sheet-bg);--reader-line:var(--sheet-line);color-scheme:light;background:var(--sheet-bg);color:var(--sheet-text);border-color:var(--sheet-line)
}
#editor-form.word-form .word-live-rail .article-live-paper[data-page-background] .native-article blockquote,.reader-shell .reading-paper[data-page-background]:not([data-page-background=""]) .native-article blockquote{background:var(--sheet-surface);color:var(--sheet-muted);border-color:var(--sheet-link)}
#editor-form.word-form .word-live-rail .article-live-paper[data-page-background] .article-callout,.reader-shell .reading-paper[data-page-background]:not([data-page-background=""]) .article-callout{background:var(--sheet-surface);color:var(--sheet-text);border-color:var(--sheet-line);border-left-color:var(--sheet-link)}
#editor-form.word-form .word-live-rail .article-live-paper[data-page-background] .native-article th,.reader-shell .reading-paper[data-page-background]:not([data-page-background=""]) .native-article th{background:var(--sheet-surface);color:var(--sheet-text)}
.reader-shell .reading-paper[data-page-background]:not([data-page-background=""]) .native-article pre{background:#303846;color:#f1f2f4}
.reader-shell .reading-paper[data-page-background]:not([data-page-background=""]) .native-article a{color:var(--sheet-link)}
#editor-form.word-form .article-size-controls{border-top:1px solid #b6bec8;padding-top:10px;margin-top:10px;text-align:left;max-width:100%}
#editor-form.word-form .article-size-controls label{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:#424b5b;gap:12px;margin:0 0 8px}
#editor-form.word-form .article-size-controls output{font-variant-numeric:tabular-nums;font-weight:700;color:#20242c}
#editor-form.word-form .article-size-controls input[type="range"]{display:block;width:100%;min-width:0;min-height:32px;margin:0;padding:0;accent-color:#8c4017}
#editor-form.word-form .article-size-controls p{margin:4px 0 8px;font-size:11px}
.photo-size-20{--article-photo-size:20%}
.photo-size-21{--article-photo-size:21%}
.photo-size-22{--article-photo-size:22%}
.photo-size-23{--article-photo-size:23%}
.photo-size-24{--article-photo-size:24%}
.photo-size-25{--article-photo-size:25%}
.photo-size-26{--article-photo-size:26%}
.photo-size-27{--article-photo-size:27%}
.photo-size-28{--article-photo-size:28%}
.photo-size-29{--article-photo-size:29%}
.photo-size-30{--article-photo-size:30%}
.photo-size-31{--article-photo-size:31%}
.photo-size-32{--article-photo-size:32%}
.photo-size-33{--article-photo-size:33%}
.photo-size-34{--article-photo-size:34%}
.photo-size-35{--article-photo-size:35%}
.photo-size-36{--article-photo-size:36%}
.photo-size-37{--article-photo-size:37%}
.photo-size-38{--article-photo-size:38%}
.photo-size-39{--article-photo-size:39%}
.photo-size-40{--article-photo-size:40%}
.photo-size-41{--article-photo-size:41%}
.photo-size-42{--article-photo-size:42%}
.photo-size-43{--article-photo-size:43%}
.photo-size-44{--article-photo-size:44%}
.photo-size-45{--article-photo-size:45%}
.photo-size-46{--article-photo-size:46%}
.photo-size-47{--article-photo-size:47%}
.photo-size-48{--article-photo-size:48%}
.photo-size-49{--article-photo-size:49%}
.photo-size-50{--article-photo-size:50%}
.photo-size-51{--article-photo-size:51%}
.photo-size-52{--article-photo-size:52%}
.photo-size-53{--article-photo-size:53%}
.photo-size-54{--article-photo-size:54%}
.photo-size-55{--article-photo-size:55%}
.photo-size-56{--article-photo-size:56%}
.photo-size-57{--article-photo-size:57%}
.photo-size-58{--article-photo-size:58%}
.photo-size-59{--article-photo-size:59%}
.photo-size-60{--article-photo-size:60%}
.photo-size-61{--article-photo-size:61%}
.photo-size-62{--article-photo-size:62%}
.photo-size-63{--article-photo-size:63%}
.photo-size-64{--article-photo-size:64%}
.photo-size-65{--article-photo-size:65%}
.photo-size-66{--article-photo-size:66%}
.photo-size-67{--article-photo-size:67%}
.photo-size-68{--article-photo-size:68%}
.photo-size-69{--article-photo-size:69%}
.photo-size-70{--article-photo-size:70%}
.photo-size-71{--article-photo-size:71%}
.photo-size-72{--article-photo-size:72%}
.photo-size-73{--article-photo-size:73%}
.photo-size-74{--article-photo-size:74%}
.photo-size-75{--article-photo-size:75%}
.photo-size-76{--article-photo-size:76%}
.photo-size-77{--article-photo-size:77%}
.photo-size-78{--article-photo-size:78%}
.photo-size-79{--article-photo-size:79%}
.photo-size-80{--article-photo-size:80%}
.photo-size-81{--article-photo-size:81%}
.photo-size-82{--article-photo-size:82%}
.photo-size-83{--article-photo-size:83%}
.photo-size-84{--article-photo-size:84%}
.photo-size-85{--article-photo-size:85%}
.photo-size-86{--article-photo-size:86%}
.photo-size-87{--article-photo-size:87%}
.photo-size-88{--article-photo-size:88%}
.photo-size-89{--article-photo-size:89%}
.photo-size-90{--article-photo-size:90%}
.photo-size-91{--article-photo-size:91%}
.photo-size-92{--article-photo-size:92%}
.photo-size-93{--article-photo-size:93%}
.photo-size-94{--article-photo-size:94%}
.photo-size-95{--article-photo-size:95%}
.photo-size-96{--article-photo-size:96%}
.photo-size-97{--article-photo-size:97%}
.photo-size-98{--article-photo-size:98%}
.photo-size-99{--article-photo-size:99%}
.photo-size-100{--article-photo-size:100%}

.native-article .article-image[class*="photo-size-"]{width:var(--article-photo-size);max-width:100%}
.article-media-text[class*="photo-size-"]{--article-media-width:var(--article-photo-size)}
#editor-form.word-form .article-media-canvas:not(.article-media-text)[class*="photo-size-"]>figure{width:var(--article-photo-size);max-width:100%}
#editor-form.word-form .article-media-canvas img,.native-article img{height:auto;object-fit:contain}
.preview-phone .native-article .article-media-text[class*="photo-size-"] figure{width:var(--article-photo-size)!important;margin-inline:auto!important;float:none!important}
@media(max-width:680px){
 #editor-form.word-form .word-page-appearance label{flex:1 1 auto;justify-content:space-between}
 #editor-form.word-form .word-page-appearance select,#editor-form.word-form .lesson-title-options .btn{min-height:44px;height:44px}
 #editor-form.word-form .article-media-text[class*="photo-size-"]>figure,.native-article .article-media-text[class*="photo-size-"]>figure{width:var(--article-photo-size)!important;max-width:100%!important;margin-inline:auto!important;float:none!important}
}

/* Explicit follow state is readable by color, text and assistive technology. */
#editor-form.word-form .word-live-rail [data-act="article-follow"]{min-width:174px}
#editor-form.word-form .word-live-rail [data-act="article-follow"][aria-pressed="false"]{background:#303846;background-image:none;color:#f1f2f4;border-color:#647084}
#editor-form.word-form .word-live-rail [data-act="article-follow"][aria-pressed="true"]{background:#70431f!important;background-image:none!important;color:#fff6ed!important;border-color:#e8a267!important;box-shadow:inset 0 0 0 1px #e8a267}
#editor-form.word-form .word-live-rail [data-act="article-follow"]:focus-visible{outline:2px solid #e8a267;outline-offset:3px}

/* 0.14.0 — centered document, a compact inspector and a modeless live window. */
#editor-form.word-floating-form .word-split-layout{grid-template-columns:minmax(0,1fr) 250px;gap:24px;max-width:1220px;margin-inline:auto;justify-content:center}
#editor-form.word-floating-form .word-edit-column{display:block!important;width:100%;max-width:900px;min-width:0;margin-inline:auto}
#editor-form.word-floating-form .word-inspector{position:sticky;top:96px;min-width:0;max-height:calc(100dvh - 116px);overflow:auto;padding:16px;border:1px solid var(--line);border-radius:10px;background:var(--panel2);color:var(--text);scrollbar-width:thin}
#editor-form.word-floating-form .word-inspector h2{font-size:17px;margin:0 0 14px}
#editor-form.word-floating-form .word-inspector h3{font-size:14px;margin:0 0 12px}
#editor-form.word-floating-form .word-inspector>.btn{width:100%;min-height:40px;font-size:13px}
#editor-form.word-floating-form .word-page-appearance{border:0;padding:0;background:transparent;display:block;margin-bottom:14px}
#editor-form.word-floating-form .word-page-appearance label{display:block;font-size:12px}
#editor-form.word-floating-form .word-page-appearance select{display:block;width:100%;margin:6px 0 8px}
#editor-form.word-floating-form .word-page-appearance>span{display:block;font-size:11px}
#editor-form.word-floating-form .word-inspector-photo{border-top:1px solid var(--line);padding-top:16px;margin-top:16px}
#editor-form.word-floating-form .word-inspector-photo label{font-size:12px;margin-bottom:12px}
#editor-form.word-floating-form .word-inspector-photo output{float:right;font-variant-numeric:tabular-nums;color:var(--text)}
#editor-form.word-floating-form .word-inspector-photo input[type="range"]{min-height:36px;padding:0;accent-color:#e8a267}
#editor-form.word-floating-form .word-inspector-layout{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:10px 0}
#editor-form.word-floating-form .word-inspector-layout .btn{min-inline-size:0;min-height:36px;font-size:11px;padding:6px;white-space:normal}
#editor-form.word-floating-form .word-inspector-layout [aria-pressed="true"]{background:#70431f!important;color:#fff6ed!important;border-color:#e8a267!important}
#editor-form.word-floating-form .word-layout-switch{display:none!important}
#editor-form.word-floating-form .word-document .article-compose{display:block!important}
#editor-form.word-floating-form dialog.word-live-rail{position:fixed;inset:var(--preview-top,96px) 24px auto auto;width:min(660px,calc(100vw - 48px));max-width:calc(100vw - 24px);min-width:0;max-height:calc(100dvh - var(--preview-top,96px) - 16px);height:auto;padding:16px;margin:0;border:1px solid #838c9b;border-radius:12px;background:#242a34;color:#f1f2f4;box-shadow:0 20px 70px #0008;z-index:80;overflow:hidden}
#editor-form.word-floating-form dialog.word-live-rail:not([open]){display:none!important}
#editor-form.word-floating-form dialog.word-live-rail[open]{display:block}
#editor-form.word-floating-form dialog.word-live-rail.is-expanded{width:min(960px,calc(100vw - 48px))}
#editor-form.word-floating-form .word-preview-window-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 0 12px;margin-bottom:12px;border-bottom:1px solid #596273;cursor:grab;touch-action:none}
#editor-form.word-floating-form .word-preview-window-head h2{font-size:17px;color:#f1f2f4;margin:0}
#editor-form.word-floating-form .word-preview-return{display:flex;gap:6px;margin:0}
#editor-form.word-floating-form .word-preview-return .btn{height:36px;min-height:36px;font-size:12px;min-inline-size:0;cursor:pointer}
#editor-form.word-floating-form .word-live-rail .article-live-preview{padding:0;border:0;box-shadow:none}
#editor-form.word-floating-form .article-live-heading .eyebrow{display:none}
#editor-form.word-floating-form .word-live-rail .article-live-scroll{max-height:calc(100dvh - var(--preview-top,96px) - 190px);min-height:0;overflow:auto}
#editor-form.word-floating-form .word-live-rail .article-live-paper{min-height:0;height:auto}
@media(max-width:1100px){
 #editor-form.word-floating-form .word-split-layout{grid-template-columns:minmax(0,1fr)}
 #editor-form.word-floating-form .word-inspector{position:static;order:-1;max-height:none;display:flex;align-items:center;flex-wrap:wrap;gap:12px}
 #editor-form.word-floating-form .word-inspector h2{display:none}
 #editor-form.word-floating-form .word-page-appearance{margin:0;flex:1 1 220px}
 #editor-form.word-floating-form .word-inspector>.btn{width:auto;min-height:44px}
 #editor-form.word-floating-form .word-inspector-photo,#editor-form.word-floating-form [data-inspector-hint]{display:none!important}
 #editor-form.word-floating-form .word-toolbar{top:84px}
}
@media(max-width:680px){
 #editor-form.word-floating-form dialog.word-live-rail{inset:var(--preview-top,84px) 12px auto auto;width:calc(100vw - 24px);padding:12px;max-height:calc(100dvh - var(--preview-top,84px) - 12px)}
 #editor-form.word-floating-form .word-preview-window-head{flex-wrap:wrap;gap:8px}
 #editor-form.word-floating-form .word-preview-return .btn{min-height:44px;height:44px}
 #editor-form.word-floating-form .word-live-rail .article-live-scroll{max-height:calc(100dvh - var(--preview-top,84px) - 220px)}
 #editor-form.word-floating-form .article-live-heading .row{gap:6px}
}
@media(min-width:1101px){#editor-form.word-floating-form .article-photo-tools>[data-photo-layout]{display:none!important}}

/* 0.15.0 — verified image behind the page, solid readable sheets, mobile workspace. */
body.has-page-backdrop{isolation:isolate}
#school-page-backdrop{position:fixed;inset:0;width:100%;height:100%;z-index:0;pointer-events:none;overflow:hidden}
.page-backdrop-layer img{display:block;width:100%;height:100%;object-fit:cover;object-position:center}
body.has-page-backdrop>main,body.has-page-backdrop>footer{position:relative;z-index:1}
body.has-page-backdrop .reader-shell{background:transparent}
.article-live-scroll.has-preview-backdrop{position:relative;isolation:isolate;background:#e8e6e1}
.article-live-scroll>.page-backdrop-layer{position:sticky;top:0;z-index:0;height:0;pointer-events:none;overflow:visible}
.article-live-scroll>.page-backdrop-layer img{height:100dvh;max-height:none;max-width:none}
#editor-form.word-floating-form .has-preview-backdrop .article-live-paper{position:relative;z-index:1;margin:16px;box-shadow:0 4px 24px #0002}
.word-backdrop-options{margin-top:16px;padding-top:14px;border-top:1px solid var(--line);min-width:0}
.word-backdrop-options>summary{font-size:13px;line-height:1.5;cursor:pointer;overflow-wrap:anywhere}
.word-backdrop-options[open]>summary{margin-bottom:12px}
#editor-form.word-floating-form .word-page-appearance .backdrop-upload{display:flex;align-items:center;justify-content:center;min-height:40px;margin:12px 0 8px;font-size:13px;cursor:pointer}
.backdrop-upload:focus-within{outline:2px solid var(--accent);outline-offset:3px}
#editor-form.word-floating-form .word-page-appearance .backdrop-opacity-label{margin-top:14px}
.backdrop-opacity-label output{float:right;font-variant-numeric:tabular-nums}
#editor-form.word-floating-form .word-page-appearance input[type="range"]{padding:0;accent-color:#e8a267;min-height:40px;width:100%;margin:6px 0}
.backdrop-upload-state{font-size:12px;line-height:1.6;margin-top:10px;overflow-wrap:anywhere}
.backdrop-upload-state progress{display:block;width:100%;height:6px;margin-top:8px}
.backdrop-upload-state progress[hidden]{display:none}
.reader-outline-toggle{display:none}
#editor-form.word-floating-form dialog.word-live-rail{max-width:var(--preview-width-limit,calc(100vw - 24px));max-height:var(--preview-max-height,calc(100dvh - var(--preview-top,96px) - 16px));overflow:auto;overscroll-behavior:contain}
#editor-form.word-floating-form .word-live-rail .article-live-scroll{max-height:calc(var(--preview-max-height,calc(100dvh - var(--preview-top,96px) - 16px)) - 190px)}
.native-article,.article-live-paper,.reading-paper,.word-edit-column,.word-inspector,.rule-page{min-width:0;overflow-wrap:anywhere}
.native-article figure,.native-article img,.native-article video,.reading-paper>.media{max-width:100%}
.native-article .article-table,.article-compose .article-table{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
.native-article .article-table table{width:max-content;min-width:100%;table-layout:auto}
.native-article .article-table td,.native-article .article-table th{max-width:28ch;overflow-wrap:anywhere;white-space:normal}
.native-article pre{max-width:100%;overflow:auto;overscroll-behavior:contain}
@media(max-width:1100px){
 #editor-form.word-floating-form .word-inspector .word-page-appearance{flex:1 1 100%}
 #editor-form.word-floating-form .word-inspector{padding:14px}
 #editor-form.word-floating-form .word-backdrop-options[open]{max-width:600px}
}
@media(max-width:680px){
 .page{padding-inline:16px;min-width:0}
 .page.layout:has(#editor-form.word-form){padding-inline:10px}
 #editor-form.word-floating-form{padding:10px}
 #editor-form.word-floating-form .word-split-layout{gap:14px}
 #editor-form.word-form .word-toolbar{position:static;top:auto;gap:6px;padding:8px;max-width:100%}
 #editor-form.word-form .word-toolbar .btn,#editor-form.word-form .word-toolbar summary,
 #editor-form.word-floating-form .word-inspector .btn,#editor-form.word-floating-form .word-page-appearance .backdrop-upload,
 .reader-shell .btn,.reader-shell summary,.reader-outline-toggle,.rule-page .btn{min-height:44px;height:auto;padding-block:10px}
 #editor-form.word-form input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
 #editor-form.word-form select,#editor-form.word-form textarea,.reader-shell input,.reader-shell select,.reader-shell textarea{font-size:16px;min-height:44px;max-width:100%}
 #editor-form.word-form input[name="title"],#editor-form.word-form input[name="lesson-title"]{font-size:clamp(20px,5.5vw,26px);line-height:1.4}
 #editor-form.word-form .word-document .article-compose{padding:18px 16px;min-height:260px}
 #editor-form.word-form .article-editable{font-size:17px;line-height:1.75;min-width:0;overflow-wrap:anywhere}
 #editor-form.word-form .article-block-head{flex-wrap:wrap}
 #editor-form.word-form .article-media-canvas:not(.article-media-text)[class*="photo-size-"]>figure,
 .native-article figure[class*="photo-size-"]{min-width:min(160px,100%)}
 #editor-form.word-form .article-media-text[class*="photo-size-"]>figure,
 .native-article .article-media-text[class*="photo-size-"]>figure{min-width:min(160px,100%);float:none!important;margin-inline:auto!important}
 .native-article .article-media-text,.article-compose .article-media-text{display:block}
 .native-article figcaption,.article-compose figcaption{font-size:14px;line-height:1.6;overflow-wrap:anywhere}
 .reader-shell .reading{display:block;padding:16px}
 .reader-shell .reading-paper{padding:22px 16px;margin:16px 0 0;width:100%;min-width:0}
 .reader-shell .reading-paper .page-heading h1{font-size:clamp(23px,6vw,30px);line-height:1.35}
 .reader-shell .reading-paper .native-article{line-height:1.8}
 .reader-shell .reader-tools{display:flex;flex-wrap:wrap;gap:10px;padding:0;width:100%}
 .reader-shell .reader-tools label{min-width:120px;flex:1 1 120px}
 .reader-shell .reader-tools>.btn{flex:1 1 100%}
 .reader-shell .outline{position:static;width:100%;padding:16px;max-height:none;margin:0}
 .reader-shell .reader-outline-toggle{display:flex;width:100%;justify-content:space-between;margin-top:12px}
 .reader-outline-toggle::after{content:'+';margin-left:12px;font-size:20px;line-height:1}
 .reader-outline-toggle[aria-expanded="true"]::after{content:'−'}
 .reader-shell .outline:not(.is-expanded) #reader-outline-content{display:none}
 .reader-shell #reader-outline-content{margin-top:14px}
 .reader-shell .outline nav{max-height:45dvh;overflow:auto;overscroll-behavior:contain}
 .reader-shell .outline nav a{min-height:44px;padding:12px;overflow-wrap:anywhere}
 .reader-shell .reader-next{gap:10px;flex-wrap:wrap}
 .reader-shell .reader-next a{width:100%;white-space:normal;text-align:center}
 .reader-shell .document-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
 .reader-shell .document-toolbar label{flex:1 1 120px;min-width:0}
 .reader-shell .document-toolbar select{width:100%}
 .rule-page{max-width:100%;line-height:1.8;padding:24px 18px}
 .rule-page h2{font-size:21px;margin-top:28px;line-height:1.4}
 .rule-page p,.rule-page .notice{font-size:16px;overflow-wrap:anywhere}
 #editor-form.word-floating-form dialog.word-live-rail{padding:12px;padding-bottom:max(12px,env(safe-area-inset-bottom));border-radius:10px}
 #editor-form.word-floating-form .word-live-rail .article-live-scroll{max-height:calc(var(--preview-max-height,calc(100dvh - var(--preview-top,12px) - 12px)) - 220px)}
 #editor-form.word-floating-form .has-preview-backdrop .article-live-paper{margin:10px;padding:20px 16px}
 #editor-form.word-floating-form .word-preview-window-head{position:sticky;top:-12px;z-index:5;background:#242a34;padding-top:8px}
 .upload-center{max-width:calc(100vw - 24px);max-height:60dvh;overflow:auto}
 .material-card,.material-card .card-body,.product-layout>*,.public-author-page{min-width:0;overflow-wrap:anywhere}
}
@media(prefers-reduced-motion:reduce){.page-backdrop-layer,.word-live-rail{animation:none!important;transition:none!important;scroll-behavior:auto}}
.backdrop-opacity-0{opacity:0}
.backdrop-opacity-1{opacity:0.01}
.backdrop-opacity-2{opacity:0.02}
.backdrop-opacity-3{opacity:0.03}
.backdrop-opacity-4{opacity:0.04}
.backdrop-opacity-5{opacity:0.05}
.backdrop-opacity-6{opacity:0.06}
.backdrop-opacity-7{opacity:0.07}
.backdrop-opacity-8{opacity:0.08}
.backdrop-opacity-9{opacity:0.09}
.backdrop-opacity-10{opacity:0.1}
.backdrop-opacity-11{opacity:0.11}
.backdrop-opacity-12{opacity:0.12}
.backdrop-opacity-13{opacity:0.13}
.backdrop-opacity-14{opacity:0.14}
.backdrop-opacity-15{opacity:0.15}
.backdrop-opacity-16{opacity:0.16}
.backdrop-opacity-17{opacity:0.17}
.backdrop-opacity-18{opacity:0.18}
.backdrop-opacity-19{opacity:0.19}
.backdrop-opacity-20{opacity:0.2}
.backdrop-opacity-21{opacity:0.21}
.backdrop-opacity-22{opacity:0.22}
.backdrop-opacity-23{opacity:0.23}
.backdrop-opacity-24{opacity:0.24}
.backdrop-opacity-25{opacity:0.25}
.backdrop-opacity-26{opacity:0.26}
.backdrop-opacity-27{opacity:0.27}
.backdrop-opacity-28{opacity:0.28}
.backdrop-opacity-29{opacity:0.29}
.backdrop-opacity-30{opacity:0.3}
.backdrop-opacity-31{opacity:0.31}
.backdrop-opacity-32{opacity:0.32}
.backdrop-opacity-33{opacity:0.33}
.backdrop-opacity-34{opacity:0.34}
.backdrop-opacity-35{opacity:0.35}
.backdrop-opacity-36{opacity:0.36}
.backdrop-opacity-37{opacity:0.37}
.backdrop-opacity-38{opacity:0.38}
.backdrop-opacity-39{opacity:0.39}
.backdrop-opacity-40{opacity:0.4}
.backdrop-opacity-41{opacity:0.41}
.backdrop-opacity-42{opacity:0.42}
.backdrop-opacity-43{opacity:0.43}
.backdrop-opacity-44{opacity:0.44}
.backdrop-opacity-45{opacity:0.45}
.backdrop-opacity-46{opacity:0.46}
.backdrop-opacity-47{opacity:0.47}
.backdrop-opacity-48{opacity:0.48}
.backdrop-opacity-49{opacity:0.49}
.backdrop-opacity-50{opacity:0.5}
.backdrop-opacity-51{opacity:0.51}
.backdrop-opacity-52{opacity:0.52}
.backdrop-opacity-53{opacity:0.53}
.backdrop-opacity-54{opacity:0.54}
.backdrop-opacity-55{opacity:0.55}
.backdrop-opacity-56{opacity:0.56}
.backdrop-opacity-57{opacity:0.57}
.backdrop-opacity-58{opacity:0.58}
.backdrop-opacity-59{opacity:0.59}
.backdrop-opacity-60{opacity:0.6}
.backdrop-opacity-61{opacity:0.61}
.backdrop-opacity-62{opacity:0.62}
.backdrop-opacity-63{opacity:0.63}
.backdrop-opacity-64{opacity:0.64}
.backdrop-opacity-65{opacity:0.65}
.backdrop-opacity-66{opacity:0.66}
.backdrop-opacity-67{opacity:0.67}
.backdrop-opacity-68{opacity:0.68}
.backdrop-opacity-69{opacity:0.69}
.backdrop-opacity-70{opacity:0.7}
.backdrop-opacity-71{opacity:0.71}
.backdrop-opacity-72{opacity:0.72}
.backdrop-opacity-73{opacity:0.73}
.backdrop-opacity-74{opacity:0.74}
.backdrop-opacity-75{opacity:0.75}
.backdrop-opacity-76{opacity:0.76}
.backdrop-opacity-77{opacity:0.77}
.backdrop-opacity-78{opacity:0.78}
.backdrop-opacity-79{opacity:0.79}
.backdrop-opacity-80{opacity:0.8}
.backdrop-opacity-81{opacity:0.81}
.backdrop-opacity-82{opacity:0.82}
.backdrop-opacity-83{opacity:0.83}
.backdrop-opacity-84{opacity:0.84}
.backdrop-opacity-85{opacity:0.85}
.backdrop-opacity-86{opacity:0.86}
.backdrop-opacity-87{opacity:0.87}
.backdrop-opacity-88{opacity:0.88}
.backdrop-opacity-89{opacity:0.89}
.backdrop-opacity-90{opacity:0.9}
.backdrop-opacity-91{opacity:0.91}
.backdrop-opacity-92{opacity:0.92}
.backdrop-opacity-93{opacity:0.93}
.backdrop-opacity-94{opacity:0.94}
.backdrop-opacity-95{opacity:0.95}
.backdrop-opacity-96{opacity:0.96}
.backdrop-opacity-97{opacity:0.97}
.backdrop-opacity-98{opacity:0.98}
.backdrop-opacity-99{opacity:0.99}
.backdrop-opacity-100{opacity:1}
@media(max-width:680px){
 #editor-form.word-floating-form .word-page-appearance select{font-size:16px;min-height:44px;height:44px}
 #editor-form.word-floating-form .word-page-appearance input[type="range"]{min-height:44px}
}
