:root { font: 15px/1.45 Helvetica,Arial,sans-serif; color: #1c1c1c; background: #f3f3f3; }
* { box-sizing: border-box; }
body { margin: 0; }
header { background: white; border-bottom: 1px solid #ccc; display: flex; justify-content: space-between; padding: 12px 20px; font-size: 1.15rem; font-weight: 700; }
a { color: #000030; text-underline-offset: .15em; }
a:hover { background: #dff9ff; }
:focus-visible { outline: 2px solid #00677a; outline-offset: 3px; }
main { display: grid; grid-template-columns: minmax(230px, 310px) minmax(0, 700px); justify-content: center; gap: 12px; padding: 12px; }
aside,.detail { background: white; border: 1px solid #ccc; padding: 12px; }
nav { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .7rem; }
nav a { padding: .3rem .4rem; }
[aria-current] { background: #dff9ff; }
aside form { display: flex; }
aside input { flex: 1; min-width: 0; }
ul { padding: 0; margin: .7rem 0 0; list-style: none; }
li { border-top: 1px solid #ddd; padding-block: .5rem; }
li small { display: block; color: #555; }
h1 { margin: 0 0 .65rem; font-size: 1.55rem; line-height: 1.17; }
.article-form { display: grid; gap: .7rem; }
.article-form label { display: block; font-weight: 700; }
input, textarea, select, button { font: inherit; border: 1px solid #888; border-radius: 0; color: inherit; background: white; padding: .35rem .5rem; }
.article-form :is(input:not([type=checkbox]),textarea,select) { display: block; width: 100%; margin-top: .2rem; }
textarea { resize: vertical; }
button { cursor: pointer; }
.primary { color: white; background: #000030; border-color: #000030; }
button:hover { color: #000030; background: #00d3ff; }
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.actions,.flags { display: flex; flex-wrap: wrap; gap: .5rem; }
.path,.job { color: #555; font-size: .88rem; margin: 0; }
[role=alert] { padding-left: .5rem; border-left: 3px solid #ad282a; }
@media (max-width: 45rem) { main { grid-template-columns: minmax(0,1fr); } .detail { grid-row: 1; } }
@media (max-width: 28rem) { .columns { grid-template-columns: minmax(0,1fr); } }
.article-form textarea[hidden] { display: none; }
.format-tools { display: flex; flex-wrap: wrap; gap: .3rem; padding: .4rem; border: 1px solid #888; border-bottom: 0; background: #f3f3f3; }
[data-rich-editor] { margin-top: .2rem; }
[contenteditable] { border: 1px solid #888; min-height: 15rem; max-height: 34rem; overflow: auto; overflow-wrap: anywhere; padding: .65rem; }
[contenteditable] :is(img,video,audio) { max-width: 100%; height: auto; }

.editor-header { min-height: 51px; align-items: center; gap: .45rem 1rem; padding: 6px 14px; }
.editor-header .editor-brand { flex: none; text-decoration: none; font-size: 1.1rem; }
.editor-header nav { gap: .15rem; margin: 0; font-size: .86rem; font-weight: 400; }
.editor-header nav a { display: flex; align-items: center; min-height: 36px; text-decoration: none; padding-inline: .5rem; }
.editor-header nav a:hover { text-decoration: underline; }
.editor-header nav a.primary:hover { color: #000030; }
.editor-workspace { --editor-share: .5fr; --preview-share: .5fr; display: grid; grid-template-columns: minmax(210px, 280px) minmax(0, 1fr); gap: 0; padding: 0; height: calc(100dvh - 51px); }
.editor-workspace.has-editor { grid-template-columns: minmax(200px, 21%) minmax(0, var(--editor-share)) 10px minmax(0, var(--preview-share)); }
.editor-workspace > :is(aside, section) { display: flex; flex-direction: column; min-width: 0; min-height: 0; border: 0; padding: 0; background: white; }
.editor-workspace > .article-list { border-right: 1px solid #ccc; }
.panel-title { flex: none; min-height: 42px; display: flex; align-items: center; gap: .65rem; margin: 0; padding: 0 12px; border-bottom: 1px solid #ccc; background: #f3f3f3; font-size: .88rem; font-weight: 700; }
.panel-title h2 { font-size: inherit; margin: 0; }
.panel-title span { margin-left: auto; font-size: .8rem; font-weight: 400; }
.panel-title a { font-size: .8rem; font-weight: 400; }
.list-tools { padding: .5rem; }
.list-tools nav { gap: .15rem; margin-bottom: .45rem; font-size: .8rem; }
.article-list ul { overflow: auto; margin: 0; }
.article-list li { padding: 0; }
.article-list li a { display: block; padding: .55rem .65rem; border-inline-start: 3px solid transparent; text-decoration: none; overflow-wrap: anywhere; }
.article-list li [aria-current] { border-inline-start-color: #000030; }
.article-list li strong { display: block; font-size: .88rem; }
.article-list li small { font-size: .76rem; }
.article-list > nav { margin: .25rem .4rem; }
.list-empty { margin-inline: .65rem; }
.detail-body { flex: 1; min-height: 0; overflow: auto; padding: 12px; }

.editor-separator { position: relative; background: #f3f3f3; border-inline: 1px solid #ccc; cursor: col-resize; touch-action: none; }
.editor-separator::after { content: ''; position: absolute; inset: calc(50% - 16px) 2px auto; height: 32px; background: #777; }
.editor-separator:hover, .editor-separator:focus-visible { background: #dff9ff; }
.workspace-tabs { display: none; background: white; border-bottom: 1px solid #ccc; }
.workspace-tabs button { flex: 1; border: 0; border-bottom: 2px solid transparent; min-height: 42px; }
.workspace-tabs button[aria-pressed=true] { border-bottom-color: #000030; font-weight: 700; }
@media (max-width: 1049px) {
  .editor-workspace.has-editor { height: calc(100dvh - 94px); grid-template-columns: minmax(0,var(--editor-share)) 10px minmax(0,var(--preview-share)); }
  .editor-enhanced .workspace-tabs { display: flex; }
  .editor-enhanced .has-editor > .article-list { display: none; }
  .editor-enhanced .has-editor[data-panel-view=list] { grid-template-columns: minmax(0,1fr); }
  .editor-enhanced .has-editor[data-panel-view=list] > :not(.article-list) { display: none; }
  .editor-enhanced .has-editor[data-panel-view=list] > .article-list { display: flex; }
}
@media (max-width: 799px) {
  .editor-header { flex-wrap: wrap; }
  .editor-header nav { flex: 1 1 100%; }
  .editor-workspace, .editor-workspace.has-editor { height: auto; grid-template-columns: minmax(0,1fr); }
  .editor-workspace > .detail { grid-row: auto; }
  .editor-workspace:not(.has-editor) > .detail { display: none; }
  .editor-workspace .editor-separator { display: none; }
  .preview-stage { flex: none; height: 75dvh; }
  .editor-enhanced .has-editor[data-panel-view=edit] > .editor-preview,
  .editor-enhanced .has-editor[data-panel-view=preview] > .detail { display: none; }
}

.editor-header { justify-content: flex-start; }
.editor-header nav { margin-left: auto; }
.list-toggle { min-height: 33px; font-size: .82rem; padding: 3px 8px; }
.editor-workspace [hidden], .list-toggle[hidden] { display: none; }
@media (min-width: 1050px) {
  .editor-enhanced .has-editor.list-collapsed { grid-template-columns: minmax(0,var(--editor-share)) 10px minmax(0,var(--preview-share)); }
  .editor-enhanced .has-editor.list-collapsed > .article-list { display: none; }
}
@media (max-width: 799px) {
  .editor-header { gap: .25rem .6rem; }
  .editor-header nav { margin-left: 0; }
}
.editor-workspace .panel-title { min-height: 35px; gap: .5rem; }
.panel-title h1 { font-size: .87rem; margin: 0; }
.panel-title small.path { flex: 1; min-width: 0; font-size: .74rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.panel-title a { flex: none; }
.detail-body { padding: .6rem .75rem; }
.editor-workspace .article-form { gap: .5rem; font-size: .88rem; }
.editor-workspace .article-form label { line-height: 1.3; }
.editor-workspace .article-form :is(input:not([type=checkbox]), textarea) { margin-top: .13rem; }
.editor-workspace .article-form [contenteditable] { min-height: 12rem; }
.editor-workspace .flags input { margin-inline: 0 .25rem; }
.category-picker, .schedule-picker { min-width: 0; margin: 0; padding: 0; border: 0; }
.category-picker legend, .schedule-picker legend { padding: 0; font-weight: 700; }
.category-picker .category-search { margin-bottom: .2rem; }
.category-options { min-height: 34px; max-height: 7rem; overflow: auto; overscroll-behavior: contain; border: 1px solid #888; padding: .15rem 0; }
.category-options label { display: flex; align-items: flex-start; gap: .38rem; font-weight: 400; padding: .23rem .4rem; overflow-wrap: anywhere; cursor: pointer; }
.category-options input { margin: .08rem 0 0; flex: none; accent-color: #000030; }
.category-options label:hover { background: #dff9ff; }
.category-empty { margin: .25rem .4rem; }
.schedule-fields { display: flex; flex-wrap: wrap; align-items: end; gap: .45rem .75rem; margin-top: .2rem; }
.schedule-date-row { display: flex; align-items: stretch; gap: .25rem; margin-top: .13rem; }
.article-form .schedule-date-row input { margin-top: 0; width: 8rem; }
.article-form input[name="schedule_time"] { width: 6rem; }
.schedule-calendar, .reading-card-delete { width: min(21rem, calc(100% - 24px)); border: 1px solid #888; padding: .75rem; }
.schedule-calendar::backdrop, .reading-card-delete::backdrop { background: rgb(0 0 35 / .25); }
.schedule-calendar h2, .reading-card-delete h2 { font-size: 1rem; margin: 0 0 .55rem; }
.calendar-month, .calendar-actions { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.calendar-month strong { font-size: .95rem; }
.calendar-month button { min-width: 36px; font-size: 1.13rem; line-height: 1; }
.calendar-week, .calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; }
.calendar-week { margin-block: .45rem .2rem; color: #555; font-size: .74rem; }
.calendar-days button { min-height: 35px; padding: 1px; border-color: #ddd; }
.calendar-days button[aria-current] { outline: 1px solid #000030; outline-offset: -2px; }
.calendar-days button[aria-pressed=true] { background: #000030; color: white; }
.calendar-actions { margin-top: .55rem; }

.preview-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; padding: .3rem .5rem; border-bottom: 1px solid #ccc; background: #f3f3f3; }
.preview-buttons { display: flex; }
.preview-buttons button + button { margin-left: -1px; }
.preview-toolbar button { min-height: 29px; padding: .15rem .42rem; font-size: .78rem; white-space: nowrap; }
.preview-toolbar a { display: flex; align-items: center; min-height: 29px; padding: .15rem .42rem; border: 1px solid #888; background: white; font-size: .78rem; white-space: nowrap; text-decoration: none; }
.preview-toolbar a:hover { background: #00d3ff; }
.preview-toolbar button[aria-pressed=true] { background: #dff9ff; color: #000030; box-shadow: inset 0 -2px #000030; font-weight: 700; }
.preview-toolbar button:disabled { opacity: .48; cursor: default; }
.preview-toolbar .preview-refresh { min-width: 30px; margin-left: auto; font-size: 1.05rem; line-height: 1; }
.site-preview-workspace { display: flex; flex: 1; min-height: 0; flex-direction: column; justify-content: initial; gap: 0; padding: 0; }
.site-preview-toolbar {
  --preview-control-height: 32px;
  display: grid;
  grid-template-areas: "days time pages";
  grid-template-columns: repeat(3, max-content);
  justify-content: start;
  align-items: end;
  gap: .55rem 1rem;
  padding: .5rem .75rem;
}
.site-preview-days { grid-area: days; }
.site-preview-time { grid-area: time; }
.site-preview-pages { grid-area: pages; }
.site-preview-label, .site-preview-time label {
  display: block;
  margin: 0 0 .25rem;
  color: #555;
  font-size: .76rem;
  line-height: 1.15;
  font-weight: 700;
}
.site-preview-toolbar nav { flex-wrap: nowrap; gap: .25rem; margin: 0; }
.site-preview-toolbar nav a { white-space: nowrap; }
.site-preview-time legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.site-preview-time .schedule-fields { flex-wrap: nowrap; margin: 0; gap: .35rem; }
.site-preview-time .schedule-date-row { margin: 0; gap: .25rem; }
.site-preview-time .schedule-fields > label { margin: 0; }
.site-preview-toolbar nav a, .site-preview-time .schedule-fields :is(input, button) {
  min-height: var(--preview-control-height);
  height: var(--preview-control-height);
  padding: 0 .45rem;
  font-size: .82rem;
  font-weight: 400;
}
.site-preview-time input[data-schedule-date] { width: 6.4rem; }
.site-preview-time input[data-schedule-time] { display: block; width: 4.4rem; margin-top: .25rem; }
.site-preview-time input[data-schedule-date], .site-preview-time input[data-schedule-time] { font-variant-numeric: tabular-nums; }
.site-preview-workspace > iframe { display: block; flex: 1; min-height: 24rem; width: 100%; border: 0; background: white; }
.site-preview-workspace > [role=alert] { margin: .6rem; }
@media (max-width: 799px) {
  .site-preview-workspace > iframe { height: 66dvh; }
}
@media (max-width: 680px) {
  .site-preview-toolbar { grid-template-areas: "days days" "time pages"; grid-template-columns: max-content max-content; gap: .45rem .55rem; }
}
@media (max-width: 435px) {
  .site-preview-toolbar { grid-template-areas: "days pages" "time time"; }
}
@media (max-width: 350px) {
  .site-preview-toolbar { grid-template-areas: "days" "time" "pages"; grid-template-columns: minmax(0, 1fr); }
}
.preview-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem .55rem; padding: .2rem .55rem; color: #555; border-bottom: 1px solid #ccc; font-size: .76rem; }
.preview-stage { min-height: 0; flex: 1; padding: 12px; overflow: hidden; background: #f3f3f3; }
.preview-scale { position: relative; margin-inline: auto; height: 100%; }
.preview-scale iframe { position: absolute; inset: 0 auto auto 0; width: 100%; height: 100%; border: 0; background: #fcfbf8; transform-origin: top left; }
@media (max-width: 799px) {
  .preview-stage { flex: none; height: 75dvh; }
  .preview-toolbar button, .calendar-days button, .calendar-month button { min-height: 40px; }
}



.event-editor { border: 1px solid #ccc; padding: .5rem; }
.event-editor summary { cursor: pointer; font-weight: 700; }
.event-editor[open] summary { margin-bottom: .45rem; }
.event-editor input[name=relevant_until] { max-width: 10rem; }
.event-editor-row { min-width: 0; border: 1px solid #ccc; margin: .55rem 0; padding: .45rem; }
.event-editor-row legend { padding-inline: .2rem; font-weight: 700; }
.video-editor legend { max-width: 100%; overflow-wrap: anywhere; }
.video-editor-options { display: flex; flex-wrap: wrap; gap: .25rem .7rem; }
.video-editor-address { display: flex; align-items: end; gap: .35rem; margin-bottom: .35rem; }
.video-editor-address label { flex: 1; min-width: 0; }
.video-editor-address button { flex: none; }
.event-editor-fields { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,8.5rem),1fr)); gap: .4rem; }
.event-editor-row button, .event-editor > button { margin-top: .45rem; min-height: 34px; }

html { scrollbar-gutter: stable; }
.editor-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 10;
  flex: none;
  justify-content: flex-start;
}
.editor-header nav a[aria-current] { box-shadow: inset 0 -2px #000030; font-weight: 400; }
.article-list-heading { justify-content: space-between; }
.article-list-heading a { padding: .2rem .4rem; text-decoration: none; }
.article-list-heading a:hover { background: #00d3ff; color: #000030; }
.editor-enhanced .workspace-tabs { display: flex; }
.editor-enhanced .workspace-tabs .list-toggle { flex: 0 0 auto; padding-inline: .75rem; border-inline-end: 1px solid #ccc; }
@media (min-width: 800px) {
  .editor-page { display: flex; flex-direction: column; height: 100dvh; }
  .editor-page .editor-workspace { flex: 1; height: auto; min-height: 0; }
}
@media (min-width: 1050px) {
  .workspace-tabs [data-panel] { display: none; }
}

.reading-card-grid { grid-template-columns: minmax(185px,21%) minmax(250px,1fr) minmax(250px,1fr); gap: 1px; min-height: calc(100dvh - 51px); padding: 0; background: #ccc; }
.reading-card-grid > :is(aside, section) { background: white; min-width: 0; padding: 0; border: 0; }
.reading-card-list .panel-title h1 { margin: 0; }
.reading-card-grid .panel-title { flex-wrap: wrap; padding-block: .3rem; }
.reading-card-detail textarea[name="text"] { field-sizing: content; min-height: 5em; }
.reading-card-preview { display: flex; flex-direction: column; min-height: 34rem; }
.reading-card-preview iframe { flex: 1; width: 100%; min-height: 34rem; border: 0; }
.reading-card-preview .panel-title button { font-size: .75rem; min-height: 32px; }
.reading-card-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .45rem; }
.reading-card-options[hidden] { display: none; }
.reading-card-options fieldset { min-width: 0; margin: 0; border: 1px solid #ccc; padding: .45rem; }
.reading-card-options label { margin-bottom: .35rem; }
.reading-card-options legend { font-weight: 700; }
@media (max-width: 1049px) {
  .reading-card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .reading-card-list { grid-column: 1/-1; }
  .reading-card-list ul { display: flex; overflow: auto; }
  .reading-card-list li { flex: 0 0 12rem; }
}
@media (max-width: 720px) {
  .reading-card-grid { grid-template-columns: minmax(0,1fr); }
}

.reading-card-option-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.55rem; }
.reading-card-options { display:block; }
.reading-card-options .actions { margin-top:.55rem; }
@media (max-width:45rem) { .reading-card-option-list { grid-template-columns:1fr; } }

.category-workspace { grid-template-columns: minmax(230px, 310px) minmax(0, 1fr); }
.category-scroll { overflow: auto; }
.category-group { margin: 0; padding: .5rem .65rem; background: #f3f3f3; font-size: .75rem; }
.category-list li a { display: flex; justify-content: space-between; gap: .5rem; }
.category-list li small { flex: none; font-variant-numeric: tabular-nums; }
.category-actions { flex-wrap: wrap; padding-block: .35rem; }
.category-actions form { margin-left: auto; }
.category-actions button { min-height: 36px; }
.category-actions .category-back { display: none; }
.category-table { width: 100%; border-collapse: collapse; text-align: left; }
.category-table :is(th,td) { border-bottom: 1px solid #ddd; padding: .48rem .6rem; vertical-align: top; }
.category-table thead th { color: #555; font-size: .8rem; }
.category-table tbody th { text-align: left; overflow-wrap: anywhere; }
.category-table td { color: #555; font-size: .82rem; }
.category-table time { white-space: nowrap; }
.category-pages { align-items: center; margin: .55rem 0 0; font-size: .86rem; }
@media (max-width: 799px) {
  .category-workspace { grid-template-columns: minmax(0,1fr); }
  .category-selected > .category-list { display: none; }
  .category-actions .category-back { display: inline; }
}
@media (max-width: 35rem) {
  .category-table :is(th,td):last-child { display: none; }
  .category-table :is(th,td) { padding-inline: .35rem; }
}

.breaking-workspace { grid-template-columns: minmax(0, 340px) minmax(0, 750px); }
.breaking-article-choice { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.breaking-article-choice button { flex-shrink: 0; }
.timeline-entry { margin-top: 1rem; padding-top: .75rem; border-top: 1px solid #ccc; }
@media (max-width: 46rem) {
  .breaking-workspace { grid-template-columns: minmax(0,1fr); }
  .breaking-workspace .detail { grid-row: auto; }
}

.editor-header nav .editor-breaking-live { color: #a02224; font-weight: 700; }

.christmas-workspace { grid-template-columns: minmax(0, 58rem); }
.christmas-workspace .detail-body { min-height: 0; overflow: auto; }
.christmas-workspace td { overflow-wrap: anywhere; }

.topic-editor-form .topic-edit-module { border: 1px solid #ccc; min-width: 0; margin-bottom: .45rem; }
.topic-edit-module summary { cursor: pointer; background: #f3f3f3; font-weight: 700; padding: .5rem .65rem; }
.topic-edit-fields { display: grid; gap: .45rem; padding: .6rem; }
.topic-edit-fields label { min-width: 0; }
.topic-editor-form select { display: block; width: 100%; }
.topic-media-field { display: flex; flex-wrap: wrap; align-items: end; gap: .35rem; }
.topic-media-field label { flex: 1 1 9rem; }
.topic-edit-module[data-module-kind="decoration"]:not(:has(select[name$=".motif"] option[value="image"]:checked)) [data-media-field] { display: none; }
.topic-design-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr)); gap: .45rem; }
.topic-modules { min-width: 0; margin: 0; padding: 0; border: 0; }
.topic-modules legend { padding: .35rem 0; font-weight: 700; }
.topic-front-modules { min-width: 0; border: 1px solid #ccc; padding: .35rem .55rem; }
.topic-front-modules label { display: flex; align-items: baseline; gap: .35rem; padding-block: .2rem; }
.topic-module-actions, .topic-module-add { display: flex; flex-wrap: wrap; align-items: end; gap: .35rem; }
.topic-module-actions button { padding: .15rem .4rem; min-height: 28px; font-size: .78rem; }
.topic-module-add label { flex: 1 1 7rem; }
#topic-edit .panel-title button { min-height: 26px; padding: 2px .5rem; }
#topic-edit .panel-title span { margin-inline-start: auto; }

.editor-login { grid-template-columns: minmax(0, 24rem); }

.editor-video-preview:not([hidden]) { display: block; width: min(100%, 24rem); max-height: 16rem; }
