:root {
  color-scheme: dark;
  --bg: #080c0e;
  --panel: rgba(13, 17, 23, 0.92);
  --panel-deep: #111820;
  --panel-note: #161e28;
  --border: #1e2d3d;
  --text: #f0f4f8;
  --muted: #8ba0b4;
  --muted-2: #6b8fa8;
  --muted-3: #c5d0db;
  --accent: #00ff88;
  --accent-dark: #00994d;
  --mono: Consolas, "SFMono-Regular", Menlo, Monaco, monospace;
  --display: "Space Mono", var(--mono);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 50% 16%, rgba(255, 255, 255, 0.08), transparent 9%),
    linear-gradient(180deg, #04080a 0%, #060a0c 100%);
  color: var(--text);
  font-family: var(--mono);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 31px),
    radial-gradient(circle at 50% 26%, rgba(255, 255, 255, 0.04), transparent 18%);
  opacity: 0.55;
}

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

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

p,
h1,
h2,
h3 {
  margin: 0;
}

.hidden {
  display: none !important;
}

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

.startup-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 12, 14, 0.96);
}

.startup-content {
  text-align: center;
}

.startup-content h1 {
  color: var(--accent);
  font-family: var(--display);
  font-size: 24px;
  line-height: 32px;
}

.startup-spinner {
  width: 44px;
  height: 44px;
  margin: 14px auto 12px;
  border-radius: 999px;
  border: 2px solid rgba(0, 255, 136, 0.18);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}

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

body.app-loading .app-shell {
  opacity: 0;
  pointer-events: none;
}

body:not(.app-loading) .startup-overlay {
  display: none;
}

.app-shell,
.container {
  position: relative;
  width: 1080px;
  max-width: calc(100vw - 32px);
  margin: 0 auto;
  padding: 16px 0;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  padding: 16px;
}

.brand-mark {
  width: 140px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
  text-align: left;
  cursor: pointer;
}

.site-nav {
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
  gap: 10px;
}

.nav-link {
  position: relative;
  padding: 8px 12px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 1px;
  background: currentColor;
}

.nav-link.active {
  color: var(--accent);
}

.page-panel {
  min-height: calc(100vh - 98px);
}

.home-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 64px;
}

.home-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
  padding: 16px 16px 32px;
}

.home-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.microcopy {
  color: var(--muted-2);
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.home-title {
  width: min(720px, 100%);
  color: var(--accent);
  font-family: var(--display);
  font-size: clamp(42px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.125;
  letter-spacing: -2px;
}

.home-body {
  width: min(394px, 100%);
  margin-top: 18px;
  color: var(--text);
  font-size: 14px;
  line-height: 24px;
}

.cta-btn,
.mini-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
}

.cta-btn {
  height: 36px;
  padding: 9px 21px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--bg);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.4px;
}

.cta-btn::after {
  content: "";
  position: absolute;
  inset: 0 -108px 0 -108px;
  background: linear-gradient(133.86deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.04) 50%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.home-copy .cta-btn {
  margin-top: 22px;
}

.home-how {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
  width: 100%;
  padding: 32px 16px;
}

.home-section-title {
  width: min(720px, 100%);
  color: var(--text);
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  line-height: 36px;
  letter-spacing: -1px;
  text-align: center;
}

.how-item {
  width: min(720px, 100%);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.how-heading {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  color: var(--accent);
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  line-height: 36px;
  letter-spacing: -1px;
}

.how-heading h3 {
  font: inherit;
}

.how-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 76px;
}

.how-body p {
  color: var(--text);
  font-size: 14px;
  line-height: 24px;
}

.spec-note,
.share-inline-note {
  border-left: 2px solid var(--accent);
  background: var(--panel-note);
  color: var(--accent);
  font-size: 12px;
  line-height: 20px;
}

.spec-note {
  padding: 12px 16px 12px 18px;
}

.share-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  width: 100%;
  padding: 16px;
}

.share-card {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
}

.share-main {
  display: flex;
  gap: 64px;
  align-items: stretch;
  padding: 32px;
}

.share-editor-main {
  display: grid;
  grid-template-columns: 386.67px minmax(0, 1fr);
  grid-template-areas:
    "left right"
    "cta right";
  align-items: start;
}

.share-left {
  width: 386.67px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.share-editor-main .share-left {
  grid-area: left;
}

.share-right {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-width: 0;
}

.share-editor-main .share-right {
  grid-area: right;
}

.share-title {
  color: var(--accent);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.field-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.field-note,
.toggle-copy small,
#security-estimate,
#security-details,
#bruteforce-estimate {
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.type-toggle {
  display: flex;
  gap: 8px;
}

.type-toggle-btn {
  flex: 1 1 0;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--muted-3);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  cursor: pointer;
}

.type-toggle-btn.active {
  border-color: var(--accent);
  color: var(--accent);
}

.input-shell,
.select-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--panel-deep);
}

