/* ==========================================================================
   Tokens

   Every colour is a variable so the dark theme is a palette swap rather than
   a second stylesheet, and so a node's own ACCENT_COLOR flows through tints
   and hovers instead of leaving stray blue behind.
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* --accent-base is injected per node from ACCENT_COLOR; everything else is
     derived from it, so changing one value retints the whole interface. */
  --accent-base: #0d6e6e;
  --accent: var(--accent-base);
  --accent-contrast: #ffffff;
  --accent-hover: color-mix(in srgb, var(--accent-base) 86%, black);
  --accent-soft: color-mix(in srgb, var(--accent-base) 9%, white);
  --accent-ring: color-mix(in srgb, var(--accent-base) 35%, transparent);

  /* Warm neutrals: deliberately off the blue-grey ramp every generated
     dashboard ships with. */
  --bg: #f7f7f5;
  --surface: #ffffff;
  --surface-sunken: #faf9f7;
  --text: #15191c;
  --text-strong: #0b0e10;
  --muted: #6b7076;
  --border: #e4e2dd;
  --border-strong: #d4d1cb;

  --danger: #c0392f;
  --danger-soft: #fdf3f2;
  --danger-border: #f2d5d1;
  --success: #15734a;
  --success-soft: #f0f8f3;
  --success-border: #c9e4d5;
  --warning-soft: #fdf6e3;
  --warning-border: #f0e3bd;
  --warning-text: #6b5518;

  --odometer-bg: #15191c;
  --odometer-text: #ffffff;

  --shadow-sm: 0 1px 2px rgba(20, 20, 18, 0.05);
  --shadow-md: 0 6px 20px rgba(20, 20, 18, 0.09);
  --shadow-lg: 0 14px 40px rgba(20, 20, 18, 0.14);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  /* A scale, so heading sizes stop being ad-hoc numbers. */
  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-body-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.5rem;

  --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* The configured accent is chosen against a light page; on a dark one it
       needs lifting or it sinks into the background. */
    --accent: color-mix(in srgb, var(--accent-base) 62%, #9ff0e4);
    --accent-contrast: #07211f;
    --accent-hover: color-mix(in srgb, var(--accent-base) 45%, #c4f5ec);
    --accent-soft: color-mix(in srgb, var(--accent-base) 22%, #11161a);
    --accent-ring: color-mix(in srgb, var(--accent-base) 45%, transparent);

    --bg: #111416;
    --surface: #191d20;
    --surface-sunken: #1f2428;
    --text: #e7e8e8;
    --text-strong: #f4f5f5;
    --muted: #9aa1a7;
    --border: #2b3136;
    --border-strong: #3a4147;

    --danger: #f0786b;
    --danger-soft: #2a1a18;
    --danger-border: #4a2a26;
    --success: #5cc48d;
    --success-soft: #16261e;
    --success-border: #27432f;
    --warning-soft: #2a2416;
    --warning-border: #463c21;
    --warning-text: #e8d9a8;

    --odometer-bg: #050708;
    --odometer-text: #f4f5f5;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 14px 40px rgba(0, 0, 0, 0.55);
  }
}

/* ==========================================================================
   Base
   ========================================================================== */

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.55;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  color: var(--text-strong);
  line-height: 1.2;
  /* System and grotesque faces both tighten up well at display sizes; this is
     most of what separates "typeset" from "default". */
  letter-spacing: -0.02em;
  font-weight: 600;
}

h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-lg); }
h3 { font-size: var(--text-base); }

a { color: var(--accent); }

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

code { font-family: var(--font-mono); font-size: 0.9em; }

.muted { color: var(--muted); }

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

/* ==========================================================================
   Chrome: bar, header, footer
   ========================================================================== */

