/* filedrop: inherits the r7zxn.cc world. Dark by default, light below. */

@font-face { font-family: 'Satoshi'; src: url('fonts/satoshi-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Satoshi'; src: url('fonts/satoshi-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Satoshi'; src: url('fonts/satoshi-900.woff2') format('woff2'); font-weight: 900; font-display: swap; }
@font-face { font-family: 'Funnel Sans'; src: url('fonts/funnel-sans.woff2') format('woff2'); font-weight: 400 600; font-display: swap; }
@font-face { font-family: 'Funnel Display'; src: url('fonts/funnel-display.woff2') format('woff2'); font-weight: 500 800; font-display: swap; }
@font-face { font-family: 'Reddit Mono'; src: url('fonts/reddit-mono.woff2') format('woff2'); font-weight: 400 600; font-display: swap; }

:root, [data-theme-preview="dark"] {
  color-scheme: dark;
  --bg: #0d100e;
  --surface: #141915;
  --raised: #1c231e;
  --tint: #16231b;
  --line: #29332b;
  --line-soft: #1d251f;
  --dash: #3a4a3e;
  --text: #eef2ea;
  --soft: #b4bfb6;
  --faint: #929e94;
  --accent: #b7efcf;
  --on-accent: #0f2418;
  --warm: #f1bf9b;
  --warm-tint: #2a1f17;
  --danger: #ff9e92;
  --danger-tint: #2b1714;
  --glow: #2f5a42;
  --shadow: #000c;

  --ui: 'Satoshi', 'Funnel Sans', system-ui, sans-serif;
  --body: 'Funnel Sans', system-ui, sans-serif;
  --mono: 'Reddit Mono', ui-monospace, monospace;
  /* accent words, as on r7zxn.cc: Funnel Display's cut terminals against Satoshi */
  --alt: 'Funnel Display', 'Satoshi', system-ui, sans-serif;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);
  --radius: 20px;
  --header: 72px;
}
:root[data-theme="light"], [data-theme-preview="light"] {
  color-scheme: light;
  --bg: #f4f3ec;
  --surface: #fbfbf7;
  --raised: #e9e9df;
  --tint: #e5ece1;
  --line: #d2d5c8;
  --line-soft: #e2e4d9;
  --dash: #b4bcab;
  --text: #161d18;
  --soft: #434f46;
  --faint: #5a665d;
  --accent: #1d5b3f;
  --on-accent: #fff;
  --warm: #8a4720;
  --warm-tint: #f5e6d8;
  --danger: #a3352a;
  --danger-tint: #f6dfdb;
  --glow: #c9dec8;
  --shadow: #1d2a2140;
}

/* filedrop's own themes. Each is a full token swap with one accent; forest and light above are r7zxn.cc's. */
:root[data-theme="midnight"], [data-theme-preview="midnight"] {
  --bg: #0d111c; --surface: #141a29; --raised: #1c2436; --tint: #152036;
  --line: #273148; --line-soft: #1a2133; --dash: #39466a;
  --text: #e8edf8; --soft: #b2bcd4; --faint: #8f9ab6;
  --accent: #a9c8ff; --on-accent: #0c1a36;
  --warm: #f2c196; --warm-tint: #2a2119; --danger: #ff9c97; --danger-tint: #2c1719;
  --glow: #263f72;
}
:root[data-theme="sakura"], [data-theme-preview="sakura"] {
  --bg: #160f12; --surface: #1f161a; --raised: #2a1e24; --tint: #2b1921;
  --line: #3a2a32; --line-soft: #24191e; --dash: #573e4a;
  --text: #f8edf1; --soft: #d3bcc5; --faint: #ab939d;
  --accent: #ffb8d2; --on-accent: #3b0f22;
  --warm: #f4cc9c; --warm-tint: #2b2118; --danger: #ff9580; --danger-tint: #301712;
  --glow: #5e2b43;
}
:root[data-theme="matcha"], [data-theme-preview="matcha"] {
  color-scheme: light;
  --bg: #eef1e3; --surface: #f8faf1; --raised: #e2e8d2; --tint: #dfe9cd;
  --line: #ccd5ba; --line-soft: #dfe5cf; --dash: #a8b590;
  --text: #1b2313; --soft: #445039; --faint: #59654c;
  --accent: #45661a; --on-accent: #fff;
  --warm: #8a561a; --warm-tint: #f3e4cc; --danger: #a3352a; --danger-tint: #f6dfdb;
  --glow: #cfe1ae; --shadow: #26301a40;
}
:root[data-theme="ember"], [data-theme-preview="ember"] {
  --bg: #130e0b; --surface: #1c1511; --raised: #261d17; --tint: #2a1b11;
  --line: #372a21; --line-soft: #211914; --dash: #533f2e;
  --text: #f6ece3; --soft: #cfbdae; --faint: #a69281;
  --accent: #ffb27a; --on-accent: #2e1505;
  --warm: #f0d58c; --warm-tint: #2a2414; --danger: #ff8f87; --danger-tint: #301513;
  --glow: #5c2c12;
}
:root[data-theme="amethyst"], [data-theme-preview="amethyst"] {
  --bg: #0f0d15; --surface: #17141f; --raised: #211c2c; --tint: #1e1729;
  --line: #2d2639; --line-soft: #1c1825; --dash: #473c5c;
  --text: #efebf6; --soft: #beb5cf; --faint: #978daa;
  --accent: #cdb0ff; --on-accent: #1e0f3b;
  --warm: #f2c49b; --warm-tint: #2a1f18; --danger: #ff9aa6; --danger-tint: #2d1520;
  --glow: #402b6b;
}
:root[data-theme="lagoon"], [data-theme-preview="lagoon"] {
  --bg: #0a1314; --surface: #111c1e; --raised: #192729; --tint: #12262a;
  --line: #233538; --line-soft: #172325; --dash: #345155;
  --text: #e7f3f2; --soft: #aec4c3; --faint: #89a09f;
  --accent: #8ce5dd; --on-accent: #052624;
  --warm: #f3c49b; --warm-tint: #2a2018; --danger: #ff9e92; --danger-tint: #2b1714;
  --glow: #1d5652;
}
:root[data-theme="onyx"], [data-theme-preview="onyx"] {
  --bg: #0b0b0b; --surface: #141414; --raised: #1d1d1d; --tint: #1a1a1a;
  --line: #2a2a2a; --line-soft: #1b1b1b; --dash: #454545;
  --text: #f2f2f2; --soft: #bdbdbd; --faint: #969696;
  --accent: #ededed; --on-accent: #111;
  --warm: #e9c49f; --warm-tint: #262019; --danger: #ff9b91; --danger-tint: #2a1614;
  --glow: #303030;
}

/* base */
*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-width: thin; scrollbar-color: var(--line) var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100svh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text); caret-color: var(--accent);
  font: 400 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-wrap: break-word;
}
h1, h2, h3, p, dl, dd, figure, pre { margin: 0; }
h1, h2, h3 { font-family: var(--ui); font-weight: 700; line-height: 1.05; letter-spacing: -.03em; text-wrap: balance; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a, button, label, summary { -webkit-tap-highlight-color: transparent; }
img, svg, video { display: block; max-width: 100%; }
code, kbd, pre { font-family: var(--mono); font-size: .9em; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
::placeholder { color: var(--faint); opacity: 1; }
.num { font-variant-numeric: tabular-nums; }

.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.container { width: min(1180px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(880px, 100% - 40px); margin-inline: auto; }
.mono { font-family: var(--mono); }
.faint { color: var(--faint); }
.soft { color: var(--soft); }

.skip-link { position: fixed; z-index: 120; left: 16px; top: -80px; padding: 10px 16px; border-radius: 10px; background: var(--accent); color: var(--on-accent); }
.skip-link:focus { top: 12px; }

/* atmosphere: the same slow glow and grain as r7zxn.cc */
.scene { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.scene::before, .scene::after {
  content: ''; position: absolute; border-radius: 50%; opacity: .22; filter: blur(40px);
  background: radial-gradient(closest-side, var(--glow), transparent);
  animation: drift 26s ease-in-out infinite alternate;
  transition: opacity .8s var(--ease);
}
.scene::before { width: 760px; height: 620px; top: -220px; right: -240px; }
.scene::after { width: 520px; height: 520px; bottom: -260px; left: -200px; opacity: .1; animation-delay: -13s; }
.is-dragging .scene::before { opacity: .42; }
/* a still field of flowing lines in the top corner, after durves.com (drawn once by app.js), as on r7zxn.cc */
.durves {
  position: absolute; top: 0; right: 0; width: min(1100px, 92vw); height: 78vh; fill: none; stroke: var(--accent); opacity: .08;
  mask-image: radial-gradient(75% 85% at 88% 8%, #000 25%, transparent 72%); -webkit-mask-image: radial-gradient(75% 85% at 88% 8%, #000 25%, transparent 72%);
}
.durves path { stroke-width: 1; vector-effect: non-scaling-stroke; }
:root[data-theme="light"] .durves { opacity: .09; }
body::after {
  content: ''; position: fixed; inset: 0; z-index: 99; pointer-events: none; opacity: .035;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px;
  border: 1px solid var(--line); border-radius: 999px; text-decoration: none; white-space: nowrap;
  font: 500 .9375rem var(--ui);
  transition: transform .5s var(--ease), background-color .3s, border-color .3s, color .3s, box-shadow .5s var(--ease), opacity .3s;
}
.button .icon { width: 18px; height: 18px; }
.button:hover { border-color: var(--soft); }
.button:active { transform: scale(.96); transition-duration: .15s; }
/* the primary button is lit from above: a bright top edge, a darker lip below, and it sinks in when pressed */
.button-primary { background: var(--accent); color: var(--on-accent); border-color: transparent; font-weight: 700; box-shadow: inset 0 1px 0 #ffffff80, inset 0 -2px 0 color-mix(in srgb, var(--shadow) 14%, transparent), 0 1px 2px color-mix(in srgb, var(--shadow) 30%, transparent); }
.button-primary:hover { border-color: transparent; transform: translateY(-2px); box-shadow: inset 0 1px 0 #ffffff80, inset 0 -2px 0 color-mix(in srgb, var(--shadow) 14%, transparent), 0 14px 28px -16px var(--shadow); }
.button-primary:active { transform: translateY(0) scale(.98); box-shadow: inset 0 2px 5px color-mix(in srgb, var(--shadow) 22%, transparent), 0 1px 1px color-mix(in srgb, var(--shadow) 20%, transparent); }
.button-danger { color: var(--danger); }
.button-danger:hover { border-color: var(--danger); background: var(--danger-tint); }
.button-small { min-height: 40px; padding: 0 16px; font-size: .875rem; }
.button-ghost { border-color: transparent; color: var(--soft); }
.button-ghost:hover { color: var(--text); border-color: var(--line); }
.button[disabled], .button[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.button.is-busy { pointer-events: none; }
.button.is-busy::after { content: ''; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.round {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; flex: none;
  border: 1px solid var(--line); border-radius: 50%; text-decoration: none;
  transition: transform .5s var(--ease), background-color .3s, color .3s, border-color .3s;
}
.round:hover { background: var(--raised); border-color: var(--soft); }
.round:active { transform: scale(.9); }
.round-small { width: 36px; height: 36px; }
.round-small .icon { width: 17px; height: 17px; }
.text-button { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; color: var(--soft); font: 500 .875rem var(--ui); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: .3em; transition: color .3s, text-decoration-color .3s; }
.text-button:hover { color: var(--text); text-decoration-color: var(--accent); }

/* form controls */
.field { display: grid; gap: 8px; }
.field > span { font: 500 .875rem var(--ui); color: var(--soft); }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 0 16px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--bg); color: var(--text); transition: border-color .3s, box-shadow .3s;
}
.textarea { padding: 14px 16px; min-height: 220px; resize: vertical; font: 400 .875rem/1.6 var(--mono); }
.select { appearance: none; padding-right: 40px; background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23929e94' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 16px center; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--dash); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.input.mono { font: 500 .875rem var(--mono); letter-spacing: .01em; }

.segmented { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented span {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px;
  font: 500 .8125rem var(--mono); color: var(--soft); white-space: nowrap; transition: background-color .35s var(--ease), color .3s;
}
.segmented label:hover span { color: var(--text); }
.segmented input:checked + span { background: var(--accent); color: var(--on-accent); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.segmented input:disabled + span { opacity: .5; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.switch input { appearance: none; position: relative; width: 46px; height: 28px; flex: none; margin: 0; border-radius: 999px; background: var(--raised); border: 1px solid var(--line); cursor: pointer; transition: background-color .3s; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--faint); transition: transform .5s var(--spring), background-color .3s; }
.switch input:checked { background: var(--accent); border-color: transparent; }
.switch input:checked::after { transform: translateX(18px); background: var(--on-accent); }

.check { appearance: none; width: 20px; height: 20px; margin: 0; flex: none; border: 1.5px solid var(--dash); border-radius: 6px; cursor: pointer; display: grid; place-items: center; transition: background-color .2s, border-color .2s; }
.check:checked { background: var(--accent); border-color: var(--accent); }
.check:checked::after { content: ''; width: 10px; height: 6px; border: 2px solid var(--on-accent); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }

/* header */
/* Transparent at rest so the glow runs unbroken behind it; the frosted bar appears once you scroll. */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent; transition: border-color .3s, background-color .3s;
  view-transition-name: site-header;
}
.site-header.is-scrolled {
  border-color: var(--line-soft);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
}
.header-inner { position: relative; min-height: var(--header); display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: baseline; gap: 10px; margin-right: auto; min-width: 0; }
.wordmark { font: 700 1.5rem/1 var(--ui); letter-spacing: -.05em; text-decoration: none; }
.wordmark span { color: var(--accent); display: inline-block; transition: transform .6s var(--spring); }
.wordmark:hover span { transform: translateY(-4px); }
/* the period breathes while a file is sending */
.is-sending .wordmark span { animation: breathe 1.4s ease-in-out infinite; }
.app-name { font: 500 .8125rem var(--mono); color: var(--faint); text-decoration: none; white-space: nowrap; transition: color .3s; }
.app-name:hover { color: var(--accent); }
.nav { display: flex; gap: 2px; }
.nav-link {
  position: relative; z-index: 1; display: flex; align-items: center; min-height: 40px; padding: 0 14px;
  border-radius: 999px; color: var(--soft); text-decoration: none; font: 500 .875rem var(--ui); transition: color .3s;
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--text); }
.nav-pill { display: none; }
.nav-mobile-only { display: none; }
.header-controls { display: flex; align-items: center; gap: 8px; }
.theme-button svg { transition: transform .6s var(--spring); }
.theme-button:hover svg, .theme-button[aria-expanded="true"] svg { transform: rotate(-30deg); }
.account-button .icon { width: 16px; height: 16px; color: var(--accent); }
.account-button.is-signed-in { font-family: var(--mono); font-size: .8125rem; }
.burger { width: 16px; height: 10px; position: relative; }
.burger i { position: absolute; left: 0; right: 0; height: 1.5px; border-radius: 2px; background: currentColor; transition: transform .4s var(--ease), top .4s var(--ease); }
.burger i:first-child { top: 0; }
.burger i:last-child { top: 8.5px; }
[aria-expanded="true"] .burger i:first-child { top: 4.25px; transform: rotate(45deg); }
[aria-expanded="true"] .burger i:last-child { top: 4.25px; transform: rotate(-45deg); }

.upload-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px 0 10px; border-radius: 999px;
  background: var(--tint); color: var(--accent); font: 500 .8125rem var(--mono); text-decoration: none;
  animation: rise-in .5s var(--ease);
}
.chip-ring { width: 18px; height: 18px; transform: rotate(-90deg); }
.chip-ring circle { fill: none; stroke-width: 2.5; }
.chip-ring .track { stroke: color-mix(in srgb, var(--accent) 25%, transparent); }
.chip-ring .fill { stroke: var(--accent); stroke-linecap: round; transition: stroke-dasharray .4s var(--ease); }

@media (max-width: 899px) {
  .js .nav {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; flex-direction: column; padding: 8px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
    box-shadow: 0 24px 60px -20px var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98); transform-origin: top right;
    transition: opacity .25s, transform .4s var(--ease), visibility 0s .4s;
  }
  .js .nav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .js .nav .nav-link { min-height: 48px; border-radius: 12px; font-size: 1rem; }
  .js .nav .nav-link[aria-current="page"] { background: var(--raised); }
  .nav-mobile-only { display: flex; }
  .account-button { display: none; }
}
@media (max-width: 359px) { .app-name { display: none; } }
@media (min-width: 900px) {
  .menu-button { display: none !important; }
  .nav { position: relative; padding: 4px; border: 1px solid var(--line-soft); border-radius: 999px; background: color-mix(in srgb, var(--surface) 70%, transparent); }
  .nav-pill {
    display: block; position: absolute; left: 0; top: 4px; bottom: 4px; width: 0; opacity: 0;
    border-radius: 999px; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line);
  }
  .nav-pill.ready { transition: transform .55s var(--spring), width .55s var(--spring), opacity .3s; }
}
@media (max-width: 420px) { .wordmark { font-size: 1.3rem; } .header-controls { gap: 6px; } }

/* page frame */
main { flex: 1; padding-bottom: 72px; view-transition-name: view; }
.page-head { padding-top: clamp(40px, 7vw, 80px); margin-bottom: 36px; }
.page-head h1 { font-size: clamp(2.5rem, 6vw, 4rem); letter-spacing: -.045em; }
.page-head p { max-width: 60ch; margin-top: 14px; color: var(--soft); font-size: 1.0625rem; }
.page-head-row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 24px; }
.page-head .usage { margin-top: 14px; font: 500 .8125rem/1.6 var(--mono); }
.section-title { font-size: 1.5rem; letter-spacing: -.025em; margin-bottom: 18px; }

.site-footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px 48px; padding: 40px 0 48px; border-top: 1px dashed var(--dash); color: var(--faint); font-size: .875rem; }
.footer-brand { display: grid; gap: 6px; align-content: start; max-width: 40ch; line-height: 1.6; }
.footer-mark { margin-bottom: 4px; color: var(--text); font: 700 1.125rem/1 var(--ui); letter-spacing: -.04em; }
.footer-mark span { color: var(--accent); }
.footer-mark small { margin-left: 8px; color: var(--faint); font: 500 .75rem var(--mono); letter-spacing: 0; }
.footer-brand p a { color: var(--soft); text-decoration-color: var(--line); text-underline-offset: .25em; transition: color .3s; }
.footer-brand p a:hover { color: var(--accent); }
/* The source link is the footer's one button: an icon tile, a label with the license under it, and an out arrow. */
.footer-source {
  justify-self: start; display: inline-flex; align-items: center; gap: 12px; margin-top: 12px; padding: 8px 16px 8px 8px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); text-decoration: none;
  transition: border-color .3s, transform .4s var(--spring);
}
.footer-source > .icon:first-child { width: 36px; height: 36px; padding: 9px; border-radius: 11px; background: var(--tint); color: var(--accent); }
.footer-source span { display: grid; line-height: 1.35; }
.footer-source strong { font: 700 .9375rem var(--ui); }
.footer-source small { color: var(--faint); font: 500 .6875rem var(--mono); }
.footer-source .icon-out { width: 16px; height: 16px; margin-left: 4px; color: var(--faint); transition: transform .4s var(--spring), color .3s; }
.footer-source:hover { border-color: var(--accent); transform: translateY(-2px); }
.footer-source:hover .icon-out { color: var(--accent); transform: translate(2px, -2px); }
.footer-cols { display: flex; gap: 56px; }
.footer-col { display: grid; align-content: start; justify-items: start; min-width: 88px; }
.footer-head { margin-bottom: 6px; color: var(--faint); font: 500 .75rem var(--mono); }
/* An accent rule draws in under the link on hover. */
.footer-col a {
  display: inline-flex; align-items: center; min-height: 34px; color: var(--soft); font: 500 .9375rem var(--ui); text-decoration: none;
  background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 calc(100% - 6px) / 0 1px;
  transition: color .25s, background-size .4s var(--ease);
}
.footer-col a:hover { color: var(--text); background-size: 100% 1px; }
@media (max-width: 599px) {
  .site-footer { grid-template-columns: 1fr; }
  .footer-col a { min-height: 40px; }
}

/* theme menu: opens under the palette button with a live preview of every theme */
.theme-wrap { position: relative; }
.theme-menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 60; width: 336px; padding: 12px 12px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 24px 60px -20px var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98); transform-origin: top right;
  transition: opacity .25s, transform .4s var(--ease), visibility 0s .4s;
}
.theme-menu.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.theme-menu-head { padding: 2px 6px 10px; color: var(--faint); font: 500 .75rem var(--mono); }
.theme-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.theme-card { display: grid; gap: 7px; padding: 6px 6px 8px; border-radius: 14px; color: var(--soft); font: 500 .75rem var(--mono); text-align: left; transition: background-color .2s, color .2s; }
.theme-card:hover { background: var(--raised); color: var(--text); }
.theme-card[aria-pressed="true"] { color: var(--text); }
.theme-card[aria-pressed="true"] .theme-preview { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
/* A tiny page in the theme's own colors: a header line, a headline and a card with its button. */
.theme-preview {
  display: grid; grid-template-rows: 3px 5px 1fr; gap: 5px; aspect-ratio: 16 / 10; padding: 8px;
  border: 1px solid var(--line); border-radius: 10px;
  background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--glow) 70%, transparent), transparent 70%), var(--bg);
  transition: box-shadow .3s var(--ease), transform .4s var(--spring);
}
.theme-card:hover .theme-preview { transform: translateY(-2px); }
.theme-preview i { display: block; border-radius: 3px; }
.theme-preview i:nth-child(1) { width: 34%; background: var(--faint); opacity: .7; }
.theme-preview i:nth-child(2) { width: 72%; background: var(--text); }
.theme-preview i:nth-child(3) { position: relative; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.theme-preview b { position: absolute; right: 4px; bottom: 4px; width: 42%; height: 6px; border-radius: 99px; background: var(--accent); }
@media (max-width: 479px) {
  .theme-wrap { position: static; }
  .theme-menu { left: 0; right: 0; width: auto; top: calc(100% + 8px); }
}

/* upload: the drop card */
.upload { display: grid; justify-items: center; padding-top: clamp(36px, 7vh, 76px); text-align: center; }
.upload-title { font: 900 clamp(3rem, 8.4vw, 5.25rem)/.95 var(--ui); letter-spacing: -.045em; }
.upload-title em { font-family: var(--alt); font-style: normal; font-weight: 800; letter-spacing: -.04em; color: var(--accent); }
.upload-sub { margin-top: 18px; color: var(--soft); font-size: clamp(1rem, 2vw, 1.125rem); max-width: 68ch; text-wrap: balance; }

.drop-card {
  position: relative; width: min(640px, 100%); margin-top: clamp(28px, 5vh, 44px); padding: 10px; text-align: left;
  border: 1px solid var(--line); border-radius: 26px; background: var(--surface);
  box-shadow: 0 40px 80px -40px var(--shadow);
  view-transition-name: drop-card;
  transition: transform .6s var(--ease), box-shadow .6s var(--ease), border-color .3s;
}
.drop-card.is-over { transform: translateY(-4px) scale(1.01); border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); box-shadow: 0 56px 90px -40px var(--shadow); }