.input-shell input,
.select-shell select {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  padding: 10px 0;
  border: 0;
  background: transparent;
  color: var(--muted-2);
  font-size: 14px;
  outline: none;
}

.select-shell select {
  color: #e8edf2;
  appearance: none;
}

.input-icon {
  width: 20px;
  height: 20px;
  margin: 8px;
  color: var(--muted);
  opacity: 0.95;
  flex-shrink: 0;
}

.toggle-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.toggle-row input[type='checkbox'] {
  width: 60px;
  height: 22px;
  margin: 0;
  appearance: none;
  border: 1px solid var(--muted-2);
  border-radius: 999px;
  background: rgba(107, 143, 168, 0.12);
  position: relative;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.toggle-row input[type='checkbox']:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.18);
}

.toggle-row input[type='checkbox']:checked {
  border-color: var(--accent);
  background: rgba(0, 255, 136, 0.15);
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.15), 0 0 32px rgba(0, 255, 136, 0.15);
}

.toggle-row input[type='checkbox']::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--muted-2);
  transition: transform 140ms ease, background 140ms ease;
}

.toggle-row input[type='checkbox']:checked::after {
  background: var(--accent);
  transform: translateX(18px);
}

.toggle-copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
}

.toggle-copy strong,
#security-profile-label,
#benchmark-status {
  color: var(--accent);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.share-cta {
  align-self: flex-start;
}

.share-editor-main .share-cta {
  grid-area: cta;
  justify-self: start;
}

.upload-block,
.note-block,
.upload-drop {
  flex: 1 1 auto;
}

.note-block textarea,
.upload-drop {
  min-height: 120px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--panel-deep);
}

.note-block textarea {
  width: 100%;
  flex: 1 1 auto;
  padding: 13px 17px;
  color: var(--muted-2);
  font-size: 14px;
  line-height: 24px;
  resize: none;
  outline: none;
}

.note-block.note-mode textarea {
  min-height: 208px;
}

.upload-drop {
  position: relative;
  overflow: hidden;
}

.upload-drop input[type='file'] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-drop-inner {
  display: flex;
  height: 100%;
  min-height: 206px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 17px;
  text-align: center;
  color: var(--muted-3);
  font-size: 14px;
  line-height: 24px;
}

.upload-icon {
  width: 64px;
  height: 64px;
  color: var(--accent);
}

.share-inline-note {
  padding: 12px 16px 12px 18px;
}

.security-strip {
  width: 100%;
  padding: 32px;
}

.security-strip-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

#security-estimate,
#security-details,
#bruteforce-estimate {
  color: var(--muted-3);
  line-height: 20px;
}

#security-details {
  margin-top: 16px;
}

#bruteforce-estimate {
  margin-top: 16px;
}

.status-panel,
.utility-card {
  width: 100%;
  padding: 32px;
}

.utility-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
}

.status-panel {
  color: var(--muted-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  font-size: 14px;
  line-height: 20px;
}

.upload-complete-summary-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px;
}

.upload-complete-expiry {
  color: var(--muted-3);
  font-family: var(--display);
  font-size: 12px;
  line-height: 20px;
}

.complete-main {
  gap: 0;
}

.complete-links {
  gap: 0;
}

.complete-block {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
}

.complete-notes {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.result-note {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px 12px 18px;
  border-left: 2px solid var(--accent);
  background: var(--panel-note);
}

.result-copy {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-direction: column;
}

.result-value {
  color: var(--text);
  font-family: var(--display);
  font-size: 12px;
  line-height: 20px;
  word-break: break-all;
}

.result-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.mini-cta-btn {
  min-width: 84px;
  padding: 9px 18px;
  flex-shrink: 0;
}

.complete-note {
  color: var(--muted-3);
  font-family: var(--display);
  line-height: 20px;
}

.utility-form {
  width: min(420px, 100%);
  margin-top: 24px;
}

.utility-form input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--panel-deep);
  color: var(--text);
  outline: none;
}

.download-card {
  display: flex;
  justify-content: center;
}

.download-form {
  display: flex;
  width: min(324px, 100%);
  flex-direction: column;
  align-items: center;
  gap: 32px;
  margin: 0 auto;
}

.download-code-block {
  width: 100%;
  align-items: center;
}

.download-field-label,
.download-field-note {
  text-align: center;
}

.download-field-note {
  font-family: var(--mono);
}

.download-code-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
}

