/* Orientierung der regulären Klasse-7-Seiten. Projektionen und Editor haben eigene Köpfe. */
.year-header.year-shell-header {
  --header-ink: #222a2f;
  --header-muted: #52605b;
  --header-accent: #245743;
  --header-soft: #eaf2ec;
  --lw-accent: var(--header-accent);
  --lw-accent-soft: var(--header-soft);
  --lw-ink: var(--header-ink);
  --lw-muted: var(--header-muted);
  position: relative;
  z-index: 10;
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  max-width: 1280px;
  margin-inline: auto;
  padding: 18px 32px 16px;
  border-bottom: 1px solid #dee2df;
  color: var(--header-ink);
  font: 400 16px/1.4 "Segoe UI", system-ui, sans-serif;
}

.year-shell-identity {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
}

.year-shell-header .year-shell-identity .lw-grade-switch,
.year-shell-header .year-topics {
  flex: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.year-shell-header .year-shell-identity .brand {
  display: grid;
  width: 370px;
  max-width: 100%;
  min-height: 48px;
  padding: 0;
  align-items: center;
  color: var(--header-ink);
  line-height: 1;
}

.year-shell-header .brand.lw-grade-summary {
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 10px;
  row-gap: 0;
}

.year-shell-header .brand.lw-grade-summary.lw-grade-home {
  grid-template-columns: minmax(0, 1fr) auto auto;
  column-gap: 5px;
}

.year-shell-header .brand picture {
  display: block;
  grid-area: 1 / 1;
  min-width: 0;
}

.year-shell-header .brand img { display: block; width: 100%; height: auto; }
.year-shell-header .brand .lw-grade-picker-label { grid-area: 1 / 2; }
.year-shell-header .brand .lw-grade-chevron { grid-area: 1 / -2; }
.year-shell-header .year-brand-subject { display: none; }

.year-shell-header .year-shell-context {
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--header-muted);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: .18em;
}

.year-shell-header .year-shell-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.year-shell-header .year-shell-nav > a,
.year-shell-header .year-topics > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .3em;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 7px;
  color: var(--header-ink);
  font: inherit;
  text-decoration: none;
}

.year-shell-header .year-topics > summary {
  list-style: none;
  cursor: pointer;
}
.year-shell-header .year-topics > summary::-webkit-details-marker { display: none; }
.year-shell-header .year-topics > summary::marker { content: ""; }
.year-shell-header .year-topics[open] > summary span { transform: rotate(180deg); }
.year-shell-header .year-nav-short { display: none; }

.year-shell-header .year-shell-nav > a:hover,
.year-shell-header .year-topics > summary:hover,
.year-shell-header .year-topics[open] > summary,
.year-shell-header .year-topic-links a:hover,
.year-shell-header .year-shell-context:hover { background: var(--header-soft); }

.year-shell-header .year-shell-nav a[aria-current] {
  background: var(--header-soft);
  color: var(--header-accent);
  font-weight: 700;
}
.year-shell-header .year-shell-nav > a[aria-current] { box-shadow: inset 0 -2px var(--header-accent); }

.year-shell-header .year-topic-links {
  position: absolute;
  z-index: 1;
  top: 100%;
  right: 32px;
  width: min(720px, calc(100% - 64px));
  max-height: 70vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 12px;
  border: 1px solid #c8d1cb;
  border-radius: 12px;
  background: white;
  box-shadow: 0 12px 30px #222a2f18;
}
.year-shell-header .year-topics:not([open]) > .year-topic-links { display: none; }

.year-shell-header .year-topic-links a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--header-ink);
  line-height: 1.4;
  text-decoration: none;
}

.year-shell-header :is(a, summary):focus-visible {
  outline: 3px solid var(--header-accent);
  outline-offset: 3px;
}
.year-shell-header .year-topic-links a:focus-visible,
.year-shell-header .lw-grade-options a:focus-visible { outline-offset: -2px; }

@media (max-width: 1050px) {
  .year-header.year-shell-header {
    flex-flow: column nowrap;
    align-items: flex-start;
    gap: 16px;
  }
  .year-shell-header .year-shell-identity .brand { width: 340px; }
  .year-shell-header .year-shell-nav { width: 100%; }
  .year-shell-header .year-topic-links { left: 32px; right: auto; }
}

@media (max-width: 760px) {
  .year-header.year-shell-header { gap: 12px; padding: 18px 18px 12px; }
  .year-shell-header .year-shell-identity .brand { width: 280px; }
  .year-shell-header .year-brand-subject {
    display: block;
    grid-area: 2 / 1 / 3 / -1;
    margin: 6px 0 0 3px;
    color: var(--header-muted);
    font: 400 13px/1.5 "Segoe UI", system-ui, sans-serif;
    letter-spacing: normal;
  }
  .year-shell-header .year-shell-context { padding-inline: 3px; font-size: 13px; }
  .year-shell-header .year-shell-nav {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    justify-content: space-between;
    gap: 4px;
  }
  .year-shell-header .year-shell-nav > a,
  .year-shell-header .year-topics > summary { padding: 8px 4px; }
  .year-shell-header .year-nav-full { display: none; }
  .year-shell-header .year-nav-short { display: inline; }
  .year-shell-header .year-topic-links { inset-inline: 18px; width: auto; }
}

