/* Ultra-minimal. Black background. Redaction font. Monochrome. */

@font-face {
  font-family: "Redaction";
  font-style: normal;
  font-weight: 400;
  src: url("/static/fonts/Redaction-regular.woff") format("woff");
  font-display: swap;
}

@font-face {
  font-family: "Redaction 35";
  font-style: normal;
  font-weight: 400;
  src: url("/static/fonts/Redaction35-regular.woff") format("woff");
  font-display: swap;
}

:root {
  --bg: #000;
  --text: #fff;
  --dim: #aaa;
  --faint: #888;
  --border: #333;
  --line: #222;
}

* {
  box-sizing: border-box;
}

/* Buttons, links, and other non-text-input controls have no visible
   focus state otherwise — only text inputs get one, via their own
   :focus border-color rules below. Keyboard users tabbing through the
   page need a visible indicator on everything else too. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.hidden {
  display: none;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Redaction", serif;
  font-size: 19px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.wrap {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 24px;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* header */

header.site {
  padding: 24px 0 16px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.brand .logo {
  font-family: "Redaction 35", serif;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
}

.brand .tagline {
  color: var(--dim);
  font-size: 14px;
}

.brand .tagline a {
  color: inherit;
  text-decoration: none;
}

.brand .tagline a:hover {
  color: var(--text);
}

/* main */

main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: safe center;
  padding: 12px 0 40px;
}

.state[hidden] {
  display: none;
}

h1 {
  font-family: "Redaction 35", serif;
  font-size: 20px;
  font-weight: 400;
  margin: 0 0 8px;
  color: var(--text);
}

.subtext {
  color: var(--dim);
  font-size: 15px;
  margin: 0 0 20px;
}

.subtext a,
.info-blurb li a {
  color: var(--faint);
  text-decoration: none;
}

.subtext a:hover,
.info-blurb li a:hover {
  color: var(--text);
}

/* dropzone */

.dropzone {
  border: 1px dashed var(--border);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--text);
}

.dropzone.has-file {
  border-style: solid;
  border-color: var(--text);
}

.dropzone .primary {
  color: var(--text);
  font-size: 16px;
  margin-bottom: 4px;
}

.dropzone .secondary {
  color: var(--faint);
  font-size: 14px;
}

/* inline options (expiry + privacy toggles) */

.inline-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 14px;
  font-size: 14px;
  color: var(--dim);
}

.inline-options .opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.inline-options .opt span {
  color: var(--dim);
}

.inline-options .opt input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--text);
  cursor: pointer;
}

.inline-options .opt select {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  padding: 4px 8px;
}

.inline-options .opt select:focus {
  border-color: var(--text);
}

/* passphrase row (revealed when password is checked) */

.passphrase-row {
  margin-top: 12px;
}

.passphrase-row input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 9px 12px;
}

.passphrase-row input::placeholder {
  color: var(--border);
}

.passphrase-row input:focus {
  border-color: var(--text);
}

/* buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 10px 16px;
  cursor: pointer;
}

.btn:hover {
  background: var(--text);
  color: var(--bg);
}

.btn:active {
  opacity: 0.8;
}

.btn-block {
  width: 100%;
  margin-top: 18px;
  padding: 12px 18px;
  font-size: 16px;
}

.btn[disabled] {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

/* upload progress */

.upload-progress {
  width: 100%;
  height: 2px;
  margin-top: 12px;
  background: var(--line);
  display: none;
}

.upload-progress.active {
  display: block;
}

.upload-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--text);
  transition: width 0.3s ease;
}

/* download status (view page) */

.download-status {
  margin-top: 12px;
  color: var(--faint);
  font-size: 14px;
  text-align: center;
  min-height: 1em;
}

/* hidden safety */

[hidden] {
  display: none !important;
}

/* result state */

.result-status {
  color: var(--dim);
  font-size: 15px;
  margin-bottom: 16px;
}

