:root {
  color-scheme: dark;
  --bg: #07090f;
  --bg-deep: #05070b;
  --panel: #0d121d;
  --panel-raised: #121927;
  --text: #f6f3ec;
  --muted: #a1aabd;
  --faint: #6f788a;
  --accent: #ff8a3c;
  --accent-bright: #ff9f5e;
  --accent-ink: #241105;
  --accent-soft: rgba(255, 138, 60, 0.12);
  --mint: #63e6b5;
  --danger: #ff7078;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.17);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow-card: 0 28px 80px -34px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
    Helvetica, Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(1100px 700px at 6% -12%, rgba(255, 114, 35, 0.15), transparent 60%),
    radial-gradient(950px 720px at 98% 8%, rgba(61, 95, 255, 0.14), transparent 58%),
    radial-gradient(780px 600px at 50% 110%, rgba(24, 120, 110, 0.1), transparent 65%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(255, 138, 60, 0.32);
  color: #fff;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

a {
  color: inherit;
}

svg {
  display: block;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.18s ease;
}

.skip-link:focus {
  top: 14px;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ambient-glow {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.55;
}

.ambient-glow-one {
  top: -210px;
  left: -160px;
  width: 620px;
  height: 560px;
  background: rgba(255, 111, 31, 0.2);
}

.ambient-glow-two {
  top: 120px;
  right: -260px;
  width: 640px;
  height: 640px;
  background: rgba(66, 97, 255, 0.17);
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 85% 58% at 50% 5%, #000 10%, transparent 80%);
  mask-image: radial-gradient(ellipse 85% 58% at 50% 5%, #000 10%, transparent 80%);
}

/* Header ------------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  max-width: 1248px;
  margin: 0 auto;
  padding: 16px 24px;
  background: linear-gradient(to bottom, rgba(7, 9, 15, 0.86), rgba(7, 9, 15, 0.5));
  border-bottom: 1px solid transparent;
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #ffab6b, #ff6a1a 72%);
  color: #281204;
  box-shadow:
    0 10px 26px -10px rgba(255, 106, 26, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.brand-mark svg {
  width: 24px;
  height: 24px;
}

.brand-text {
  font-size: 1.06rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: #c7cfdc;
  font-size: 0.73rem;
  font-weight: 550;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.live-dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(99, 230, 181, 0.13);
}

.live-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(99, 230, 181, 0.4);
  animation: ping 2.6s ease-out infinite;
}

.live-pill.is-offline {
  color: #ffc0c3;
  border-color: rgba(255, 112, 120, 0.3);
  background: rgba(255, 112, 120, 0.08);
}

.live-pill.is-offline .live-dot {
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(255, 112, 120, 0.13);
}

.live-pill.is-offline .live-dot::after {
  display: none;
}

.live-pill.is-working .live-dot {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 138, 60, 0.13);
}

.live-pill.is-working .live-dot::after {
  border-color: rgba(255, 138, 60, 0.5);
}

/* Buttons ----------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(180deg, #ff9c56, #ff7a24);
  color: #261305;
  box-shadow:
    0 10px 26px -14px rgba(255, 122, 36, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #ffb076, #ff8f42);
  box-shadow:
    0 14px 30px -14px rgba(255, 122, 36, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: #e6e9ef;
}

.btn-ghost:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.075);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-primary:disabled:hover {
  background: linear-gradient(180deg, #ff9c56, #ff7a24);
  box-shadow:
    0 10px 26px -14px rgba(255, 122, 36, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-sm {
  min-height: 34px;
  padding: 0 13px;
  font-size: 0.77rem;
}

.icon-btn {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.035);
  color: #cfd6e2;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.icon-btn:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.icon-btn:active {
  transform: scale(0.96);
}

.icon-btn.is-spinning .icon,
.is-spinning .refresh-icon {
  animation: spin 0.8s linear infinite;
}

.text-btn {
  padding: 2px 4px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 600;
}

.text-btn:hover {
  color: var(--accent-bright);
}

/* Hero -------------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, 0.95fr);
  gap: clamp(32px, 5vw, 78px);
  align-items: center;
  width: 100%;
  max-width: 1248px;
  margin: 0 auto;
  padding: 62px 24px 42px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px 5px 9px;
  border: 1px solid rgba(255, 138, 60, 0.24);
  border-radius: 999px;
  background: rgba(255, 138, 60, 0.07);
  color: #ffb787;
  font-size: 0.67rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(255, 138, 60, 0.9);
}

.hero h1 {
  margin-top: 22px;
  font-size: clamp(3.3rem, 6vw, 5.55rem);
  font-weight: 630;
  line-height: 0.93;
  letter-spacing: -0.062em;
}

.hero h1 em {
  display: inline-block;
  padding-right: 0.04em;
  background: linear-gradient(100deg, #ffe1c9 2%, #ffae72 36%, #ff7a24 78%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--font-serif);
  font-size: 1.06em;
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.025em;
  transform: translateY(0.015em);
}

.lede {
  max-width: 46ch;
  margin-top: 24px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.66;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 20px;
  margin-top: 22px;
}

.point {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #cbd3e0;
  font-size: 0.79rem;
  font-weight: 500;
}

.point .icon {
  width: 14px;
  height: 14px;
  color: var(--mint);
}

.page-link {
  display: flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  max-width: 440px;
  margin-top: 30px;
  padding: 6px 6px 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.032);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.page-link-icon {
  display: grid;
  place-items: center;
  color: var(--faint);
}

.page-link-icon svg {
  width: 15px;
  height: 15px;
}

.page-link code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: #c4ccda;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-copy {
  flex: none;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(255, 138, 60, 0.22);
  border-radius: 999px;
  background: rgba(255, 138, 60, 0.11);
  color: #ffba8c;
  font-size: 0.72rem;
  font-weight: 650;
  transition:
    background 0.18s ease,
    color 0.18s ease;
}

.link-copy:hover {
  background: var(--accent);
  color: var(--accent-ink);
}

/* Upload card ------------------------------------------------------------- */

.hero-panel {
  min-width: 0;
}

.upload-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  background: linear-gradient(165deg, rgba(24, 31, 47, 0.9), rgba(10, 14, 23, 0.94));
  box-shadow: var(--shadow-card);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.upload-card::before {
  content: "";
  position: absolute;
  top: -150px;
  left: 18%;
  width: 380px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255, 122, 36, 0.16);
  filter: blur(70px);
  pointer-events: none;
}

.upload-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
}

.upload-head-icon {
  display: grid;
  width: 46px;
  height: 46px;
  flex: none;
  place-items: center;
  border: 1px solid rgba(255, 138, 60, 0.26);
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(255, 138, 60, 0.22), rgba(255, 138, 60, 0.06));
  color: #ffb37c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.upload-head-icon svg {
  width: 23px;
  height: 23px;
}

.upload-head h2 {
  font-size: 1.07rem;
  font-weight: 620;
  letter-spacing: -0.02em;
}

.upload-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.dropzone {
  position: relative;
  display: block;
  margin-top: 18px;
  padding: 25px 18px 23px;
  border: 1.5px dashed rgba(255, 255, 255, 0.17);
  border-radius: 18px;
  background: rgba(5, 8, 14, 0.42);
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.dropzone:hover {
  border-color: rgba(255, 138, 60, 0.52);
  background: rgba(255, 138, 60, 0.055);
}

.dropzone:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.upload-card.is-dragging .dropzone {
  border-style: solid;
  border-color: var(--accent);
  background: rgba(255, 138, 60, 0.11);
  transform: scale(1.008);
}

.dropzone-art {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 11px;
  place-items: center;
  color: var(--accent);
  opacity: 0.92;
  transition: transform 0.25s ease;
}

.dropzone-art svg {
  width: 100%;
  height: 100%;
}

.dropzone:hover .dropzone-art,
.upload-card.is-dragging .dropzone-art {
  transform: translateY(-2px);
}

.dropzone strong {
  display: block;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.dropzone-sub {
  display: block;
  margin-top: 4px;
  color: var(--faint);
  font-size: 0.76rem;
}

.fake-link {
  color: #d4dae4;
  text-decoration: underline;
  text-decoration-color: rgba(255, 138, 60, 0.55);
  text-underline-offset: 3px;
}

.upload-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 11px;
}

.limit-hint {
  color: var(--faint);
  font-size: 0.71rem;
}

.key-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--faint);
  transition: border-color 0.18s ease;
}