/* Reguläre Lernseiten: Marke und Bogenstandort teilen auf Tablets eine Zeile
   mit der Hauptnavigation. Die drei Hauptziele bleiben auch mit Touch erreichbar. */
@media screen and (min-width: 761px) and (max-width: 1366px) {
  .year-header.year-shell-header {
    flex-flow: row nowrap;
    align-items: center;
    gap: 16px;
    padding: 8px clamp(18px, 3vw, 32px);
  }
  .year-shell-header .year-shell-identity {
    flex-flow: row nowrap;
    align-items: center;
    gap: 8px;
  }
  .year-shell-header .year-shell-identity .brand { width: clamp(214px, 22vw, 280px); }
  .year-shell-header .year-shell-nav { width: auto; }
  .year-shell-header .year-shell-context {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    white-space: nowrap;
  }
  .year-shell-header .year-topic-links { inset-inline: auto clamp(18px, 3vw, 32px); }
  .task-route-workbar + main { margin-top: 12px; }
}

@media screen and (max-width: 760px) {
  .year-header.year-shell-header { gap: 2px; padding: 8px 18px 6px; }
  .year-shell-header .year-shell-identity {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }
  .year-shell-header .year-shell-identity .brand { width: clamp(169px, 46vw, 215px); }
  .year-shell-header .year-shell-context {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 44px;
    overflow-wrap: anywhere;
  }
  .year-shell-header .year-brand-subject { margin-top: 3px; }
  .year-shell-header .year-shell-nav > a,
  .year-shell-header .year-topics > summary { min-height: 44px; }
}

/* Links an Bildmaterial, Arbeitsunterlagen und Rückwegen lassen sich als einzelne
   Ziele antippen, ohne die fachlichen Texte oder die Projektionsseiten zu ändern. */
.figure-help a,
.media-path .mp-picker nav a,
.lw-grade7 .aside-back,
.lw-grade7 .phase-links a,
.lw-grade7 .lesson-article a[href="../bilder/alg6-codekarte.svg"],
.year-material-routes a {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  min-height: 44px;
  padding-inline: .2em;
}
.media-path .mp-picker nav a { display: flex; }
.lw-grade7 .lesson-article a[href="../bilder/alg6-codekarte.svg"] {
  vertical-align: middle;
  font-weight: 600;
}

/* Verweise außerhalb des Vorlesetexts und am Unterrichtsmaterial der vier Bögen. */
.year-material-routes {
  max-width: 1040px;
  margin: 12px auto;
  padding: 8px 24px;
  color: #245743;
  font: 400 16px/1.5 "Segoe UI", system-ui, sans-serif;
}
.year-material-routes a { display: inline-block; padding: 6px 0; color: inherit; }
.year-material-routes a:focus-visible { outline: 3px solid #245743; outline-offset: 3px; }
.year-material-routes ul { display: grid; gap: 4px; margin: 0; padding-left: 20px; }
main .year-material-routes { margin: 8px 0 16px; padding: 0; }
@media print {
  .year-material-routes { display: none; }
  .year-header.year-shell-header,
  .year-shell-header + .year-tools { display: none; }
}

/* Die Materialübersicht zeigt dieselben vier Lernbögen auch im geteilten iPad-Fenster. */
.year-material-table .year-material-label { display: none; }
.year-material-table tbody th { font-weight: inherit; text-align: start; background: transparent; }

@media screen and (max-width: 680px) {
  .year-reader .year-material-table { overflow: visible; }
  .year-reader .year-material-table table {
    display: block;
    min-width: 0;
    width: 100%;
    border: 0;
  }
  .year-material-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .year-material-table tbody { display: grid; gap: 1rem; }
  .year-material-table tbody tr {
    display: grid;
    padding: .45rem .85rem;
    border: 1px solid #c8d1cb;
    border-radius: .5rem;
  }
  .year-reader .year-material-table tbody :is(th,td) {
    display: grid;
    grid-template-columns: minmax(6rem, .72fr) minmax(0, 1.6fr);
    align-items: center;
    gap: .5rem;
    border: 0;
    padding: .15rem 0;
    min-width: 0;
    text-align: start;
    overflow-wrap: anywhere;
  }
  .year-reader .year-material-table tbody th {
    display: block;
    font-weight: 700;
    border-bottom: 1px solid #dee2df;
  }
  .year-material-table .year-material-label {
    display: block;
    color: #52605b;
    font-size: .875rem;
  }
  .year-material-table a { display: inline-flex; align-items: center; min-height: 44px; }
}

@media screen and (pointer: coarse) {
  .year-material-table tbody :is(th, td) { padding-block: .15rem; }
  .year-material-table a { display: inline-flex; align-items: center; min-height: 44px; }
}