/* the outline is the progress bar: it fills in mint as bytes leave */
.trace { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); pointer-events: none; overflow: visible; }
.trace rect { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 0 100; opacity: 0; transition: stroke-dasharray .45s var(--ease), opacity .4s; }
.drop-card.is-uploading .trace rect, .drop-card.is-done .trace rect { opacity: 1; }
.is-sending .scene::before { opacity: .36; }
.drop-card.is-done .trace rect { animation: trace-settle 1.2s var(--ease) .1s forwards; }

.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg); }
.tab { min-height: 36px; padding: 0 18px; border-radius: 999px; font: 500 .875rem var(--ui); color: var(--soft); transition: background-color .3s, color .3s; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: var(--raised); color: var(--text); }
.card-limit { margin-right: 8px; font: 500 .75rem var(--mono); color: var(--faint); }

.drop-field {
  position: relative; display: grid; place-items: center; min-height: 250px; padding: 28px; text-align: center; cursor: pointer;
  border: 1.5px dashed var(--dash); border-radius: 18px;
  background: radial-gradient(70% 90% at 50% 100%, var(--tint), transparent 70%);
  transition: border-color .3s, background-color .3s, min-height .6s var(--ease);
}
.drop-field:hover { border-color: var(--soft); }
.drop-field:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.drop-field input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-card.is-over .drop-field { border-style: solid; border-color: var(--accent); background-color: color-mix(in srgb, var(--accent) 6%, transparent); }
.drop-icon {
  width: 64px; height: 64px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 18px;
  background: var(--tint); color: var(--accent); transition: transform .6s var(--spring);
}
.drop-icon .icon { width: 28px; height: 28px; }
.drop-field:hover .drop-icon, .drop-card.is-over .drop-icon { transform: translateY(-6px) rotate(-6deg); }
.drop-field b { display: block; font: 700 1.75rem/1.15 var(--ui); letter-spacing: -.03em; }
.drop-field small { display: block; margin-top: 6px; color: var(--faint); font-size: .9375rem; }
.drop-field kbd { padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; font-size: .8125rem; }
.drop-card.has-files .drop-field { min-height: 96px; padding: 16px; }
.drop-card.has-files .drop-icon { display: none; }
.drop-card.has-files .drop-field b { font-size: 1.125rem; }