.notice-bar {
  background: var(--warning-soft);
  border-bottom: 1px solid var(--warning-border);
  color: var(--warning-text);
  text-align: center;
  padding: 0.6rem 1rem;
  font-size: var(--text-body-sm);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.brand {
  font-weight: 600;
  font-size: var(--text-lg);
  letter-spacing: -0.03em;
  color: var(--text-strong);
  text-decoration: none;
}
.brand:hover { color: var(--accent); }

.topbar nav { display: flex; align-items: center; }

nav a {
  margin-left: 1.25rem;
  font-size: var(--text-body-sm);
  color: var(--muted);
  text-decoration: none;
}
nav a:hover { color: var(--text-strong); }

.container {
  max-width: 920px;
  margin: 2.5rem auto 3.5rem;
  padding: 0 1.5rem;
}

/* The personal area holds a 5-column table, so it gets more room than the
   marketing and legal pages, where long measures hurt reading. */
.container--wide { max-width: 1120px; }

.footer {
  text-align: center;
  color: var(--muted);
  padding: 2.5rem 1.5rem 3rem;
  font-size: var(--text-body-sm);
  border-top: 1px solid var(--border);
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}
.footer-links a { color: var(--muted); text-decoration: none; margin-left: 0; }
.footer-links a:hover { color: var(--accent); }

/* ==========================================================================
   Language menu
   ========================================================================== */

.lang-menu {
  position: relative;
  display: inline-block;
  margin-left: 1.25rem;
  padding-left: 1.25rem;
  border-left: 1px solid var(--border);
}

.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-body-sm);
  color: var(--text);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.lang-trigger::-webkit-details-marker { display: none; }
.lang-trigger:hover { background: var(--surface-sunken); }
.lang-globe { color: var(--muted); flex-shrink: 0; }
.lang-chevron { color: var(--muted); transition: transform 0.15s ease; }
.lang-menu[open] .lang-chevron { transform: rotate(180deg); }

.lang-panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  min-width: 11rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 0.25rem;
  z-index: 30;
}

.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-left: 0;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-body-sm);
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.lang-option:hover { background: var(--surface-sunken); color: var(--text); }
.lang-option.current { color: var(--accent); font-weight: 600; }

/* ==========================================================================
   Controls
   ========================================================================== */

label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: var(--text-body-sm);
  color: var(--text);
}

input, textarea {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--text-body-sm);
  background: var(--surface);
  color: var(--text);
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--accent-contrast);
  border: 1px solid transparent;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--text-body-sm);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}
.button:hover { background: var(--accent-hover); }

.button.secondary {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--border-strong);
}
.button.secondary:hover { background: var(--accent-soft); border-color: var(--accent); }

