:root {
  color-scheme: light;
  --bg: #f3f4f9;
  --surface: #ffffff;
  --ink: #191b30;
  --muted: #585e75;
  --line: #e5e6f0;
  --accent: #5941cf;
  --accent-deep: #4932b4;
  --accent-light: #eeebff;
  --success: #087651;
  --danger: #ad2f4a;
  --radius: 1.125rem;
  --shadow: 0 12px 28px -24px #24234d52, 0 1px 2px #20204b06;
  font-family: Inter, "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

*, *::before, *::after { box-sizing: border-box }
body { margin: 0; min-width: 19.5rem }
a { color: var(--accent-deep); text-decoration: none }
a:hover { text-decoration: underline }
button, input, select, textarea { font: inherit }
button { cursor: pointer }
button:disabled { opacity: .55; cursor: wait }
:focus-visible { outline: 3px solid #8a73ed; outline-offset: 3px }
[hidden] { display: none !important }
h1, h2, p, dl, dd { margin: 0 }
h1, h2 { line-height: 1.15 }
h1 { font-size: clamp(1.9rem, 3.3vw, 2.65rem); font-weight: 760; letter-spacing: -.05em }
h2 { font-size: 1.13rem; font-weight: 735; letter-spacing: -.023em }
small { font-size: .875rem }
code { font-family: "IBM Plex Mono", monospace; font-size: .9em }
.muted { color: var(--muted) }

.layout { display: grid; grid-template-columns: 14.5rem minmax(0, 1fr); min-height: 100svh }
.sidebar {
  display: flex; flex-direction: column; gap: 2.5rem; position: sticky; top: 0; height: 100svh; z-index: 2;
  background: radial-gradient(circle at -15% 0, #262548, transparent 52%), #181827;
  padding: 1.65rem 1.1rem 1.05rem; color: #f7f4ff;
}
.brand { display: inline-flex; align-items: center; gap: .72rem; width: fit-content; color: inherit }
.brand:hover { text-decoration: none }
.sidebar .brand { margin-left: .37rem }
.brand strong, .brand small, .side-host strong, .side-host small { display: block }
.brand strong { font-size: 1.125rem; font-weight: 760; letter-spacing: -.045em }
.brand small, .side-host small { color: #b6b3ca; font-size: .84rem }
.brand.light small { color: var(--muted) }
.brand-mark {
  display: grid; align-content: center; justify-items: center; gap: 3px;
  width: 2.5rem; height: 2.5rem; border-radius: .79rem; flex: none;
  background: linear-gradient(155deg, #b59aff 0%, #805cf0 65%, #6443d0);
  box-shadow: inset 0 1px 2px #e5d5ffa8, 0 6px 13px #38248335;
}
.brand-mark i { display: block; height: 3px; width: 1rem; background: #fff; border-radius: 3px; transform: skewX(-18deg) }
.brand-mark i:nth-child(2) { width: .78rem; margin-left: .18rem; opacity: .83 }
.brand-mark i:nth-child(3) { width: .52rem; margin-left: .4rem; opacity: .64 }
.nav { display: grid; gap: .35rem }
.nav a {
  display: flex; align-items: center; gap: .75rem; padding: .73rem .81rem;
  border: 1px solid transparent; border-radius: .75rem; color: #c7c4da; font-size: .9375rem; font-weight: 600;
}
.nav a:hover { background: #ffffff0d; color: #fff; text-decoration: none }
.nav a[aria-current] { background: #38305c; border-color: #4d4276; color: #f5f0ff }
.icon { width: 1rem; height: 1rem; position: relative; display: inline-block; flex: none }
.icon.overview { border: 1.5px solid currentColor; border-radius: .23rem; background: linear-gradient(currentColor,currentColor) center 50%/100% 1px no-repeat, linear-gradient(currentColor,currentColor) center center/1px 100% no-repeat }
.icon.folder { border: 1.5px solid currentColor; border-radius: .2rem; height: .69rem; margin-top: .25rem }
.icon.folder::before { content: ""; position: absolute; top: -.27rem; left: -1.5px; width: .48rem; height: .28rem; border: 1.5px solid currentColor; border-bottom: 0; border-radius: .15rem .18rem 0 0 }
.icon.link { transform: rotate(-42deg); border: 1.5px solid currentColor; width: .99rem; height: .54rem; border-radius: .5rem }
.icon.link::before { content: ""; position: absolute; left: 45%; top: 0; width: 1px; height: 100%; background: currentColor }
.icon.document { height: .98rem; width: .78rem; border: 1.5px solid currentColor; border-radius: .16rem; background: repeating-linear-gradient(to bottom,currentColor 0 1px,transparent 1px 3px) center 65%/.36rem .32rem no-repeat }
.icon.person::before { content: ""; position: absolute; left: .32rem; top: .03rem; width: .42rem; height: .42rem; border: 1.5px solid currentColor; border-radius: 100% }
.icon.person::after { content: ""; position: absolute; left: .15rem; top: .53rem; width: .76rem; height: .43rem; border: 1.5px solid currentColor; border-radius: .65rem .65rem .22rem .22rem }
.sidebar-end { display: grid; gap: .35rem; margin-top: auto }
.side-host {
  display: flex; align-items: center; gap: .65rem; padding: .65rem; border: 1px solid #ffffff15;
  border-radius: .75rem; background: #ffffff08; font-size: .93rem;
}
.host-mark { border-radius: .5rem; padding: .23rem .45rem; background: #ffffff14; color: #cbb8ff; font-size: 1.05rem }
.side-logout { width: 100%; background: none; color: #c7c4da; border: 0; text-align: left; padding: .65rem; border-radius: .5rem; font-size: .875rem }
.side-logout:hover { background: #ffffff0d; color: white }

.topbar {
  height: 4.3rem; padding: 0 clamp(1.15rem, 3.2vw, 3.3rem); background: var(--surface);
  border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.breadcrumb, .account { display: flex; align-items: center; gap: .65rem; font-size: .92rem }
.breadcrumb span, .breadcrumb b { color: var(--muted) }
.breadcrumb b { font-weight: 450; opacity: .58 }
.account { font-weight: 650; overflow: hidden }
.account span:last-child { overflow: hidden; text-overflow: ellipsis }
.avatar { display: grid; place-items: center; width: 2rem; height: 2rem; flex: none; color: var(--accent-deep); background: var(--accent-light); border-radius: .65rem; font-size: .93rem; font-weight: 780 }
.content { max-width: 92rem; margin: 0 auto; padding: 2rem clamp(1.15rem, 3.2vw, 3.3rem) 3.2rem }
.page-title { display: flex; justify-content: space-between; align-items: end; gap: 1.15rem; margin-bottom: 1.6rem }
.page-title p { color: var(--muted); margin-top: .45rem; font-size: 1rem }
.actions, .row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem }
.actions { justify-content: flex-end }
.btn {
  display: inline-flex; justify-content: center; align-items: center; gap: .35rem; min-height: 2.62rem;
  padding: .45rem .9rem; border-radius: .65rem; border: 1px solid transparent;
  font-weight: 655; font-size: .9rem; line-height: 1.25; text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none }
.btn.primary { background: var(--accent); color: white; box-shadow: 0 2px 6px #5941cf25 }
.btn.primary:hover { background: var(--accent-deep) }
.btn.secondary { border-color: #dedfec; background: white; color: #343650; box-shadow: 0 1px 2px #24234d0b }
.btn.secondary:hover, .btn.ghost:hover { border-color: #cfc6f8; background: #f6f3ff }
.btn.ghost { color: var(--accent-deep); background: transparent }
.btn.small { min-height: 2.25rem; padding: .3rem .66rem; font-size: .875rem }
.btn.danger { background: var(--danger); color: white }
.btn.danger:hover { background: #932742 }
.danger-text, .btn.danger-text { color: var(--danger) }
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .25rem .64rem;
  border-radius: 2rem; white-space: nowrap; font-size: .875rem; font-weight: 630; min-height: 1.8rem;
}
.pill i { width: .42rem; height: .42rem; border-radius: 50%; background: currentColor }
.pill.good { background: #def6ec; color: #096647 }
.pill.warning { background: #fdf0e1; color: #87510e }
.pill.neutral { background: #eff0f6; color: #5a5d75 }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0 }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem }
.metric { padding: 1.1rem 1.18rem .86rem; overflow: hidden }
.violet { --metric-color: #694fd7; --metric-soft: #eee9ff }
.blue { --metric-color: #3971c5; --metric-soft: #e7efff }
.green { --metric-color: #148767; --metric-soft: #e1f5ed }
.metric-top { display: flex; align-items: center; gap: .64rem }
.metric-top h2 { font-size: .94rem; letter-spacing: 0; color: #42445e }
.metric-icon {
  width: 2rem; height: 2rem; display: inline-grid; place-items: center; border-radius: .6rem; flex: none;
  background: var(--metric-soft, #eee9ff); color: var(--metric-color, #694fd7); font-size: 1.08rem; font-weight: 720;
}
.metric-value { font-size: 2.25rem; line-height: 1; font-weight: 780; letter-spacing: -.065em; font-variant-numeric: tabular-nums; margin-top: .75rem }
.metric-value small { color: var(--muted); margin-left: .12rem; font-weight: 650 }
.plot { display: block; width: 100%; height: 2.85rem; color: var(--metric-color); margin: .28rem 0 .14rem }
.metric p { font-size: .875rem; color: var(--muted) }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1rem; margin-bottom: 1rem }
.overview-grid > .card, .form-card, .link-result, .guide-card { padding: 1.15rem 1.25rem }
.card-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .6rem; margin-bottom: .9rem }
.release-banner {
  position: relative; isolation: isolate; overflow: hidden; min-height: 5.8rem;
  display: flex; align-items: flex-end; justify-content: space-between; gap: .5rem;
  background: linear-gradient(112deg, #3f287c, #5b43ab 60%, #7054c5);
  border-radius: .82rem; padding: .78rem .95rem; color: #fff;
}
.release-label { color: #ede6ff; font-size: .875rem; font-weight: 600 }
.release-number { font-size: 2.06rem; line-height: 1.06; letter-spacing: -.07em; font-weight: 790; margin-top: .1rem }
.release-details { display: flex; flex-wrap: wrap; justify-content: end; gap: .42rem; color: #fff; font-size: .875rem }
.release-details span { border: 1px solid #ffffff42; background: #22135342; border-radius: .5rem; padding: .15rem .45rem }
.release-orbit, .release-orbit::before, .release-orbit::after { position: absolute; border: 1px solid #f4e9ff3c; border-radius: 50% }
.release-orbit { width: 26rem; height: 11rem; top: -5.1rem; right: -7.1rem; z-index: -1; transform: rotate(-28deg) }
.release-orbit::before { content: ""; inset: .6rem }
.release-orbit::after { content: ""; inset: 1.2rem }
.release-hashes { display: flex; gap: 1.2rem; margin: .7rem 0; flex-wrap: wrap }
.release-hashes div { display: inline-flex; align-items: center; gap: .45rem; min-width: 0 }
.release-hashes dt { color: var(--muted); font-size: .875rem; font-weight: 650 }
.release-hashes code { background: #f1f1f8; color: #45436b; padding: .18rem .4rem; border-radius: .35rem; white-space: nowrap }
.check-grid { display: flex; flex-wrap: wrap; gap: .7rem; padding-top: .7rem; border-top: 1px solid var(--line) }
.check { display: flex; align-items: center; flex: 1 1 7rem; gap: .45rem }
.check span:nth-child(2), .check small { display: block }
.check strong { font-size: .86rem; white-space: nowrap }
.check small { color: var(--muted); font-size: .82rem }
.check-icon { display: grid; place-items: center; width: 1.55rem; height: 1.55rem; border-radius: .46rem; color: #595a73; background: #eeeeF6; font-weight: 760; flex: none }
.check-icon.ok { background: #e0f5eb; color: #087651 }
.check-icon.bad { background: #fde9ef; color: #a32c47 }
.error-item { min-height: 3.45rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .52rem 0; border-top: 1px solid var(--line) }
.error-item strong, .error-item small { display: block }
.error-item strong { font-size: .95rem }
.error-item small, .card-foot { color: var(--muted); font-size: .875rem }
.error-item .count { font-size: 1.55rem; font-weight: 760; color: #332c55; font-variant-numeric: tabular-nums }
.card-foot { margin-top: .8rem }
.services { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 .85rem }
.services > div { display: flex; align-items: center; justify-content: space-between; gap: .4rem; flex-wrap: wrap; border-top: 1px solid var(--line); padding: .55rem 0; font-size: .9rem }
.services .pill { padding: .12rem .48rem; min-height: 1.5rem }
.storage-meter { display: flex; align-items: baseline; gap: .45rem; color: var(--muted); margin: .28rem 0 .5rem }
.storage-meter strong { color: #322957; font-size: 1.55rem; letter-spacing: -.05em }
progress { display: block; width: 100%; height: .6rem; border: 0; border-radius: 1rem; overflow: hidden; appearance: none; color: var(--accent); background: #edeafb }
progress::-webkit-progress-bar { background: #edeafb }
progress::-webkit-progress-value { background: linear-gradient(90deg, #8e74f0, #5f47d0); border-radius: 1rem }
progress::-moz-progress-bar { background: #7456d9 }

.split-grid, .guide-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem }
.form-card { display: flex; flex-direction: column }
.form-card .form { flex: 1 }
.form-card .form button { margin-top: auto; align-self: start }
.files-card { padding: 0 }
.file-controls, .path-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .8rem; padding: .92rem 1.12rem }
.path-bar { justify-content: flex-start; border-top: 1px solid var(--line); padding: .55rem 1.12rem; font-size: .875rem }
.path-bar span { margin-left: auto }
.segments, .file-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem }
.segments { border-radius: .7rem; background: #f2eff9; padding: .2rem }
.segments a { padding: .36rem .65rem; border-radius: .52rem; font-size: .9rem; font-weight: 650; color: #4d4f69 }
.segments a[aria-current] { color: var(--accent-deep); background: #fff; box-shadow: 0 1px 4px #2d254e1b }
.segments a:hover { text-decoration: none; color: var(--accent-deep) }
input, select, textarea {
  width: 100%; border: 1px solid #d8d9e9; border-radius: .6rem; padding: .54rem .65rem; color: var(--ink); background: #fff;
}
input::placeholder, textarea::placeholder { color: #686e85 }
input.search { width: min(12.5rem, 100%); line-height: 1.3; font-size: .9rem }
textarea { resize: vertical }
select {
  appearance: none;
  background: linear-gradient(45deg, transparent 50%, #686184 50%) right .95rem center/.29rem .29rem no-repeat,
              linear-gradient(135deg, #686184 50%, transparent 50%) right .67rem center/.29rem .29rem no-repeat, #fff;
  padding-right: 2rem;
}
.table-wrap { overflow-x: auto }
.file-table { border-collapse: collapse; width: 100%; text-align: left; font-size: .9rem }
.file-table th, .file-table td { padding: .67rem .87rem; border-top: 1px solid var(--line); vertical-align: top }
.file-table th { background: #f8f7fb; color: #53566d; font-size: .875rem; font-weight: 695 }
.file-table th:first-child, .file-table td:first-child { padding-left: 1.12rem; width: 49% }
.file-table th.last, .file-table td.last { padding-right: 1.12rem; text-align: right }
.file-table td:nth-child(n + 2) { white-space: nowrap }
.file-name { display: inline-flex; align-items: center; gap: .55rem; color: #343250; font-weight: 630; overflow-wrap: anywhere }
.file-name .icon { color: var(--accent) }
.row-actions { justify-content: flex-end; flex-wrap: nowrap }
.file-menu { text-align: right }
.file-menu summary { list-style: none; border: 1px solid var(--line); border-radius: .55rem; min-width: 2rem; padding: .3rem .45rem; color: #43425f; cursor: pointer; font-weight: 760 }
.file-menu summary::-webkit-details-marker { display: none }
.file-menu > div { display: grid; text-align: left; margin-top: .35rem; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: .55rem; background: #fff }
.file-menu button { padding: .24rem 0; background: none; border: 0; text-align: left; font-size: .875rem }
.file-menu a { padding: .24rem 0; font-size: .875rem }
.empty-inline { color: var(--muted); font-size: .92rem; padding: 1rem 1.12rem }
.release-card .empty-inline, .storage-card .empty-inline { padding: .2rem 0 .8rem }
.shares-panel { margin-top: 1rem }
.shares-panel > .card-head { padding: .95rem 1.12rem 0 }
.accounts-result { margin-bottom: 1rem }
.stack { display: grid; gap: .78rem }
.form label, .link-result label { display: grid; gap: .3rem; color: #3c3d56; font-size: .92rem; font-weight: 630 }
.link-result { margin-top: 1rem }
.copy-row { display: flex; gap: .5rem }
.copy-row input { min-width: 0; font-size: .845rem }
.form-status { min-height: 1.2rem; font-size: .88rem; color: var(--muted) }
.form-status.problem, .notice.error { color: var(--danger) }
.notice { font-size: .91rem; padding: .55rem .65rem; background: #faedf2; border-radius: .6rem }
.toast { position: fixed; bottom: 1.3rem; right: 1.4rem; max-width: 25rem; padding: .7rem .9rem; z-index: 5; color: #fff; background: #27213f; border-radius: .72rem; box-shadow: 0 6px 22px #25203935; font-size: .92rem }
.dialog { width: min(29rem, 92vw); padding: 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); background: white; box-shadow: 0 22px 80px #2421234d }
.dialog::backdrop { background: #201a37a1 }
.dialog header { display: flex; justify-content: space-between; align-items: center; gap: .7rem; margin-bottom: .85rem }
.dialog .close { border: 0; background: #f0edf8; color: #473569; border-radius: .52rem; width: 2rem; height: 2rem; font-size: 1.2rem }
.drop-zone { position: relative; min-height: 6.4rem; align-content: center; justify-items: center; text-align: center; padding: .8rem; border: 1px dashed #bcb1ea; border-radius: .75rem; background: #f8f6ff }
.drop-zone small { color: var(--muted); font-weight: 450 }
.drop-zone input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer }
.drop-zone:focus-within { outline: 3px solid #8a73ed; outline-offset: 2px }
.upload-list { max-height: 8rem; overflow: auto; margin: 0; padding-left: 1.2rem; color: var(--muted); font-size: .88rem }
.guide-card { display: grid; align-content: start; gap: .62rem }
.guide-card p, .guide-card li { color: #565a71; font-size: .95rem }
.guide-card ol { margin: 0; padding-left: 1.2rem }
.guide-card ol li + li { margin-top: .3rem }
.config-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .42rem }
.config-list li { display: grid; gap: .15rem; overflow-wrap: anywhere }
.config-list strong { color: var(--ink); font-size: .9rem }
.guide-card pre { margin: .05rem 0; padding: .55rem .7rem; overflow: auto; border-radius: .57rem; background: #f1f0f7; color: #3e335f; font-size: .89rem }
.blue-mark { --metric-color: #3971c5; --metric-soft: #e7efff }
.green-mark { --metric-color: #148767; --metric-soft: #e1f5ed }

.public-shell { min-height: 100svh }
.public-top { padding: 1rem max(1.2rem,calc((100vw - 62rem) / 2)); border-bottom: 1px solid var(--line); background: white }
.public-content { max-width: 64rem; margin: 0 auto; padding: 2.4rem 1rem }
.center-screen { display: grid; place-items: center; min-height: 100svh; padding: 1rem; background: radial-gradient(circle at 20% 12%,#ece5ff 0,transparent 40%),radial-gradient(circle at 80% 82%,#e3eefb 0,transparent 37%),var(--bg) }
.auth-card { width: min(27rem, 100%); border: 1px solid #e2dcf0; border-radius: 1.32rem; background: white; padding: clamp(1.1rem, 5vw, 2rem); box-shadow: 0 20px 75px #49357720; display: grid; gap: 1.05rem }
.auth-card h1 { margin-top: .2rem; font-size: 1.95rem }
.auth-card .form .btn { margin-top: .2rem; padding: .62rem }
.receiver p { color: var(--muted) }

@media (max-width: 70rem) {
  .layout { grid-template-columns: 12rem minmax(0,1fr) }
  .overview-grid { grid-template-columns: minmax(0,1.32fr) minmax(0,1fr) }
  .services { grid-template-columns: 1fr }
}
@media (max-width: 56rem) {
  .layout { display: block }
  .sidebar { position: static; height: auto; display: grid; grid-template-columns: 1fr auto; gap: .65rem; padding: .86rem 1rem .65rem }
  .sidebar .brand { margin: 0 }
  .nav { grid-row: 2; grid-column: 1 / -1; display: flex; overflow-x: auto; gap: .3rem }
  .nav a { flex: none; gap: .4rem; padding: .5rem .64rem; font-size: .875rem }
  .sidebar-end { align-self: center; display: block; margin: 0 }
  .side-host { display: none }
  .side-logout { border: 1px solid #ffffff25; padding: .37rem .6rem }
  .topbar { height: 3.25rem }
  .content { padding-top: 1.4rem }
}
@media (max-width: 41rem) {
  .page-title { align-items: start; flex-direction: column; gap: .7rem; margin-bottom: 1rem }
  .actions { justify-content: start }
  .metrics { gap: .4rem }
  .metric { padding: .62rem .55rem }
  .metric-top { gap: .25rem; flex-wrap: wrap }
  .metric-top h2 { font-size: .855rem }
  .metric .metric-icon { display: none }
  .metric-value { font-size: 1.65rem; margin-top: .55rem }
  .metric p { font-size: .82rem }
  .plot { height: 2rem }
  .overview-grid, .split-grid, .guide-grid { grid-template-columns: 1fr; gap: .65rem }
  .table-wrap .file-table { min-width: 29rem }
  .public-content { padding-top: 1.35rem }
  .copy-row { flex-wrap: wrap }
}
