:root {
    color-scheme: light;
    --ink: #1f2b26;
    --muted: #586760;
    --paper: #f6f7f3;
    --surface: #fff;
    --green: #204b3b;
    --line: #d7ddd7;
    font-family: Inter, "Segoe UI", system-ui, sans-serif;
    color: var(--ink);
    background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--green); text-underline-offset: .2em; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid #a4561c; outline-offset: 3px; }
.skip { position: absolute; left: 1rem; top: -8rem; padding: .7rem; background: white; z-index: 2; }
.skip:focus { top: .5rem; }
.shell { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.mast { background: #203b30; color: white; }
.bar { display: flex; align-items: center; gap: 1.3rem; min-height: 74px; }
.brand { color: white; display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; font-size: 1.24rem; font-weight: 850; letter-spacing: -.045em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 19px; height: 21px; background: #d9ebac; clip-path: polygon(0 0, 100% 0, 100% 26%, 65% 26%, 65% 100%, 37% 100%, 37% 26%, 0 26%); }
.local { font-size: .76rem; color: #dbebda; border-left: 1px solid #73857b; padding-left: 1rem; }
.bar nav { display: flex; gap: 1rem; align-items: center; margin-left: auto; }
.bar nav a,.link-light { color: #f4f7ef; font-size: .87rem; }
.bar nav a { text-decoration: none; }
.bar nav a:hover,.link-light:hover { text-decoration: underline; }
.account { display: flex; align-items: center; gap: .65rem; font-size: .8rem; color: #d5e2d8; }
.link-light { border: 0; background: transparent; padding: 0; text-decoration: underline; cursor: pointer; }
main { padding: 46px 0 70px; }
h1,h2,p,ul,dl,dd { margin: 0; }
h1,h2 { font-family: "Source Sans 3","Segoe UI",system-ui,sans-serif; }
h1 { font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.06; letter-spacing: -.055em; overflow-wrap: anywhere; }
h2 { font-size: 1.22rem; line-height: 1.22; letter-spacing: -.032em; }
.section-label { color: var(--muted); font-size: .73rem; font-weight: 750; text-transform: uppercase; letter-spacing: .12em; margin-bottom: .6rem; }
.page-head,.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.page-head { margin: .55rem 0 2.35rem; }
.page-head.tight { margin: 1.05rem 0 1.7rem; }
.page-head .muted,.signin .muted { margin-top: .8rem; }
.muted { color: var(--muted); line-height: 1.55; }
.primary,.secondary,.destructive { font: inherit; font-size: .91rem; font-weight: 650; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; text-decoration: none; padding: .7rem 1.05rem; min-height: 44px; border-radius: 6px; border: 1px solid transparent; }
.primary { background: var(--green); color: #fff; }
.primary:hover { background: #143728; text-decoration: none; }
.secondary { background: white; color: var(--green); border-color: #a7b6aa; }
.secondary:hover { background: #f4f7f3; text-decoration: none; }
.destructive { background: #fff7f5; border-color: #cda098; color: #822e23; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.1rem; }
.filters a { display: inline-flex; align-items: center; gap: .5rem; min-height: 40px; padding: .45rem .8rem; font-size: .89rem; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); text-decoration: none; background: white; }
.filters a[aria-current] { border-color: var(--green); background: #e7eee6; color: #203b30; }
.filters b { font-size: .78rem; font-variant-numeric: tabular-nums; }
.listing,.panel,.signin { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.listing { overflow: hidden; }
.list-head,.list-row { display: grid; grid-template-columns: minmax(90px,.65fr) minmax(160px,3fr) minmax(130px,1fr); gap: 1.2rem; align-items: center; padding: 1.1rem 1.45rem; }
.list-head { color: var(--muted); background: #edf1eb; font-size: .78rem; font-weight: 650; }
.list-row { color: inherit; border-top: 1px solid var(--line); text-decoration: none; }
.list-row:first-child { border-top: 0; }
.list-row:focus-visible { outline-offset: -4px; }
.list-row:hover { background: #f7f9f5; text-decoration: none; }
.list-row:hover .subject strong { text-decoration: underline; text-underline-offset: .17em; }
.date,.subject,.assignment,.log li { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; overflow-wrap: anywhere; min-width: 0; }
.date strong { font-size: 1.1rem; }
small,.subject span,.log span { color: var(--muted); font-size: .85rem; }
.subject strong { font-size: 1.1rem; }
.subject small { font-weight: 600; }
.pill { border-radius: 99px; font: 650 .76rem/1.2 Inter,"Segoe UI",system-ui,sans-serif; padding: .4rem .65rem; color: #48534c; background: #e9ece8; display: inline-block; justify-self: start; }
.pill.angefragt { color: #775210; background: #f8eccb; }
.pill.bestätigt { color: #285237; background: #deeddc; }
.pill.storniert { color: #7a3932; background: #f7e7e3; }
.danger-text,.errorlist { color: #8c341e; }
.empty { padding: 3.5rem 1.2rem; text-align: center; }
.empty p { margin-top: .5rem; color: var(--muted); }
.back { font-size: .88rem; font-weight: 600; }
.columns { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(265px,1fr); gap: 1.2rem; align-items: start; }
.panel,.signin { padding: clamp(1rem, 2.8vw, 1.8rem); margin-bottom: 1rem; }
.panel.focus { border-top: 3px solid var(--green); }
.panel h2 + *, .section-head + *, .focus p + form, details[open] summary + *, details p + form { margin-top: 1rem; }
.panel p,.signin p { line-height: 1.5; }
.facts,.fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.15rem 1.5rem; }
.facts div { min-width: 0; }
.facts dt { font-size: .77rem; font-weight: 650; color: var(--muted); margin-bottom: .25rem; }
.facts dd { line-height: 1.45; overflow-wrap: anywhere; }
.log,.errorlist { list-style: none; padding: 0; }
.log li { padding: .8rem 0; border-top: 1px solid var(--line); }
.log li:first-child { padding-top: 0; border: 0; }
.log li:last-child { padding-bottom: 0; }
.log .section-label { margin: 0; font-size: .73rem; }
.errorlist { font-size: .88rem; margin: .2rem 0; }
summary { cursor: pointer; font-weight: 650; color: #81382e; }
.edit-form,.reading { max-width: 810px; }
.wide { grid-column: 1/-1; }
label { color: #35433b; display: block; font-size: .9rem; font-weight: 650; margin-bottom: .4rem; }
input:not([type=hidden]),select,textarea { font: inherit; width: 100%; min-width: 0; max-width: 100%; background: white; color: var(--ink); border: 1px solid #aebbb1; border-radius: 5px; padding: .63rem .7rem; min-height: 44px; }
textarea { resize: vertical; }
.focus form p { margin: .8rem 0; }
.message { line-height: 1.5; background: #e8efe3; border-left: 4px solid #59906c; padding: .8rem 1rem; margin: 0 0 1rem; }
.message.error,.message.warning { background: #fff2df; border-color: #ba8139; }
.message.error { background: #fff1ec; border-color: #ae5542; }
.response { display: flex; gap: .75rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.reading .success { margin: 1rem 0 0; }
.signin { max-width: 430px; margin: 6vh auto; }
.signin form { margin-top: 1.7rem; }
.signin form p { margin-bottom: 1.1rem; }
@media(max-width: 920px) {
    .bar { flex-wrap: wrap; gap: .6rem 1rem; padding-block: .95rem; }
    .account { margin-left: auto; }
    .bar nav { order: 2; width: 100%; margin: 0; flex-wrap: wrap; }
    .columns { grid-template-columns: minmax(0,1.5fr) minmax(230px,1fr); }
}
@media(max-width: 680px) {
    .shell { width: calc(100% - 32px); }
    .brand { font-size: 1.05rem; }
    .bar { gap: .6rem; }
    .bar nav { gap: .85rem; }
    .account span { display: none; }
    .local { font-size: .69rem; padding-left: .6rem; }
    main { padding-top: 1.6rem; }
    .page-head { flex-wrap: wrap; align-items: start; margin-bottom: 1.35rem; }
    .page-head .primary,.page-head .secondary { min-height: 40px; }
    .list-head { display: none; }
    .list-row { grid-template-columns: 72px minmax(0,1fr); gap: .7rem .8rem; padding: 1rem; align-items: start; }
    .list-row > :nth-child(3) { grid-column: 2; }
    .list-row .assignment { flex-direction: row; flex-wrap: wrap; align-items: center; }
    .date strong,.subject strong { font-size: 1rem; }
    .date small { font-size: .72rem; }
    .columns { display: flex; flex-direction: column; gap: 0; }
    .columns > * { width: 100%; }
    .fields { grid-template-columns: minmax(0,1fr); }
    .filters { gap: .3rem; }
    .filters a { font-size: .82rem; padding: .4rem .52rem; gap: .35rem; }
    .section-head { flex-wrap: wrap; }
    .signin { margin-top: 3vh; }
}
@media(max-width: 390px) {
    .facts { grid-template-columns: minmax(0,1fr); }
}
.duplicate { border-left: 4px solid #ba8139; }
.duplicate p { margin: .65rem 0 1rem; }
.reading form > p + button { margin-top: .8rem; }