.hint-touch { display: none !important; }
@media (hover: none) and (pointer: coarse) {
  .hint-pointer { display: none !important; }
  .hint-touch { display: block !important; }
}

.paste-panel { display: grid; gap: 10px; }
.paste-panel .textarea { min-height: 250px; }

.queue { list-style: none; margin: 10px 0 0; padding: 0; display: grid; max-height: 320px; overflow-y: auto; scrollbar-width: thin; }
.q-item { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 4px 14px; padding: 12px 10px; border-top: 1px solid var(--line-soft); animation: rise-in .45s var(--ease) backwards; }
.q-item:first-child { border-top: 0; }
.q-glyph { grid-row: span 2; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--raised); color: var(--soft); }
.q-glyph .icon { width: 18px; height: 18px; }
.q-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; font-size: .9375rem; }
.q-meta { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px 12px; font: 400 .75rem var(--mono); color: var(--faint); font-variant-numeric: tabular-nums; }
.q-action { grid-row: 1 / span 2; grid-column: 3; }
.q-bar { grid-column: 2 / 4; height: 3px; border-radius: 3px; background: var(--raised); overflow: hidden; }
.q-bar i { display: block; height: 100%; width: 100%; background: var(--accent); border-radius: 3px; transform: scaleX(var(--p, 0)); transform-origin: left; transition: transform .35s var(--ease); }
.q-item.is-done .q-glyph { background: var(--tint); color: var(--accent); }
.q-item.is-error .q-glyph { background: var(--danger-tint); color: var(--danger); }
.q-item.is-error .q-meta { color: var(--danger); }

