/* Eliten: mobil først. Følger idedesigneren-DESIGN.md (monokrom, hårfine streger, ingen accentfarve). */
:root{
  --bg:#181818; --surface:#1c1c1c; --surface-2:#222; --border:rgba(255,255,255,.08); --border-strong:rgba(255,255,255,.14);
  --text:#ededed; --muted:#a3a3a3; --dim:#6e6e6e; --glow:rgba(255,255,255,.04); --shade:rgba(0,0,0,.55);
  --head:'Inter Tight',system-ui,sans-serif; --body:'Source Sans 3',system-ui,sans-serif;
  color-scheme:dark;
}
[data-theme="light"]{
  --bg:#f7f7f6; --surface:#fff; --surface-2:#f0f0ef; --border:rgba(0,0,0,.08); --border-strong:rgba(0,0,0,.16);
  --text:#161616; --muted:#555; --dim:#9a9a9a; --glow:rgba(0,0,0,.03); --shade:rgba(0,0,0,.3);
  color-scheme:light;
}
*{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%}
html.lock{overflow:hidden}
body{background:var(--bg);color:var(--text);font:400 15px/1.6 var(--body);-webkit-font-smoothing:antialiased;min-height:100dvh;
  background-image:radial-gradient(ellipse 90% 34% at 50% -8%,var(--glow),transparent);background-repeat:no-repeat;transition:background-color .3s,color .3s}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer;-webkit-tap-highlight-color:transparent}
:focus-visible{outline:2px solid var(--muted);outline-offset:2px}
#app{max-width:520px;margin:0 auto;padding:0 20px calc(120px + env(safe-area-inset-bottom))}
.splash{color:var(--dim);padding:40vh 0 0;text-align:center}

/* Tekst */
h1{font:500 28px/1.15 var(--head);letter-spacing:-.03em}
h2{font:500 17px/1.25 var(--head);letter-spacing:-.02em}
h3{font:500 15px/1.3 var(--head);letter-spacing:-.01em}
.grad{background:linear-gradient(90deg,var(--text) 35%,var(--dim) 100%);-webkit-background-clip:text;background-clip:text;color:transparent}
.lead{font-weight:300;color:var(--muted);margin-top:10px}
.lbl{font-size:13px;color:var(--muted)}
.dim{font-size:13px;color:var(--dim)}
.mut{color:var(--muted)}
.mt{margin-top:14px}
.err{font-size:14px;color:var(--text);border:1px dashed var(--border-strong);border-radius:10px;padding:10px 12px;margin-top:14px}
.pre{white-space:pre-line}
section{margin-top:36px}
section>h2{margin-bottom:12px}
.ic{width:18px;height:18px;flex:none;stroke:currentColor;stroke-width:1.5;fill:none;stroke-linecap:round;stroke-linejoin:round}
.ic.big{width:46px;height:46px;stroke-width:1.2}

/* Top */
.top{display:flex;justify-content:space-between;align-items:center;padding:16px 0 28px}
.logo{font:600 22px var(--head);letter-spacing:-.04em}
.phead{display:flex;justify-content:space-between;align-items:center;padding:14px 0 22px}
.round{width:40px;height:40px;border-radius:50%;border:1px solid var(--border);background:var(--surface);display:grid;place-items:center;transition:border-color .2s}
.round:hover{border-color:var(--border-strong)}

