/* v7.2.8 UI-013: compact beginner shell and unambiguous controls. */

body.mf6.mf-compact-shell .mf6-content-area {
  grid-template-rows: var(--mf6-topbar-height) minmax(0, 1fr);
}

body.mf6.mf-compact-shell .mf6-save-state,
body.mf6.mf-compact-shell .mf6-footer {
  display: none !important;
}

body.mf6.mf-compact-shell .container {
  padding-bottom: var(--mf6-space-4) !important;
  scroll-padding-bottom: var(--mf6-space-4) !important;
}

body.mf6 .mf6-nav svg,
body.mf6 .mf6-nav svg use,
body.mf6 .mf6-sidebar-footer svg,
body.mf6 .mf6-sidebar-footer svg use {
  width: 1.2rem;
  height: 1.2rem;
  overflow: visible;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.mf6 .mf-outline-icon,
body.mf6 .mf-outline-icon use {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.mf6 .mf6-right-rail-toggle {
  right: .8rem;
  width: auto;
  min-width: 6.25rem;
  height: 2.75rem;
  grid-template-columns: minmax(0, auto) auto;
  gap: .45rem;
  padding: .45rem .7rem;
  border-radius: 999px;
}

body.mf6 .mf6-right-rail-toggle-label {
  font-size: .76rem;
  font-weight: 800;
  line-height: 1;
}

body.mf6 .mf6-right-rail-toggle-icon {
  font-size: 1.15rem;
}

/* Localized action labels can be wider than their German reference text.
   Reserve the toggle's real footprint in the first page hero whenever the
   context rail is overlaid instead of occupying its desktop column. */
@media (max-width: 1320px) {
  body.mf6 .mf6-main > :first-child:is(
    .mf6-module-header,
    .module-hero-v524b,
    .mf-v6-page-hero,
    .mf-v6-book-hero
  ),
  body.mf6 .mf6-main > .module-page-stack-v524d:first-child > :first-child:is(
    .mf6-module-header,
    .module-hero-v524b,
    .mf-v6-page-hero,
    .mf-v6-book-hero
  ) {
    margin-right: 7rem !important;
  }
}

@media (max-width: 700px) {
  body.mf6 .mf6-main > :first-child:is(
    .mf6-module-header,
    .module-hero-v524b,
    .mf-v6-page-hero,
    .mf-v6-book-hero
  ) {
    margin-right: 0 !important;
    padding-top: 4.5rem !important;
  }
}

body.mf6 .mf-simple-mode-choices > button {
  width: 100%;
  min-height: 2.6rem;
  padding: .55rem .7rem;
  border: 1px solid rgba(243, 207, 123, .35);
  border-radius: .55rem;
  background: rgba(255, 255, 255, .07);
  color: #fff;
  cursor: pointer;
  font-size: .75rem;
  text-align: left;
}

body.mf6 .mf-simple-mode-choices > button strong {
  display: inline !important;
  color: var(--mf6-gold-300);
}

body.mf6 .mf-simple-sidebar-footer .mf-manual-sidebar-link strong,
body.mf6 .mf-simple-sidebar-footer .mf-manual-sidebar-link small {
  display: block !important;
  min-width: 0;
  overflow: hidden;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: normal;
}

body.mf6 .mf-beginner-guide:not([open]) {
  margin-bottom: 1rem;
  padding: .4rem .8rem;
}

body.mf6 .mf-beginner-guide > summary {
  min-height: 2.35rem;
  list-style: none;
}

body.mf6 .mf-beginner-guide > summary::-webkit-details-marker {
  display: none;
}

body.mf6 .mf-beginner-guide > summary::after {
  margin-left: auto;
  content: '+';
  color: var(--mf6-info);
  font-size: 1.25rem;
  font-weight: 850;
}

body.mf6 .mf-beginner-guide[open] > summary::after {
  content: '−';
}

body.mf6 .mf-assistant-shell {
  gap: .8rem;
  margin-bottom: 1rem;
  padding: .9rem 1rem;
}

body.mf6 .mf-assistant-shell__head {
  align-items: center;
  gap: .85rem;
}

body.mf6 .mf-assistant-shell__head h1 {
  margin-bottom: .2rem;
  font-size: clamp(1.35rem, 2.3vw, 1.8rem);
}

body.mf6 .mf-assistant-shell__head p {
  font-size: .86rem;
  line-height: 1.4;
}

body.mf6 .mf-assistant-modes a {
  min-height: 2.75rem;
  padding: .5rem .65rem;
}

body.mf6 .mf-assistant-stepper button {
  min-height: 3.1rem;
  grid-template-columns: 1.7rem minmax(0, 1fr);
  gap: .45rem;
  padding: .45rem .55rem;
}

body.mf6 .mf-assistant-stepper button > span {
  width: 1.7rem;
  height: 1.7rem;
  font-size: .75rem;
}

body.mf6 .mf-assistant-question {
  gap: .2rem;
  padding: .65rem .8rem;
}

body.mf6 .mf-assistant-question h2 {
  font-size: 1.08rem;
}

body.mf6 .mf-assistant-question p,
body.mf6 .mf-assistant-shell__footer > span {
  font-size: .8rem;
}

body.mf6 .mf-assistant-shell__footer {
  padding-top: .5rem;
}

body.mf6 .mf-assistant-more {
  min-height: 2.75rem;
  padding: .55rem .75rem;
  font-size: .82rem;
}

body.mf6 .mf-assistant-intent[aria-disabled="true"] {
  pointer-events: none;
  opacity: .48;
}

body.mf6.mf-route-editor .mf6-tool-button {
  width: auto;
  min-width: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding-inline: .55rem;
}

body.mf6 .mf6-tool-label {
  font-size: .72rem;
  font-weight: 750;
}

body.mf6.mf-route-editor .mf6-rich-editor-shell {
  grid-template-rows: auto minmax(0, 1fr);
}

body.mf6 .mf6-publishing-selector {
  align-items: start;
}

body.mf6 .mf-v6-book-cover > img,
body.mf6 .mf-v6-cover-fallback {
  width: 100%;
  height: 100%;
}

body.mf6 .mf-v6-book-cover > img {
  display: block;
  object-fit: cover;
}

body.mf6 .mf-v6-cover-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  padding: 1rem;
  color: #fff;
  text-align: center;
}

body.mf6 .mf-v6-cover-fallback .mf-outline-icon {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--mf6-gold-300);
}