.result-link {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.result-link-value {
  flex: 1;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 15px;
  padding: 10px 12px;
  overflow-x: auto;
  white-space: nowrap;
}

.result-meta {
  margin-top: 16px;
  color: var(--faint);
  font-size: 14px;
}

.result-passphrase-wrap {
  margin-top: 4px;
}

.result-passphrase {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.result-passphrase .rp-value {
  flex: 1;
  color: var(--text);
  font-size: 15px;
  padding: 8px 0;
  overflow-x: auto;
  white-space: nowrap;
}

.result-passphrase-label {
  margin-top: 12px;
}

.field-label {
  color: var(--dim);
  font-size: 14px;
  margin: 14px 0 4px;
}

.warning-note {
  margin-top: 16px;
  color: var(--faint);
  font-size: 14px;
  line-height: 1.6;
}

/* copy button */

.copy-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--dim);
  font-family: inherit;
  font-size: 14px;
  padding: 8px 14px;
  cursor: pointer;
  white-space: nowrap;
  min-width: 60px;
}

.copy-btn:hover {
  border-color: var(--text);
  color: var(--text);
}

.copy-btn.copied {
  border-color: var(--text);
  color: var(--text);
}

/* link secondary (reset button) */

.link-secondary {
  display: block;
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--faint);
  text-decoration: none;
}

.link-secondary:hover {
  color: var(--text);
}

button.link-secondary {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 20px;
  font-family: inherit;
  font-size: 14px;
  color: var(--faint);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

button.link-secondary:hover {
  color: var(--text);
}

/* view page (recipient) */

.file-card {
  text-align: center;
}

.file-name {
  color: var(--text);
  font-size: 17px;
  margin-bottom: 4px;
  word-break: break-all;
}

.file-meta {
  color: var(--faint);
  font-size: 14px;
  margin-bottom: 20px;
}

.file-meta span {
  margin: 0 4px;
}

.password-gate {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: left;
}

.password-gate .field-label {
  color: var(--dim);
  font-size: 14px;
  margin-bottom: 4px;
}

.password-gate input {
  margin-bottom: 10px;
}

.password-input-wrap {
  display: flex;
  gap: 0;
  margin-bottom: 10px;
}

.password-input-wrap input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  padding: 10px 12px;
  margin-bottom: 0;
}

.password-input-wrap input::placeholder {
  color: var(--border);
}

.password-input-wrap input:focus {
  border-color: var(--text);
}

.password-toggle-btn {
  background: none;
  border: 1px solid var(--border);
  border-left: none;
  color: var(--dim);
  font-family: inherit;
  font-size: 13px;
  padding: 0 14px;
  cursor: pointer;
  white-space: nowrap;
}

.password-toggle-btn:hover {
  color: var(--text);
  border-color: var(--text);
}

.download-success {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 14px;
  display: none;
}

.download-success.show {
  display: block;
}

/* error / expired page */

.error-panel {
  text-align: center;
  padding: 20px 20px;
}

.error-code {
  color: var(--text);
  font-size: 14px;
  margin-bottom: 12px;
}

.error-title {
  color: var(--text);
  font-size: 20px;
  font-family: "Redaction 35", serif;
  margin-bottom: 10px;
}

.error-desc {
  color: var(--dim);
  font-size: 15px;
  max-width: 380px;
  margin: 0 auto 24px;
}

/* condensed info on index page */

.info-blurb {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 14px;
  line-height: 1.6;
}

.info-blurb p {
  margin: 0 0 12px;
  color: var(--text);
}

.info-blurb ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.info-blurb ul li {
  color: var(--dim);
  margin-bottom: 4px;
}

.info-blurb ul li::before {
  content: "\2022  ";
  color: var(--faint);
}

/* status dashboard */

.status-grid {
  width: 100%;
  max-width: 640px;
  min-width: 0;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.status-indicator {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 15px;
  font-family: "Redaction 35", serif;
}

.dot {
  font-size: 14px;
  color: var(--faint);
}

.dot.operational {
  color: #fff;
}

.status-text {
  color: var(--dim);
  text-transform: lowercase;
}

.stat-card {
  border: 1px solid var(--border);
  padding: 16px 20px;
  text-align: center;
}

.stat-value {
  font-family: "Redaction 35", serif;
  font-size: 24px;
  color: var(--text);
  margin-bottom: 4px;
}

.stat-label {
  color: var(--faint);
  font-size: 13px;
  text-transform: lowercase;
}

.stat-limits .stat-value {
  font-size: 16px;
}

/* status nav link */

.nav-link {
  display: inline-block;
  margin-top: 24px;
  font-size: 13px;
  color: var(--faint);
  text-decoration: none;
}

.nav-link:hover {
  color: var(--text);
}

/* legal / terms */

.legal {
  text-align: left;
  max-width: 640px;
  margin: 0 auto;
  color: var(--dim);
  font-size: 14px;
  line-height: 1.6;
}

.legal h2 {
  color: var(--text);
  font-size: 15px;
  margin: 28px 0 8px;
}

.legal h2:first-of-type {
  margin-top: 8px;
}

.legal p {
  margin: 0 0 12px;
}

.legal ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.legal li {
  margin-bottom: 6px;
}

.legal a {
  color: var(--text);
}

.legal .disclaimer {
  color: var(--faint);
  font-size: 12px;
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 16px;
}

/* admin panel */

.admin-login {
  max-width: 420px;
  margin: 0 auto;
}

.admin-login-error {
  margin-top: 10px;
  font-size: 13px;
  color: var(--faint);
  min-height: 18px;
}

.admin-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.admin-bar-btn {
  display: inline-block;
  width: auto;
  margin: 0;
  padding: 6px 4px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--faint);
  cursor: pointer;
}

