/* Scoped writing tools and shared constrained public content. */
.studio-heading {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.studio-heading p {
  flex: 1;
  min-width: 12rem;
}
.studio-filters {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr) auto;
  align-items: end;
  gap: 1rem;
  margin: 1.5rem 0;
}
.studio-library {
  border: 1px solid var(--line, #dce3df);
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper, #fff);
}
.studio-library article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e3e8e4;
}
.studio-library h2 {
  font-size: 1.25rem;
  margin: 0.2rem 0;
}
.studio-library p {
  margin: 0.3rem 0;
  color: #51615b;
}
.studio-library .badge {
  max-width: 13rem;
  white-space: normal;
}
.studio-legacy {
  max-height: 30rem;
  overflow: auto;
}
.studio-legacy article {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid #e1e7e3;
}
.studio-legacy small {
  display: block;
}
.studio-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 9;
  background: #f7f8f4;
  border: 1px solid #d9e2dd;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
}
.studio-bar [data-save-status] {
  margin-right: auto;
  font-size: 0.85rem;
  color: #465c50;
}
.studio-bar button,
.studio-toolbar button {
  min-height: 44px;
}
.studio-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.5rem;
  align-items: start;
}
.studio-writing {
  background: #fff;
  border: 1px solid #dfe6e0;
  border-radius: 14px;
  padding: clamp(1rem, 3vw, 2.75rem);
  min-width: 0;
}
.studio-writing input[name="title"],
.studio-writing textarea[name="title"] {
  font-family: Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  line-height: 1.25;
  background: #fff;
  font-weight: 600;
}
.studio-writing textarea[name="summary"] {
  font-size: 1.1rem;
  line-height: 1.6;
}
.studio-writing label,
.studio-settings label {
  display: block;
  margin-bottom: 1.25rem;
}
.studio-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  border-block: 1px solid #d9e1da;
  padding: 0.65rem 0;
  margin-top: 1.5rem;
}
.studio-toolbar button {
  background: transparent;
  color: #233e33;
  border: 1px solid transparent;
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}
.studio-toolbar button:hover,
.studio-toolbar button:focus-visible {
  border-color: #829b8e;
  background: #eff4ee;
}
.studio-prose {
  min-height: 25rem;
  outline: none;
  line-height: 1.8;
  overflow-wrap: anywhere;
  padding: 1rem 0;
  color: #21382d;
  font-size: 1.05rem;
}
.studio-prose:focus-visible {
  outline: 2px solid #648c7b;
  outline-offset: 8px;
}
.studio-prose p {
  margin: 0 0 1.2rem;
}
.studio-settings {
  min-width: 0;
}
.studio-settings details {
  background: #fff;
  border: 1px solid #dce4de;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
}
.studio-settings summary {
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 1rem;
}
.studio-settings input,
.studio-settings select,
.studio-settings textarea,
.studio-writing input,
.studio-writing textarea {
  max-width: 100%;
  width: 100%;
  min-width: 0;
}
.studio-settings select[multiple] {
  height: auto;
  min-height: 6rem;
}
.studio-history {
  padding-left: 1rem;
  max-height: 22rem;
  overflow: auto;
}
.studio-history li {
  margin-bottom: 1.3rem;
}
.studio-history small {
  display: block;
  overflow-wrap: anywhere;
}
.studio-settings button {
  margin: 0.3rem 0.25rem 0.3rem 0;
}
.studio-error {
  color: #942c20;
}
.studio-error:empty {
  display: none;
}
[data-save-recovery] {
  background: #fff0df;
  border: 1px solid #d1a373;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
}
[data-save-recovery] button {
  margin: 0.5rem;
}
dialog[data-media-dialog],
dialog[data-insert-dialog],
dialog[data-action-dialog] {
  width: min(720px, calc(100vw - 2rem));
  max-height: 85vh;
  overflow: auto;
  border: 1px solid #b9cbbf;
  border-radius: 16px;
  padding: 2rem;
  color: #203c2c;
  background: #fbfcf8;
}
dialog::backdrop {
  background: #0c231e88;
}
dialog form label {
  display: block;
  margin-bottom: 1rem;
}
dialog input {
  display: block;
  width: 100%;
  box-sizing: border-box;
}
.studio-dialog-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}
[data-media-list] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
[data-media-list] button {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
  background: #fff;
  border: 1px solid #d4dfd6;
  border-radius: 10px;
  color: #253e30;
  padding: 1rem;
  overflow-wrap: anywhere;
}
[data-media-list] img {
  width: 100%;
  height: 110px;
  object-fit: contain;
}
[data-media-list] small {
  font-weight: 400;
}
.studio-revision {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.studio-reading {
  max-width: 780px;
  margin: 0 auto 4rem;
  overflow-wrap: anywhere;
}
.studio-reading .page-head h1 {
  font-size: clamp(2.25rem, 5vw, 3.8rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}
.studio-reading .lead {
  font-size: 1.2rem;
  line-height: 1.7;
}
.studio-reading .prose {
  font-size: 1.1rem;
  line-height: 1.85;
}
.studio-reading figure,
.studio-prose figure {
  margin: 2rem 0;
}
.studio-reading img,
.studio-prose img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}
.studio-reading figcaption,
.studio-prose figcaption {
  font-size: 0.875rem;
  color: #5c6b61;
  margin-top: 0.6rem;
}
.studio-reading table,
.studio-prose table {
  border-collapse: collapse;
  width: 100%;
  display: block;
  overflow-x: auto;
  margin: 2rem 0;
}
.studio-reading th,
.studio-prose th,
.studio-reading td,
.studio-prose td {
  padding: 0.75rem;
  border: 1px solid #c7d6cb;
  min-width: 6rem;
  text-align: left;
}
.studio-reading th,
.studio-prose th {
  background: #eaf2eb;
  color: #1f392e;
}
.studio-reading .callout,
.studio-prose .callout {
  background: #edf4ed;
  border-left: 3px solid #668b74;
  border-radius: 0 8px 8px 0;
  padding: 1.25rem;
  margin: 1.75rem 0;
}
.studio-reading .media-block iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  height: auto;
  min-height: 0;
  border: 0;
  border-radius: 10px;
}
.studio-reading .studio-video-instagram {
  width: min(100%, 420px);
  margin-inline: auto;
  container-type: inline-size;
}
.studio-reading .studio-video-instagram iframe {
  /* Instagram's 4:5 media area plus its account row and player controls. */
  height: calc(125cqw + 220px);
  aspect-ratio: auto;
  max-height: none;
}
.studio-reading .studio-video figcaption {
  margin-top: 0.75rem;
  font: 0.875rem/1.6 var(--font-sans, sans-serif);
}
.studio-reading details,
.studio-prose details {
  border: 1px solid #cbd8cd;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
}
.studio-sources {
  white-space: pre-line;
}
.studio-reading h2 {
  margin-top: 2.5rem;
}
.studio-reading h3 {
  margin-top: 2rem;
}
@media (max-width: 1150px) {
  .studio-editor-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .studio-settings {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
  .studio-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .studio-library article {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .studio-library .row-action {
    grid-column: 1/-1;
  }
  .studio-bar {
    position: static;
  }
}
@media (max-width: 600px) {
  .studio-settings,
  .studio-filters {
    grid-template-columns: minmax(0, 1fr);
  }
  .studio-library article {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.65rem;
  }
  .studio-bar {
    gap: 0.6rem;
    padding: 0.75rem;
  }
  .studio-bar [data-save-status] {
    flex-basis: 100%;
  }
  .studio-writing {
    padding: 1rem;
  }
  .studio-toolbar {
    gap: 0.1rem;
  }
  .studio-toolbar button {
    padding: 0.35rem 0.5rem;
  }
  .studio-legacy article {
    align-items: flex-start;
    flex-direction: column;
  }
  .studio-reading .prose {
    font-size: 1rem;
  }
  [data-media-list] {
    grid-template-columns: minmax(0, 1fr);
  }
  dialog[data-media-dialog],
  dialog[data-insert-dialog],
  dialog[data-action-dialog] {
    padding: 1.25rem;
  }
}

dialog[data-preview-dialog] {
  width: min(1200px, calc(100vw - 2rem));
  height: 85vh;
  padding: 1rem;
  border: 1px solid #b9cbbf;
  border-radius: 12px;
  background: #f4f7f1;
}
dialog[data-preview-dialog] iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  height: calc(100% - 70px);
  border: 1px solid #cbd8ce;
  margin: 1rem auto;
  background: white;
}
/* Publication metadata stays distinct from long-form body copy. */
.studio-reading .studio-breadcrumb {
  margin: 0 0 1.6rem;
  font-size: 0.9rem;
}
.studio-reading .studio-byline {
  font-size: 0.9rem;
  line-height: 1.7;
  color: #495d55;
  margin: 1.25rem 0 0.45rem;
}
.studio-reading .studio-byline span,
.studio-reading .studio-topics span {
  margin: 0 0.35rem;
}
.studio-reading .studio-topics {
  font-size: 0.78rem;
  line-height: 1.6;
  color: #496b5e;
  margin: 0.45rem 0 0;
}
.studio-reading .studio-references {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid #bdcbc3;
}
.studio-reading .studio-references li {
  font:
    0.9rem/1.7 system-ui,
    sans-serif;
  margin-bottom: 0.6rem;
}
.studio-toolbar button[aria-pressed="true"] {
  color: #fff;
  background: #315b48;
  border-color: #315b48;
}
.studio-toolbar button:focus-visible {
  outline: 3px solid #315b48;
  outline-offset: 3px;
}

/* Editorial system: restrained paper, ink and rule. Public readers receive no editor script. */
.studio-reading.ed-article {
  max-width: 1120px;
  margin: 0 auto 5rem;
  color: #223a31;
}
.ed-article .page-head {
  max-width: 850px;
  padding: 0;
  margin: 0 0 2rem;
}
.ed-article .page-head .eyebrow {
  color: #557264;
  letter-spacing: 0.12em;
  font-size: 0.73rem;
  text-transform: uppercase;
}
.ed-article .page-head h1 {
  font-size: clamp(2.2rem, 4.6vw, 4rem);
  line-height: 1.08;
  font-weight: 500;
  text-wrap: balance;
  max-width: 23ch;
  margin: 0.8rem 0 1.25rem;
}
.ed-article .lead {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.6;
  max-width: 65ch;
  color: #4b5e54;
  margin-bottom: 1.25rem;
}
.ed-cover {
  --cover-paper: #e9e5d9;
  --cover-ink: #2d4c3e;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  min-height: 132px;
  padding: 1.5rem 2rem;
  background: var(--cover-paper);
  color: var(--cover-ink);
  border: 1px solid #98a49466;
}
.ed-cover-brand {
  font:
    3.4rem/1 Georgia,
    serif;
  letter-spacing: -0.09em;
}
.ed-cover-category {
  font:
    1.35rem/1.2 Georgia,
    serif;
  max-width: 26ch;
  text-transform: capitalize;
}
.ed-cover-rule {
  height: 1px;
  background: currentColor;
  opacity: 0.4;
}
.ed-cover-mark {
  position: absolute;
  right: 1rem;
  bottom: -0.45rem;
  opacity: 0.06;
  z-index: -1;
  font:
    8.5rem/1 Georgia,
    serif;
}
.ed-cover-footer {
  grid-column: 1/-1;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font:
    0.54rem/1.2 system-ui,
    sans-serif;
  letter-spacing: 0.16em;
}
.ed-cover--2 {
  --cover-paper: #e0e8df;
  border-left: 7px solid #78917c;
}
.ed-cover--2 .ed-cover-rule {
  background: repeating-linear-gradient(
    90deg,
    currentColor 0 1px,
    transparent 1px 8px
  );
  height: 30px;
  opacity: 0.3;
}
.ed-cover--3 {
  --cover-paper: #f1e9d9;
  border-top: 5px solid #8c8065;
}
.ed-cover--3 .ed-cover-category {
  font-style: italic;
}
.ed-cover--4 {
  --cover-paper: #dae4df;
  outline: 1px solid #9aaa9e;
  outline-offset: -10px;
}
.ed-cover--4 .ed-cover-rule {
  height: 10px;
  background: none;
  border-block: 1px solid currentColor;
}
.ed-cover--5 {
  --cover-paper: #e7e3dc;
}
.ed-cover--5 .ed-cover-brand {
  border-right: 1px solid #9baba0;
  padding-right: 1rem;
}
.ed-cover--5 .ed-cover-rule {
  height: 45px;
  width: 100%;
  background: repeating-linear-gradient(
    90deg,
    transparent 0 15px,
    currentColor 15px 16px
  );
  opacity: 0.2;
}
.ed-cover--compact {
  min-height: 160px;
  height: 100%;
  padding: 1.25rem;
  grid-template-columns: auto 1fr;
  align-content: space-between;
}
.ed-cover--compact .ed-cover-category {
  grid-column: 1/-1;
  font-size: 1.3rem;
  max-width: 20ch;
}
.ed-cover--compact .ed-cover-brand {
  font-size: 2.6rem;
}
.ed-cover--compact .ed-cover-footer {
  font-size: 0.48rem;
}
.ed-cover--compact .ed-cover-footer span {
  display: none;
}
.ed-article > .ed-cover {
  margin: 2rem 0 3rem;
}
.ed-reading-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}
.ed-reading-layout.ed-has-toc {
  grid-template-columns: 190px minmax(0, 1fr);
}
.ed-article .prose {
  max-width: 70ch;
  min-width: 0;
  font-size: 1.13rem;
  line-height: 1.78;
}
.ed-article .prose p {
  margin: 0 0 1.25em;
}
.ed-article .prose h2 {
  font-size: clamp(1.55rem, 2.3vw, 2rem);
  line-height: 1.23;
  letter-spacing: -0.025em;
  margin: 2.6em 0 0.8em;
  text-wrap: balance;
  break-after: avoid;
}
.ed-article .prose h3 {
  font-size: 1.2rem;
  line-height: 1.4;
  margin: 1.8em 0 0.6em;
  break-after: avoid;
}
.ed-article .prose > :first-child {
  margin-top: 0;
}
.ed-article :is(h2, h3)[id] {
  scroll-margin-top: 1rem;
}
.ed-article .prose :is(ul, ol) {
  margin: 1rem 0 1.75rem;
  padding-left: 1.4rem;
}
.ed-article .prose li {
  padding-left: 0.15rem;
  margin: 0.55rem 0;
}
.ed-toc {
  position: sticky;
  top: 6rem;
  max-height: calc(100vh - 8rem);
  overflow: auto;
  border-top: 1px solid #9bad9f;
  font:
    0.8rem/1.5 system-ui,
    sans-serif;
}
.ed-article .ed-toc details {
  margin: 0;
  border: 0;
  padding: 1rem 0;
  border-radius: 0;
}
.ed-toc summary {
  cursor: pointer;
  font-weight: 600;
  min-height: 32px;
}
.ed-toc ol {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
}
.ed-toc li {
  margin: 0.5rem 0;
}
.ed-toc a {
  display: block;
  padding: 0.35rem 0;
  text-decoration: none;
  color: #506659;
}
.ed-toc .ed-toc-level-3 {
  padding-left: 0.85rem;
  font-size: 0.74rem;
}
.ed-article .prose .ed-label {
  font:
    600 0.69rem/1.4 system-ui,
    sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #597063;
  margin: 0 0 0.75rem;
}
.ed-note {
  background: #edece2;
  border-left: 2px solid #78917d;
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
}
.ed-note--distinction {
  background: transparent;
  border-block: 1px solid #bac6ba;
  border-left: 0;
  padding: 1.5rem 0;
}
.ed-note--callout {
  background: #f0f2ec;
}
.ed-article .ed-note p:last-child {
  margin-bottom: 0;
}
.ed-example {
  border-block: 1px solid #b7c5b8;
  margin: 2.4rem 0;
  padding: 1.5rem 0;
}
.ed-article .ed-example h3 {
  margin: 0.3rem 0 1.2rem;
  font-size: 1.5rem;
}
.ed-example > div {
  padding-left: 1.1rem;
  border-left: 2px solid #d4dbce;
}
.ed-table {
  overflow-x: auto;
  max-width: 100%;
  margin: 2rem 0;
  border-block: 1px solid #b6c5b9;
}
.ed-article .ed-table table {
  display: table;
  width: 100%;
  margin: 0;
  overflow: visible;
  font-size: 0.95rem;
  line-height: 1.6;
}
.ed-table caption {
  text-align: left;
  padding: 1rem 0;
  color: #496052;
  font-weight: 600;
}
.ed-article .ed-table :is(th, td) {
  border: 0;
  border-bottom: 1px solid #d8ded5;
  padding: 1rem;
  min-width: 9rem;
  vertical-align: top;
}
.ed-article .ed-table th {
  background: #e8ede4;
  font-weight: 600;
}
.ed-article .ed-table tr:last-child td {
  border-bottom: 0;
}
.ed-article .ed-quote {
  margin: 2.5rem 0;
  padding: 1rem 0 1rem 1.5rem;
  border-left: 2px solid #839780;
}
.ed-article .ed-quote :is(p, blockquote) {
  font:
    italic clamp(1.4rem, 2.2vw, 1.9rem) / 1.45 Georgia,
    serif;
  color: #3b5c49;
  margin: 0;
  padding: 0;
  border: 0;
}
.ed-article .ed-quote figcaption {
  font-size: 0.85rem;
  margin-top: 1rem;
}
.ed-number {
  border-block: 1px solid #b6c5b9;
  padding: 1.6rem 0;
  margin: 2.2rem 0;
}
.ed-article .ed-number .ed-figure {
  font:
    3.4rem/1.1 Georgia,
    serif;
  letter-spacing: -0.04em;
  margin: 0.3rem 0 1rem;
}
.ed-article .ed-number .ed-number-source,
.ed-article .ed-number .ed-qualification {
  font-size: 0.85rem;
  color: #53665a;
}
.ed-divider {
  margin: 3rem 0;
  border: 0;
  border-top: 1px solid #c2cbbd;
  padding-top: 0.75rem;
  font:
    0.7rem/1.5 system-ui,
    sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.ed-article .ed-faq details {
  border: 0;
  border-top: 1px solid #c5cec0;
  border-radius: 0;
  margin: 0;
  padding: 1rem 0;
}
.ed-faq summary {
  cursor: pointer;
  padding: 0.4rem 0;
  font-weight: 600;
}
.ed-faq details[open] summary {
  margin-bottom: 1rem;
}
.ed-checklist {
  list-style-type: "✓  ";
}
.ed-author {
  margin-top: 3rem;
  padding: 1.4rem 0;
  border-block: 1px solid #b8c7b9;
  max-width: 70ch;
}
.ed-author .ed-label {
  font:
    0.7rem/1.5 system-ui,
    sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0;
  color: #627569;
}
.ed-author > p:not(.ed-label) {
  font:
    1.35rem/1.4 Georgia,
    serif;
  margin: 0.4rem 0 1rem;
}
.ed-author > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 2rem;
  font-size: 0.9rem;
}
.ed-article :is(a, summary, .ed-table):focus-visible {
  outline: 3px solid #527c63;
  outline-offset: 4px;
}
/* Administrator controls use the same paper and ink without pretending to be the public page. */
.ed-writing-actions,
.ed-block-toolbar,
.ed-insert-row,
.ed-block-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: end;
  margin: 1rem 0;
}
.ed-writing-actions button,
.ed-block-toolbar button,
.ed-edit-block button {
  min-height: 36px;
  font-size: 0.78rem;
  padding: 0.4rem 0.6rem;
}
.ed-edit-block {
  border-top: 1px solid #ccd6ca;
  padding: 1.1rem 0 1.6rem;
  min-width: 0;
}
.ed-edit-block > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font:
    0.72rem/1.4 system-ui,
    sans-serif;
  letter-spacing: 0.04em;
  color: #607362;
}
.ed-edit-block > header div {
  display: flex;
  gap: 0.3rem;
}
.ed-edit-block label {
  font-size: 0.8rem;
  margin: 0.6rem 0;
}
.ed-edit-block textarea {
  min-height: 44px;
  resize: vertical;
  line-height: 1.65;
}
.ed-edit-rich {
  min-height: 3rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid #c5d0c1;
  border-radius: 5px;
  background: #fff;
  font-size: 1.05rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.ed-edit-rich:focus-visible {
  outline: 2px solid #4c795e;
  outline-offset: 2px;
}
.ed-edit-table {
  overflow-x: auto;
  max-width: 100%;
}
.ed-edit-table table {
  border-collapse: collapse;
}
.ed-edit-table :is(th, td) {
  min-width: 150px;
  padding: 0.3rem;
  vertical-align: top;
}
.ed-edit-table td:last-child {
  min-width: 80px;
}
.ed-edit-table textarea {
  width: 100%;
}
.ed-edit-empty {
  padding: 2rem 0;
  color: #607362;
}
.ed-insert-row {
  padding: 1rem 0;
  border-top: 1px solid #bfcdbd;
}
.ed-insert-row label {
  margin: 0;
}
.ed-paste {
  padding: 1rem 0;
}
.ed-paste summary {
  cursor: pointer;
}
.ed-hints {
  background: #edf0e7;
  padding: 1.25rem 1.25rem 1.25rem 2.25rem;
  font-size: 0.9rem;
}
.ed-hints li {
  margin: 0.75rem 0;
}
.ed-hints button {
  font-size: 0.75rem;
}
.ed-settings-hidden {
  grid-template-columns: minmax(0, 1fr);
}
[data-document-outline] label {
  display: flex;
  align-items: start;
  gap: 0.6rem;
  font-size: 0.8rem;
}
[data-document-outline] input {
  width: 18px;
  flex: 0 0 18px;
  margin-top: 0.2rem;
}
[data-cover-preview] .ed-cover {
  min-height: 170px;
}
[data-block-editor] dialog {
  max-width: 500px;
  border: 1px solid #b7c4b5;
  padding: 1.5rem;
  border-radius: 8px;
}
[data-block-editor] [hidden],
.studio-editor-layout [hidden] {
  display: none !important;
}
@media (max-width: 900px) {
  .ed-reading-layout.ed-has-toc {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }
  .ed-toc {
    position: static;
    max-height: none;
  }
  .ed-toc ol {
    columns: 2;
    column-gap: 2rem;
  }
  .ed-toc li {
    break-inside: avoid;
  }
  .ed-article .prose {
    max-width: 70ch;
  }
}
@media (max-width: 600px) {
  .ed-article .page-head h1 {
    font-size: clamp(2rem, 8vw, 2.8rem);
    line-height: 1.12;
  }
  .ed-article .prose {
    font-size: 1.04rem;
    line-height: 1.75;
  }
  .ed-article > .ed-cover {
    min-height: 110px;
    padding: 1rem;
    margin: 1.5rem 0 2rem;
  }
  .ed-cover-category {
    font-size: 1.05rem;
  }
  .ed-cover-brand {
    font-size: 2.8rem;
  }
  .ed-toc ol {
    columns: 1;
  }
  .ed-toc a {
    min-height: 36px;
  }
  .ed-note {
    padding: 1.2rem;
  }
  .ed-edit-block > header {
    align-items: start;
  }
  .ed-edit-block > header div {
    flex-wrap: wrap;
    justify-content: end;
  }
  .ed-insert-row > label {
    width: 100%;
  }
  .ed-insert-row select {
    width: 100%;
  }
  dialog[data-preview-dialog] .studio-dialog-actions {
    gap: 0.25rem;
    flex-wrap: wrap;
  }
  dialog[data-preview-dialog] button {
    padding: 0.4rem 0.6rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ed-article {
    scroll-behavior: auto;
  }
}
.ed-related {
  margin-top: 3.5rem;
}
.ed-related > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
.ed-related article {
  min-width: 0;
}
.ed-article .ed-related h3 {
  font-size: 1.2rem;
  line-height: 1.35;
  margin: 1rem 0 0.5rem;
}
.ed-related p {
  font-size: 0.75rem;
  color: #576b5c;
}
.ed-related img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
@media (max-width: 700px) {
  .ed-related > div {
    grid-template-columns: 1fr;
  }
  .ed-related .ed-cover {
    min-height: 130px;
    height: auto;
  }
}
.ed-live-panel {
  margin: 2rem 0;
  padding: 1rem;
  background: #e9eee5;
  border: 1px solid #bac9b9;
}
.ed-live-panel iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 750px;
  border: 1px solid #bac9b9;
  background: white;
  margin: 1rem auto 0;
}
/* The sticky header's full-bleed background must not count the scrollbar as content. */
.visitor-site > .wrap:has(> .header)::before {
  inset: 0;
  box-shadow: 0 0 0 100vmax var(--paper);
  clip-path: inset(0 -100vmax);
}

/* The editor keeps writing primary; controls expand where the task happens. */
[data-studio-editor] .studio-bar {
  gap: 0.5rem;
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
}
[data-studio-editor] .studio-bar > a:first-child {
  margin-right: 0.25rem;
}
[data-studio-editor] .studio-bar .badge {
  font-size: 0.7rem;
  max-width: 13rem;
  white-space: normal;
}
.studio-more-actions {
  position: relative;
}
.studio-more-actions > summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 0.7rem;
  border: 1px solid #b4c4b7;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.85rem;
}
.studio-more-actions > div {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  z-index: 12;
  width: 230px;
  max-width: calc(100vw - 2rem);
  padding: 0.6rem;
  background: #fff;
  border: 1px solid #b8c9bc;
  border-radius: 8px;
  box-shadow: 0 6px 18px #213b2d1a;
}
.studio-more-actions :is(button, a) {
  display: block;
  width: 100%;
  padding: 0.7rem;
  text-align: left;
  font-size: 0.85rem;
}
[data-studio-editor] textarea[data-grow] {
  overflow: hidden;
  resize: none;
  min-height: 0;
}
[data-studio-editor] .studio-writing > label {
  margin-bottom: 1.2rem;
  color: #586c5f;
  font-size: 0.8rem;
}
[data-studio-editor] .studio-writing textarea[name="title"] {
  font-weight: 500;
  padding: 0.6rem 0.7rem;
}
[data-studio-editor] .studio-writing textarea[name="summary"] {
  padding: 0.6rem 0.7rem;
}
.ed-editor-tools {
  border-block: 1px solid #cbd6c9;
  padding: 0.5rem 0;
}
.ed-editor-tools .ed-block-toolbar {
  margin: 0 0 0.5rem;
  gap: 0.4rem;
  align-items: center;
}
.ed-editor-tools .ed-block-toolbar button {
  min-height: 44px;
  background: #f4f7f1;
  color: #304d3b;
  border: 1px solid #d0dbcc;
}
.ed-editor-tools .ed-insert-row {
  border-top: 0;
  margin: 0;
  padding: 0.4rem 0;
  align-items: end;
}
.ed-editor-tools .ed-insert-row label {
  flex: 1 1 10rem;
  font-size: 0.75rem;
  margin: 0;
}
.ed-editor-tools .ed-insert-row select {
  min-height: 44px;
  margin-top: 0.3rem;
}
.ed-document-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 0.55rem 0;
}
.ed-document-nav > label {
  flex: 1 1 15rem;
  margin: 0;
  font-size: 0.75rem;
}
.ed-document-nav select {
  margin-top: 0.3rem;
  font-size: 0.85rem;
  min-width: 0;
  max-width: 100%;
}
.ed-document-nav details {
  flex: 1 1 10rem;
  font-size: 0.8rem;
}
.ed-document-nav summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.ed-document-nav nav {
  display: grid;
  padding: 0.5rem 0;
}
.ed-document-nav nav button {
  text-align: left;
  font-size: 0.85rem;
  background: transparent;
  border: 0;
  color: #355640;
  min-height: 44px;
}
.ed-outline-level-3 {
  padding-left: 1.2rem;
}
.ed-edit-help {
  font-size: 0.75rem;
  color: #667665;
  margin: 0.65rem 0 1rem;
}
[data-block-list] .ed-edit-block {
  position: relative;
  padding: 0.8rem 0 0.65rem;
  border-top-color: #e3e9e0;
  scroll-margin-top: 8rem;
}
[data-block-list] .ed-edit-block > header {
  margin: 0 0 0.4rem;
  letter-spacing: 0.02em;
  font-size: 0.69rem;
  align-items: center;
}
.ed-block-options {
  position: relative;
  flex-shrink: 0;
}
.ed-block-options > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  color: #536b58;
  border-radius: 5px;
  font-size: 0.75rem;
  letter-spacing: 0;
}
.ed-block-options[open] > summary {
  background: #edf2e9;
}
.ed-block-options-panel {
  padding: 0.75rem;
  border: 1px solid #c2d1bf;
  background: #f7f9f3;
  border-radius: 6px;
}
.ed-block-options[open] {
  position: static;
}
.ed-block-options[open] .ed-block-options-panel {
  position: absolute;
  z-index: 3;
  top: 3.6rem;
  right: 0;
  width: min(340px, 100%);
  box-shadow: 0 5px 15px #223b2e15;
}
.ed-block-options-panel .ed-block-actions {
  margin: 0;
  align-items: center;
}
.ed-block-options-panel :is(button, select) {
  min-height: 44px;
}
[data-block-list] .ed-rich-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  margin: 0;
}
[data-block-list] .ed-edit-rich {
  min-height: 2.8rem;
  border-color: transparent;
  border-radius: 4px;
  background: transparent;
  padding: 0.4rem 0.15rem;
  font-size: 1.05rem;
  line-height: 1.75;
}
[data-block-list] .ed-edit-rich:hover {
  border-color: #dce5d6;
}
[data-block-list] .ed-edit-rich:focus {
  outline: 2px solid #77956e;
  outline-offset: 3px;
  background: #fff;
}
[data-block-list] .ed-edit-block--heading .ed-edit-rich {
  font:
    500 1.65rem/1.35 Georgia,
    serif;
  padding-block: 0.6rem;
}
[data-block-list]
  :is(.ed-edit-block--takeaway, .ed-edit-block--callout)
  .ed-edit-rich {
  background: #f0f3e9;
  padding: 0.85rem 1rem;
}
[data-block-list] .ed-edit-block--quote .ed-edit-rich {
  font:
    italic 1.4rem/1.55 Georgia,
    serif;
  border-left: 2px solid #a0b499;
  padding-left: 1rem;
}
[data-block-list] .ed-field-options {
  margin: 0.3rem 0;
  font-size: 0.8rem;
}
.ed-field-options > summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  color: #5c715b;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
[data-block-list] .ed-edit-block textarea {
  overflow: hidden;
  resize: none;
}
[data-block-list] .ed-insert-below {
  display: block;
  min-height: 44px;
  color: #587151;
  background: transparent;
  border: 1px solid transparent;
  padding: 0.3rem 0.5rem;
  font-size: 0.75rem;
  margin: 0.15rem 0 0 auto;
}
[data-block-list] .ed-insert-below:hover {
  border-color: #c2d0bb;
  background: #f7f9f3;
}
.ed-placement-image {
  display: block;
  max-width: 100%;
  max-height: 360px;
  width: auto;
  height: auto;
  margin: 0.5rem auto 1rem;
  object-fit: contain;
  border-radius: 5px;
}
[data-studio-editor] :is(summary, button, select, a):focus-visible {
  outline: 3px solid #527c63;
  outline-offset: 3px;
}
.studio-check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  line-height: 1.5;
}
.studio-check input {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-top: 0.15rem;
}
#studio-history {
  scroll-margin-top: 8rem;
}
@media (max-width: 1150px) {
  [data-studio-editor] .studio-bar {
    position: sticky;
    top: 0;
  }
}
@media (max-width: 600px) {
  [data-studio-editor] .studio-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 0.5rem;
    gap: 0.4rem;
  }
  [data-studio-editor] .studio-bar > a:first-child {
    grid-column: span 2;
    font-size: 0.78rem;
  }
  [data-studio-editor] .studio-bar > .badge {
    grid-column: span 2;
    font-size: 0.65rem;
    justify-self: end;
  }
  [data-studio-editor] .studio-bar > [data-save-status] {
    grid-column: 1/-1;
    font-size: 0.75rem;
    margin: 0;
  }
  [data-studio-editor] .studio-bar button,
  .studio-more-actions > summary {
    font-size: 0.72rem;
    padding: 0.4rem 0.2rem;
    justify-content: center;
    white-space: normal;
  }
  .studio-more-actions > div {
    right: -2rem;
  }
  .ed-writing-actions {
    gap: 0.35rem;
  }
  .ed-writing-actions button {
    min-height: 44px;
    flex: 1 1 auto;
    font-size: 0.7rem;
  }
  .ed-editor-tools .ed-block-toolbar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .ed-editor-tools .ed-block-toolbar button {
    min-width: 0;
    padding: 0.3rem 0.15rem;
    font-size: 0.7rem;
  }
  .ed-editor-tools .ed-insert-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .ed-editor-tools .ed-insert-row > label {
    width: auto;
  }
  .ed-editor-tools .ed-insert-row > button {
    grid-column: 1/-1;
    min-height: 44px;
  }
  .ed-document-nav {
    display: block;
  }
  .ed-document-nav select {
    width: 100%;
  }
  [data-block-list] .ed-edit-block {
    scroll-margin-top: 10rem;
  }
  [data-block-list] .ed-edit-block > header {
    gap: 0.4rem;
  }
  [data-block-list] .ed-edit-rich {
    font-size: 1rem;
  }
  [data-block-list] .ed-edit-block--heading .ed-edit-rich {
    font-size: 1.4rem;
  }
  [data-block-list] .ed-edit-block :is(input, textarea, select) {
    font-size: 16px;
  }
  .ed-block-options-panel .ed-block-actions {
    gap: 0.35rem;
  }
}

