:root {
  --ink:#17191c;
  --muted:#626b75;
  --paper:#f7f8fa;
  --line:#d9dfe7;
  --accent:#2458d3;
  --danger:#a52b35;
  --space:24px;
  --control:44px;
  --control-font:14px;
  --control-line:20px;
  --control-width-small:160px;
  --control-width-medium:320px;
  --control-width-large:440px;
  --panel-width:520px;
  --captcha-width:240px;
  font-family:
    Inter,
    system-ui,
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 14px;
  line-height: 1.625;
  -webkit-font-smoothing: antialiased;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
button,
input,
select {
  font: inherit;
}
button,
.button {
  min-height: var(--control);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: white;
  text-decoration: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .15em;
  text-transform: uppercase;
  line-height: var(--control-line);
  transition: opacity 300ms;
}
button:disabled {
  opacity: .5;
  cursor: wait;
}
button:hover,
.button:hover {
  opacity: .85;
}
button.secondary,
.button.secondary {
  background: white;
  color: var(--ink);
  border-color: var(--line);
}
button.subtle {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}
input,
select {
  height: var(--control);
  min-height: var(--control);
  font-size: var(--control-font);
  line-height: var(--control-line);
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: white;
  max-width: 100%;
  width: 100%;
  border-radius: 0;
  color: var(--ink);
}
input[type=checkbox] {
  width: 20px;
  height: 20px;
  min-height: 20px;
  accent-color: var(--accent);
}
label {
  font-weight: 500;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  padding: 40px 26px;
  background: white;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.brand {
  font-size: 19px;
  letter-spacing: .2em;
  font-weight: 300;
  text-decoration: none;
  white-space: nowrap;
}
.sidebar > p {
  font-size: 12px;
  margin: 0;
}
.sidebar nav {
  display: grid;
  gap: 8px;
  margin-top: 36px;
}
.sidebar nav a {
  padding: 12px 16px;
  text-decoration: none;
  min-height: 44px;
}
.sidebar nav a.selected {
  background: #edf2ff;
  color: #2149a3;
  border-left: 2px solid var(--accent);
}
.safety {
  margin-top: auto;
  padding-top: 40px;
  font-size: 12px;
}
.safety p {
  color: var(--muted);
}
main {
  max-width: 1440px;
  width: 100%;
  padding: 24px 48px 60px;
  min-width: 0;
}
.pilot {
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin: 0 0 36px;
}
h1 {
  font-size: 36px;
  line-height: 1.2;
  font-weight: 300;
  letter-spacing: -.025em;
  margin: 12px 0 24px;
}
h2 {
  font-size: 24px;
  font-weight: 300;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}
.page-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.page-top h1 {
  margin-bottom: 20px;
}
.page-top button {
  flex-shrink: 0;
}
.toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  margin: 12px 0 24px;
}
.toolbar select {
  width: min(100%, var(--control-width-medium));
}
.storage-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: white;
  border: 1px solid var(--line);
  gap: 20px;
}
.storage-card p {
  margin: 4px 0;
}
.storage-card #capacity {
  font-size: 21px;
  font-weight: 300;
}
.dropzone {
  margin: 24px 0;
  border: 1px dashed #aeb9c9;
  text-align: center;
  padding: 28px;
  background: #f0f3f9;
}
.dropzone.drag {
  border-color: var(--accent);
  background: #e4ecff;
}
.upload-symbol {
  font-size: 30px;
  color: var(--accent);
}
.upload-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
}
.file-input:focus-visible + label {
  outline: 3px solid var(--accent);
}
.destination {
  max-width: var(--control-width-large);
  margin: 24px auto 0;
  display: grid;
  gap: 8px;
  text-align: left;
}
.destination label {
  font-size: 12px;
}
.list-tools {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin: 28px 0 20px;
}
.list-tools > div {
  max-width: var(--control-width-large);
  width: 100%;
}
.list-tools input[type=search] {
  margin-top: 8px;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  white-space: nowrap;
}
.file-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  background: white;
  padding: 20px;
  border: 1px solid var(--line);
  border-bottom: 0;
}
.file-row:last-child {
  border-bottom: 1px solid var(--line);
}
.file-info {
  min-width: 0;
  overflow-wrap: anywhere;
}
.file-info strong {
  font-weight: 500;
}
.file-info p {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 0;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.actions button,
.actions a {
  padding: 8px 12px;
  font-size: 11px;
}
.file-row p {
  margin: 6px 0;
}
.file-row > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.auth-card {
  max-width: var(--panel-width);
  margin: 60px auto;
  background: white;
  border: 1px solid var(--line);
  padding: 36px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}
.stack > button {
  margin-top: 14px;
}
.stack input + label {
  margin-top: 10px;
}
.compact {
  max-width: var(--control-width-large);
}
.password-field {
  position: relative;
}
.password-field input {
  padding-right: 52px;
}
.password-field .eye {
  position: absolute;
  right: 0;
  top: 0;
  background: transparent;
  color: var(--ink);
  border: 0;
  padding: 8px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
}
.alert {
  padding: 16px;
  border: 1px solid #8db89c;
  background: #eef8f1;
  margin-bottom: 20px;
}
.error {
  color: var(--danger);
  background: #fff0f1;
  border-color: #dfaab0;
}
#status {
  overflow-wrap: anywhere;
  min-height: 24px;
}
progress {
  width: 100%;
  height: 8px;
  accent-color: var(--accent);
}
dialog {
  border: 1px solid var(--line);
  padding: 28px;
  max-width: min(600px, calc(100% - 32px));
  width: 100%;
  max-height: 85vh;
  overflow: auto;
}
dialog::backdrop {
  background: #10182b80;
}
dialog .stack {
  margin-top: 0;
}
.cards {
  margin-top: 30px;
}
.version {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.version:last-child {
  margin-bottom: 24px;
}
#token {
  font-family: monospace;
  margin: 16px 0 24px;
}
body:has(dialog[open]) {
  overflow: hidden;
}
@media (max-width: 1050px) {
  main {
    padding: 24px;
  }
  .shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .sidebar {
    padding: 32px 20px;
  }
  .brand {
    font-size: 16px;
  }
  .file-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .storage-card {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}
@media (max-width: 680px) {
  .shell {
    display: block;
  }
  .sidebar {
    padding: 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
  }
  .sidebar > p,
  .sidebar .safety {
    display: none;
  }
  .sidebar nav {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    gap: 4px;
    order: 3;
    width: 100%;
  }
  .sidebar nav a {
    padding: 10px 12px;
  }
  .sidebar > form {
    margin-left: auto;
  }
  .brand {
    font-size: 16px;
  }
  .sidebar button {
    padding: 8px;
  }
  .pilot {
    margin-bottom: 24px;
    font-size: 11px;
  }
  main {
    padding: 20px 16px 40px;
  }
  h1 {
    font-size: 30px;
  }
  .page-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }
  .toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .toolbar select {
    width: 100%;
  }
  .dropzone {
    padding: 20px 12px;
  }
  .upload-buttons {
    flex-direction: column;
  }
  .list-tools {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }
  .auth-card {
    margin: 24px 0;
    padding: 24px 18px;
  }
  .file-row {
    padding: 16px;
  }
  .actions {
    width: 100%;
  }
  .actions > * {
    flex: 1;
  }
  .storage-card {
    padding: 18px;
  }
  .storage-card #capacity {
    font-size: 18px;
  }
  .page-top button {
    width: 100%;
  }
  .version {
    align-items: flex-start;
    flex-direction: column;
  }
}
.captcha-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}
.captcha-row img {
  width: var(--captcha-width);
  max-width: calc(100% - 56px);
  height: auto;
  border: 1px solid var(--line);
}
.captcha-example {
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #16a34a;
  font-weight: 600;
  padding: 12px;
  font-size: 13px;
  line-height: 1.65;
}
#captcha-help {
  margin: 0;
}
#captcha {
  max-width: 220px;
}
label:has(+ .file-input:focus-visible) {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
@media (max-width: 680px) {
  .actions > * {
    flex: 1 1 100px;
    min-width: 100px;
    white-space: nowrap;
  }
}
@font-face {
  font-family: Inter;
  src: url(/assets/fonts/Inter.ttf) format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
.eye svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.eye-slash {
  display: none;
}
.eye[aria-pressed=true] .eye-slash {
  display: block;
}
.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space);
  margin-top: var(--space);
}
.profile-card {
  background: white;
  border: 1px solid var(--line);
  padding: var(--space);
  min-width: 0;
}
.profile-card .stack {
  max-width: var(--control-width-large);
}
.profile-card h2 {
  margin: 8px 0 16px;
}
.profile-card .eyebrow {
  margin: 0;
}
.profile-card .muted {
  min-height: 48px;
}
.account-email {
  overflow-wrap: anywhere;
  font-size: 16px;
}
.role-badge {
  padding: 8px 12px;
  background: #edf2ff;
  color: #2149a3;
  font-size: 12px;
  letter-spacing: .08em;
}
.verification-summary {
  padding: 16px;
  border: 1px solid var(--line);
  display: grid;
  gap: 6px;
  overflow-wrap: anywhere;
}
.verification-summary span {
  color: var(--muted);
  font-size: 12px;
}
.field-error {
  margin: 0;
  color: var(--danger);
  font-size: 13px;
}
.control-small {
  max-width: var(--control-width-small);
}
input[aria-invalid=true] {
  border-color: var(--danger);
}
.captcha-refresh {
  font-size: 24px;
  min-width: 44px;
  padding: 6px;
  letter-spacing: 0;
}
.captcha-row {
  gap: 12px;
}
.stack .password-field + label {
  margin-top: 8px;
}
@media (max-width: 1050px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 680px) {
  input,
  select {
    font-size: 16px;
  }
  .profile-card {
    padding: 20px 16px;
  }
  .profile-card .muted {
    min-height: 0;
  }
  .role-badge {
    margin-bottom: 16px;
  }
  .auth-card h1 {
    font-size: 30px;
  }
  .captcha-example {
    font-size: 13px;
  }
  .sidebar nav a {
    flex: 1;
    text-align: center;
    padding-inline: 8px;
  }
  .sidebar nav {
    gap: 2px;
  }
}