.card-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 6px 4px; }
.card-controls .left { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.card-controls .select { width: auto; min-height: 46px; border-radius: 999px; font: 500 .8125rem var(--ui); }
.go { min-height: 52px; padding: 0 30px; font-size: 1.0625rem; }
@media (max-width: 560px) {
  .card-controls { flex-direction: column; align-items: stretch; padding-inline: 2px; }
  .card-controls .left { flex-direction: column; align-items: stretch; }
  .card-controls .segmented { display: flex; }
  .card-controls .segmented label { flex: 1; }
  .card-controls .segmented span { justify-content: center; width: 100%; padding: 0 6px; }
  .card-controls .select { width: 100%; }
  .go { width: 100%; }
  .drop-field { min-height: 200px; }
}
.turnstile-slot:empty { display: none; }
.turnstile-slot { display: flex; justify-content: center; padding-top: 12px; }
.card-error { margin: 12px 6px 2px; padding: 12px 14px; border-radius: 12px; background: var(--danger-tint); color: var(--danger); font-size: .875rem; }
.upload-total { display: flex; justify-content: space-between; gap: 12px; padding: 12px 8px 2px; font: 500 .8125rem var(--mono); color: var(--soft); font-variant-numeric: tabular-nums; }
.upload-total strong { color: var(--accent); font-weight: 500; }

/* the ticket the card turns into */
.ticket { padding: 18px 14px 10px; }
.ticket-title { display: flex; align-items: center; gap: 10px; color: var(--text); font: 700 1.25rem/1.2 var(--ui); letter-spacing: -.02em; }
.ticket-title .icon { width: 20px; height: 20px; color: var(--accent); }
.upload-status { display: flex; align-items: center; gap: 8px; padding-left: 6px; color: var(--soft); font: 500 .875rem var(--ui); }
.upload-status .icon { width: 18px; height: 18px; color: var(--accent); }
.ticket-link {
  display: block; margin: 14px 0 6px; font: 500 clamp(1.05rem, 3.3vw, 1.5rem)/1.3 var(--mono); letter-spacing: -.01em;
  color: var(--text); text-decoration: none; overflow-wrap: anywhere;
}
.ticket-link:hover { color: var(--accent); }
.ticket-link .ch { display: inline-block; animation: roll-in .6s var(--ease) backwards; }
.ticket-link .ch.hi { color: var(--accent); }
.ticket-meta { color: var(--faint); font: 400 .8125rem var(--mono); font-variant-numeric: tabular-nums; }
.ticket-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.ticket-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; }
.ticket-list li { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.ticket-list li:first-child { border-top: 0; }
.ticket-list .t-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.ticket-list .t-link { grid-column: 1; color: var(--soft); font: 500 .8125rem var(--mono); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-list .t-link:hover { color: var(--text); }
.ticket-list .t-link .ch { display: inline-block; animation: roll-in .6s var(--ease) backwards; }
.ticket-list .t-link .ch.hi { color: var(--accent); }
.ticket-list .round { grid-row: 1 / span 2; grid-column: 2; }
.ticket-list .t-error { grid-column: 1; color: var(--danger); font-size: .8125rem; }
.ticket-list .t-actions { grid-row: 1 / span 2; grid-column: 2; display: flex; gap: 4px; }
.ticket-list .t-actions .round { grid-row: auto; grid-column: auto; }
.ticket-list [data-delete-item]:hover { color: var(--danger); }
.ticket-list .t-gone { grid-column: 1; color: var(--faint); font-size: .8125rem; }
.ticket-list .is-deleted .t-name { color: var(--faint); text-decoration: line-through; text-decoration-color: var(--dash); }
.round.is-busy { pointer-events: none; opacity: .45; }
.keybox { margin-top: 18px; padding: 14px 16px; border-radius: 14px; background: var(--warm-tint); color: var(--text); font-size: .875rem; }
.keybox p { color: var(--soft); }
.keybox strong { color: var(--warm); font-weight: 600; }
.keybox .row { display: flex; gap: 8px; margin-top: 10px; }
.keybox code { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px; background: var(--bg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .75rem; }

.facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; margin-top: 28px; color: var(--faint); font-size: .8125rem; }
.facts span, .facts a { display: inline-flex; align-items: center; gap: 8px; }
.facts .icon { width: 16px; height: 16px; color: var(--accent); }
.blocked-note { margin-top: 14px; text-align: center; color: var(--faint); font: 500 .75rem/1.6 var(--mono); }
.blocked-note a { color: var(--soft); text-decoration-color: var(--accent); }
.facts a { text-decoration: none; }
.facts a:hover { color: var(--text); }

/* drop anywhere: a quiet frame around the window while dragging */
.drag-frame { position: fixed; inset: 10px; z-index: 90; pointer-events: none; border: 1.5px dashed var(--accent); border-radius: 24px; opacity: 0; transform: scale(1.01); transition: opacity .3s, transform .5s var(--ease); }
.is-dragging .drag-frame { opacity: .55; transform: none; }

/* panels and lists */
.panel { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel + .panel { margin-top: 18px; }
.panel h2 { font-size: 1.375rem; letter-spacing: -.02em; }
.panel > p { margin-top: 8px; color: var(--soft); font-size: .9375rem; max-width: 62ch; }
.panel-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.split { display: grid; gap: 18px; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; } .split .panel + .panel { margin-top: 0; } }

/* API plans and donations */
.plans { display: grid; gap: 12px; margin-top: 20px; }
@media (min-width: 640px) { .plans { grid-template-columns: repeat(3, 1fr); } }
.plan { display: grid; gap: 6px; align-content: start; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--text); text-align: left; font: inherit; }
button.plan { cursor: pointer; transition: border-color .3s, background-color .3s, transform .5s var(--spring); }
button.plan:hover { border-color: var(--accent); background: var(--tint); }
button.plan:active { transform: scale(.98); }
button.plan:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button.plan.is-busy { pointer-events: none; opacity: .6; }
.plan-name { font: 500 .75rem var(--mono); color: var(--soft); text-transform: uppercase; letter-spacing: .06em; }
.plan-price { font: 700 1.75rem/1.1 var(--ui); letter-spacing: -.03em; }
.plan-price small { margin-left: 6px; font: 500 .8125rem var(--mono); color: var(--faint); letter-spacing: 0; }
.plan-text { color: var(--faint); font-size: .875rem; }
.badge.badge-ok { vertical-align: middle; background: var(--tint); color: var(--accent); }
.donate .segmented { flex-wrap: wrap; margin-top: 18px; border-radius: 22px; }
.donate .field { margin-top: 18px; max-width: 260px; }
.donate .faint { margin-top: 14px; font-size: .8125rem; }
.pay-email { margin-top: 18px; max-width: 320px; }
.wallets { display: grid; gap: 12px; margin-top: 18px; }
.wallet { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; align-items: center; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.wallet-head { grid-column: 1 / -1; display: flex; gap: 10px; align-items: baseline; }
.wallet-net { font-size: .8125rem; color: var(--faint); }
.wallet-address { font: 500 .8125rem var(--mono); color: var(--text); overflow-wrap: anywhere; }
.panel > .pay-note { margin-top: 14px; font-size: .8125rem; color: var(--faint); }

.callout { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--warm-tint); font-size: .9rem; }
.callout .icon { color: var(--warm); margin-top: 2px; }
.callout strong { color: var(--warm); }

.empty { display: grid; justify-items: center; gap: 12px; padding: 64px 20px; text-align: center; border: 1.5px dashed var(--line); border-radius: var(--radius); }
.empty .drop-icon { margin: 0 0 4px; }
.empty h2 { font-size: 1.625rem; }
.empty p { max-width: 46ch; color: var(--soft); }

.loading { display: grid; place-items: center; min-height: 40vh; color: var(--faint); font: 500 .8125rem var(--mono); }
.loading::before { content: ''; width: 22px; height: 22px; margin-bottom: 12px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }

/* file page */
.file-page { padding-top: clamp(32px, 6vw, 64px); }
.preview {
  position: relative; display: grid; place-items: center; min-height: 260px; overflow: hidden;
  border: 1px solid var(--line); border-radius: 22px; background: radial-gradient(80% 80% at 50% 100%, var(--tint), var(--surface) 70%);
}
.preview:has(> img, > video) { min-height: 0; background: var(--surface); }
.preview img, .preview video { width: 100%; max-height: min(68vh, 720px); object-fit: contain; }
@media (max-width: 560px) {
  .file-actions .button { flex: 1 1 100%; }
  .file-actions .button-primary { min-width: 0; }
}
.preview audio { width: min(520px, 100% - 48px); margin: 48px 0; }
.preview pre { width: 100%; max-height: 520px; overflow: auto; padding: 22px 24px; font-size: .8125rem; line-height: 1.7; color: var(--soft); white-space: pre; tab-size: 2; align-self: start; text-align: left; }
.glyph-tile { display: grid; justify-items: center; gap: 14px; padding: 56px 20px; }
.glyph-tile .drop-icon { width: 88px; height: 88px; border-radius: 24px; margin: 0; }
.glyph-tile .drop-icon .icon { width: 36px; height: 36px; }
.glyph-tile span { font: 500 .8125rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.file-title { margin-top: 28px; font-size: clamp(1.75rem, 4.6vw, 2.75rem); letter-spacing: -.035em; overflow-wrap: anywhere; }
.file-meta { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 18px; padding: 16px 0; border-block: 1px solid var(--line); }
.file-meta div { display: grid; gap: 2px; }
.file-meta dt { font: 500 .75rem var(--ui); color: var(--faint); }
.file-meta dd { font: 500 .9375rem var(--mono); font-variant-numeric: tabular-nums; }
.file-meta .is-soon dd { color: var(--warm); }
.file-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.file-actions .button-primary { min-width: 220px; }
.file-foot { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 28px; }
.file-page .callout { margin-top: 22px; }
.report { margin-top: 18px; }
.report form { display: grid; gap: 14px; margin-top: 14px; }
.reasons { display: flex; flex-wrap: wrap; gap: 8px; }
.reasons label { position: relative; }
.reasons input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.reasons span { display: inline-flex; min-height: 38px; align-items: center; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; font-size: .875rem; color: var(--soft); transition: background-color .3s, color .3s, border-color .3s; }
.reasons input:checked + span { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.reasons input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.gone { display: grid; justify-items: start; gap: 16px; padding-top: clamp(48px, 10vw, 120px); }
.gone h1 { font-size: clamp(2.75rem, 8vw, 5rem); letter-spacing: -.045em; }
.gone p { max-width: 52ch; color: var(--soft); font-size: 1.0625rem; }

/* album */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); text-decoration: none; transition: transform .6s var(--ease), border-color .3s, box-shadow .6s var(--ease); }
.tile:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); box-shadow: 0 24px 50px -30px var(--shadow); }
.tile-media { aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--raised); color: var(--soft); overflow: hidden; }
.tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.tile:hover .tile-media img { transform: scale(1.04); }
.tile-media .icon { width: 32px; height: 32px; }
.tile-body { padding: 12px 14px 14px; min-width: 0; }
.tile-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; font-size: .9375rem; }
.tile-meta { display: block; margin-top: 2px; font: 400 .75rem var(--mono); color: var(--faint); font-variant-numeric: tabular-nums; }

