:root {
  --bg: #f5f5f7; --card: #fff; --fill: #7878801a; --text: #1d1d1f; --muted: #6e6e73; --line: #3c3c4321;
  --accent: #0071e3; --accent-text: #0066cc; --soft: #0071e31a; --danger: #d70015;
  --glass: #ffffffa6; --shadow: 0 1px 2px #0000000a, 0 18px 45px -22px #1b2a5a40;
  --edge: #ffffffcc; --glow-a: #5ac8fa40; --glow-b: #5e5ce62e; --glow-c: #ff5fa21f;
  --spring: cubic-bezier(.32, .72, 0, 1);
  font: 15px/1.47 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #000; --card: #1c1c1e; --fill: #7878803d; --text: #f5f5f7; --muted: #98989d; --line: #54545899;
    --accent: #0a74e8; --accent-text: #409cff; --soft: #0a84ff2e; --danger: #ff6961; --glass: #1c1c1e99; --shadow: 0 20px 50px -25px #000; --card: #17171ccc; --edge: #ffffff14; --glow-a: #0a84ff38; --glow-b: #5e5ce633; --glow-c: #bf5af21f; }
}
* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--text); min-height: 100dvh; -webkit-tap-highlight-color: transparent; }
h1 { font-size: 2.15rem; line-height: 1.1; letter-spacing: -.025em; font-weight: 700; }
h2 { font-size: 1.2rem; letter-spacing: -.012em; font-weight: 600; }
a { color: var(--accent-text); text-decoration: none; }
svg { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); font-size: .87rem; }
.empty { color: var(--muted); text-align: center; padding: 3.5rem 1rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

button, input, textarea { font: inherit; color: inherit; }
input, textarea, select { width: 100%; background: var(--fill); border: 1px solid transparent; border-radius: 12px; padding: .72rem .9rem; font-size: 16px; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px var(--soft); }
/* checkboxes look and move like switches */
input[type=checkbox] { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 2.7rem; height: 1.65rem; padding: 0; border: 1px solid var(--line); border-radius: 980px; background: var(--fill); cursor: pointer; transition: background .25s; }
input[type=checkbox]::before { content: ""; position: absolute; top: 2px; left: 2px; width: calc(1.65rem - 6px); aspect-ratio: 1; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px #0005; transition: translate .35s var(--spring), scale .15s; }
input[type=checkbox]:checked { background: #30c552; border-color: #30c552; }
input[type=checkbox]:checked::before { translate: 1.05rem 0; }
input[type=checkbox]:active::before { scale: 1.12 1; }
@media (forced-colors: active) { input[type=checkbox] { appearance: auto; -webkit-appearance: auto; width: 1.2rem; height: 1.2rem; } input[type=checkbox]::before { display: none; } }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 2.4rem; background: var(--fill); border: 0; border-radius: 980px; padding: .5rem 1.05rem; cursor: pointer; font-weight: 500; color: var(--accent-text); transition: transform .25s var(--spring), filter .15s; }
button:hover, .button:hover { filter: brightness(.96); }
button:active, .button:active { transform: scale(.96); transition-duration: .08s; }
button:disabled { opacity: .45; cursor: default; }
button.primary { background: var(--accent); color: #fff; }
button.danger { color: var(--danger); }
button.round, .button.round { width: 2.4rem; padding: 0; }
button.plain { background: none; }
label { display: grid; gap: .35rem; font-weight: 500; font-size: .87rem; }
label.check { display: flex; gap: .6rem; align-items: center; cursor: pointer; }
form { display: grid; gap: .9rem; }

/* sign in */
.gate { min-height: 100dvh; display: grid; place-items: center; padding: 1.5rem 1.2rem; isolation: isolate; }
.gate form { width: min(26rem, 100%); padding: 2.2rem 1.6rem; border-radius: 30px; background: var(--glass); border: 1px solid var(--edge); box-shadow: var(--shadow); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%); text-align: center; gap: 1rem; animation: rise .6s var(--spring) both; }
.gate h1 { font-size: 1.9rem; }
.gate label.check { justify-content: center; font-weight: 400; }
.gate button { min-height: 3rem; font-size: 1.02rem; }
.logo { width: 5.2rem; height: 5.2rem; margin: 0 auto .4rem; border-radius: 1.35rem; background: linear-gradient(160deg, #5ac8fa, #0071e3 55%, #5e5ce6); display: grid; place-items: center; color: #fff; box-shadow: 0 18px 40px -16px #0071e3aa, inset 0 1px 0 #ffffff66; }
.logo svg { width: 55%; height: 55%; stroke: #fff; stroke-width: 1.9; }
.logo svg.i-cloud { fill: #fff; }
.gate .secure { font-size: .78rem; margin-top: .3rem; }
.group { border: 1px solid var(--line); background: var(--card); border-radius: 16px; box-shadow: var(--shadow); text-align: left; }
.group .line { display: flex; align-items: center; border-top: 1px solid var(--line); }
.group .line:first-child { border-top: 0; }
.group input { background: none; border: 0; border-radius: 16px; padding: 1rem 1.1rem; box-shadow: none; }
.group input:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.gate .group button { min-height: 2.4rem; margin-right: .5rem; }
.hint { color: var(--danger); font-size: .85rem; }
.secure { display: flex; gap: .4rem; align-items: center; justify-content: center; }

/* sign-in in space: always dark */
.gate.space { color-scheme: dark; --text: #f5f5ff; --muted: #b0aed0; --card: #ffffff0a; --fill: #ffffff14; --line: #ffffff21; --edge: #ffffff21; --glass: #1b183f8c; --accent: #6c63ff; --accent-text: #8ad8ff; --soft: #8ad8ff2e; --danger: #ff8a80; --shadow: 0 30px 80px -30px #000;
  color: var(--text); background: radial-gradient(60rem 40rem at 0 0, #3a2a8c66, transparent 70%), radial-gradient(40rem 30rem at 70% 0, #6b1f5c40, transparent 70%), #07061a;
  grid-template-columns: minmax(0, 26rem) minmax(0, 30rem); justify-content: center; align-content: center; align-items: center; gap: clamp(1rem, 8vw, 8rem); overflow: clip; }
.gate.space::before { background: radial-gradient(1px 1px at 20px 30px, #fff, #0000), radial-gradient(1.5px 1.5px at 90px 120px, #cfd8ff, #0000), radial-gradient(1px 1px at 60px 80px, #fff9, #0000), radial-gradient(1px 1px at 33px 140px, #fffc, #0000), radial-gradient(2px 2px at 120px 40px, #fff, #0000), radial-gradient(1px 1px at 80px 190px, #bcd0ff, #0000); background-size: 191px 173px, 313px 277px, 131px 229px, 167px 211px, 419px 367px, 239px 283px; opacity: .8; }
.gate.space form { text-align: left; padding: 2.2rem 1.8rem; border-radius: 26px; }
.gate.space label.check { justify-content: flex-start; }
.gate.space button.primary { background: linear-gradient(90deg, #6a4fe8, #1580d0); box-shadow: 0 14px 34px -14px #4aa8ff; }
.brandline { display: flex; align-items: center; gap: .6rem; font-size: .75rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.brandline .logo { width: 2.1rem; height: 2.1rem; margin: 0; border-radius: 50%; box-shadow: 0 0 22px #6c63ffaa; }
.sky { position: relative; width: 100%; aspect-ratio: 1; transform: perspective(900px) rotateY(calc(var(--x, 0) * 22deg)) rotateX(calc(var(--y, 0) * -22deg)); transition: transform .5s var(--spring); transform-style: preserve-3d; pointer-events: none; }
.planet { position: absolute; inset: 14%; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 34% 28%, #fff 4%, #f1ecffcc 18%, transparent 46%), linear-gradient(168deg, #7fdcff, #b7a4ff 30%, #e8fbff 41%, #8ee6dd 47%, #d9b3ff 56%, #6c58e8 72%, #1d1450); box-shadow: 0 0 90px #6c63ff73, 0 0 0 1px #a8e2ff66; }
.planet::before { content: ""; position: absolute; inset: 0 -100% 0 0; background: repeating-radial-gradient(60% 9% at 25% 50%, #fff3 0, transparent 40%, #6a4fe833 70%, transparent 100%); animation: turn 26s linear infinite; }
.planet::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset -3rem -2.5rem 4.5rem #0b0733d9, inset .6rem .6rem 2rem #bfeaff80; }
@keyframes turn { to { transform: translateX(-50%); } }
.ring { position: absolute; inset: 39% -4%; border-radius: 50%; border: 3px solid #d5dcff59; box-shadow: 0 0 14px #9fb4ff40, inset 0 0 14px #9fb4ff40; rotate: -13deg; }
.ring.front { clip-path: inset(50% -20px -20px -20px); box-shadow: none; } /* a glow would show the cut edge */
.moon { position: absolute; width: 7%; aspect-ratio: 1; right: 4%; top: 22%; border-radius: 50%; background: radial-gradient(circle at 32% 30%, #fff, #b9b2e8 55%, #3b3270); box-shadow: 0 0 18px #cfd8ff80; animation: float 7s ease-in-out infinite alternate; }
.moon.small { width: 4%; right: auto; left: 12%; top: 80%; animation-duration: 5s; animation-direction: alternate-reverse; }
@keyframes float { from { translate: 0 -14px; } to { translate: -10px 16px; } }
@media (max-width: 860px) {
  .gate.space { grid-template-columns: minmax(0, 26rem); gap: .6rem; }
  .gate.space .sky { order: -1; justify-self: center; width: min(13rem, 55vw); }
}

/* six-digit code */
.otp { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .45rem; }
.otp span { display: grid; place-items: center; height: 3.4rem; border-radius: 13px; background: var(--fill); border: 1px solid var(--line); font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; transition: background .25s, border-color .25s, transform .25s var(--spring); }
.otp span:not(:empty) { border-color: var(--accent-text); animation: pop .25s var(--spring); }
.otp:focus-within span.next { border-color: var(--accent-text); box-shadow: 0 0 0 4px var(--soft); transform: translateY(-2px); }
.otp input { position: absolute; inset: 0; height: 100%; opacity: 0; cursor: text; }
/* all six digits in: an orange line runs along them while the answer is on its way */
.otp.full:not([data-state]) span { border-color: #ff8a4c; animation: trace .9s ease-in-out infinite alternate; animation-delay: calc(var(--i) * .08s); }
@keyframes trace { to { box-shadow: 0 0 0 3px #ff8a4c40, 0 0 18px #ff6a3d80; } }
/* right: the boxes slide together, turn and become one glowing tick. The plain styles are the end state, for reduced motion */
.otp .tick { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 3.4rem; height: 3.4rem; display: grid; place-items: center; border-radius: 15px; border: 2px solid #4ade80; background: #1f9d5533; color: #d5ffe4; font-size: 1.6rem; box-shadow: 0 0 34px #30d158a6; opacity: 0; pointer-events: none; }
.otp[data-state=good] span { opacity: 0; translate: calc((2.5 - var(--i)) * (100% + .45rem)); border-color: #4ade80; animation: merge .55s var(--spring); }
@keyframes merge { from { opacity: 1; translate: 0; } 70% { opacity: 1; rotate: 160deg; } }
.otp[data-state=good] .tick { opacity: 1; animation: appear .45s .4s var(--spring) backwards; }
@keyframes appear { from { opacity: 0; scale: .4; rotate: -90deg; } }
.gate.space form:has(.otp[data-state=good]) { box-shadow: var(--shadow), inset 0 0 90px -20px #30d15866; }

/* upload capsule */
.capsule { --done: 0%; position: relative; display: flex; align-items: center; gap: .7rem; width: min(24rem, 100%); height: 3.5rem; margin: 1.7rem auto 1rem; padding: 0 1.2rem 0 .5rem; border-radius: 980px; background: var(--fill); border: 1px solid var(--edge); box-shadow: var(--shadow); text-align: left; transition: width .5s var(--spring), background .3s; animation: rise .4s var(--spring); }
.capsule .fill { position: absolute; inset: 0 auto 0 0; width: var(--done); border-radius: inherit; background: linear-gradient(90deg, #30d15826, #30d15873); transition: width .3s ease-out; }
.capsule .symbol { position: relative; flex: none; width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: 50%; background: var(--fill); }
.capsule .falling { display: grid; place-items: center; width: 1.9rem; height: 2.3rem; border-radius: 6px; background: #fff; color: #d70015; box-shadow: 0 8px 18px -6px #0008; animation: fall .6s var(--spring) backwards; }
@keyframes fall { from { opacity: 0; translate: -2rem -3.5rem; rotate: -18deg; scale: 1.25; } }
.capsule .what { position: relative; flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; }
.upload { display: grid; grid-template-columns: minmax(0, 1fr); gap: .55rem; width: min(24rem, 100%); margin: 1rem auto; text-align: left; }
.upload .capsule { margin: 0; justify-self: center; }
.meter { display: flex; align-items: center; gap: .7rem; }
.meter b { min-width: 3.1rem; text-align: right; font-variant-numeric: tabular-nums; }
.track { flex: 1; height: .65rem; overflow: hidden; border-radius: 980px; background: var(--fill); box-shadow: inset 0 0 0 1px var(--line); }
.track i { display: block; width: var(--total, 0%); height: 100%; border-radius: inherit; background: linear-gradient(90deg, #30d158, #64d2ff); transition: width .3s ease-out; }
.upload small { color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.upload .cancel { justify-self: center; min-height: 2.1rem; font-size: .85rem; }
.upload .capsule[data-state=bad] { background: #8f1d16; color: #fff; }
.capsule[data-state=bad] .fill { display: none; }
.uploads { position: fixed; z-index: 6; right: 1.4rem; bottom: 1.4rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: .6rem; width: min(24rem, calc(100% - 2rem)); max-height: 70dvh; overflow: auto; }
.uploads:empty { display: none; }
.uploads .upload { width: 100%; margin: 0; padding: .9rem 1rem; border-radius: 26px; border: 1px solid var(--edge); background: #20212ef2; box-shadow: var(--shadow); }
@media (max-width: 760px) { .uploads { right: 1rem; bottom: calc(5.8rem + env(safe-area-inset-bottom)); } }
.capsule[data-state=good] { justify-content: center; width: 12rem; padding-inline: .8rem; background: #17803f; color: #fff; animation: pop .45s var(--spring); }
.capsule[data-state=good] .fill { display: none; }
.capsule[data-state=good] .symbol { width: 1.5rem; height: 1.5rem; background: none; }
.capsule[data-state=good] .what { flex: none; }
.otp[data-state=bad] span { border-color: var(--danger); color: var(--danger); background: #ff453a1f; }
.otp[data-state=bad] { animation: shake .4s ease-out; }
@keyframes pop { 50% { scale: 1.12; } }
@keyframes shake { 20% { translate: -10px; } 40% { translate: 8px; } 60% { translate: -5px; } 80% { translate: 3px; } }

/* layout */
.app { display: grid; grid-template-columns: 17rem minmax(0, 1fr); min-height: 100dvh; isolation: isolate; }
.app::before, .gate::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(55rem 38rem at 85% -5%, var(--glow-a), transparent 70%), radial-gradient(50rem 40rem at 15% 105%, var(--glow-b), transparent 70%), radial-gradient(35rem 28rem at 95% 90%, var(--glow-c), transparent 70%); }
nav { position: sticky; top: .8rem; height: calc(100dvh - 1.6rem); margin: .8rem 0 .8rem .8rem; display: flex; flex-direction: column; gap: .2rem; padding: 1rem .7rem; overflow: hidden auto; border-radius: 26px; border: 1px solid var(--edge); box-shadow: var(--shadow), inset 0 1px 0 var(--edge); background: var(--glass); backdrop-filter: blur(34px) saturate(190%); -webkit-backdrop-filter: blur(34px) saturate(190%); }
nav .brand { display: flex; align-items: center; gap: .65rem; padding: 0 .3rem .9rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; }
nav .brand .logo { width: 2.1rem; height: 2.1rem; margin: 0; border-radius: .6rem; box-shadow: none; }
nav .brand .label { flex: 1; white-space: nowrap; }
nav .fold { width: 2rem; min-height: 2rem; flex: none; color: var(--text); }
nav a, nav .out { display: flex; flex: none; gap: .75rem; align-items: center; justify-content: flex-start; padding: .6rem .75rem; border: 1px solid transparent; border-radius: 13px; color: var(--text); font-weight: 500; white-space: nowrap; }
nav a svg, nav .out svg { width: 1.3em; height: 1.3em; }
nav a:hover, nav .out:hover { background: var(--fill); }
nav a { position: relative; z-index: 1; transition: color .2s; }
nav a[aria-current], nav a[aria-current]:hover { background: none; }
nav a[aria-current] svg { animation: pop .35s var(--spring); }
.glide { position: absolute; top: 0; left: 0; border-radius: 13px; background: var(--fill); border: 1px solid var(--edge); box-shadow: inset 0 1px 0 var(--edge), 0 10px 22px -14px #000a; pointer-events: none; }
.glide.ready { transition: translate .5s var(--spring), width .35s var(--spring), height .35s var(--spring); }
/* changing page, folder or month: the old one gives way, the new one follows from the matching side */
main { view-transition-name: page; }
::view-transition { pointer-events: none; }
::view-transition-old(root) { display: none; }
::view-transition-new(root) { animation: none; }
::view-transition-group(page) { animation-duration: .4s; animation-timing-function: var(--spring); }
::view-transition-old(page) { animation: leave .16s ease-in both; }
::view-transition-new(page) { animation: arrive .45s .06s var(--spring) both; }
@keyframes leave { to { opacity: 0; translate: calc(var(--way-x, 0) * -36px) calc(var(--way-y, 0) * -24px); scale: .985; } }
@keyframes arrive { from { opacity: 0; translate: calc(var(--way-x, 0) * 48px) calc(var(--way-y, 0) * 32px); scale: .985; } }
nav a[aria-current] svg { color: var(--accent-text); }
nav .out { margin-top: auto; background: none; min-height: 0; }
.section { padding: .9rem .75rem .25rem; color: var(--muted); font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.who { display: flex; align-items: center; gap: .65rem; padding: .7rem .3rem; border-block: 1px solid var(--line); }
.who .label { min-width: 0; }
.who b, .who small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who b { font-weight: 600; }
.who small { color: var(--muted); font-size: .76rem; }
.app { transition: grid-template-columns .35s var(--spring); }
@media (min-width: 761px) {
  .app.mini { grid-template-columns: 5.6rem minmax(0, 1fr); }
  .mini nav .label { display: none; }
  .mini nav .brand { flex-direction: column; padding-inline: 0; }
  .mini nav a, .mini nav .out, .mini .who { justify-content: center; padding-inline: 0; }
}
/* glass dashboard: a pane of dark glass in front of northern lights over a lake */
:root:has(.app) { color-scheme: dark; --bg: #14121c; --card: #ffffff12; --fill: #ffffff1c; --text: #f7f7fb; --muted: #cfcddb; --line: #ffffff24; --edge: #ffffff2b; --glass: #0b0f1e61; --shadow: 0 24px 60px -30px #000c; --accent: #0a74e8; --accent-text: #9bceff; --soft: #9bceff29; --danger: #ffa49d; }
.app::before { background: url(wallpaper.jpg?v=25) center / cover, #070a1d; }
:root[data-wall=sunset] .app::before { background-image: url(bg-sunset.jpg?v=25); }
:root[data-wall=space] .app::before { background-image: url(bg-space.jpg?v=25); }
:root[data-wall=calm] .app::before { background-image: url(bg-calm.jpg?v=25); }
.walls { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
@media (min-width: 60rem) { .walls { grid-template-columns: repeat(4, 1fr); } }
button.wall { flex-direction: column; gap: .45rem; padding: .4rem .4rem .55rem; border-radius: 18px; color: var(--text); }
button.wall span { width: 100%; aspect-ratio: 16 / 10; border-radius: 12px; background: url(wallpaper-klein.jpg?v=25) center / cover; }
button.wall.sunset span { background-image: url(bg-sunset-klein.jpg?v=25); }
button.wall.space span { background-image: url(bg-space-klein.jpg?v=25); }
button.wall.calm span { background-image: url(bg-calm-klein.jpg?v=25); }
button.wall[aria-pressed=true] { box-shadow: 0 0 0 2px var(--accent-text); background: var(--soft); }
.window { min-width: 0; margin: .8rem; border-radius: 26px; border: 1px solid var(--edge); background: var(--glass); box-shadow: var(--shadow), inset 0 1px 0 var(--edge); backdrop-filter: blur(3px) saturate(130%); -webkit-backdrop-filter: blur(3px) saturate(130%); }
:root:has(.app) dialog, :root:has(.app) #toast { background: #20212ef2; }
.app nav { backdrop-filter: blur(14px) saturate(150%); -webkit-backdrop-filter: blur(14px) saturate(150%); }
.app .hero { background: linear-gradient(125deg, #2dd4bf40, #3b82f633 55%, #a855f73d); border: 1px solid var(--edge); box-shadow: inset 0 1px 0 var(--edge); }
.app .card { box-shadow: inset 0 1px 0 #ffffff14, 0 18px 40px -28px #000; }
.app .pill.good, .app .icon.green { color: #6ee79a; }
.app .pill.warn, .app .icon.orange { color: #ffc261; }
.app .icon.purple { color: #d9a2ff; }
.avatar { width: 2.2rem; height: 2.2rem; flex: none; display: grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 600; background: linear-gradient(135deg, #5ac8fa, #5e5ce6); }
main { padding: 2.5rem clamp(1rem, 4vw, 3.5rem) 7rem; max-width: 76rem; width: 100%; min-width: 0; margin-inline: auto; }
main.enter > * { animation: rise .5s var(--spring) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.head { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; justify-content: space-between; margin-bottom: 1.3rem; }
.head.sub { margin: 1.8rem 0 .8rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.card { background: var(--card); border: 1px solid var(--edge); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
.hero { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-end; justify-content: space-between; margin-bottom: 1.4rem; padding: 1.8rem; border-radius: 26px; color: #fff; background: radial-gradient(30rem 16rem at 90% 0, #5ac8fa99, transparent), linear-gradient(125deg, #0a5fd1, #4b47c9 55%, #8b3fc4); box-shadow: 0 24px 50px -26px #4b47c9; }
.hero p { opacity: .85; font-size: .9rem; }
.hero h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -.025em; font-weight: 700; overflow-wrap: anywhere; }
.stats { display: flex; flex-wrap: wrap; gap: .6rem; }
.stats div { min-width: 6.2rem; padding: .65rem 1rem; border-radius: 16px; background: #ffffff21; border: 1px solid #ffffff2e; }
.stats b { display: block; white-space: nowrap; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.stats span { font-size: .78rem; opacity: .85; }
.pad.center { margin-inline: auto; max-width: 26rem; text-align: center; padding: 2rem 1.5rem; }
.pad.center label { text-align: left; }
.pad.editor-lock { max-width: none; }
.editor-lock form { width: min(20rem, 100%); margin-inline: auto; }
.row.file .actions { flex-wrap: nowrap; gap: .1rem; }
select { font: inherit; color: inherit; }
.gate .filename { font-size: 1.45rem; overflow-wrap: anywhere; }
.button.big { min-height: 3.3rem; margin-top: .3rem; color: #fff; background: linear-gradient(135deg, #0a84ff, #5e5ce6); box-shadow: 0 14px 30px -14px #0a84ff; font-size: 1.05rem; font-weight: 600; }
.gate.share form { width: min(30rem, 100%); padding: 1.2rem 1.2rem 1.4rem; }
.preview { display: grid; place-items: center; overflow: hidden; border-radius: 20px; background: var(--fill); border: 1px solid var(--line); }
.preview img { display: block; max-width: 100%; max-height: 45dvh; object-fit: contain; }
.filetile.icon { width: 100%; height: 12rem; border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; }
.filetile svg { width: 4.5rem; height: 4.5rem; stroke-width: 1.2; }
.filetile b { letter-spacing: .12em; font-size: .85rem; }
.eyebrow { margin-bottom: -.7rem; text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 600; }
.sent { text-align: left; }
.sent:not(:empty) { border-top: 1px solid var(--line); }
code { white-space: pre-wrap; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; }
.chips span { padding: .3rem .8rem; border-radius: 980px; background: var(--fill); font-size: .8rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.blank { display: grid; justify-items: center; gap: .6rem; text-align: center; margin: .8rem; padding: 3rem 1rem; border: 2px dashed var(--line); border-radius: 18px; }
.blank .logo { width: 4.2rem; height: 4.2rem; }
.blank button { margin-top: .6rem; }
.row:hover { background: var(--fill); }
.icon.green { background: #30d15826; color: #1f9d49; }
.icon.red { background: #ff453a24; color: var(--danger); }
.icon.purple { background: #bf5af226; color: #a04bd6; }
.icon.orange { background: #ff9f0a2b; color: #c97800; }
.icon.gray { background: var(--fill); color: var(--muted); }
.qr { width: min(15rem, 100%); height: auto; justify-self: center; background: #fff; border-radius: 16px; stroke: none; }
.qr path { fill: #000; stroke: none; }
summary { cursor: pointer; color: var(--accent-text); }
details code { margin: .7rem 0; }
details p { margin-top: .6rem; }
.pad { padding: 1.4rem; display: grid; gap: 1rem; align-content: start; margin-bottom: 1rem; max-width: 36rem; }
.note-line { margin: .8rem .3rem 0; }

/* lists */
.row { display: flex; align-items: center; gap: .9rem; padding: .7rem 1rem; position: relative; }
.row + .row::before { content: ""; position: absolute; top: 0; left: 4.4rem; right: 0; border-top: 1px solid var(--line); }
.row .grow { flex: 1; min-width: 0; }
.row .name { display: block; background: none; min-height: 0; border-radius: 4px; padding: 0; font-weight: 500; text-align: left; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--text); }
.icon { width: 2.5rem; height: 2.5rem; flex: none; border-radius: 11px; background: var(--soft); color: var(--accent-text); display: grid; place-items: center; font-size: 1.1rem; object-fit: cover; }
.crumbs { display: flex; flex-wrap: wrap; width: fit-content; max-width: 100%; gap: .15rem; align-items: center; margin-bottom: .8rem; padding: .25rem; border-radius: 22px; background: var(--fill); border: 1px solid var(--edge); color: var(--muted); }
.crumbs button { background: none; min-height: 2rem; padding: .25rem .8rem; color: var(--text); overflow-wrap: anywhere; }
.crumbs button:hover { background: var(--fill); }
.crumbs button[aria-current] { background: var(--soft); color: var(--accent-text); font-weight: 600; }
.crumbs > svg { width: .9em; height: .9em; }
/* the whole row opens the folder or file: the name stretches over it, the other buttons stay on top.
   No filter or transform on the name, either would shrink the stretched area back to the text */
.row.file a.name, .row.file button.name { filter: none; transform: none; }
.row.file a.name::after, .row.file button.name::after { content: ""; position: absolute; inset: 0; }
.row.file a.name:focus-visible, .row.file button.name:focus-visible { outline: 0; }
.row.file .name:focus-visible::after { outline: 3px solid var(--accent); outline-offset: -3px; border-radius: 14px; }
.row.file > button, .row.file > .actions { position: relative; z-index: 1; }
/* the bar on top of every page stays in reach while scrolling */
main > .head:not(.sub) { position: sticky; top: 0; z-index: 4; padding: .65rem .7rem .65rem 1.2rem; border-radius: 22px; background: #1d1f2e; border: 1px solid var(--edge); box-shadow: var(--shadow), inset 0 1px 0 var(--edge); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); }
main > .head:not(.sub) h1 { font-size: 1.55rem; min-width: 0; overflow-wrap: anywhere; }
.drop { outline: 2px dashed var(--accent); outline-offset: 6px; border-radius: 18px; }
progress { width: 100%; height: .4rem; accent-color: var(--accent); }

/* admin and account */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr)); gap: 1rem; }
.tiles.wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr)); align-items: start; }
.tile { display: flex; flex-direction: column; gap: .9rem; padding: 1.3rem; }
.tile > .actions { margin-top: auto; }
.tiles + .tile, .tiles + .tiles { margin-top: 1rem; }
.tile-head { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; }
.tile-head h2 { flex: 1; min-width: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.pill { padding: .15rem .65rem; border-radius: 980px; background: var(--fill); color: var(--muted); font-size: .72rem; font-weight: 600; white-space: nowrap; }
.pill.good { background: #30d15826; color: #1a8a40; }
.pill.warn { background: #ff9f0a2b; color: #a86400; }
.pill.bad { background: #ff453a24; color: var(--danger); }
.pill.blue { background: var(--soft); color: var(--accent-text); }
@media (prefers-color-scheme: dark) { .pill.good { color: #30d158; } .pill.warn { color: #ffb340; } }
.title { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; overflow-wrap: anywhere; }
.row.user .avatar { width: 2.5rem; height: 2.5rem; }
.more summary { padding: .9rem 1rem; text-align: center; border-top: 1px solid var(--line); font-weight: 500; }

/* notes */
.notes { display: grid; grid-template-columns: 18rem 1fr; gap: 1.2rem; align-items: start; }
.notes .list { max-height: 70dvh; overflow: auto; padding: .4rem; }
.notes .list button { display: block; width: 100%; border-radius: 12px; background: none; color: var(--text); text-align: left; padding: .65rem .8rem; }
.notes .list button[aria-current] { background: var(--soft); }
.notes .list span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 400; }
.search { margin-bottom: .8rem; border-radius: 980px; }
.editor { max-width: none; }
.editor input, .editor textarea { background: none; border: 0; box-shadow: none; padding: .2rem 0; }
.editor input { font-size: 1.5rem; font-weight: 700; letter-spacing: -.015em; }
.editor input:focus-visible, .editor textarea:focus-visible { outline: 0; }
.editor:focus-within { box-shadow: 0 0 0 2px var(--accent); }
.editor textarea { min-height: 50dvh; resize: vertical; line-height: 1.6; }
.editor .head { margin: 0; }

/* calendar */
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); padding: .5rem; gap: 2px; }
.month > b { text-align: center; padding: .4rem 0; font-size: .75rem; font-weight: 600; color: var(--muted); }
.day { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: .2rem; min-height: 6rem; border-radius: 12px; background: none; color: var(--text); padding: .3rem; min-width: 0; font-weight: 400; }
.day:hover { background: var(--fill); }
.day.other { color: var(--muted); opacity: .55; }
.day .num { align-self: center; width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%; font-size: 1.02rem; }
.day.today .num { color: var(--danger); font-weight: 700; }
.day[aria-pressed=true] .num { background: var(--accent); color: #fff; }
.chip { background: var(--soft); color: var(--accent-text); border-radius: 6px; padding: 0 .4rem; font-size: .75rem; font-weight: 500; text-align: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* sheets */
dialog { margin: auto; width: min(27rem, calc(100% - 2rem)); border: 0; border-radius: 24px; background: var(--card); color: var(--text); padding: 1.6rem; box-shadow: 0 30px 80px -20px #0008; transition: opacity .35s var(--spring), transform .35s var(--spring); }
@starting-style { dialog[open] { opacity: 0; transform: scale(.95); } }
dialog::backdrop { background: #0006; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
dialog img { max-width: 100%; max-height: 65dvh; display: block; margin: 0 auto 1rem; border-radius: 14px; }
code { display: block; padding: .9rem; background: var(--fill); border-radius: 12px; word-break: break-all; user-select: all; text-align: center; font-size: 1rem; }
#toast { position: fixed; left: 50%; top: 1rem; translate: -50% 0; background: var(--glass); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%); border: 1px solid var(--line); box-shadow: 0 12px 30px -12px #0005; padding: .7rem 1.2rem; border-radius: 980px; font-weight: 500; width: max-content; max-width: 90vw; z-index: 9; }
#toast:empty { display: none; }

@media (max-width: 760px) {
  .app { display: block; }
  nav { position: fixed; overflow: visible; z-index: 5; inset: auto .6rem calc(.6rem + env(safe-area-inset-bottom)) .6rem; top: auto; height: auto; margin: 0; flex-direction: row; justify-content: space-around; padding: .4rem .2rem; }
  nav .brand, nav .who, nav .section, nav .out { display: none; }
  .hero { padding: 1.3rem; }
  .stats div { min-width: 0; flex: 1; padding: .6rem .7rem; }
  .stats { width: 100%; }
  nav a { flex-direction: column; gap: .15rem; font-size: .66rem; padding: .25rem .4rem; color: var(--muted); }
  nav a svg { color: inherit; width: 1.6rem; height: 1.6rem; }
  nav a:hover { background: none; }
  nav a[aria-current] { background: none; box-shadow: none; color: var(--accent-text); }
  nav a[aria-current] svg { color: inherit; }
  .window { margin: 0; min-height: 100dvh; border: 0; border-radius: 0; }
  main { padding-top: calc(.8rem + env(safe-area-inset-top)); }
  main > .head:not(.sub) { top: env(safe-area-inset-top); padding-left: 1rem; }
  .notes { grid-template-columns: minmax(0, 1fr); }
  .notes .list { max-height: 14rem; }
  .month { padding: .3rem; }
  .day { min-height: 3.4rem; padding: .15rem; align-items: center; }
  .chip { width: .4rem; height: .4rem; padding: 0; font-size: 0; background: var(--accent); border-radius: 50%; }
  .row { gap: .65rem; padding: .7rem .75rem; }
  .row .actions { gap: .3rem; }
  .row.user { flex-wrap: wrap; }
  .row.file { flex-wrap: wrap; row-gap: .2rem; }
  .row.file .grow { flex-basis: calc(100% - 3.5rem); }
  .row.file .actions { margin-left: auto; }
  dialog { margin: auto auto 0; width: 100%; max-width: 100%; border-radius: 24px 24px 0 0; padding-bottom: calc(1.6rem + env(safe-area-inset-bottom)); }
  @starting-style { dialog[open] { opacity: 0; transform: translateY(40%); } }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) { nav, .app nav, .window, :root:has(.app) #toast { background: #1c1d28; backdrop-filter: none; -webkit-backdrop-filter: none; } }