.social-options { display: grid; gap: 16px; margin: 28px 0; }
.social-button { width: 100%; min-height: 48px; gap: 12px; text-transform: none; letter-spacing: normal; font-size: 14px; }
.social-button svg { width: 20px; height: 20px; flex-shrink: 0; }
.auth-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 16px; text-underline-offset: 4px; }
.registration-panel { padding: 24px; border: 1px solid #8db89c; background: #eef8f1; margin-bottom: 32px; }
.registration-panel h2 { font-size: 24px; }
.registration-row { display: flex; gap: 20px; align-items: center; justify-content: space-between; padding: 18px 0; border-top: 1px solid #b4d1bc; }
.registration-row > div { min-width: 0; overflow-wrap: anywhere; }
.registration-row p { margin: 8px 0 0; }
.pagination { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 700px) { .registration-panel { padding: 16px; } .registration-row { align-items: stretch; flex-direction: column; } .registration-row .actions > button { flex: 1; } }

.pairing-code { font-size: 28px; font-weight: 600; letter-spacing: .15em; overflow-wrap: anywhere; }

.token-actions { margin-top: 16px; }
#token { overflow-wrap: anywhere; }

.checksum { font-family: monospace; font-size: 12px; overflow-wrap: anywhere; }
.folder-path { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; }
.folder-path button { white-space: normal; overflow-wrap: anywhere; max-width: 100%; text-transform: none; letter-spacing: normal; }
.folder-name { display: inline-flex; gap: 12px; align-items: center; text-align: start; text-transform: none; letter-spacing: normal; font-size: 16px; font-weight: 500; overflow-wrap: anywhere; max-width: 100%; }
.file-pages { align-items: center; margin-top: 24px; }
.desktop-guide { margin-top: 24px; }
.desktop-guide li { margin-bottom: 14px; line-height: 1.6; }

.device-actions > form {
  flex: 1 1 180px;
  min-width: 0;
}
.device-actions button {
  width: 100%;
  white-space: normal;
}

.permission-options { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.permission-options .check { min-height: 44px; }
.permission-browser { padding: 12px; border: 1px solid #d7dce5; }
.permission-browser button { white-space: normal; overflow-wrap: anywhere; text-align: start; }
.grant-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid #d7dce5; }
.grant-row > div { min-width: 0; flex: 1 1 200px; overflow-wrap: anywhere; }
fieldset { min-width: 0; border: 1px solid #d7dce5; padding: 16px; }

[hidden] { display: none !important; }

summary { cursor: pointer; min-height: 44px; display: list-item; padding: 12px 0; font-weight: 500; }
.grant-edit { margin-top: 8px; }
.grant-edit .stack { padding-top: 12px; }
