:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  background: #101519;
  color: #eef2f4;
  --panel: #171f24;
  --inset: #11191d;
  --line: #303e46;
  --muted: #acbac2;
  --accent: #7ce7c3;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
h1, h2, h3, p, ul { margin: 0; }
h1, h2, h3 { line-height: 1.15; }
p { line-height: 1.55; }
button, .action {
  min-height: 44px;
  padding: .6rem .85rem;
  border: 1px solid var(--line);
  border-radius: .55rem;
  background: var(--inset);
  color: inherit;
  font-weight: 650;
  cursor: pointer;
}
button:hover, .action:hover { border-color: #76938e; }
button:disabled { cursor: wait; opacity: .6; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.primary { color: #0a2921; background: var(--accent); border-color: var(--accent); }
.quiet { background: transparent; }
.action { display: inline-flex; align-items: center; text-decoration: none; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .65rem 1rem;
  padding: .72rem clamp(1rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--line);
  background: #141c20;
}
.brand { display: flex; align-items: center; gap: .65rem; font-weight: 750; }
.brand small { display: block; color: var(--muted); font-weight: 500; }
.brand-icon {
  width: 2.4rem; aspect-ratio: 1; display: grid; place-items: center;
  background: #203e36; color: var(--accent); border: 1px solid #366b5c;
  border-radius: .7rem; letter-spacing: -.04em;
}
.account { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
#account-name { color: var(--muted); margin-inline-end: .35rem; overflow-wrap: anywhere; }
.workspace { max-width: 1360px; margin: auto; padding: clamp(1rem, 4vw, 3.5rem); }
.overview { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .75rem; margin-bottom: 1.4rem; }
h1 { font-size: clamp(1.9rem, 5vw, 3.15rem); letter-spacing: -.045em; }
#version { margin-top: .5rem; color: var(--muted); }
.columns { display: grid; grid-template-columns: minmax(315px, 4fr) minmax(0, 7fr); align-items: start; gap: 1rem; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: .9rem; }
.navigator { padding: 1rem; min-width: 0; }
.nav-header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: 1rem; }
.nav-header h2 { font-size: 1.13rem; }
.muted { color: var(--muted); }
#count { font-size: .8rem; white-space: nowrap; }
.filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .62rem; margin-bottom: .95rem; }
.search { grid-column: span 2; }
label { display: grid; gap: .38rem; font-size: .88rem; color: var(--muted); }
input, select, textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: .55rem .68rem;
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: var(--inset);
  color: #eef2f4;
  font-size: 1rem;
}
textarea { resize: vertical; }
#tree ul { list-style: none; padding: 0; }
#tree li > ul { margin-left: .85rem; padding-left: .28rem; border-left: 1px solid var(--line); }
.tree-row { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); align-items: center; gap: .15rem; margin: .2rem 0; }
.tree-toggle { padding: 0; border-color: transparent; font-size: 1.3rem; }
.tree-spacer { text-align: center; color: var(--muted); }
.tree-choice {
  min-width: 0;
  display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .55rem;
  width: 100%;
  background: transparent; border-color: transparent; text-align: left;
  font-size: .9rem; padding-inline: .55rem;
  overflow-wrap: anywhere;
}
.tree-choice[aria-current] { background: #203a33; border-color: #366b5c; }
.tree-choice .tag { margin-left: auto; font-size: .72rem; }
.tree-check { color: var(--accent); }
.tag { display: inline-block; width: fit-content; padding: .24rem .52rem; border-radius: .35rem; background: #263139; color: #cbd6dd; font-size: .8rem; font-weight: 650; }
.tag-geplant { background: #25384d; color: #b7d8fb; }
.tag-teilweise { background: #463824; color: #f7d49e; }
.tag-gebaut { background: #243e43; color: #a8e2e7; }
.tag-fertig { background: #25463b; color: #a3f2d3; }
.tag-gestrichen { background: #462c37; color: #f3becf; }
.detail { padding: clamp(1rem, 3vw, 2rem); min-height: 23rem; scroll-margin-top: 1rem; overflow-wrap: anywhere; }
.detail h2 { font-size: clamp(1.6rem, 4vw, 2.15rem); letter-spacing: -.035em; }
.crumb { color: var(--muted); font-size: .86rem; margin-bottom: .45rem; }
.summary { color: var(--muted); margin-top: .45rem; }
.status-row, .backlog { display: flex; flex-wrap: wrap; gap: .45rem; }
.status-row { margin-top: .85rem; }
.check-action { margin-top: .9rem; }
.description-list, .comments { margin-top: 1.3rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.description-list { display: grid; gap: .85rem; }
.description h3, .comments h3 { font-size: 1rem; margin-bottom: .45rem; }
.description p, .comment p { white-space: pre-wrap; }
.comment-list { display: grid; gap: .6rem; margin-block: .6rem 1rem; }
.comment { border: 1px solid var(--line); background: var(--inset); border-radius: .6rem; padding: .75rem; }
.comment-meta { display: flex; flex-wrap: wrap; gap: .3rem .8rem; margin-bottom: .35rem; align-items: baseline; }
.comment-meta time { font-size: .8rem; color: var(--muted); }
.comment-form .primary { margin-top: .55rem; }
.notice { border: 1px solid #785a3b; background: #33291e; color: #f3d4ae; padding: .6rem .8rem; border-radius: .5rem; margin-block: .6rem; }
.empty { color: var(--muted); padding: .65rem; }
.navigator > summary { cursor: pointer; min-height: 44px; margin: 0; }
.navigator > summary::after { content: '⌄'; color: var(--accent); }
.navigator > summary #count { margin-left: auto; }
.navigator[open] > summary { margin-bottom: .75rem; }
.navigator[open] > summary::after { content: '⌃'; }
.branches { margin-top: 1.35rem; }
.branch-origin { display: inline-block; margin: 0; padding: .55rem .85rem; background: #254038; color: var(--accent); border: 1px solid #466b60; border-radius: .5rem; font-size: 1rem; }
.branch-list { list-style: none; padding: .2rem 0 0 1.5rem; }
.branch-list li { position: relative; padding: .55rem 0 0 1.55rem; }
.branch-list li::before, .branch-list li::after { content: ''; position: absolute; left: 0; border-left: 2px solid #42675b; }
.branch-list li::before { top: -.2rem; height: calc(50% + .5rem); width: 1.55rem; border-bottom: 2px solid #42675b; border-radius: 0 0 0 .4rem; }
.branch-list li:not(:last-child)::after { top: 50%; bottom: -.5rem; }
.branch-card { display: grid; gap: .45rem; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: .55rem; background: var(--inset); color: inherit; text-decoration: none; }
.branch-card:hover { border-color: var(--accent); }
.branch-meta, .crumb { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .65rem; }
.branch-meta { color: var(--muted); font-size: .83rem; }
.crumb a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); }
.boot { margin: 2rem auto; max-width: 55ch; padding-inline: 1rem; text-align: center; }
.login { margin: clamp(1rem, 9vh, 6rem) auto; width: min(34rem, calc(100% - 2rem)); padding: clamp(1rem, 5vw, 2.3rem); }
.login h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.login p { margin-block: .6rem 1.1rem; color: var(--muted); }
.demo-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
dialog { width: min(37rem, calc(100% - 1rem)); border: 1px solid var(--line); border-radius: .9rem; background: var(--panel); color: inherit; padding: 1rem; }
dialog::backdrop { background: #05090ac9; }
.dialog-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; }
.member { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; border-bottom: 1px solid var(--line); padding-block: .6rem; }
.member div { flex: 1 1 10rem; overflow-wrap: anywhere; }
#member-form { display: grid; gap: .75rem; margin-top: 1rem; }
#member-form button { justify-self: start; }
@media (max-width: 760px) {
  .columns { grid-template-columns: minmax(0, 1fr); }
  .topbar { align-items: flex-start; }
  .account { gap: .35rem; }
  #account-name { align-self: center; }
  .detail { min-height: 0; }
}


/* Atlas: ink on paper, with routes connecting the six topic families. */
:root {
  color-scheme: light;
  --panel:#fffdf8; --inset:#f4f2e9; --line:#d4d6ca;
  --muted:#505e5a; --accent:#126750;
  background:#eceee5; color:#192f2c;
}
body { min-height:100vh; background:linear-gradient(130deg,#e8eee4,#f4efe5 68%,#e6e9dc); }
.topbar { background:#142f2d; color:#f2f4e8; border-bottom:4px solid #a6c885; }
.brand { color:inherit; text-decoration:none; }
.brand small, #account-name { color:#cad7cc; }
.brand-icon { background:#c6df92; color:#16392e; border-color:#c6df92; }
.topbar button,.nav-link { color:#e2eae3; border-color:#516560; }
.nav-link { text-decoration:none; padding:.6rem .7rem; display:inline-flex; align-items:center; min-height:44px; font-weight:650; }
.nav-link:hover { text-decoration:underline; text-underline-offset:4px; }
.workspace { max-width:1180px; padding-top:clamp(1.4rem,4vw,3.2rem); }
h1,h2 { font-family:Georgia,Cambria,serif; font-weight:600; }
h1 { font-size:clamp(2.4rem,6vw,4.4rem); line-height:1.04; }
.card,dialog { box-shadow:0 7px 24px #203f3120; }
.columns { display:flex; flex-direction:column; align-items:stretch; gap:1rem; }
.navigator { padding:.2rem 1rem; }
.navigator[open] { padding-bottom:1rem; }
.navigator[open] #tree { max-height:21rem; overflow:auto; }
.detail { background:var(--panel); min-height:0; padding:clamp(1rem,3vw,2.2rem); }
.primary { color:white; background:#155e4b; border-color:#155e4b; }
input,select,textarea { color:#192f2c; background:#fffefa; }
.filters { grid-template-columns:2fr 1fr 1fr; }
.search { grid-column:auto; }
.tree-choice[aria-current] { background:#deeada; border-color:#a4bea7; }
.tag-neutral,.tag-idee { background:#e8eae1; color:#3e514d; }
.tag-teilweise { background:#f4e1b6; color:#68451c; }
.tag-geplant { background:#dce7f5; color:#2e4b68; }
.tag-gebaut { background:#d6eae6; color:#225d56; }
.tag-fertig { background:#daead1; color:#305a30; }
.tag-gestrichen { background:#f0dde0; color:#71434c; }
.map-count { color:var(--muted); margin:.45rem 0 1rem; }
.atlas-map { position:relative; isolation:isolate; display:grid; grid-template-columns:1fr 1fr; gap:1.05rem clamp(2rem,8vw,6rem);
  padding:clamp(1rem,3vw,2.25rem); background-color:#eaf0e4;
  background-image:radial-gradient(#9baea177 1px,transparent 1.4px); background-size:14px 14px;
  border:1px solid #c9d6c6; border-radius:.85rem; }
.atlas-map::before { content:''; position:absolute; z-index:-1; left:50%; top:17%; bottom:17%; border-left:2px solid #77988a; }
.atlas-node { --ink:#296d60; position:relative; display:grid; align-content:center; grid-template-columns:auto 1fr auto;
  gap:.3rem .7rem; padding:1rem; min-height:6rem; border:1px solid #bac9b9; border-radius:.7rem;
  color:#1e3531; text-decoration:none; background:#fffdf6; box-shadow:0 3px 0 #c6d3c4; }
.atlas-node::before { content:''; position:absolute; top:50%; width:clamp(1rem,4vw,3rem); border-top:2px solid #77988a; }
.atlas-node:nth-child(odd)::before { left:100%; }
.atlas-node:nth-child(even)::before { right:100%; }
.atlas-node:hover,.branch-card:hover { border-color:var(--ink,var(--accent)); background:#f8fbef; }
.map-symbol { color:var(--ink); align-self:center; grid-row:span 2; font:1.7rem Georgia,serif; }
.atlas-node strong { align-self:end; font-size:clamp(1rem,2.2vw,1.3rem); }
.atlas-node small { color:var(--muted); grid-row:2; grid-column:2; }
.node-arrow { grid-column:3; grid-row:1 / 3; align-self:center; color:var(--ink); }
.tone-wirtschaft { --ink:#915512; } .tone-stadt { --ink:#356a94; } .tone-technik { --ink:#79588c; }
.tone-einsatz { --ink:#a7554d; }
.branch-origin { color:#1e5541; background:#dfe9d4; border-color:#b2c6af; }
.branch-list { columns:2; column-gap:1rem; padding-left:.4rem; }
.branch-list li { break-inside:avoid; }
.branch-card { background:#fafaf3; }
.back-link,.inbox-topic { display:inline-flex; align-items:center; min-height:44px; color:var(--accent); font-weight:650; }
.inbox-filters { display:grid; grid-template-columns:minmax(8rem,1fr) 2fr; gap:.75rem; margin-block:1rem; }
.inbox-list { display:grid; gap:.75rem; }
.inbox-item { background:#f7f8ef; border:1px solid var(--line); border-left:4px solid #89a588; border-radius:.6rem; padding:1rem; }
.inbox-text { white-space:pre-wrap; margin-bottom:.8rem; }
#access-dialog h3 { margin:1.3rem 0 .6rem; }
#invite-result { display:grid; gap:.5rem; margin-top:.7rem; }
.notice,.login p.notice { background:#fff2d6; border-color:#c8a65d; color:#624b1a; }
.login { border-top:5px solid #56866f; }
.comment-form { margin-top:1rem; }
@media(max-width:760px) {
  .atlas-map { grid-template-columns:1fr; gap:.65rem; padding:.8rem .75rem .8rem 1.75rem; }
  .atlas-map::before { left:.8rem; top:2.3rem; bottom:2.3rem; }
  .atlas-map .atlas-node::before { left:auto; right:100%; width:.95rem; }
  .atlas-node { min-height:4.2rem; padding:.65rem .8rem; }
  .branch-list { columns:1; }
  .filters { grid-template-columns:1fr 1fr; } .search { grid-column:span 2; }
  .inbox-filters { grid-template-columns:1fr; }
  .nav-link,.account button { font-size:.86rem; padding:.4rem .5rem; }
}