.button.danger { background: var(--danger); color: #fff; }
.button.danger:hover { background: color-mix(in srgb, var(--danger) 85%, black); }

.button:disabled {
  background: var(--surface-sunken);
  color: var(--muted);
  border-color: var(--border);
  cursor: not-allowed;
}

.form-error, .form-success {
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  font-size: var(--text-body-sm);
  margin: 0 0 0.9rem;
}
.form-error {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}
.form-success {
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid var(--success-border);
}

/* ==========================================================================
   Home
   ========================================================================== */

.hero h1 {
  font-size: var(--text-3xl);
  letter-spacing: -0.035em;
  margin: 0 0 0.6rem;
}
.hero-lead {
  color: var(--muted);
  font-size: var(--text-lg);
  max-width: 54ch;
  margin: 0 0 2rem;
}

/* The counter is the one loud element on the page: it is the proof the
   service is running, so it gets the display treatment and nothing else does. */
.counter { display: flex; flex-direction: column; gap: 0.6rem; }
.counter-label {
  color: var(--muted);
  font-size: var(--text-xs);
  text-transform: none;
  letter-spacing: 0.01em;
}
.counter-digits { display: flex; gap: 0.3rem; align-items: center; }
.counter-digit {
  background: var(--odometer-bg);
  color: var(--odometer-text);
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.5rem;
  min-width: 1.75rem;
  text-align: center;
}
.counter-gap { width: 0.5rem; }

.actions { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 3rem; }
.action-card {
  flex: 1 1 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.action-card h2 { margin: 0 0 1.1rem; }
.action-note { color: var(--muted); font-size: var(--text-sm); margin: 1rem 0 0; }

.key-form { display: flex; flex-direction: column; gap: 0.8rem; align-items: stretch; }
.key-form .button { align-self: flex-start; }

.how-it-works, .pricing, .faq { margin-top: 3.5rem; }
.steps {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.steps li {
  flex: 1 1 220px;
  display: flex;
  gap: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.step-num {
  flex-shrink: 0;
  width: 1.75rem; height: 1.75rem;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-sm);
  font-weight: 600;
}
.steps p { margin: 0.3rem 0 0; color: var(--muted); font-size: var(--text-body-sm); }

.features { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-top: 2rem; }
.feature {
  flex: 1 1 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.feature h3 { margin: 0 0 0.4rem; }
.feature p { margin: 0; color: var(--muted); font-size: var(--text-body-sm); }

.pricing-cards { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-top: 1.5rem; }
.pricing-card {
  flex: 1 1 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.pricing-card h3 { margin: 0; }
.pricing-card .price {
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0.3rem 0 1.1rem;
}
.pricing-card ul {
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: var(--text-body-sm);
  margin: 0 0 1.4rem;
}
.pricing-card li { margin-bottom: 0.3rem; }

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  margin-top: 0.6rem;
}
.faq summary {
  cursor: pointer;
  font-weight: 500;
  font-size: var(--text-body-sm);
}
.faq p { color: var(--muted); margin: 0.6rem 0 0; font-size: var(--text-body-sm); }

/* ==========================================================================
   Cards and panels
   ========================================================================== */

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  max-width: 420px;
  /* The card is narrower than its container, so without this it sits against
     the container's left edge and reads as misaligned on a wide screen. */
  margin-inline: auto;
}
.form-card.wide { max-width: 680px; }
.form-card h1 { margin: 0 0 1.25rem; }
.form-card form { display: flex; flex-direction: column; gap: 0.9rem; }
.form-card .button { align-self: flex-start; }
.form-card p { font-size: var(--text-body-sm); }

/* One surface treatment for every block in the personal area, so panels line
   up at a single width instead of mixing narrow cards with bare tables. */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.panel--flush { padding: 0; overflow: hidden; }
.panel--danger { border-color: var(--danger-border); }
.panel h2 { margin: 0 0 0.9rem; }
.panel-intro { color: var(--muted); font-size: var(--text-body-sm); margin: 0 0 1rem; }

/* Legal pages are read, not skimmed: tighter paragraphs, clear clause spacing,
   and a visible revision date at the top. */
.legal-meta {
  color: var(--muted);
  font-size: var(--text-sm);
  margin: -0.5rem 0 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.legal p { margin: 0 0 0.6rem; font-size: var(--text-body-sm); line-height: 1.6; }
.legal h2 { margin-top: 2rem; }

.about-stats {
  margin: 1.75rem 0;
  padding: 1.25rem 0;
  border-block: 1px solid var(--border);
}
.about-stats .stat-value { font-size: var(--text-xl); }
.about-list { padding-left: 1.1rem; margin: 0; font-size: var(--text-body-sm); }
.about-list li { margin-bottom: 0.5rem; line-height: 1.6; }

/* ==========================================================================
   Personal area
   ========================================================================== */

.shell-title { font-size: var(--text-xl); margin: 0 0 0.2rem; }
.shell-subtitle { color: var(--muted); font-size: var(--text-body-sm); margin: 0 0 1.25rem; }

.account-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.75rem;
  overflow-x: auto;
}
.account-tab {
  padding: 0.6rem 0.9rem;
  font-size: var(--text-body-sm);
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.account-tab:hover { color: var(--text-strong); }
.account-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 500;
}

.stat-row { display: flex; flex-wrap: wrap; gap: 2rem; margin-bottom: 1.25rem; }
.stat { display: flex; flex-direction: column; gap: 0.2rem; min-width: 9rem; }
.stat-label { color: var(--muted); font-size: var(--text-xs); }
.stat-value {
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.stat-sub { color: var(--muted); font-size: var(--text-xs); }

.quota-bar {
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  height: 8px;
  overflow: hidden;
}
.quota-bar-fill { background: var(--accent); height: 100%; }
.quota-caption { color: var(--muted); font-size: var(--text-xs); margin: 0.5rem 0 1.5rem; }

.stacked-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  max-width: 22rem;
  align-items: stretch;
}
.stacked-form .button { align-self: flex-start; }
.inline-form { display: flex; align-items: flex-end; gap: 0.8rem; flex-wrap: wrap; }
.inline-form label { max-width: 12rem; }

.field-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1.75rem;
  margin: 0;
  font-size: var(--text-body-sm);
}
.field-list dt { color: var(--muted); }
.field-list dd { margin: 0; }
.field-list + .panel-intro { margin-top: 1.5rem; }

/* ==========================================================================
   File table
   ========================================================================== */

.table-scroll { overflow-x: auto; }
.file-table { width: 100%; border-collapse: collapse; font-size: var(--text-body-sm); }
.file-table th, .file-table td {
  text-align: left;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.file-table th {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--muted);
  background: var(--surface-sunken);
}
.file-table tbody tr:last-child td { border-bottom: none; }
.file-table tbody tr:hover { background: var(--surface-sunken); }

.col-size, .col-date, .col-actions { white-space: nowrap; }
.col-size { width: 1%; font-variant-numeric: tabular-nums; }
.col-date { width: 1%; color: var(--muted); }
.col-actions { width: 1%; text-align: right; }
.col-link { white-space: nowrap; }
.link-expiry { display: block; color: var(--muted); font-size: var(--text-xs); margin-top: 0.15rem; }

.file-cell { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 22rem; }

.file-badge {
  flex-shrink: 0;
  display: inline-block;
  min-width: 2.9rem;
  text-align: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 4px;
  padding: 0.25rem 0.4rem;
}

.row-actions { display: flex; gap: 1rem; justify-content: flex-end; align-items: center; }
.inline { display: inline; }

/* All three row actions read as the same kind of control, with colour as the
   only signal that one of them is destructive. */
.row-action {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: var(--text-body-sm);
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.row-action:hover { text-decoration: underline; }
.row-action.danger { color: var(--danger); }

.empty-state {
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 3rem 1rem;
  color: var(--muted);
  font-size: var(--text-body-sm);
}
.empty-state p:first-child {
  color: var(--text-strong);
  font-weight: 600;
  font-size: var(--text-base);
  margin: 0 0 0.35rem;
}
.empty-state p:last-child { margin: 0; }

/* ==========================================================================
   Upload
   ========================================================================== */

.dropzone {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  text-align: center;
  background: var(--surface-sunken);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone-text { font-weight: 600; margin: 0 0 0.3rem; font-size: var(--text-body-sm); }
.dropzone-hint { color: var(--muted); font-size: var(--text-sm); margin: 0 0 0.9rem; }
.dropzone input[type="file"] { display: block; margin: 0 auto; font-size: var(--text-sm); }
/* Once JS runs, the native control is replaced by the styled button, but it
   stays in the layout (not display:none) so `required` can still focus it. */
.dropzone.js-enhanced input[type="file"] {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}
.dropzone-filename { margin: 0.8rem 0 0; font-size: var(--text-body-sm); }

#upload-submit { margin-top: 1rem; }

.progress-wrap {
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  height: 8px;
  overflow: hidden;
  margin-top: 1rem;
}
.progress-bar { background: var(--accent); height: 100%; width: 0%; transition: width 0.1s linear; }

/* ==========================================================================
   Status
   ========================================================================== */

.status-heading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--text-xl);
  margin: 0 0 0.5rem;
}
.status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--success);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 18%, transparent);
}
.component-list { list-style: none; margin: 0; padding: 0; }
.component-list li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--text-body-sm);
}
.component-list li:last-child { border-bottom: none; }