.studio-compare {
  width: min(900px, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid #b8c9bc;
  border-radius: 12px;
  background: #f7f9f3;
  color: #263e30;
}
.studio-compare::backdrop {
  background: #1c342966;
}
.studio-compare > section {
  border-top: 1px solid #c9d5c5;
  padding: 1rem 0;
}
.studio-compare h2 {
  margin-top: 0;
}
.studio-compare h3 {
  font-size: 1.1rem;
  text-transform: capitalize;
}
.studio-compare details {
  margin: 0.5rem 0;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d4dece;
  background: #fff;
  border-radius: 6px;
}
.studio-compare summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
}
.studio-compare pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 320px;
  overflow: auto;
  padding: 0.75rem;
  font:
    0.8rem/1.6 ui-monospace,
    monospace;
  border-top: 1px solid #e3e9df;
}
.studio-compare label {
  display: block;
  margin-top: 0.8rem;
  font-size: 0.85rem;
}
.studio-compare select {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 0.4rem;
}
.studio-compare > button {
  min-height: 44px;
  margin: 0.5rem 0.6rem 0 0;
}
.studio-compare :is(button, select, summary):focus-visible {
  outline: 3px solid #527c63;
  outline-offset: 3px;
}
.studio-capacity:not([hidden]) {
  padding: 0.85rem 1rem;
  border: 1px solid #b8c5ad;
  background: #f2f1e6;
  border-radius: 6px;
  font-size: 0.85rem;
}
[data-studio-editor] .studio-settings {
  scroll-margin-top: 10rem;
}
[data-block-list] .ed-edit-block.is-selected > header > span {
  color: #315d3f;
  font-weight: 600;
}
.ed-block-toolbar button[aria-pressed="true"] {
  background: #315b48;
  color: #fff;
  border-color: #315b48;
}