body.mf6 .mf-v6-cover-fallback strong {
  overflow-wrap: anywhere;
  font-size: .82rem;
  line-height: 1.35;
}

/* A real three-step creation assistant. JavaScript only adds .is-ready after
   all fields and controls are available, so the form remains usable without it. */
.mf-project-wizard {
  display: grid;
  gap: 1rem;
}

.mf-project-wizard__progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mf-project-wizard__progress li {
  display: flex;
  min-height: 2.75rem;
  align-items: center;
  gap: .5rem;
  padding: .45rem .65rem;
  border: 1px solid var(--mf6-line);
  border-radius: .65rem;
  background: var(--mf6-surface-soft);
  color: var(--mf6-muted);
  font-size: .78rem;
  font-weight: 760;
}

.mf-project-wizard__progress li > span {
  width: 1.65rem;
  height: 1.65rem;
  display: grid;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: var(--mf6-surface-raised);
  color: var(--mf6-text);
}

.mf-project-wizard__progress li[aria-current="step"] {
  border-color: var(--mf6-info);
  background: color-mix(in srgb, var(--mf6-info) 8%, var(--mf6-surface-raised));
  color: var(--mf6-text);
}

.mf-project-wizard__progress li[aria-current="step"] > span {
  background: var(--mf6-info);
  color: #fff;
}

.mf-project-wizard__step {
  display: grid;
  gap: .85rem;
}

.mf-project-wizard__step > header h3,
.mf-project-wizard__step > header p {
  margin: 0;
}

.mf-project-wizard__step > header p {
  margin-top: .25rem;
  color: var(--mf6-muted);
}

.mf-project-wizard.is-ready .mf-project-wizard__step[hidden] {
  display: none !important;
}