/* ==========================================================================
   Cookie notice and support widget
   ========================================================================== */

.cookie-notice {
  position: fixed;
  left: 1rem; right: 1rem; bottom: 1rem;
  max-width: 460px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 25;
}
.cookie-notice[hidden] { display: none; }
.cookie-notice p { margin: 0; font-size: var(--text-sm); color: var(--text); }
.cookie-notice .button { align-self: flex-start; }

.support-widget {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}
.support-widget[hidden] { display: none; }

.support-bubble {
  width: 3.1rem;
  height: 3.1rem;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--accent);
  color: var(--accent-contrast);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}
.support-bubble:hover { background: var(--accent-hover); }

.support-panel {
  width: min(22rem, calc(100vw - 2.5rem));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.support-panel[hidden] { display: none; }

.support-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-sunken);
  font-size: var(--text-body-sm);
}
.support-close {
  background: none;
  border: none;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 0 0.2rem;
}
.support-panel-body { padding: 1rem; }
.support-intro { color: var(--muted); font-size: var(--text-sm); margin: 0 0 0.9rem; }
.support-form { display: flex; flex-direction: column; gap: 0.7rem; }
.support-form textarea { resize: vertical; }
.support-form .button { align-self: flex-start; }
.support-sent { margin: 0; font-size: var(--text-body-sm); }