.admin-bar-btn:hover {
  color: var(--text);
}

.admin-bar-btn-logout:hover {
  color: #e88;
}

.admin-refresh-error {
  font-size: 13px;
  color: #e88;
}

.admin-h {
  color: var(--text);
  font-size: 15px;
  margin: 32px 0 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.admin-count {
  color: var(--faint);
  font-size: 13px;
  font-weight: normal;
}

.admin-token-box {
  border: 1px solid var(--border);
  padding: 16px;
}

.admin-token-value {
  font-family: monospace;
  font-size: 14px;
  color: var(--faint);
  word-break: break-all;
  padding: 10px 12px;
  background: var(--line);
}

.admin-token-value.revealed {
  color: var(--text);
}

.admin-token-meta {
  font-size: 12px;
  color: var(--faint);
  margin: 10px 0;
}

.admin-token-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.admin-table th {
  color: var(--faint);
  font-weight: normal;
  font-size: 12px;
}

.admin-table td:nth-child(2) {
  font-family: monospace;
}

.admin-table td:first-child {
  font-family: monospace;
  color: var(--dim);
}

.admin-empty {
  color: var(--faint);
  font-size: 13px;
  padding: 14px 0;
}

.admin-table-wrap .admin-bar-btn {
  margin-top: 8px;
}

.btn-danger {
  border-color: #a33;
  color: #e88;
}

.btn-danger:hover {
  background: #a33;
  color: var(--text);
}

.link-danger {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 13px;
  color: #e88;
  text-decoration: underline;
  cursor: pointer;
}

.link-danger:hover {
  color: #f99;
}

.link-danger:disabled {
  opacity: 0.5;
  cursor: default;
}

.link-action {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 13px;
  color: var(--dim);
  text-decoration: underline;
  cursor: pointer;
}

.link-action:hover {
  color: var(--text);
}

.link-action:disabled {
  opacity: 0.5;
  cursor: default;
}

.action-cell {
  display: flex;
  gap: 12px;
  white-space: nowrap;
}

.badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--faint);
}

.badge-active {
  border-color: var(--text);
  color: var(--text);
}

.badge-suspended {
  border-color: #a33;
  color: #e88;
}

.row-suspended td:first-child {
  color: #e88;
}

/* report abuse */

.report-row {
  margin-top: 20px;
  text-align: center;
}

.link-report {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 12px;
  color: var(--faint);
  text-decoration: underline;
  cursor: pointer;
}

.link-report:hover {
  color: var(--text);
}

.link-report:disabled {
  opacity: 0.5;
  cursor: default;
}

.report-status {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--faint);
}

/* reduced motion */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* small screens */

@media (max-width: 480px) {
  .wrap {
    padding: 0 16px;
  }

  .inline-options .opt input[type="checkbox"] {
    width: 18px;
    height: 18px;
  }

  /* these are side-by-side flex rows designed for spare width; a shared
     link or passphrase getting squeezed into a sliver next to a fixed-
     width button is worse than just stacking them */
  .result-link,
  .result-passphrase,
  .password-input-wrap {
    flex-direction: column;
    gap: 8px;
  }

  .result-link-value,
  .result-passphrase .rp-value {
    white-space: normal;
    word-break: break-all;
  }

  .result-link .copy-btn,
  .result-passphrase .copy-btn {
    width: 100%;
  }

  .password-input-wrap input {
    margin-bottom: 0;
  }

  .password-toggle-btn {
    border-left: 1px solid var(--border);
    padding: 10px 14px;
  }
}