/* my files table */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.toolbar .input { flex: 1 1 220px; width: auto; border-radius: 999px; }
.toolbar .select { width: auto; border-radius: 999px; }
.usage { display: flex; flex-wrap: wrap; gap: 6px 24px; color: var(--soft); font: 500 .8125rem var(--mono); font-variant-numeric: tabular-nums; }
.usage b { color: var(--text); font-weight: 500; }
.bulkbar { position: sticky; top: calc(var(--header) + 8px); z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; padding: 8px 8px 8px 18px; border-radius: 999px; background: var(--raised); box-shadow: 0 18px 40px -24px var(--shadow); animation: rise-in .4s var(--ease); }
.bulkbar span { margin-right: auto; font: 500 .875rem var(--ui); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.table th { position: sticky; top: 0; padding: 12px 14px; text-align: left; white-space: nowrap; font: 500 .75rem var(--ui); color: var(--faint); border-bottom: 1px solid var(--line); background: var(--surface); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color .2s; }
.table tbody tr:hover, .table tbody tr.is-selected { background: color-mix(in srgb, var(--raised) 60%, transparent); }
.table .c-check { width: 44px; padding-right: 0; }
.table .c-name { min-width: 220px; max-width: 420px; }
.table .c-name a { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.table .c-name a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table .c-name a:hover span { color: var(--accent); }
.table .c-name .icon { color: var(--faint); width: 18px; height: 18px; }
.table .c-num { font: 500 .8125rem var(--mono); color: var(--soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.table .c-actions { white-space: nowrap; text-align: right; }
.table .c-actions .round { display: inline-flex; margin-left: 4px; }
.life { display: grid; gap: 6px; min-width: 120px; }
.life-bar { height: 4px; border-radius: 4px; background: var(--raised); overflow: hidden; }
.life-bar i { display: block; height: 100%; width: 100%; border-radius: 4px; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 1)); }
.life.is-soon .life-bar i { background: var(--warm); }
.life.is-soon .c-num, .life.is-soon span { color: var(--warm); }
.badge { display: inline-flex; padding: 2px 8px; border-radius: 999px; background: var(--danger-tint); color: var(--danger); font: 500 .6875rem var(--mono); }
.more { display: flex; justify-content: center; margin-top: 18px; }
.more:empty { display: none; }

/* My files on phones: each row becomes a two-line card */
@media (max-width: 700px) {
  .toolbar .select { flex: 1 1 140px; }
  .files-table thead { display: none; }
  .files-table, .files-table tbody { display: block; }
  .files-table tr {
    display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; grid-template-areas: "check name actions" ". size life";
    align-items: center; gap: 4px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line-soft);
  }
  .files-table tr:last-child { border-bottom: 0; }
  .files-table td { padding: 0; border: 0; }
  .files-table td[colspan] { grid-column: 1 / -1; }
  .files-table .c-check { grid-area: check; width: auto; }
  .files-table .c-name { grid-area: name; min-width: 0; max-width: none; }
  .files-table .c-actions { grid-area: actions; }
  .files-table .c-actions .round { margin-left: 2px; }
  .files-table .c-size { grid-area: size; }
  .files-table .c-life { grid-area: life; }
  .files-table .c-life .life { grid-template-columns: auto 1fr; align-items: center; gap: 10px; min-width: 0; }
  .files-table .c-album, .files-table .c-dl { display: none; }
}

/* albums */
.album-create { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.album-create .input { flex: 1 1 260px; width: auto; border-radius: 999px; }
.album-cover { aspect-ratio: 16 / 10; display: grid; place-items: center; background: radial-gradient(90% 90% at 100% 0%, var(--tint), var(--raised)); color: var(--accent); overflow: hidden; }
.album-cover img { width: 100%; height: 100%; object-fit: cover; }
.album-cover b { font: 900 2.5rem var(--ui); letter-spacing: -.04em; }

/* stats */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); border-block: 1px solid var(--line); }
.figure { padding: 22px 20px 22px 0; }
.figure + .figure { padding-left: 20px; border-left: 1px solid var(--line-soft); }
.figure dt { font: 500 .8125rem var(--ui); color: var(--faint); }
.figure dd { margin-top: 6px; font: 700 clamp(1.75rem, 4vw, 2.5rem)/1 var(--ui); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .figure + .figure { padding-left: 0; border-left: 0; border-top: 1px solid var(--line-soft); } }
.chart-block { margin-top: 44px; }
.chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; margin-bottom: 14px; }
.chart-head h2 { font-size: 1.375rem; }
.chart { position: relative; height: 240px; display: grid; grid-template-columns: repeat(30, 1fr); align-items: end; gap: 4px; padding: 0 0 28px; border-bottom: 1px solid var(--line); }
.chart .bar { position: relative; height: 100%; display: flex; align-items: flex-end; }
.chart .bar { outline-offset: 2px; }
.chart .bar i { width: 100%; min-height: 2px; height: calc(var(--h) * 100%); border-radius: 4px 4px 0 0; background: var(--accent); opacity: .72; transform-origin: bottom; animation: grow .9s var(--ease) backwards; animation-delay: calc(var(--i) * 18ms); transition: opacity .2s; }
.chart .bar:hover i, .chart .bar:focus-visible i, .chart .bar.is-today i { opacity: 1; }
.chart-table { margin-top: 14px; }
.chart-table summary { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; cursor: pointer; list-style: none; color: var(--soft); font: 500 .8125rem var(--ui); transition: color .2s; }
.chart-table summary::-webkit-details-marker { display: none; }
.chart-table summary:hover { color: var(--text); }
.chart-table summary .icon { width: 16px; height: 16px; transition: transform .4s var(--ease); }
.chart-table[open] summary .icon { transform: rotate(90deg); }
.chart-table .table-wrap { margin-top: 12px; max-height: 320px; overflow-y: auto; }
.chart .tip { position: absolute; bottom: calc(var(--h) * 100% + 10px); left: 50%; translate: -50% 0; z-index: 2; padding: 6px 10px; border-radius: 10px; background: var(--raised); box-shadow: 0 10px 30px -12px var(--shadow); font: 500 .75rem var(--mono); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s; }
.chart .bar:hover .tip, .chart .bar:focus-visible .tip { opacity: 1; }
/* Tips near either edge open inward, and the chart clips sideways so a hidden tip never adds a page scrollbar. */
.chart { overflow-x: clip; }
.chart .bar:nth-child(-n+3) .tip { left: 0; translate: 0 0; }
.chart .bar:nth-last-child(-n+3) .tip { left: auto; right: 0; translate: 0 0; }
.chart-axis { display: flex; justify-content: space-between; margin-top: 8px; font: 400 .75rem var(--mono); color: var(--faint); }
.kinds { display: grid; grid-template-columns: max-content 1fr max-content; align-items: center; gap: 14px 18px; margin-top: 8px; font-size: .9375rem; }
.kind-row { display: contents; }
.kind-row .life-bar { height: 8px; }
.kind-row .c-num { font: 500 .8125rem var(--mono); color: var(--soft); font-variant-numeric: tabular-nums; }
.note { margin-top: 32px; color: var(--faint); font-size: .875rem; }

