/* Keybolt — Dark mode default, mobile-first */

/* === Fonts === */

@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Source Serif 4';
  src: url('/fonts/source-serif-4-latin.woff2') format('woff2');
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/jetbrains-mono-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --bg: #08090f;
  --surface: #0f1118;
  --surface-2: #161a24;
  --border: #1e2535;
  --text: #dce4f0;
  --muted: #5a6a7a;
  --accent: #4d9fff;
  --accent-glow: rgba(77, 159, 255, 0.25);
  --accent-dim: rgba(77, 159, 255, 0.08);

  /* Character type colors */
  --char-upper: #5b9cf5;
  --char-lower: #8a9bb0;
  --char-digit: #a0c4ff;
  --char-symbol: #c77dff;

  /* Strength colors — storm intensity scale */
  --strength-weak: #4a4a5a;
  --strength-fair: #3a5a8a;
  --strength-good: #4d9fff;
  --strength-strong: #70b8ff;
  --strength-excellent: #e0f0ff;

  --radius: 5px;
  --radius-sm: 3px;
  --font-body: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  --font-display: 'Source Serif 4', Georgia, 'Times New Roman', serif;
}

/* === Reset === */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse at 30% 20%, rgba(77, 159, 255, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(77, 159, 255, 0.04) 0%, transparent 50%),
    url('/images/storm-bg.jpg');
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  color: var(--text);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Dark overlay to dim the background image to ~8% visibility */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--bg);
  opacity: 0.92;
  pointer-events: none;
  z-index: -1;
}

/* Grain texture overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: url('/images/noise.svg') repeat;
  opacity: 0.04;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: overlay;
}

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

.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

/* === App Layout === */

.app {
  max-width: 520px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

/* === Header === */

.app-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text);
  font-style: normal;
  text-transform: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 -1px 0 rgba(255, 255, 255, 0.05);
}

/* === Sticky Output Wrapper === */

.output-sticky {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  background-image: radial-gradient(ellipse at 50% 50%, rgba(77, 159, 255, 0.04) 0%, transparent 70%);
  padding-bottom: 0.5rem;
}

/* === Password Display === */

.output-section {
  margin-bottom: 0.75rem;
}

.password-display {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid rgba(77, 159, 255, 0.15);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  min-height: 4rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0;
  font-family: var(--font-mono);
  font-size: clamp(1.15rem, 3.5vw, 1.4rem);
  line-height: 1.6;
  letter-spacing: 0.08em;
  word-break: break-all;
  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, 0.5),
    0 1px 0 rgba(255, 255, 255, 0.03),
    0 8px 24px rgba(0, 0, 0, 0.4);
  transition: box-shadow 0.4s ease;
  position: relative;
  overflow: hidden;
}

.password-display.just-generated {
  box-shadow: 0 0 30px var(--accent-glow), inset 0 0 30px var(--accent-dim);
}

/* Character spans */
.char {
  display: inline-block;
  opacity: 0;
  transform: translateY(6px);
  animation: char-lock 0.3s ease forwards;
}

.char-upper { color: var(--char-upper); }
.char-lower { color: var(--char-lower); }
.char-digit { color: var(--char-digit); }
.char-symbol { color: var(--char-symbol); }
.char-scramble { color: var(--muted); opacity: 0.4; }

