/* The admin looks like the program itself: same cards, tabs and controls. */
.adm { background: #07080d; }
.adm .small { font-size: 13px; }
.adm h1, .adm h2, .adm h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
.btn svg[fill='currentColor'] { fill: currentColor; stroke: none; }

.login { display: grid; place-items: center; min-height: 100vh; padding: 24px 16px; background: radial-gradient(60% 50% at 50% 0%, rgba(99, 102, 241, 0.1), transparent 70%); }
.login-card { display: flex; flex-direction: column; gap: 14px; width: min(380px, 100%); padding: 30px 28px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); }
.login-card .logo { align-self: center; }
.login-card h1 { margin-top: 4px; font-size: 20px; text-align: center; }
.login-card p { margin: -8px 0 6px; font-size: 13.5px; color: var(--muted); text-align: center; }
.input-code { font-family: var(--mono); letter-spacing: 0.32em; }
.login-card small { font-size: 12px; color: var(--muted); text-align: center; }

.top { position: sticky; top: 0; z-index: 10; background: rgba(7, 8, 13, 0.9); border-bottom: 1px solid var(--line-soft); backdrop-filter: blur(10px); }
.top-in { display: flex; align-items: center; gap: 28px; width: min(1120px, calc(100% - 32px)); height: 60px; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand b { font: 700 16px var(--font-display); }
.brand i { padding-left: 10px; font-style: normal; font-size: 13.5px; color: var(--muted); border-left: 1px solid var(--line); }
.tabs { display: flex; gap: 2px; align-self: stretch; }
.tabs button { position: relative; padding: 0 14px; font-size: 14px; color: var(--text2); cursor: pointer; background: transparent; border: 0; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--text); }
.tabs button.on::after { position: absolute; right: 12px; bottom: -1px; left: 12px; height: 2px; content: ''; background: var(--acc2); border-radius: 2px; }
.who { margin-left: auto; font: 13px var(--mono); color: var(--muted); }