/* docs */
.docs { display: grid; gap: 48px; }
@media (min-width: 1000px) { .docs { grid-template-columns: 220px 1fr; } }
.toc { display: none; }
@media (min-width: 1000px) { .toc { display: grid; align-content: start; gap: 2px; position: sticky; top: calc(var(--header) + 24px); } }
.toc a { padding: 7px 12px; border-radius: 10px; color: var(--soft); text-decoration: none; font: 500 .875rem var(--ui); transition: background-color .2s, color .2s; }
.toc a:hover { background: var(--raised); color: var(--text); }
.prose { min-width: 0; max-width: 76ch; }
.prose section { padding-bottom: 40px; margin-bottom: 40px; border-bottom: 1px solid var(--line-soft); }
.prose section:last-child { border-bottom: 0; }
.prose h2 { font-size: 1.75rem; letter-spacing: -.03em; margin-bottom: 14px; scroll-margin-top: calc(var(--header) + 20px); }
.prose h3 { font-size: 1.125rem; letter-spacing: -.01em; margin: 28px 0 10px; }
.prose p, .prose li { color: var(--soft); }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 20px; }
.prose li + li { margin-top: 6px; }
.prose code { padding: 1px 6px; border-radius: 6px; background: var(--raised); color: var(--text); }
.prose strong { color: var(--text); }
.prose a { color: var(--text); text-decoration-color: var(--accent); }
.prose .kept { list-style: none; padding: 0; margin-top: 14px; }
.prose .kept li { display: flex; gap: 10px; }
.prose .kept .icon { width: 18px; height: 18px; margin-top: 3px; }
.prose .kept-yes .icon { color: var(--accent); }
.prose .kept-no .icon { color: var(--faint); }