/* On phones the preview uses the available viewport, rather than a smaller
   page inside a padded dialog. Device choices still cap at the available width. */
@media (max-width: 600px) {
  dialog[data-preview-dialog] {
    inset: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    overflow: hidden;
  }
  dialog[data-preview-dialog][open] {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }
  dialog[data-preview-dialog] .studio-dialog-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: max(8px, env(safe-area-inset-top))
      max(8px, env(safe-area-inset-right)) 8px
      max(8px, env(safe-area-inset-left));
  }
  dialog[data-preview-dialog] .studio-dialog-actions button {
    min-width: 0;
    min-height: 44px;
    padding: 8px 4px;
    font-size: 0.75rem;
  }
  dialog[data-preview-dialog] iframe {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 100%;
    min-height: 0;
    margin: 0 auto;
    border: 0;
  }
}
/* Continuous document editor. Scoped to the admin form; public prose is unchanged. */
[data-document-editor] {
  --doc-border: #d8dcd8;
  --doc-ink: #193c37;
  min-width: 0;
}
.studio-document-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  position: sticky;
  top: 4.5rem;
  z-index: 8;
  background: #fafbf8;
  border: 1px solid var(--doc-border);
  border-radius: 12px;
  padding: 0.5rem;
  box-shadow: 0 3px 12px #193c3708;
}
.studio-document-toolbar button,
.studio-document-toolbar summary,
.studio-table-tools button {
  font:
    600 0.8rem/1.3 system-ui,
    sans-serif;
  padding: 0.55rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--doc-ink);
  cursor: pointer;
  min-height: 38px;
}
.studio-document-toolbar button:hover,
.studio-document-toolbar summary:hover,
.studio-table-tools button:hover {
  background: #e7eee7;
}
.studio-document-toolbar button[aria-pressed="true"] {
  background: #193c37;
  color: #fff;
}
.studio-document-toolbar button:disabled {
  opacity: 0.45;
  cursor: default;
}
.studio-document-style {
  font-size: 0;
  margin: 0 !important;
}
.studio-document-style select {
  width: 125px;
  font:
    600 0.85rem/1.4 system-ui,
    sans-serif;
  margin: 0;
  min-height: 38px;
  padding: 0.4rem;
}
.studio-tool-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem;
  border-right: 1px solid var(--doc-border);
  padding-right: 0.35rem;
}
.studio-insert-menu {
  position: relative;
  margin: 0 !important;
  border: 0 !important;
  padding: 0 !important;
}
.studio-insert-menu > div {
  position: absolute;
  right: 0;
  top: 100%;
  width: min(260px, 75vw);
  padding: 0.75rem;
  border: 1px solid var(--doc-border);
  background: #fff;
  box-shadow: 0 12px 36px #193c3726;
  border-radius: 10px;
  display: grid;
  gap: 0.4rem;
  z-index: 20;
}
.studio-insert-menu label {
  font-size: 0.8rem;
}
.studio-insert-menu select {
  width: 100%;
}
.studio-table-tools {
  display: flex;
  flex-wrap: wrap;
  background: #edf2ed;
  border-radius: 8px;
  padding: 0.35rem;
  gap: 0.25rem;
}
.studio-table-tools[hidden] {
  display: none;
}
.studio-document-notice:empty {
  display: none;
}
.studio-document-notice {
  font-size: 0.85rem;
  padding: 0.65rem 0.9rem;
  background: #fff5d9;
  border-radius: 8px;
  color: #4e3f14;
}
.studio-document-prose {
  min-height: 55vh;
  padding: 2rem clamp(0.85rem, 3vw, 2.5rem) 5rem;
  background: #fff;
  color: #253b36;
  font:
    1.075rem/1.8 Georgia,
    serif;
  border: 1px solid var(--doc-border);
  border-radius: 10px;
  margin-top: 0.75rem;
  overflow-wrap: anywhere;
  outline: none;
}
.studio-document-prose:focus-visible {
  outline: 2px solid #286950;
  outline-offset: 3px;
}
.studio-document-prose p {
  margin: 0.65em 0;
}
.studio-document-prose h2 {
  font-size: 1.65rem;
  line-height: 1.3;
  margin: 1.6em 0 0.5em;
}
.studio-document-prose h3 {
  font-size: 1.25rem;
  line-height: 1.4;
  margin: 1.3em 0 0.5em;
}
.studio-document-prose > :first-child {
  margin-top: 0;
}
.studio-document-prose ul,
.studio-document-prose ol {
  padding-left: 1.7em;
}
.studio-document-prose li p {
  margin: 0.15em 0;
}
.studio-document-prose blockquote {
  border-left: 3px solid #6e8c76;
  padding-left: 1.2em;
  margin-left: 0;
  color: #466252;
}
.studio-document-prose table {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
  margin: 1rem 0;
}
.studio-document-prose td,
.studio-document-prose th {
  min-width: 45px;
  border: 1px solid #b7c6bc;
  padding: 0.6rem;
  vertical-align: top;
  position: relative;
}
.studio-document-prose th {
  background: #edf2ed;
}
.studio-document-prose .selectedCell::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #28695026;
  pointer-events: none;
}
.studio-document-prose p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  color: #6b756e;
  float: left;
  height: 0;
  pointer-events: none;
}
.studio-document-prose .ProseMirror-gapcursor {
  display: block;
  position: relative;
}
.studio-document-prose .ProseMirror-gapcursor:after {
  content: "";
  display: block;
  border-top: 1px solid currentColor;
  width: 20px;
}
.studio-document-object {
  border: 1px solid #cbd7cc;
  border-radius: 10px;
  padding: 1rem;
  margin: 1.5rem 0;
  background: #f8faf6;
  max-width: 100%;
  font-family: system-ui, sans-serif;
}
.studio-document-object.ProseMirror-selectednode {
  outline: 2px solid #286950;
  outline-offset: 3px;
}
.studio-object-label {
  color: #526b5e;
  font:
    700 0.75rem/1.4 system-ui,
    sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.studio-object-preview {
  max-height: 30rem;
  overflow: auto;
  font-size: 0.95rem;
}
.studio-object-preview img {
  max-width: 100%;
  max-height: 24rem;
  height: auto;
  object-fit: contain;
}
.studio-object-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-top: 0.8rem;
  margin-top: 0.8rem;
  border-top: 1px solid #dbe3d9;
}
.studio-object-controls button {
  background: #fff;
  color: #193c37;
  font:
    600 0.75rem/1.4 system-ui,
    sans-serif;
  padding: 0.5rem 0.65rem;
  border: 1px solid #cbd7cc;
  border-radius: 6px;
}
.studio-document-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  color: #58675f;
  font:
    0.75rem/1.5 system-ui,
    sans-serif;
  padding: 0.8rem 0.25rem;
}
.studio-document-dialog {
  width: min(560px, calc(100vw - 2rem));
  max-height: calc(100dvh - 3rem);
  overflow: auto;
  padding: 1.5rem;
  border: 1px solid #cbd7cc;
  border-radius: 14px;
  color: #193c37;
}
.studio-document-dialog::backdrop {
  background: #11271f80;
}
.studio-document-dialog label {
  display: grid;
  gap: 0.35rem;
  margin: 1rem 0;
  font:
    600 0.9rem/1.5 system-ui,
    sans-serif;
}
.studio-document-dialog input,
.studio-document-dialog textarea,
.studio-document-dialog select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem;
  border: 1px solid #a5b7a9;
  border-radius: 6px;
  font:
    1rem/1.5 system-ui,
    sans-serif;
}
.studio-document-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}
.studio-document-dialog [role="alert"] {
  color: #9b2226;
}
.studio-focus-mode .studio-settings {
  display: none;
}
.studio-focus-mode .studio-editor-layout {
  display: block;
  max-width: 900px;
  margin-inline: auto;
}
[data-document-editor] :focus-visible,
.studio-document-dialog :focus-visible {
  outline: 2px solid #286950;
  outline-offset: 3px;
}
[data-document-outline] button {
  display: block;
  background: transparent;
  color: #193c37;
  text-align: left;
  font-size: 0.85rem;
}
@media (max-width: 700px) {
  .studio-document-toolbar {
    position: static;
    gap: 0.2rem;
  }
  .studio-document-toolbar button,
  .studio-document-toolbar summary,
  .studio-object-controls button {
    min-height: 44px;
  }
  .studio-document-prose {
    padding: 1rem 0.85rem 3rem;
    font-size: 1rem;
  }
  .studio-document-dialog {
    padding: 1rem;
  }
  .studio-document-prose table {
    font-size: 0.85rem;
  }
}
.prose figure.ed-image--medium {
  width: 70%;
}
.prose figure.ed-image--small {
  width: 45%;
}
.prose figure.ed-image--left {
  margin-left: 0;
  margin-right: auto;
}
.prose figure.ed-image--center {
  margin-inline: auto;
}
.prose figure.ed-image--right {
  margin-left: auto;
  margin-right: 0;
}
.prose figure.ed-image img {
  width: 100%;
  height: auto;
}
@media (max-width: 550px) {
  .prose figure.ed-image--medium,
  .prose figure.ed-image--small {
    width: 100%;
  }
}