.key-field:focus-within {
  border-color: rgba(255, 138, 60, 0.55);
}

.key-field .icon {
  width: 13px;
  height: 13px;
}

.key-field input {
  width: 110px;
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.73rem;
  outline: none;
}

.key-field input::placeholder {
  color: var(--faint);
}

.upload-queue {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 500;
}

.queue-list {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}

.queue-item {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.032);
}

.queue-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.queue-name {
  overflow: hidden;
  color: #dbe0e9;
  font-size: 0.76rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-status {
  flex: none;
  color: var(--faint);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
}

.queue-track {
  height: 3px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.queue-fill {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff7a24, #ffb373);
  transition: width 0.18s ease;
}

.queue-item.is-done .queue-fill {
  width: 100% !important;
  background: var(--mint);
}

.queue-item.is-error .queue-fill {
  width: 100% !important;
  background: var(--danger);
}

.queue-item.is-error .queue-status {
  color: #ff9ba0;
}

.retry-btn {
  width: 100%;
  margin-top: 9px;
  min-height: 36px;
  font-size: 0.76rem;
}

/* Note composer ----------------------------------------------------------- */

.note-block {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.note-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 4px 2px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.77rem;
  text-align: left;
  transition: color 0.18s ease;
}

.note-toggle:hover {
  color: var(--text);
}

.note-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.note-toggle .icon {
  width: 16px;
  height: 16px;
}

.note-chevron {
  transition: transform 0.2s ease;
}

.note-toggle[aria-expanded="true"] .note-chevron {
  transform: rotate(180deg);
}

.note-body {
  margin-top: 10px;
  animation: rise 0.22s ease both;
}

.note-body textarea {
  display: block;
  width: 100%;
  min-height: 104px;
  padding: 11px 12px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.24);
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.55;
  outline: none;
  transition:
    border-color 0.18s ease,
    background 0.18s ease;
}

.note-body textarea::placeholder {
  color: var(--faint);
}

.note-body textarea:focus {
  border-color: rgba(255, 138, 60, 0.5);
  background: rgba(0, 0, 0, 0.32);
}

.note-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.note-count {
  color: var(--faint);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
}

/* Files section ----------------------------------------------------------- */

.files-section {
  width: 100%;
  max-width: 1248px;
  margin: 0 auto;
  padding: 14px 24px 66px;
}

.files-shell {
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(14, 19, 30, 0.62), rgba(8, 12, 20, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.section-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.section-head h2 {
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  font-weight: 620;
  letter-spacing: -0.035em;
}

.count-pill {
  min-width: 26px;
  padding: 2px 8px;
  border: 1px solid rgba(255, 138, 60, 0.22);
  border-radius: 999px;
  background: var(--accent-soft);
  color: #ffb98b;
  font-size: 0.7rem;
  font-weight: 650;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.section-copy > p {
  margin-top: 5px;
  color: var(--faint);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.file-tools {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 202px;
  height: 39px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.032);
  transition:
    border-color 0.18s ease,
    background 0.18s ease;
}

.search-field:focus-within {
  border-color: rgba(255, 138, 60, 0.48);
  background: rgba(255, 255, 255, 0.05);
}

.search-field .icon {
  width: 16px;
  height: 16px;
  color: var(--faint);
}

.search-field input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.79rem;
  outline: none;
}

.search-field input::placeholder {
  color: var(--faint);
}

.search-field input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.select-wrap .icon {
  position: absolute;
  right: 9px;
  width: 14px;
  height: 14px;
  color: var(--faint);
  pointer-events: none;
}

.select-wrap select {
  height: 39px;
  padding: 0 30px 0 11px;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.032);
  color: #ced5e1;
  font-size: 0.76rem;
  outline: none;
  transition:
    border-color 0.18s ease,
    background 0.18s ease;
}

.select-wrap select:hover {
  border-color: var(--line-strong);
}

.select-wrap select:focus-visible {
  border-color: rgba(255, 138, 60, 0.48);
}

.select-wrap option {
  background: #111827;
  color: var(--text);
}

.section-refresh {
  width: 39px;
  height: 39px;
  border-radius: 10px;
}

/* Setup banner ------------------------------------------------------------ */

.setup-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 20px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 138, 60, 0.28);
  border-radius: 14px;
  background: rgba(255, 138, 60, 0.07);
}