/* faq */
.faq { display: grid; gap: 10px; }
.faq-item { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); scroll-margin-top: calc(var(--header) + 20px); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; cursor: pointer; list-style: none; font: 700 1.0625rem/1.3 var(--ui); letter-spacing: -.01em; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { color: var(--faint); transition: transform .4s var(--spring), color .2s; }
.faq-item[open] summary .icon { transform: rotate(90deg); color: var(--accent); }
.faq-item summary:focus-visible { outline-offset: -2px; border-radius: 18px; }
.faq-body { padding: 0 22px 20px; color: var(--soft); max-width: 70ch; }
.faq-body > * + * { margin-top: 10px; }
.faq-body ul { padding-left: 20px; }
.faq-body strong { color: var(--text); }
.faq-body a { color: var(--text); text-decoration-color: var(--accent); }
.faq-body code { overflow-wrap: anywhere; }
.code { position: relative; margin: 14px 0; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--bg) 70%, #000); }
:root[data-scheme="light"] .code { background: var(--surface); }
.code pre { padding: 18px 20px; overflow-x: auto; font-size: .8125rem; line-height: 1.75; color: var(--soft); }
.code pre code { padding: 0; background: none; color: inherit; }
.code .copy-code { position: absolute; top: 10px; right: 10px; }
.method { display: inline-flex; padding: 2px 8px; margin-right: 8px; border-radius: 6px; background: var(--tint); color: var(--accent); font: 600 .75rem var(--mono); }
.endpoint { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }
.endpoint h3 { margin: 0 0 8px; font: 500 .9375rem var(--mono); letter-spacing: 0; }
.sharex { display: grid; gap: 12px; margin-top: 14px; }
@media (min-width: 640px) { .sharex { grid-template-columns: 1fr auto auto; align-items: end; } }