/* Monogram */
.av{display:inline-grid;place-items:center;width:30px;height:30px;border-radius:50%;flex:none;background:linear-gradient(135deg,#5a5a5a,#2a2a2a);
  color:#eee;font:500 11px var(--head);letter-spacing:0;border:1px solid var(--border-strong)}
.av.lg{width:64px;height:64px;font-size:22px}
.av.me{width:36px;height:36px;font-size:13px}
.avs{display:flex;align-items:center;gap:10px;margin-top:12px}
.avs .stack{display:flex}
.avs .stack .av{margin-left:-8px;box-shadow:0 0 0 2px var(--bg)}
.avs .stack .av:first-child{margin-left:0}

/* Knapper: én form. Valgt tilstand er omvendt (lys fyld, mørk tekst). */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:0 22px;border-radius:999px;border:1px solid var(--border);
  background:var(--surface);color:var(--text);font:400 14px var(--body);transition:border-color .2s,transform .2s,background .2s,color .2s}
.btn:hover{border-color:var(--border-strong);transform:translateY(-1px)}
.btn:disabled{opacity:.4;transform:none;cursor:default}
.btn.block{display:flex;width:100%}
.btn.sm{min-height:36px;padding:0 15px;font-size:13px}
.btn.on{background:var(--text);color:var(--bg);border-color:var(--text)}
.btn .ic{width:15px;height:15px}
.link{background:none;border:none;color:var(--muted);font-size:14px;text-decoration:underline;text-underline-offset:3px;text-decoration-color:var(--border-strong);padding:6px 0}
.link:hover{color:var(--text)}
.row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.acts{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}
.seg{display:flex;gap:4px;padding:4px;border:1px solid var(--border);border-radius:999px;background:var(--surface);margin-top:14px}
.seg button{flex:1;min-height:40px;border:none;border-radius:999px;background:none;color:var(--muted);font-size:14px;transition:background .2s,color .2s}
.seg button.on{background:var(--text);color:var(--bg)}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.tag{font-size:12px;color:var(--muted);border:1px solid var(--border-strong);border-radius:999px;padding:2px 10px;white-space:nowrap}
.tag.dash{border-style:dashed}

/* Kort: omrids med hårfin streg, der fader diagonalt */
.card{display:block;border:1px solid transparent;border-radius:12px;padding:18px;
  background:linear-gradient(var(--bg),var(--bg)) padding-box,linear-gradient(160deg,var(--border-strong),transparent 62%) border-box;transition:background .3s}
a.card:hover{background:linear-gradient(var(--surface),var(--surface)) padding-box,linear-gradient(160deg,var(--dim),transparent 66%) border-box}
.card+.card{margin-top:12px}
.card.dash{border:1px dashed var(--border-strong);background:none}
.card.best{background:linear-gradient(var(--bg),var(--bg)) padding-box,linear-gradient(160deg,var(--muted),transparent 80%) border-box}
.card h3+p,.card h2+p{margin-top:4px}
.meta{display:flex;flex-wrap:wrap;gap:6px 14px;margin-top:10px;font-size:13px;color:var(--muted)}
.meta span{display:inline-flex;align-items:center;gap:6px}
.meta .ic{width:14px;height:14px}
.empty{text-align:center;padding:36px 20px;color:var(--muted)}
.empty>.ic{margin:0 auto 14px}
.empty h2{color:var(--text);margin-bottom:6px}
.empty .btn{margin-top:18px}

/* Lister */
.list{list-style:none}
.list>li,.list>a{display:flex;align-items:center;gap:12px;padding:13px 0;border-bottom:1px solid var(--border)}
.list>li:last-child,.list>a:last-child{border-bottom:none}
.grow{flex:1;min-width:0}
.list b{font-weight:400;display:block}
.list .dim{display:block}
.facts{display:grid;gap:14px}
.fact{display:flex;gap:14px;align-items:flex-start}
.fact .ic{margin-top:3px;color:var(--muted)}
.fact b{font:500 15px var(--head);display:block}
.fact span,.fact a{font-size:13px;color:var(--muted)}
.fact a{text-decoration:underline;text-underline-offset:3px;text-decoration-color:var(--border-strong)}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.grid2 .card{margin:0;padding:14px}
.grid2.names{gap:10px}
.grid2.names .fld{margin-top:18px}
.grid2 b{font:500 15px var(--head);display:block}
.bar{height:3px;border-radius:3px;background:var(--border);margin:12px 0 8px;overflow:hidden}
.bar i{display:block;height:100%;background:var(--text);border-radius:3px;transition:width .3s}
.tl{list-style:none;border-left:1px solid var(--border-strong);margin-left:5px}
.tl li{position:relative;padding:0 0 18px 20px}
.tl li:last-child{padding-bottom:0}
.tl li::before{content:'';position:absolute;left:-4px;top:8px;width:7px;height:7px;border-radius:50%;background:var(--bg);border:1px solid var(--muted)}
.tl b{font:500 14px var(--head);display:block}
.num{list-style:none;counter-reset:n}
.num li{counter-increment:n;display:flex;gap:14px;padding:8px 0}
.num li::before{content:counter(n);font:500 13px var(--head);color:var(--dim);min-width:14px;padding-top:2px}
.cmt{display:flex;gap:12px;padding:10px 0}
.cmt p{color:var(--muted)}

/* Felter */
.fld{display:block;margin-top:18px}
.fld>span{display:block;font-size:13px;color:var(--muted);margin-bottom:6px}
input,select,textarea{width:100%;min-height:48px;background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:11px 14px;outline:none;transition:border-color .2s;font-size:16px}
textarea{min-height:96px;resize:vertical;line-height:1.5}
input:focus,select:focus,textarea:focus{border-color:var(--muted)}
input::placeholder,textarea::placeholder{color:var(--dim)}
.inrow{display:flex;gap:8px;align-items:center;margin-top:8px}
.inrow input{flex:1;min-width:0}
.inrow input.t{flex:none;width:118px}
.inrow .round{flex:none;width:36px;height:36px;background:none;color:var(--dim)}
.add{display:flex;gap:8px;margin-top:10px}
.add input{flex:1;min-width:0}
.feed{margin-top:16px;font-size:13px;color:var(--muted);text-overflow:ellipsis}
.hint{font-size:13px;color:var(--dim);margin-top:8px}

/* Kalender */
.month{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}
.days{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;text-align:center}
.days span{font-size:12px;color:var(--dim);padding-bottom:6px}
.days button{aspect-ratio:1;max-width:46px;width:100%;margin:0 auto;border-radius:50%;border:1px solid transparent;background:none;font:400 14px var(--head);color:var(--muted)}
.days button.today{border-color:var(--border-strong);color:var(--text)}
.days button.prop{border:1px dashed var(--muted);color:var(--text)}
.days button.has{background:var(--text);color:var(--bg);border-color:var(--text)}
.days button.sel{box-shadow:0 0 0 2px var(--bg),0 0 0 3px var(--muted)}
.legend{display:flex;gap:16px;justify-content:center;margin-top:16px;font-size:12px;color:var(--dim)}
.legend i{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:6px;vertical-align:-1px;border:1px solid var(--border-strong)}
.legend i.has{background:var(--text);border-color:var(--text)}
.legend i.prop{border:1px dashed var(--muted)}

/* Bundnavigation: svævende pille */
.nav{position:fixed;left:50%;bottom:calc(14px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:20;width:min(calc(100% - 28px),440px);
  display:grid;grid-template-columns:1fr 1fr auto 1fr 1fr;align-items:center;gap:2px;padding:6px;border-radius:22px;border:1px solid var(--border);
  background:var(--surface);box-shadow:0 12px 40px var(--shade)}
.nav a{display:flex;flex-direction:column;align-items:center;gap:3px;padding:8px 0 6px;border-radius:16px;font:400 11px var(--head);color:var(--muted);transition:background .2s,color .2s}
.nav a.on{background:var(--surface-2);color:var(--text)}
.nav .plus{width:46px;height:46px;margin:0 6px;border-radius:50%;border:1px solid var(--border-strong);background:var(--surface-2);display:grid;place-items:center}
.stick{position:fixed;left:50%;bottom:0;transform:translateX(-50%);z-index:20;width:100%;max-width:520px;display:flex;gap:10px;align-items:center;
  padding:14px 20px calc(14px + env(safe-area-inset-bottom));background:linear-gradient(transparent,var(--bg) 34%)}
.stick .btn{flex:1}
.stick .round{flex:none;width:48px;height:48px}

/* Ark fra bunden */
.veil{position:fixed;inset:0;z-index:40;background:var(--shade);display:flex;align-items:flex-end;justify-content:center}
.veil.in{animation:fade .2s}
.veil.in .sheet{animation:up .25s}
.sheet{width:100%;max-width:520px;max-height:88dvh;overflow:auto;background:var(--surface);border:1px solid var(--border);border-bottom:none;border-radius:20px 20px 0 0;
  padding:10px 20px calc(24px + env(safe-area-inset-bottom));box-shadow:0 -12px 40px var(--shade)}
.sheet::before{content:'';display:block;width:36px;height:4px;border-radius:4px;background:var(--border-strong);margin:0 auto 18px}
.sheet h2{font-size:21px;margin-bottom:6px}
.sheet .opt{display:flex;align-items:center;gap:14px;width:100%;text-align:left;padding:14px 0;border:none;border-bottom:1px solid var(--border);background:none}
.sheet .opt:last-of-type{border-bottom:none}
.sheet .opt b{font:500 15px var(--head);display:block}
.sheet .opt span{font-size:13px;color:var(--muted)}
.sheet .opt>.ic{color:var(--muted)}
@keyframes fade{from{opacity:0}}
@keyframes up{from{transform:translateY(24px);opacity:0}}

/* Præsentation: ét budskab pr. skærm */
.show{position:fixed;inset:0;z-index:60;background:var(--bg);display:flex;flex-direction:column;padding:calc(14px + env(safe-area-inset-top)) 24px calc(28px + env(safe-area-inset-bottom));
  background-image:radial-gradient(ellipse 90% 40% at 50% -8%,var(--glow),transparent)}
.show .segs{display:flex;gap:4px}
.show .segs i{flex:1;height:2px;border-radius:2px;background:var(--border-strong)}
.show .segs i.on{background:var(--text)}
.show .x{position:relative;z-index:2;align-self:flex-end;margin-top:14px}
.show .slide{flex:1;display:flex;flex-direction:column;justify-content:center;max-width:560px;width:100%;margin:0 auto}
.show .slide.in{animation:fade .3s}
.show .slide h1{font-size:clamp(40px,11vw,60px);line-height:1.05;margin:10px 0 16px}
.show .slide h2{font-size:30px;margin-bottom:22px;letter-spacing:-.03em}
.show .slide p,.show .slide li{font-size:19px;font-weight:300;color:var(--muted)}
.show .slide .big{font:500 24px/1.3 var(--head);color:var(--text);letter-spacing:-.02em}
.show .slide .tl b{font-size:17px}
.show .slide .list>li{padding:11px 0}
.show .tap{position:absolute;top:90px;bottom:0;width:50%;background:none;border:none}
.show .tap.l{left:0}.show .tap.r{right:0}
.show .foot{text-align:center;font-size:12px;color:var(--dim)}

/* Besked nederst */
.toast{position:fixed;left:50%;bottom:calc(104px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:70;max-width:calc(100% - 40px);
  background:var(--text);color:var(--bg);font-size:14px;padding:10px 18px;border-radius:999px}
.toast.in{animation:fade .2s}

/* Login */
.gate{min-height:92dvh;display:flex;flex-direction:column;justify-content:center;padding:40px 0}
.gate .logo{display:block;margin-bottom:44px}
.gate .ic.big{margin-bottom:22px}
.gate .btn{margin-top:26px}
.gate .foot{margin-top:22px;display:flex;flex-direction:column;align-items:flex-start;gap:2px}

@media (min-width:700px){#app{padding-top:16px}}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