/* Long-document workspace. Small screens retain normal page scrolling. */
.studio-workspace-controls {
  display: flex;
  gap: 0.4rem;
  padding: 0.4rem 0;
}
.studio-workspace-controls button {
  padding: 0.45rem 0.8rem;
  min-height: 38px;
  background: #fff;
  color: #193c37;
  border: 1px solid #ccd8d3;
}
.studio-workspace-controls button[aria-expanded="true"],
.studio-workspace-controls button[aria-pressed="true"] {
  background: #193c37;
  color: #fff;
}
.studio-workspace-ready [hidden] {
  display: none !important;
}
.studio-navigation {
  padding: 1rem;
  background: #f7f9f7;
  border: 1px solid #dce4df;
  border-radius: 10px;
}
.studio-navigation h2 {
  font: 600 1rem/1.4 system-ui;
  margin: 0;
}
.studio-navigation button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  color: #193c37;
  border: 0;
  padding: 0.6rem;
  font-size: 0.85rem;
}
.studio-navigation button[data-level="3"] {
  padding-left: 1.5rem;
}
.studio-navigation button[aria-current] {
  background: #e1ece5;
  box-shadow: inset 3px 0 #193c37;
}
.studio-document-scroll {
  padding: 1rem;
}
.studio-document-scroll > label {
  max-width: 850px;
  margin-inline: auto;
}
.studio-document-scroll [name="title"] {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
}
.studio-document-scroll [name="summary"] {
  font-size: 1rem;
  line-height: 1.5;
}
.studio-workspace-ready .studio-document-prose {
  margin: 0 auto;
  max-width: 850px;
  padding: 1.5rem clamp(1rem, 3vw, 2.5rem) 5rem;
}
.studio-workspace-ready .studio-document-toolbar {
  top: 0;
  margin: 0;
  border-radius: 10px 10px 0 0;
}
.studio-workspace-ready .studio-document-footer {
  font-size: 0.75rem;
  padding: 0.6rem 1rem;
  border-top: 1px solid #dce4df;
}
.studio-workspace-ready .studio-object-controls label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font: 0.8rem/1.3 system-ui;
}
.studio-object-controls select {
  width: auto;
  min-height: 38px;
  padding: 0.35rem;
  font-size: 0.8rem;
}
.studio-object-preview.ed-image--small {
  width: 45%;
}
.studio-object-preview.ed-image--medium {
  width: 70%;
}
.studio-object-preview.ed-image--left {
  margin-right: auto;
}
.studio-object-preview.ed-image--center {
  margin-inline: auto;
}
.studio-object-preview.ed-image--right {
  margin-left: auto;
}
.studio-object-preview.ed-image {
  border: 1px solid #dce4df;
  background: #f5f8f5;
  padding: 1rem;
  overflow-wrap: anywhere;
}
.studio-writing-focus .sidebar,
.studio-writing-focus .topbar {
  display: none;
}
.studio-writing-focus .admin-layout {
  display: block;
}
.studio-writing-focus .workspace {
  margin: 0;
}
@media (min-width: 1000px) and (min-height: 650px) {
  .studio-editing main {
    height: calc(100dvh - 72px);
    min-height: 0;
    padding: 10px 20px;
    display: flex;
    flex-direction: column;
    max-width: none;
  }
  .studio-editing .page-heading {
    margin-bottom: 6px;
    flex: 0 0 auto;
  }
  .studio-editing .page-heading h1 {
    font-size: 22px;
  }
  .studio-editing .page-heading .eyebrow,
  .studio-editing .page-heading p:not(.eyebrow),
  .studio-editing .refresh-note,
  .studio-editing .workspace > footer {
    display: none;
  }
  .studio-editing .studio-workspace-ready {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }
  .studio-workspace-ready .studio-bar {
    position: static;
    order: -2;
    flex: 0 0 auto;
    padding: 0.5rem 0.75rem;
    margin: 0;
    gap: 0.4rem;
  }
  .studio-workspace-controls {
    order: -1;
    flex: 0 0 auto;
  }
  .studio-workspace-ready .studio-editor-layout {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
    flex: 1;
    min-height: 0;
  }
  .studio-workspace-ready .studio-writing {
    flex: 1;
    min-height: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: visible;
  }
  .studio-workspace-ready [data-document-editor] {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }
  .studio-workspace-ready .studio-document-toolbar,
  .studio-workspace-ready .studio-table-tools,
  .studio-workspace-ready .studio-document-footer {
    flex: 0 0 auto;
    position: relative;
  }
  .studio-workspace-ready .studio-document-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    background: #f7f8f5;
  }
  .studio-workspace-ready .studio-settings {
    flex: 0 0 290px;
    overflow: auto;
    min-height: 0;
    padding-right: 0.25rem;
  }
  .studio-workspace-ready .studio-navigation {
    flex: 0 0 210px;
    overflow: auto;
    min-height: 0;
  }
  .studio-workspace-ready .studio-error:empty {
    display: none;
  }
  .studio-workspace-ready .studio-error:not(:empty),
  .studio-workspace-ready [data-save-recovery]:not([hidden]),
  .studio-workspace-ready .studio-document-notice:not(:empty) {
    max-height: 18vh;
    overflow: auto;
    flex-shrink: 0;
    margin-block: 0.3rem;
  }
  .studio-workspace-ready .studio-import-note {
    font-size: 0.75rem;
    margin: 0.25rem 0;
  }
  .studio-writing-focus main {
    height: 100dvh;
    max-width: 1440px;
  }
}
@media (max-width: 999px), (max-height: 649px) {
  .studio-workspace-ready .studio-editor-layout {
    display: flex;
    flex-direction: column;
  }
  .studio-workspace-ready .studio-settings,
  .studio-workspace-ready .studio-navigation {
    order: -1;
    width: 100%;
    max-height: 55dvh;
    overflow: auto;
  }
  .studio-workspace-ready .studio-writing {
    padding: 0;
    width: 100%;
  }
  .studio-workspace-ready .studio-document-toolbar {
    position: sticky;
    top: 0;
    z-index: 8;
  }
  .studio-workspace-ready .studio-bar {
    position: static;
  }
  .studio-document-scroll {
    padding: 0.75rem;
  }
  .studio-object-controls select {
    min-height: 44px;
  }
}