/* legal */
.legal .prose h2 { margin-top: 0; }

/* token reveal */
.token-box { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.token-box code { flex: 1 1 280px; min-width: 0; padding: 14px 16px; border-radius: 14px; background: var(--bg); border: 1px solid var(--accent); color: var(--accent); font-size: .9375rem; overflow-wrap: anywhere; }
.setting { padding: 18px 0; border-top: 1px solid var(--line-soft); }
.setting:first-of-type { border-top: 0; }
.setting p { margin-top: 4px; color: var(--faint); font-size: .875rem; max-width: 56ch; }
.setting strong { font: 600 1rem var(--ui); }

/* dialog */
dialog { width: min(440px, 100% - 32px); padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); color: var(--text); box-shadow: 0 40px 80px -30px var(--shadow); }
dialog::backdrop { background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(4px); }
dialog[open] { animation: rise-in .45s var(--ease); }
dialog h2 { font-size: 1.375rem; }
dialog p { margin-top: 8px; color: var(--soft); font-size: .9375rem; }
dialog form { display: grid; gap: 14px; }
dialog .panel-actions { justify-content: flex-end; margin-top: 8px; }

/* toasts */
.toasts { position: fixed; z-index: 110; left: 50%; bottom: 24px; translate: -50% 0; display: grid; justify-items: center; gap: 8px; pointer-events: none; width: min(420px, 100% - 32px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; background: var(--text); color: var(--bg); font: 500 .875rem var(--ui); box-shadow: 0 18px 40px -18px var(--shadow); animation: toast-in .5s var(--spring); }
.toast .icon { width: 16px; height: 16px; }
.toast.is-error { background: var(--danger); color: #1c0d0a; }
:root[data-scheme="light"] .toast.is-error { color: #fff; }
.toast.is-leaving { animation: toast-out .3s var(--ease) forwards; }

/* motion */
@keyframes breathe { 50% { opacity: .25; } }
@keyframes drift { to { transform: translate(-60px, 40px) scale(1.08); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes roll-in { from { opacity: 0; transform: translateY(.6em); filter: blur(4px); color: var(--accent); } }
@keyframes trace-settle { 50% { stroke-width: 3; } to { stroke-width: 1; opacity: .5; } }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

:root.route-change::view-transition-old(view) { animation: vt-out .18s var(--ease) both; }
:root.route-change::view-transition-new(view) { animation: vt-in .5s var(--ease) both; }
::view-transition-group(drop-card) { animation-duration: .6s; animation-timing-function: var(--ease); }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(12px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