.mf-project-wizard .field {
  margin: 0;
}

.mf-project-wizard .choice-card-group {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Keep a translated option label and its longer explanation readable. */
.mf-project-wizard .choice-card-text {
  display: grid;
  min-width: 0;
  gap: .18rem;
}

.mf-project-wizard .choice-card-text > strong,
.mf-project-wizard .choice-card-text > small {
  display: block;
}

.mf-project-wizard .choice-card-text > small {
  font-weight: 650;
}

.mf-project-wizard__recommendation {
  padding: .7rem .8rem;
  border-left: .22rem solid var(--mf6-info);
  border-radius: .45rem;
  background: color-mix(in srgb, var(--mf6-info) 7%, var(--mf6-surface-soft));
  color: var(--mf6-text);
  font-size: .84rem;
  line-height: 1.45;
}

.mf-project-wizard__extras {
  border: 1px solid var(--mf6-line);
  border-radius: .7rem;
  background: var(--mf6-surface-soft);
}

.mf-project-wizard__extras > summary {
  min-height: 2.75rem;
  padding: .65rem .8rem;
  color: var(--mf6-text);
  cursor: pointer;
  font-weight: 760;
}

.mf-project-wizard__extras > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
  padding: 0 .8rem .8rem;
}

.mf-project-wizard__extras [data-field-name="description"],
.mf-project-wizard__extras [data-field-name="default_style_rules"] {
  grid-column: 1 / -1;
}

.mf-project-wizard-actions [data-mf-project-wizard-back][hidden],
.mf-project-wizard-actions [data-mf-project-wizard-next][hidden],
.mf-project-wizard-actions [data-mf-project-wizard-submit][hidden] {
  display: none !important;
}

.mf-project-wizard__error {
  margin: 0;
  color: var(--mf6-danger);
  font-size: .82rem;
  font-weight: 750;
}

.mf-chapter-create-essential-v728 {
  grid-template-columns: minmax(0, 2fr) minmax(11rem, 1fr);
  gap: .8rem;
}

.mf-chapter-create-later-v728 {
  border: 1px solid var(--mf6-line);
  border-radius: .7rem;
  background: var(--mf6-surface-soft);
}

.mf-chapter-create-later-v728 > summary {
  min-height: 2.75rem;
  padding: .7rem .8rem;
  color: var(--mf6-text);
  cursor: pointer;
  font-weight: 780;
}

.mf-chapter-create-later-v728 > p,
.mf-chapter-create-later-v728 > div {
  margin-right: .8rem;
  margin-left: .8rem;
}

.mf-chapter-create-later-v728 > div {
  padding-bottom: .8rem;
}

.mf-v6-action-card .mf-outline-icon {
  width: 1.2rem;
  height: 1.2rem;
}

@media (max-width: 1180px) {
  body.mf6 .mf6-tool-label { display: none; }
  body.mf6.mf-route-editor .mf6-tool-button {
    width: 2.18rem;
    min-width: 2.18rem;
    padding-inline: .4rem;
  }
  body.mf6 .mf-assistant-shell__head { align-items: stretch; flex-direction: column; }
  body.mf6 .mf-assistant-modes { width: 100%; grid-template-columns: repeat(3, 1fr); }
  body.mf6 .mf6-publishing-selector { grid-template-columns: 1fr; }
}

@media (max-width: 880px) {
  body.mf6 .mf-assistant-stepper button {
    display: flex;
    justify-content: center;
  }
  body.mf6 .mf-assistant-stepper button > strong {
    display: block;
    font-size: .68rem;
    line-height: 1.2;
  }
  .mf-project-wizard__progress li { justify-content: center; }
  .mf-project-wizard__progress li > strong {
    display: block;
    font-size: .7rem;
    line-height: 1.2;
  }
  .mf-project-wizard__extras > div { grid-template-columns: 1fr; }
  .mf-project-wizard__extras [data-field-name] { grid-column: 1 !important; }
  .mf-chapter-create-essential-v728 { grid-template-columns: 1fr; }
}

@media print {
  body.mf6.mf-route-user-manual .mf6-footer { display: none !important; }
}