.page { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 120px; }
.page section { display: flex; flex-direction: column; gap: 16px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 6px; }
.page-head h1 { font-size: 28px; }
.page-head p { margin: 6px 0 0; font-size: 14px; color: var(--text2); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.card.pad { padding: 20px; }
.card h2 { margin-bottom: 16px; font-size: 16px; }
.card-title { padding: 16px 20px 4px; font-size: 15px; font-weight: 600; }
.summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr) minmax(0, 1fr); }
.summary > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 18px 20px; }
.summary > div + div { border-left: 1px solid var(--line-soft); }
.summary small { font-size: 12.5px; color: var(--muted); }
.summary b { font-size: 18px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.summary span { font-size: 13px; color: var(--text2); }
.link { align-self: flex-start; padding: 0; font-size: 13px; color: var(--acc-text); cursor: pointer; background: none; border: 0; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; font-size: 13.5px; border-collapse: collapse; }
.table th { padding: 12px 20px 8px; font-size: 12px; font-weight: 500; color: var(--muted); text-align: left; white-space: nowrap; }
.table td { padding: 12px 20px; color: var(--text2); white-space: nowrap; border-top: 1px solid var(--line-soft); }
.table td.v { font: 600 14px var(--mono); color: var(--text); }
.table td.m { font-family: var(--mono); font-size: 12.5px; }
.table td.act { text-align: right; }
.table td.act .btn + .btn { margin-left: 6px; }
.table td.wrap { white-space: normal; }
.glyphs { display: inline-flex; gap: 8px; color: var(--text); }
.glyphs svg { width: 15px; height: 15px; }
.glyphs .no { opacity: 0.22; }

.now { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.now small { display: block; margin-bottom: 4px; font-size: 12.5px; color: var(--muted); }
.now b { font-size: 16px; font-weight: 600; }
.now + p { margin: 12px 0 0; }

.steps { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.step { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.step:first-child { border-top: 0; padding-top: 0; }
.step-n { display: grid; place-items: center; width: 30px; height: 30px; font-size: 13px; font-weight: 600; color: var(--text2); background: var(--tint); border: 1px solid var(--line); border-radius: 50%; }
.step.done .step-n { color: #05261b; background: var(--ok); border-color: transparent; font-size: 0; }
.step.done .step-n::before { content: '✓'; font-size: 14px; }
.step-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.step-body > b { font-size: 14.5px; font-weight: 600; }
.step-body > span { max-width: 720px; font-size: 13.5px; line-height: 1.55; color: var(--text2); }
.step-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.step-row .input { flex: 1; min-width: 220px; max-width: 420px; }
.step.wait .step-body > b, .step.wait .step-body > span { opacity: 0.55; }
.field-error { margin-top: 4px; font-size: 12.5px; color: var(--bad); }

/* Drawer: a click beside it does not close it. */
.drawer { position: fixed; inset: 0; z-index: 50; }
.drawer-shade { position: absolute; inset: 0; background: rgba(4, 5, 10, 0.62); animation: fade 200ms ease; }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; width: min(520px, 100%); background: #0e1018; border-left: 1px solid var(--line); animation: slide 240ms ease; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; height: 60px; padding: 0 16px 0 22px; border-bottom: 1px solid var(--line-soft); }
.drawer-head h2 { font-size: 17px; }
.icon-btn { display: grid; place-items: center; width: 34px; height: 34px; color: var(--text2); cursor: pointer; background: transparent; border: 0; border-radius: 9px; }
.icon-btn:hover { color: var(--text); background: var(--tint); }
.icon-btn svg { width: 16px; height: 16px; }
.drawer-body { display: flex; flex: 1; flex-direction: column; gap: 18px; padding: 22px; overflow-y: auto; }
.drawer-foot { display: flex; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line-soft); }
.grow { flex: 1; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px; color: var(--text2); cursor: pointer; background: var(--sunken); border: 1.5px dashed var(--line-strong); border-radius: var(--r-md); transition: border-color 150ms ease, background 150ms ease; }
.drop:hover { background: rgba(99, 102, 241, 0.06); border-color: rgba(139, 140, 255, 0.5); }
.drop svg { width: 22px; height: 22px; color: var(--acc-text); }
.drop b { font-size: 14px; font-weight: 600; color: var(--text); }
.drop span { font-size: 12.5px; color: var(--muted); }
.drop.small { flex-direction: row; justify-content: center; padding: 10px; }
.drop.small svg { width: 16px; height: 16px; }
.drop.small span { display: none; }
.drop.small b { font-size: 13px; font-weight: 500; color: var(--text2); }
.files { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-md); }
.file { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 11px 12px; }
.file + .file { border-top: 1px solid var(--line-soft); }
.file-ico { display: grid; grid-row: span 2; place-items: center; width: 32px; height: 32px; color: var(--text2); background: var(--tint); border-radius: 8px; }
.file-ico svg { width: 15px; height: 15px; }
.file b { overflow: hidden; font: 500 13px var(--mono); color: var(--text); text-overflow: ellipsis; white-space: nowrap; }
.file small { grid-column: 2; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .pill { grid-row: span 2; }
.file .bar { grid-column: 2 / -1; height: 3px; overflow: hidden; background: var(--tint); border-radius: 2px; }
.file .bar i { display: block; width: 0; height: 100%; background: var(--acc-text); transition: width 500ms ease; }
.file.missing b, .file.missing small, .file.missing .file-ico { opacity: 0.5; }
.file-error { grid-column: 2 / -1; margin-top: 6px; font-size: 12.5px; line-height: 1.45; color: var(--bad); }
.from-sig { display: grid; grid-template-columns: auto auto 1fr; gap: 4px 22px; align-items: end; padding: 12px 14px; background: var(--tint); border-radius: var(--r-md); }
.from-sig small { display: block; font-size: 12px; color: var(--muted); }
.from-sig b { font-size: 15px; }
.from-sig p { margin: 0; font-size: 12px; color: var(--muted); }
.field-top { display: flex; align-items: center; justify-content: space-between; }
.seg { display: inline-flex; padding: 2px; background: var(--sunken); border: 1px solid var(--line); border-radius: 9px; }
.seg button { height: 26px; padding: 0 10px; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; background: transparent; border: 0; border-radius: 7px; }
.seg button.on { color: var(--text); background: var(--hover); }
.hint { font-size: 12px; color: var(--muted); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px; background: var(--tint); border-radius: var(--r-md); cursor: pointer; }
.switch-row b { display: block; font-size: 14px; font-weight: 600; }
.switch-row span { font-size: 12.5px; color: var(--text2); }

.dialog { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(4, 5, 10, 0.62); animation: fade 160ms ease; }
.dialog-card { width: min(440px, 100%); padding: 22px; background: #11131c; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.9); }
.dialog-card h3 { font-size: 17px; }
.dialog-card p { margin: 10px 0 20px; font-size: 14px; line-height: 1.55; color: var(--text2); }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; }

@media (max-width: 860px) {
  .top-in { gap: 14px; }
  .brand i, .who { display: none; }
  .tabs { overflow-x: auto; scrollbar-width: none; }
  .tabs button { flex: none; }
  #logout { margin-left: auto; }
  .summary { grid-template-columns: 1fr; }
  .summary > div + div { border-top: 1px solid var(--line-soft); border-left: 0; }
}
@media (max-width: 560px) {
  .drawer-foot { flex-wrap: wrap; }
  .drawer-foot .grow { display: none; }
  .drawer-foot .btn { flex: 1; }
}

/* Downloads: a figure with a month of days under it. */
.dls { position: relative; }
.dls-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.dls-top span { font-size: 12px; color: var(--text2); }
.dls-num { display: flex; align-items: baseline; gap: 10px; }
.dls-num span { font-size: 12.5px; color: var(--text2); }
.dls-chart { display: flex; align-items: flex-end; gap: 3px; height: 46px; margin-top: 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.dls-chart i { position: relative; display: flex; flex: 1; align-items: flex-end; justify-content: center; height: 100%; cursor: default; }
.dls-chart i::before { width: min(100%, 12px); height: var(--h); min-height: 2px; content: ''; background: #7477f0; border-radius: 3px 3px 0 0; transition: background 120ms ease; }
.dls-chart i.zero::before { background: rgba(255, 255, 255, 0.1); }
.dls-chart i:hover::before, .dls-chart i.on::before { background: #a5b4fc; }
.dls-tip { position: absolute; z-index: 3; padding: 6px 9px; font-size: 12px; white-space: nowrap; pointer-events: none; background: var(--raised); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.9); transform: translate(-50%, -100%); }
.dls-tip b { font-family: var(--mono); font-weight: 600; }
.dls-note { margin-top: 6px; font-size: 11.5px !important; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.table td .num { display: block; font: 600 13.5px var(--mono); color: var(--text); }
.table td .sub { display: block; font-size: 11.5px; color: var(--muted); }

/* First sign-in: the authenticator and the spare codes. */
.link.center { align-self: center; }
.login-card small.left { text-align: left; }
.qr { align-self: center; padding: 10px; line-height: 0; background: #fff; border-radius: 12px; }
.secret { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; background: var(--sunken); border: 1px solid var(--line); border-radius: 10px; }
.secret span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.secret code { flex: 1; font: 600 13px var(--mono); letter-spacing: 0.02em; white-space: nowrap; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px; background: var(--sunken); border: 1px solid var(--line); border-radius: 12px; }
.codes span { font-size: 14px; text-align: center; letter-spacing: 0.04em; }

/* New release: the fields of release.json and its signature. */
.file { grid-template-columns: 32px minmax(0, 1fr) auto auto; }
.file .icon-btn { grid-row: span 2; width: 30px; height: 30px; }
.file .icon-btn svg { width: 14px; height: 14px; }
.file-actions { display: flex; flex-wrap: wrap; grid-column: 2 / -1; gap: 8px; margin-top: 10px; }
.from-sig { grid-template-columns: auto auto; justify-content: start; }
.from-sig label { display: flex; flex-direction: column; gap: 4px; }
.from-sig .input { width: 170px; height: 34px; font-size: 14px; }
.from-sig p { grid-column: 1 / -1; margin-top: 4px; }
.drawer-body .hint code { font: 11.5px var(--mono); color: var(--text2); word-break: break-word; }
.secret code { white-space: normal; }
.drop.over { background: rgba(99, 102, 241, 0.06); border-color: rgba(139, 140, 255, 0.5); }
.drawer-body > * { flex-shrink: 0; }
