:root {
  color-scheme:light; --ink:#18382f; --muted:#465a51; --bg:#f3efe6; --line:#d8cbb8;
  --white:#fff; --primary:#18382f; --primary-dark:#18382f; --mint:#e0f7ee;
  --lavender:#e8ede3; --blue:#e9efff; --warm:#fff2dd; --radius:17px;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);font-size:1rem;line-height:1.5}
button,input,select,textarea{font:inherit;color:inherit}
a{color:var(--primary-dark)}
button,a,select,input[type=checkbox],input[type=radio]{-webkit-tap-highlight-color:transparent}
button,select,input[type=checkbox],input[type=radio]{cursor:pointer}
:focus-visible{outline:3px solid #285445;outline-offset:3px}
h1,h2,h3,p{margin:0}
h1,h2,h3{line-height:1.16;overflow-wrap:anywhere}
h1{font-size:clamp(2.05rem,4vw,2.9rem);letter-spacing:-.045em}
h2{font-size:1.27rem;letter-spacing:-.025em}
h3{font-size:1rem;letter-spacing:-.012em}
p{color:var(--muted);overflow-wrap:anywhere}
.icon{height:20px;width:20px;flex:0 0 auto;vertical-align:middle}
.skip{position:fixed;top:-80px;left:12px;z-index:20;background:white;padding:10px}
.skip:focus{top:14px}
.sidebar{position:fixed;inset:0 auto 0 0;width:238px;background:#fff;border-right:1px solid var(--line);display:flex;flex-direction:column;padding:31px 16px 19px;z-index:5;overflow:auto}
.brand{display:flex;align-items:center;gap:10px;margin:0 8px 36px;color:var(--ink);text-decoration:none;font-weight:800;letter-spacing:-.025em;line-height:1.22}
.brand small,.sidebar-end small{display:block;color:var(--muted);font-weight:500;letter-spacing:0;font-size:.81rem;margin-top:3px}
.brand-icon{display:grid;place-items:center;width:39px;height:39px;border-radius:12px;background:var(--primary);color:white;flex:0 0 auto}
.brand-icon svg{height:23px;width:23px}
.sidebar nav{display:grid;gap:5px}
.sidebar nav a{display:flex;align-items:center;gap:11px;min-height:46px;color:#4f556c;text-decoration:none;border-radius:9px;padding:10px 12px;font-size:.925rem;font-weight:600}
.sidebar nav a:hover{background:var(--bg)}
.sidebar nav a[aria-current=page]{background:var(--lavender);color:var(--primary-dark);font-weight:750}
.sidebar nav a:last-child{margin-top:12px;border-top:1px solid var(--line)}
.sidebar-end{margin-top:auto;display:flex;gap:9px;align-items:center;padding:13px 11px;background:#f4f3fc;border-radius:12px;font-size:.86rem;color:#4d3c8b;line-height:1.25}
.shell{margin-left:238px}
.topbar{height:72px;display:flex;justify-content:space-between;align-items:center;padding:0 clamp(20px,3.3vw,48px);border-bottom:1px solid var(--line);background:#fff}
.crumb,.header-actions{display:flex;align-items:center;gap:12px;font-size:.925rem;font-weight:650}
.profile-label{color:var(--muted);font-size:.85rem}
.menu-button{display:none!important}
main{width:min(100%,1330px);margin:0 auto;padding:28px clamp(20px,3.3vw,48px) 48px;outline:none}
.hero{background:linear-gradient(112deg,#eefaf5 3%,#e1f5ec 97%);border-radius:22px;border:1px solid #d7eee4;position:relative;overflow:hidden;isolation:isolate;padding:30px clamp(24px,3vw,43px);margin-bottom:28px}
.hero-content{position:relative;z-index:1;max-width:570px}
.hero h1{margin:12px 0 8px;font-size:clamp(2.6rem,5.1vw,4.1rem);line-height:.99;letter-spacing:-.064em}
.hero p{max-width:520px;margin:14px 0 20px;color:#3d5f58}
.hero-buttons{display:flex;flex-wrap:wrap;align-items:center;gap:9px}
.hero-art{position:absolute;right:5%;top:50%;transform:translateY(-50%) rotate(-9deg);width:clamp(190px,29vw,410px);aspect-ratio:1;color:#4a9d82;display:grid;place-items:center;pointer-events:none}
.hero-art span{position:absolute;border:1px solid #7db9a4;border-radius:50%;width:87%;height:87%;opacity:.36}
.hero-art span:nth-child(2){width:68%;height:68%;opacity:.46}
.hero-art span:nth-child(3){width:51%;height:51%;opacity:.56;background:#d7f3e7}
.hero-art svg{width:29%;height:29%;z-index:1;stroke-width:.72;filter:drop-shadow(5px 8px 4px rgb(41 123 98 / .12));fill:#a1dfc9}
.button,.icon-btn{display:inline-flex;gap:7px;align-items:center;justify-content:center;border-radius:9px;border:1px solid transparent;text-decoration:none;line-height:1.24;font-weight:700;min-height:40px}
.button{padding:9px 13px;font-size:.875rem;white-space:normal;text-align:center}
.button .icon{width:16px;height:16px}
.primary{background:var(--primary);color:white}
.primary:hover{background:var(--primary-dark)}
.secondary,.icon-btn{background:#fff;border-color:#dedfec;color:#3c355b}
.secondary:hover,.icon-btn:hover{background:#f4f1ff;border-color:#c8bce9}
.icon-btn{width:39px;height:39px;min-height:39px;padding:0}
.danger{border-color:#f1cacc;background:white;color:#8d2e34}
.small{min-height:33px;padding:5px 9px}
.page-title,.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.page-title{margin:5px 0 24px;align-items:flex-end}
.page-title p,.section-head p{margin-top:5px}
.section-head{margin-bottom:12px}
.section-head p{font-size:.875rem}
.tag{display:inline-flex;width:max-content;max-width:100%;align-items:center;border-radius:20px;padding:4px 9px;font-size:.8125rem;font-weight:700;color:#4e536b;background:#eff1f6;line-height:1.3}
.hero-tag{background:#d7efe4;color:#235e4d;padding:5px 10px}
.mint{background:var(--mint);color:#21634f}
.lavender{background:var(--lavender);color:var(--primary-dark)}
.blue{background:var(--blue);color:#314f8f}
.warm{background:var(--warm);color:#795016}
.meta{font-size:.8125rem;color:var(--muted)}
.exam-date{display:flex;gap:6px;align-items:center;white-space:nowrap}
.exam-date .icon{width:16px;height:16px}
.card{background:var(--white);border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 2px 5px rgb(37 33 86 / .028);min-width:0}
.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:20px}
.stat{padding:15px 17px}
.stat-label{display:flex;align-items:center;gap:9px;font-size:.9rem;font-weight:700;line-height:1.23}
.mini-icon{display:grid;place-items:center;border-radius:9px;width:35px;height:35px;flex:0 0 auto}
.mini-icon .icon{width:18px;height:18px}
.stat-value{font-size:1.9rem;font-weight:800;letter-spacing:-.04em;margin-top:7px;line-height:1.24}
.stat-value span{font-size:1rem;letter-spacing:0;color:var(--muted);font-weight:600}
.stat p{font-size:.82rem;margin:3px 0 6px}
.meter{width:100%;height:6px;appearance:none;border:0;border-radius:10px;background:#eeedf7;color:var(--primary);display:block}
.meter::-webkit-progress-bar{background:#eeedf7;border-radius:10px}
.meter::-webkit-progress-value{background:var(--primary);border-radius:10px}
.meter::-moz-progress-bar{background:var(--primary);border-radius:10px}
.dashboard-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px;align-items:start}
.board{padding:17px}
.rows{display:grid}
.compact-row{display:flex;align-items:center;gap:9px;padding:12px 0;border-top:1px solid var(--line)}
.compact-row:first-child{border-top:0}
.row-body{flex:1;min-width:0}
.row-body p,.module p{margin:6px 0 0}
.row-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.step-marker{display:grid;place-items:center;width:32px;height:32px;background:#f3f2fb;color:#62578c;border-radius:8px;flex:0 0 auto}
.step-marker .icon,.board-icon{width:17px;height:17px}
.step-marker.complete{background:var(--mint);color:#21634f}
.board-icon{color:#645692}
.text-link,.source-line a{font-weight:700;text-decoration:none}
.text-link:hover,.source-line a:hover{text-decoration:underline}
.text-link{display:inline-block;font-size:.88rem;margin-top:8px}
.session-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px;color:var(--muted);font-size:.83rem;margin-top:5px}
.session-meta .icon{width:15px;height:15px}
.check-wrap{display:grid;place-items:center;flex:0 0 auto;width:29px;height:29px}
input[type=checkbox],input[type=radio]{accent-color:var(--primary);width:18px;height:18px;margin:0;flex:0 0 auto}
.done{text-decoration:line-through;color:var(--muted)}
.callout{margin-bottom:22px;padding:17px;display:flex;gap:12px;background:#fbfaff}
.callout h2{font-size:1.14rem}
.callout p{margin-top:6px}
.source-line{font-size:.875rem;color:var(--muted)}
section>.source-line{margin-top:12px}
.module-stack{display:grid;gap:9px}
.module,.step,.session,.topic{padding:15px;display:flex;gap:12px;align-items:flex-start}
.module-code{display:grid;place-items:center;width:40px;height:35px;border-radius:8px;background:var(--lavender);color:var(--primary-dark);font-weight:800;flex:0 0 auto}
.entry-note{white-space:pre-wrap;border-left:3px solid #d8ccf4;padding-left:8px}
.spaced{margin:21px 0}
.exam-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0}
.exam-grid>div{background:var(--bg);padding:10px 12px;border-radius:8px}
.exam-grid dt{font-size:.85rem;color:var(--muted);font-weight:650}
.exam-grid dd{margin:2px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}
.toolbar{display:flex;align-items:flex-end;gap:12px;margin-bottom:14px;flex-wrap:wrap}
.toolbar-count{color:var(--muted);font-size:.875rem;margin:0 0 8px auto}
.control{display:grid;gap:4px;font-size:.875rem;font-weight:650;min-width:0}
select,input:not([type=checkbox]):not([type=radio]),textarea{border:1px solid #dadbea;background:white;border-radius:8px;min-height:39px;padding:7px 10px;max-width:100%}
select{appearance:none;background-image:linear-gradient(45deg,transparent 50%,#62578c 50%),linear-gradient(135deg,#62578c 50%,transparent 50%);background-position:calc(100% - 15px) 50%,calc(100% - 11px) 50%;background-size:4px 5px;background-repeat:no-repeat;padding-right:25px}
textarea{resize:vertical}
.topic-tags{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:7px}
.topic-actions{display:flex;gap:7px;align-items:flex-end}
.empty{padding:15px;color:var(--muted)}
.session{align-items:center}
.plan-week{margin-top:20px}
.quiz-card{padding:clamp(16px,3vw,28px);max-width:850px}
fieldset{border:0;padding:0;margin:0;min-width:0}
legend{font-size:clamp(1.16rem,2.4vw,1.55rem);font-weight:750;margin:8px 0 12px;line-height:1.28}
.answer{display:flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:9px;padding:10px;margin-bottom:8px;cursor:pointer}
.answer:has(input:checked){border-color:#806bd1;background:#f8f6ff}
.answer.correct{border-color:#74ac99;background:var(--mint)}
.answer.incorrect{border-color:#e4bfb6;background:#fff4f2}
.result-label{font-size:.8125rem;font-weight:750;margin-left:auto;color:#21634f}
.quiz-actions{margin-top:14px;display:flex;gap:8px;flex-wrap:wrap}
.quiz-result{margin-top:11px;border-radius:9px;padding:11px}
.quiz-result p{margin-top:4px}
.resource-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.resource{padding:15px;display:flex;flex-direction:column;gap:7px}
.resource p{font-size:.94rem}
.resource .meta{font-size:.8125rem}
.resource-actions{display:flex;gap:6px;align-items:center;margin-top:auto;padding-top:6px}
.data-card{max-width:850px;margin-bottom:13px}
#notice:not(:empty){position:fixed;bottom:16px;right:16px;max-width:min(440px,calc(100vw - 32px));z-index:15;background:#312552;color:white;padding:10px 14px;border-radius:10px;font-weight:650;box-shadow:0 5px 24px #3b2b7340}
dialog{width:min(510px,calc(100% - 24px));max-height:calc(100% - 24px);border:1px solid var(--line);border-radius:15px;padding:0;color:var(--ink);box-shadow:0 18px 60px #30224b40}
dialog::backdrop{background:#23183a68}
.editor-head,.editor-actions{display:flex;align-items:center;gap:8px;padding:13px 16px;background:#fff}
.editor-head{justify-content:space-between;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:1}
.editor-head .icon-btn{font-size:1.5rem;flex:0 0 auto}
.editor-actions{justify-content:flex-end;flex-wrap:wrap;border-top:1px solid var(--line)}
.editor-actions .danger{margin-right:auto}
.form-fields{display:grid;gap:10px;padding:14px 16px}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.form-error:empty{display:none}
.form-error{color:#8d2e34}
@media(max-width:1180px){
  .compact-row .row-actions .tag{display:none}
  .dashboard-grid{grid-template-columns:1fr 1fr}
  .resource-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:930px){
  .sidebar{width:198px;padding-inline:11px}.shell{margin-left:198px}
  .hero-art{opacity:.7;right:-1%;width:29vw}
  .hero-content{max-width:440px}
  .dashboard-grid{grid-template-columns:1fr}
  .compact-row .row-actions .tag{display:inline-flex}
  .topic{flex-direction:column}
}
@media(max-width:710px){
  .sidebar{display:none;inset:60px auto 0 0;width:min(265px,84vw);box-shadow:8px 8px 30px #261b5425}
  .sidebar.open{display:flex}.shell{margin-left:0}.topbar{height:60px}
  .menu-button{display:inline-flex!important}
  main{padding-top:15px}
  .hero{margin-bottom:22px}
  .hero-art{opacity:.65;right:0;width:36vw;top:39%}
}
@media(max-width:465px){
  main,.topbar{padding-inline:12px}
  .hero{padding:22px 15px}.hero-art{opacity:.4;right:-7%}
  .hero h1{font-size:2.55rem}
  .stats,.resource-grid{grid-template-columns:1fr;gap:8px}
  .stat{display:grid;grid-template-columns:1fr auto;align-items:center;gap:4px 10px;padding:9px 12px}
  .stat-value{margin:0}.stat p{margin:0}.meter{grid-column:1/-1;margin:2px 0}
  .profile-label{display:none}
  .page-title,.step{flex-wrap:wrap;align-items:flex-start}
  .step .row-actions{width:100%;justify-content:flex-start;padding-left:44px}
  .exam-grid{grid-template-columns:1fr}
  .compact-row .row-actions .tag{display:none}
  .editor-actions{padding-inline:10px}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

.review-board{margin-top:15px}
.sync-badge{font-size:.8rem;font-weight:700;color:var(--primary-dark);text-decoration:none;background:var(--lavender);border-radius:15px;padding:4px 9px;white-space:nowrap}
.sync-badge[data-status=synced]{background:var(--mint);color:#21634f}
.sync-badge:is([data-status=offline],[data-status=conflict],[data-status=rejected],[data-status=auth]){background:var(--warm);color:#795016}
.data-card .hero-buttons,.data-card>p+p{margin-top:10px}
@media(max-width:600px){.header-actions{gap:6px}.sync-badge{font-size:.72rem;white-space:normal;text-align:center;line-height:1.15;padding:4px 6px}.topbar .crumb{gap:6px}.profile-label{display:none}}
@media(max-width:355px){.topbar .crumb span{display:none}}

.norm-shortcut{margin:0 0 14px}
.norm-lessons{display:grid;gap:12px}
.norm-lesson>summary{cursor:pointer;padding:15px 19px;font-size:1.04rem;color:var(--ink)}
.norm-lesson>summary span{display:inline}
.norm-lesson>summary small{font-size:.875rem;color:var(--muted);margin-left:.7em}
.norm-lesson[open]>summary{border-bottom:1px solid var(--line)}
.norm-body{padding:16px 19px}
.norm-body>p+p{margin-top:7px}
.norm-diagram{margin:15px 0 12px;padding:12px;border:1px solid var(--line);border-radius:11px;background:#f8fafc}
.norm-diagram figcaption{font-size:.875rem;color:var(--muted);margin-top:8px}
.norm-nodes,.norm-network{display:grid;gap:10px;margin:0;padding:0}
.norm-nodes{grid-template-columns:repeat(3,minmax(0,1fr));list-style:none}
.norm-nodes li,.norm-network-row>span{display:grid;align-content:center;gap:2px;min-width:0;background:#fff;border:1px solid #dfe7ef;padding:10px;border-radius:8px;overflow-wrap:anywhere}
.norm-nodes li span,.norm-network-row>span{font-size:.9rem;color:var(--muted)}
.norm-flow{gap:20px}
.norm-flow li{position:relative}
.norm-flow li+li::before{content:'';position:absolute;top:50%;right:100%;width:21px;border-top:2px solid #77839b}
.norm-network-row{display:grid;grid-template-columns:3rem repeat(2,minmax(0,1fr));gap:7px;align-items:stretch}
.norm-network-row strong{display:grid;place-items:center;background:var(--lavender);color:var(--ink);border-radius:8px}
.norm-points{display:grid;gap:11px;margin:15px 0}
.norm-points dt{font-weight:750}
.norm-points dd{margin:2px 0;color:var(--muted)}
.norm-exercise{padding:9px 12px;border:1px solid var(--line);border-radius:8px}
.norm-exercise summary{cursor:pointer;font-weight:650}
.norm-exercise p,.norm-exercise details{margin:6px 0 0}
@media(max-width:620px){
  .norm-nodes{grid-template-columns:1fr}
  .norm-flow li+li::before{top:auto;bottom:100%;left:50%;right:auto;width:0;height:21px;border-top:0;border-left:2px solid #77839b}
  .norm-lesson>summary small{white-space:nowrap}
}

[hidden]{display:none!important}
.login-panel{max-width:34rem;margin:10vh auto;padding:24px;width:calc(100% - 32px)}
.login-panel p{margin:12px 0}
.login-panel form{display:grid;gap:12px}
.login-panel #account-actions{display:flex;flex-wrap:wrap;gap:8px}

.denkpaar-wordmark{display:block;width:145px;height:auto;margin:0 0 16px -8px}
.sidebar .denkpaar-wordmark{width:114px;margin:12px 0 0}

#tutor{inset:0 0 0 auto;margin:0;width:min(100%,27rem);max-width:100%;height:100dvh;max-height:100%;padding:0;border:0;border-left:1px solid var(--line);background:var(--bg);color:var(--ink)}
.tutor-panel{display:grid;gap:12px;padding:18px}
.tutor-header{display:flex;justify-content:space-between;align-items:center;gap:10px}
#tutor-form{display:grid;gap:10px}
#tutor-form textarea{resize:vertical;min-height:64px}
#tutor-messages{display:grid;gap:8px;max-height:38dvh;overflow:auto;list-style:none;padding:0;margin:0}
#tutor-messages li{background:var(--white);border:1px solid var(--line);border-radius:8px;padding:8px 10px}
#tutor-messages p{white-space:pre-wrap}
#tutor-status:empty{display:none}
@media(max-width:500px){
  .topbar{height:auto;min-height:60px;padding-block:8px;gap:6px}
  .header-actions{justify-content:flex-end;flex-wrap:wrap}
  .header-actions .button{padding-inline:7px;min-height:34px;font-size:.75rem}
}