.download-code-input {
  width: 100%;
  min-width: 0;
  padding: 8px 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--panel-deep);
  color: #e8edf2;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  line-height: 36px;
  letter-spacing: -1px;
  text-align: center;
  outline: none;
}

.download-code-input::placeholder {
  color: #e8edf2;
  opacity: 1;
}

.download-code-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(0, 255, 136, 0.18);
}

.download-open-btn {
  align-self: center;
}

.download-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
}

.delete-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
}

.delete-card {
  display: flex;
  justify-content: center;
}

.delete-card .download-form {
  width: 100%;
  max-width: 360px;
  gap: 16px;
}

.delete-message {
  width: 100%;
  color: var(--muted-3);
  font-family: var(--display);
  font-size: 12px;
  line-height: 20px;
  text-align: center;
}

.delete-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.delete-no-btn {
  border-color: var(--accent);
  background: transparent;
  color: var(--accent);
}

.delete-back-btn {
  align-self: center;
}

.download-detail-card {
  display: flex;
  justify-content: center;
}

.download-detail-form {
  width: 100%;
  max-width: none;
}

.download-detail-form .download-code-block {
  width: min(324px, 100%);
}

.download-detail-head {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.download-meta {
  width: 100%;
  color: var(--muted-3);
  font-family: var(--display);
  font-size: 12px;
  line-height: 20px;
  text-align: center;
}

.download-password-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-left: 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--panel-deep);
}

.download-password-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--muted-2);
  font-size: 14px;
  line-height: 20px;
  outline: none;
}

.download-password-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.download-password-toggle svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.download-delete-btn {
  align-self: center;
  border-color: var(--border);
  background: transparent;
  color: var(--muted-3);
}

.download-secondary-card {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 32px;
}

.download-status-note {
  width: 100%;
  color: var(--accent);
  line-height: 20px;
}

.note-detail-card textarea {
  width: 100%;
  min-height: 220px;
  padding: 13px 17px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--panel-deep);
  color: var(--muted-3);
  line-height: 24px;
  resize: vertical;
  outline: none;
}

.cli-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cli-layout {
  display: flex;
  gap: 64px;
  width: 100%;
}

.cli-sidebar {
  width: 386.67px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  flex-shrink: 0;
}

.cli-body-copy {
  color: var(--muted-3);
  font-family: var(--display);
  line-height: 20px;
}

.cli-note {
  color: var(--accent);
  line-height: 20px;
}

.cli-content {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.cli-code-wrap {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--panel-deep);
  overflow: hidden;
}

.cli-code-head {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.cli-code-wrap-highlight {
  position: relative;
}

.cli-code-wrap-highlight::after {
  content: "";
  position: absolute;
  top: 15px;
  right: 6px;
  width: 4px;
  height: 49px;
  border-radius: 4px;
  background: var(--accent);
}

.cli-code {
  margin: 0;
  padding: 16px;
  color: var(--muted-2);
  font-size: 14px;
  line-height: 1.7;
  overflow-x: auto;
}

.footer-note {
  display: flex;
  justify-content: center;
  padding: 16px;
  color: var(--accent-dark);
  font-family: var(--display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.error {
  border-color: rgba(255, 60, 90, 0.35);
  background: rgba(64, 13, 25, 0.92);
  color: #ffd7df;
}

.warning {
  border-color: rgba(255, 231, 166, 0.22);
  background: rgba(54, 40, 12, 0.92);
  color: #ffe7a6;
}

@media (max-width: 960px) {
  .app-shell,
  .container {
    max-width: calc(100vw - 24px);
  }

  .share-main {
    flex-direction: column;
  }

  .share-editor-main {
    grid-template-columns: 1fr;
    grid-template-areas:
      "left"
      "right"
      "cta";
    gap: 32px;
  }

  .share-left {
    width: 100%;
  }

  .security-strip-head,
  .result-note {
    flex-direction: column;
  }

  .how-item,
  .home-section-title {
    width: 100%;
  }

  .cli-layout {
    flex-direction: column;
  }

  .cli-sidebar {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .app-shell,
  .container {
    max-width: calc(100vw - 16px);
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .home-title {
    font-size: 42px;
    line-height: 52px;
  }

  .how-body {
    padding-left: 0;
  }

  .security-strip,
  .status-panel,
  .utility-card,
  .share-main {
    padding: 20px;
  }

  .upload-complete-summary-body {
    padding: 20px;
  }

  .download-code-grid {
    gap: 10px;
  }

  .download-code-input {
    font-size: 22px;
  }

  .download-shell {
    padding: 16px 0;
  }

  .download-secondary-card {
    padding: 20px;
  }

  .result-note {
    padding-right: 18px;
  }

  .mini-cta-btn {
    width: 100%;
  }
}