/* Admin support inbox */
.support-inbox { margin-top: 2.5rem; }
.support-message {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.75rem;
  font-size: var(--text-body-sm);
}
.support-message.unread { border-left-color: var(--accent); }
.support-message-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: var(--text-sm);
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.support-from { color: var(--text-strong); font-weight: 600; }
.support-body { margin: 0 0 0.6rem; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ==========================================================================
   Narrow screens
   ========================================================================== */

/* A 5-column table needs a horizontal scroll on a phone, which hides the row
   actions behind a gesture with no affordance. Below this width each row
   becomes a stacked card instead, so every action stays reachable. */
@media (max-width: 700px) {
  .file-table thead { display: none; }
  .file-table, .file-table tbody, .file-table tr, .file-table td { display: block; width: 100%; }
  .file-table tr { padding: 0.9rem 1rem; border-bottom: 1px solid var(--border); }
  .file-table tbody tr:last-child { border-bottom: none; }
  .file-table td { border: none; padding: 0.1rem 0; }
  .file-name { max-width: none; white-space: normal; overflow-wrap: anywhere; }

  /* Scoped through .file-table so these beat the `.file-table td` block rule
     above, which is more specific than a bare class. */
  .file-table .col-size, .file-table .col-date {
    display: inline-block;
    width: auto;
    color: var(--muted);
    font-size: var(--text-sm);
  }
  .file-table .col-size::after { content: " · "; white-space: pre; }
  .file-table .col-link, .file-table .col-actions {
    width: auto;
    text-align: left;
    white-space: normal;
  }
  .col-link { margin-top: 0.4rem; }
  .row-actions { justify-content: flex-start; margin-top: 0.35rem; }
  .link-expiry { display: inline; margin-left: 0.4rem; }

  .topbar { padding: 0.8rem 1rem; }
  .container { padding: 0 1rem; margin-top: 1.75rem; }
  .hero h1 { font-size: var(--text-2xl); }
  .hero-lead { font-size: var(--text-base); }
  nav a { margin-left: 0.85rem; }
  .lang-menu { margin-left: 0.85rem; padding-left: 0.85rem; }
  .lang-trigger-name { display: none; }
  .stat-row { gap: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