@keyframes char-lock {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Strength Indicator === */

.strength-section {
  margin-bottom: 1rem;
}

.strength-bar {
  height: 4px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.strength-fill {
  height: 100%;
  border-radius: 2px;
  width: 0%;
  transition: width 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
  box-shadow: 0 0 8px currentColor;
}

.strength-weak    { background: var(--strength-weak); }
.strength-fair    { background: var(--strength-fair); }
.strength-good    { background: var(--strength-good); }
.strength-strong  { background: var(--strength-strong); }
.strength-excellent { background: var(--strength-excellent); }

.strength-narrative {
  font-size: 0.8rem;
  margin-top: 0.5rem;
  text-align: center;
  transition: color 0.3s ease;
  line-height: 1.4;
}

.strength-narrative.color-weak { color: var(--strength-weak); }
.strength-narrative.color-fair { color: var(--strength-fair); }
.strength-narrative.color-good { color: var(--strength-good); }
.strength-narrative.color-strong { color: var(--strength-strong); }
.strength-narrative.color-excellent { color: var(--strength-excellent); }

/* === Output Actions === */

.output-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}

.btn:active {
  transform: scale(0.97);
}

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

/* New button (secondary) */
.btn-new {
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  color: var(--text);
  border: 1px solid var(--border);
  flex: 0.6;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-new:hover {
  background: linear-gradient(180deg, #182030 0%, var(--surface-2) 100%);
  border-color: rgba(77, 159, 255, 0.3);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.4);
}

.btn-new:active {
  transform: translateY(0);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.4),
    0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Copy button (primary) */
.btn-copy {
  background: linear-gradient(180deg, #4d9fff 0%, #3578d8 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--bg);
  flex: 1;
  position: relative;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 2px 8px rgba(77, 159, 255, 0.3);
}

.btn-copy:hover {
  background: linear-gradient(180deg, #5eaaff 0%, #4a8be5 100%);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 4px 16px rgba(77, 159, 255, 0.4);
}

.btn-copy:active {
  transform: translateY(0);
  background: linear-gradient(180deg, #3578d8 0%, #2a65b8 100%);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.3),
    0 1px 4px rgba(77, 159, 255, 0.2);
}

.btn-copy.copied {
  background: var(--surface-2);
  color: var(--accent);
  border: 1px solid var(--accent);
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.btn-copy.copied:hover {
  background: var(--accent-dim);
  box-shadow: none;
}

.copy-ring {
  flex-shrink: 0;
}

/* === Trust Line === */

.trust-line {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  text-align: center;
  line-height: 1.5;
}

.trust-line svg {
  color: var(--border);
  flex-shrink: 0;
}

.trust-dot {
  color: var(--border);
  margin: 0 0.15rem;
}

/* === Security Tip === */

.security-tip {
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  padding: 0 1rem;
  line-height: 1.4;
  font-style: italic;
}

.bolt-note {
  text-align: center;
  font-size: 0.7rem;
  color: var(--muted);
  opacity: 0.7;
  margin-bottom: 1.25rem;
  padding: 0 1.5rem;
  line-height: 1.5;
  font-style: italic;
}

/* === Customize Drawer === */

.customize-drawer {
  background: linear-gradient(180deg, var(--surface) 0%, rgba(12, 14, 20, 0.95) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 4px 16px rgba(0, 0, 0, 0.3);
}

.drawer-handle {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: color 0.2s;
}

.drawer-handle::-webkit-details-marker { display: none; }

.drawer-handle::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s;
  margin-top: -2px;
}

.customize-drawer[open] .drawer-handle::after {
  transform: rotate(-135deg);
  margin-top: 2px;
}

.drawer-handle:hover {
  color: var(--text);
}

.drawer-content {
  padding: 0 1rem 1rem;
}

/* === Mode Tabs (inside drawer) === */

.mode-tabs {
  display: flex;
  gap: 2px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 1rem;
}

.mode-tab {
  flex: 1;
  padding: 0.4rem 0.75rem;
  border: none;
  border-radius: calc(var(--radius-sm) - 2px);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.mode-tab:hover {
  color: var(--text);
}

.mode-tab.active {
  background: var(--border);
  color: var(--text);
}

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

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

.control-group {
  margin-bottom: 1rem;
}

.control-group:last-child {
  margin-bottom: 0;
}

.control-group label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.control-value {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text);
  background: var(--surface-2);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
}

/* Select */
select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: rgba(8, 9, 15, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.875rem;
  cursor: pointer;
  appearance: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b6b80' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

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

select optgroup {
  font-weight: 600;
  color: var(--muted);
}

/* Range Slider */
input[type="range"] {
  width: 100%;
  height: 4px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 2px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(180deg, #4d9fff 0%, #3578d8 100%);
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.4);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(180deg, #4d9fff 0%, #3578d8 100%);
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.4);
}

input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Checkboxes / Toggles */
.toggles {
  border: none;
  padding: 0;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  font-size: 0.875rem;
  color: var(--text);
  cursor: pointer;
}

.toggle-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--border);
  border-radius: 3px;
  background: rgba(8, 9, 15, 0.6);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.toggle-label input[type="checkbox"]:checked {
  background: linear-gradient(180deg, #4d9fff 0%, #3578d8 100%);
  border-color: rgba(77, 159, 255, 0.6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 6px rgba(77, 159, 255, 0.3);
}

.toggle-label input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid var(--bg);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.toggle-label input[type="checkbox"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.toggle-label input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.toggle-hint {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
}

/* Smart Input */
.smart-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: rgba(8, 9, 15, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.875rem;
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.smart-input::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

.smart-input:focus {
  border-color: rgba(77, 159, 255, 0.5);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.4),
    0 0 8px rgba(77, 159, 255, 0.2),
    0 0 20px rgba(77, 159, 255, 0.08);
}

/* Service Tiles */
.tile-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.tile {
  padding: 0.35rem 0.65rem;
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s, transform 0.1s, box-shadow 0.15s;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.tile:hover {
  color: var(--text);
  border-color: var(--muted);
  transform: translateY(-1px);
}

.tile.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow:
    inset 0 1px 4px rgba(0, 0, 0, 0.3),
    0 0 8px rgba(77, 159, 255, 0.1);
}

.tile.matched {
  color: var(--text);
  border-color: var(--accent);
}

.tile-show-all {
  display: block;
  width: 100%;
  padding: 0.35rem 0;
  margin-bottom: 1rem;
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.7rem;
  cursor: pointer;
  transition: color 0.15s;
}

.tile-show-all:hover {
  color: var(--text);
}

/* Preset Note */
.preset-note {
  background: var(--accent-dim);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.5rem 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: var(--accent);
  line-height: 1.4;
}

/* === Details Panel (Layer 2) === */

.details-panel {
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent 0%, var(--border) 20%, var(--accent) 50%, var(--border) 80%, transparent 100%) 1;
  margin-top: 1rem;
}

.details-panel summary {
  padding: 0.75rem 0;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.details-panel summary::-webkit-details-marker { display: none; }

.details-panel summary::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 0.2s;
}

.details-panel[open] summary::before {
  transform: rotate(45deg);
}

.details-panel summary:hover {
  color: var(--text);
}

.details-content {
  padding-bottom: 0.5rem;
}

.details-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
  font-size: 0.8rem;
}

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

.details-value {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text);
}

.details-note {
  justify-content: flex-end;
  font-size: 0.7rem;
  color: var(--border);
  font-style: italic;
}

/* === Dictation Panel (inside Details) === */

.dictation-panel {
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent 0%, var(--border) 20%, var(--accent) 50%, var(--border) 80%, transparent 100%) 1;
  margin-top: 0.5rem;
}

.dictation-panel summary {
  padding: 0.75rem 0;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.dictation-panel summary::-webkit-details-marker { display: none; }

.dictation-panel summary::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 0.2s;
}

.dictation-panel[open] summary::before {
  transform: rotate(45deg);
}

.dictation-panel summary:hover {
  color: var(--text);
}

.alphabet-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0 0 0.75rem;
  flex-wrap: wrap;
}

.alphabet-tab {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  transition: all 0.15s;
}

.alphabet-tab:hover {
  color: var(--text);
  border-color: var(--muted);
}

.alphabet-tab.active {
  color: var(--accent);
  border-color: var(--accent);
}

.dictation-content {
  padding: 0 0 0.75rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.25rem;
}

.dictation-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
  font-size: 0.8rem;
}

.dictation-char {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  width: 1.5em;
  text-align: center;
  flex-shrink: 0;
}

.dictation-desc {
  color: var(--muted);
  font-size: 0.75rem;
}

/* === About Page === */

.about-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.about-page h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.about-page .version {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-bottom: 2rem;
}

.about-page .back-link {
  display: inline-block;
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.about-page .back-link:hover {
  color: var(--text);
  text-decoration: none;
}

.about-page section {
  margin-bottom: 2rem;
}

.about-page h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.about-page p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.about-page code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: var(--surface);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  color: var(--accent);
}

.about-page ul {
  list-style: none;
  padding: 0;
}

.about-page li {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
  padding-left: 1.25rem;
  position: relative;
}

.about-page li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border);
}

.about-credit {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

/* === Error Page === */

.error-page {
  max-width: 520px;
  margin: 0 auto;
  padding: 4rem 1.25rem;
  text-align: center;
}

.error-page h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.error-page p {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* === Footer === */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding: 1.5rem 1.25rem;
}

.footer-inner {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}

.footer-nav {
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
}

.footer-nav a {
  color: var(--muted);
}

.footer-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.footer-sep {
  color: var(--border);
  margin: 0 0.25rem;
}

.footer-trust {
  font-size: 0.7rem;
  color: var(--border);
  margin-bottom: 0.25rem;
}

.footer-credit {
  font-size: 0.7rem;
  color: var(--muted);
}

.footer-credit a {
  color: var(--muted);
}

.footer-credit a:hover {
  color: var(--accent);
}

/* === Focus & Accessibility === */

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

/* === Responsive === */

@media (max-width: 360px) {
  .app {
    padding: 1.5rem 1rem 2rem;
  }

  .password-display {
    font-size: 1rem;
    padding: 1rem 0.75rem;
  }

  .mode-tab {
    font-size: 0.75rem;
    padding: 0.35rem 0.5rem;
  }

  .trust-line {
    font-size: 0.65rem;
  }
}