.setup-icon {
  display: grid;
  width: 26px;
  height: 26px;
  flex: none;
  place-items: center;
  color: var(--accent);
}

.setup-icon svg {
  width: 22px;
  height: 22px;
}

.setup-banner strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
}

.setup-banner p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.setup-banner code {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.28);
  font-family: var(--font-mono);
  font-size: 0.71rem;
}

/* File grid --------------------------------------------------------------- */

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(284px, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.file-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.031);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.file-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.046);
  box-shadow: 0 18px 40px -26px rgba(0, 0, 0, 0.9);
  transform: translateY(-2px);
}

.file-card.is-new {
  border-color: rgba(255, 138, 60, 0.38);
}

.file-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.file-tile {
  display: grid;
  width: 47px;
  height: 53px;
  flex: none;
  place-items: center;
  border-radius: 11px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  line-height: 1;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 8px 18px -12px rgba(0, 0, 0, 0.75);
}

.tile-image {
  background: linear-gradient(145deg, #ffc08e, #ff8266);
  color: #461505;
}

.tile-video {
  background: linear-gradient(145deg, #cbb8ff, #8c7bff);
  color: #1a1145;
}

.tile-audio {
  background: linear-gradient(145deg, #98f3dd, #45cdb7);
  color: #04352c;
}

.tile-pdf {
  background: linear-gradient(145deg, #ffb1b1, #ff6b78);
  color: #470a11;
}

.tile-archive {
  background: linear-gradient(145deg, #ffe1a1, #ffb437);
  color: #3d2703;
}

.tile-text {
  background: linear-gradient(145deg, #b5dcff, #75b2ff);
  color: #08284a;
}

.tile-other {
  background: linear-gradient(145deg, #dbe1ea, #aab4c6);
  color: #1c2433;
}

.file-info {
  min-width: 0;
  flex: 1;
}

.file-card.is-new .file-info {
  padding-right: 30px;
}

.file-name {
  overflow: hidden;
  color: #f2efe9;
  font-size: 0.87rem;
  font-weight: 570;
  letter-spacing: -0.012em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  overflow: hidden;
  color: var(--faint);
  font-size: 0.71rem;
  white-space: nowrap;
}

.file-meta .dot {
  width: 2.5px;
  height: 2.5px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

.file-meta time {
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-download {
  display: inline-flex;
  min-width: 0;
  min-height: 35px;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 11px;
  border: 1px solid rgba(255, 138, 60, 0.24);
  border-radius: 9px;
  background: rgba(255, 138, 60, 0.1);
  color: #ffb98a;
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.btn-download:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-download .icon {
  width: 15px;
  height: 15px;
}

.copy-file {
  width: 35px;
  height: 35px;
  border-radius: 9px;
}

.copy-file .icon {
  width: 15px;
  height: 15px;
}

.copy-file.is-copied {
  border-color: rgba(99, 230, 181, 0.4);
  color: var(--mint);
}

.new-badge {
  position: absolute;
  top: 10px;
  right: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffa361, #ff822f);
  color: #2a1303;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px -4px rgba(255, 122, 36, 0.85);
}

/* Skeleton ---------------------------------------------------------------- */

.skeleton-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.02);
}

.skeleton {
  display: block;
  border-radius: 7px;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0.045) 20%,
    rgba(255, 255, 255, 0.09) 42%,
    rgba(255, 255, 255, 0.045) 64%
  );
  background-size: 220% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}

.skeleton-tile {
  width: 47px;
  height: 53px;
  border-radius: 11px;
}

.skeleton-line {
  height: 9px;
}

.skeleton-line-lg {
  width: 74%;
}

.skeleton-line-sm {
  width: 46%;
}

.skeleton-button {
  width: 100%;
  height: 35px;
  margin-top: 8px;
  border-radius: 9px;
}

/* Empty states ------------------------------------------------------------ */

.empty-state {
  margin-top: 22px;
  padding: 54px 22px;
  border: 1px dashed rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  text-align: center;
}

.empty-art {
  display: grid;
  width: 78px;
  height: 78px;
  margin: 0 auto 14px;
  place-items: center;
  border: 1px solid rgba(255, 138, 60, 0.16);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, rgba(255, 138, 60, 0.14), transparent 68%);
  color: var(--accent);
}

.empty-art svg {
  width: 48px;
  height: 48px;
}

.empty-state h3 {
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.empty-state p {
  max-width: 42ch;
  margin: 6px auto 18px;
  color: var(--faint);
  font-size: 0.82rem;
  line-height: 1.6;
}

.no-results {
  padding: 40px 22px;
}

.no-results p {
  margin-bottom: 16px;
}

.truncated-note {
  margin-top: 14px;
  color: var(--faint);
  font-size: 0.72rem;
  text-align: center;
}

/* Footer ------------------------------------------------------------------ */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 1248px;
  margin: 0 auto;
  padding: 22px 24px 38px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  color: var(--faint);
  font-size: 0.72rem;
}

.site-footer p {
  display: flex;
  align-items: center;
  gap: 7px;
}

.footer-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px rgba(99, 230, 181, 0.6);
}

.footer-built {
  letter-spacing: 0.01em;
}

/* Toasts ------------------------------------------------------------------ */

.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  display: flex;
  width: min(356px, calc(100vw - 32px));
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 12px 12px 14px;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  background: rgba(17, 23, 36, 0.97);
  box-shadow: 0 18px 50px -16px rgba(0, 0, 0, 0.85);
  color: #e7eaf0;
  font-size: 0.79rem;
  line-height: 1.45;
  pointer-events: auto;
  animation: toast-in 0.24s ease both;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.toast.is-leaving {
  animation: toast-out 0.2s ease both;
}

.toast-mark {
  width: 7px;
  height: 7px;
  flex: none;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(255, 138, 60, 0.65);
}

.toast p {
  flex: 1;
  min-width: 0;
}

.toast-success {
  border-left-color: var(--mint);
}

.toast-success .toast-mark {
  background: var(--mint);
  box-shadow: 0 0 10px rgba(99, 230, 181, 0.6);
}

.toast-error {
  border-left-color: var(--danger);
}

.toast-error .toast-mark {
  background: var(--danger);
  box-shadow: 0 0 10px rgba(255, 112, 120, 0.6);
}

.toast-close {
  display: grid;
  width: 20px;
  height: 20px;
  flex: none;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--faint);
  font-size: 0.95rem;
  line-height: 1;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

/* Noscript ---------------------------------------------------------------- */

.noscript-banner {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 300;
  padding: 16px;
  border: 1px solid rgba(255, 112, 120, 0.4);
  border-radius: 12px;
  background: #2a1116;
  color: #ffd7d9;
  font-size: 0.85rem;
  text-align: center;
}

/* Responsive -------------------------------------------------------------- */

@media (max-width: 1040px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 38px;
    max-width: 760px;
    padding-top: 48px;
  }

  .hero-panel {
    max-width: 580px;
  }

  .lede {
    max-width: 56ch;
  }
}

@media (max-width: 760px) {
  .site-header {
    padding: 13px 16px;
    gap: 12px;
  }

  .brand-text {
    font-size: 0.98rem;
  }

  .share-label {
    display: none;
  }

  .share-page-btn {
    width: 38px;
    min-height: 38px;
    padding: 0;
    border-radius: var(--radius-sm);
  }

  .hero {
    padding: 38px 16px 30px;
    gap: 32px;
  }

  .hero h1 {
    font-size: clamp(2.9rem, 12vw, 4.1rem);
  }

  .lede {
    margin-top: 20px;
    font-size: 0.94rem;
  }

  .hero-points {
    gap: 8px 14px;
  }

  .point {
    font-size: 0.75rem;
  }

  .page-link {
    max-width: 100%;
  }

  .files-section {
    padding: 10px 16px 48px;
  }

  .files-shell {
    padding: 18px 14px;
    border-radius: 22px;
  }

  .section-head {
    align-items: flex-start;
    gap: 15px;
  }

  .file-tools {
    width: 100%;
  }

  .search-field {
    flex: 1;
    width: auto;
    min-width: 140px;
  }

  .file-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-footer {
    padding: 20px 16px 34px;
  }

  .toast-stack {
    right: 16px;
    bottom: 16px;
  }
}

@media (max-width: 480px) {
  .live-pill {
    padding: 0 9px;
  }

  .header-actions {
    gap: 6px;
  }

  .hero h1 {
    font-size: clamp(2.65rem, 14vw, 3.2rem);
  }

  .eyebrow {
    font-size: 0.62rem;
  }

  .upload-card {
    padding: 17px;
    border-radius: 24px;
  }

  .upload-head h2 {
    font-size: 1rem;
  }

  .upload-head p {
    font-size: 0.74rem;
  }

  .dropzone {
    padding: 22px 12px 21px;
  }

  .page-link code {
    font-size: 0.69rem;
  }

  .select-wrap select {
    max-width: 132px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

@media (max-width: 380px) {
  .brand-text {
    display: none;
  }

  .live-pill #connectionText {
    display: none;
  }

  .live-pill {
    width: 32px;
    justify-content: center;
    padding: 0;
  }
}

/* Motion ------------------------------------------------------------------ */

@keyframes ping {
  0% {
    opacity: 0.65;
    transform: scale(0.6);
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(1.65);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -120% 0;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(6px) scale(0.985);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
