/* Self-hosted IBM Plex (latin + latin-ext covers Polish) — no requests to Google Fonts */
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 300; font-display: swap; src: url('fonts/ibm-plex-sans-latin-ext-300-normal.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 300; font-display: swap; src: url('fonts/ibm-plex-sans-latin-300-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/ibm-plex-sans-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/ibm-plex-sans-latin-ext-500-normal.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/ibm-plex-sans-latin-ext-600-normal.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 300; font-display: swap; src: url('fonts/ibm-plex-mono-latin-ext-300-normal.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 300; font-display: swap; src: url('fonts/ibm-plex-mono-latin-300-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/ibm-plex-mono-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/ibm-plex-mono-latin-ext-500-normal.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/ibm-plex-mono-latin-ext-600-normal.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/ibm-plex-mono-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

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

html.dark-early body                    { background: #181818; color: #f0f0ec; }
html.dark-early .card                   { background: #232323; }
html.dark-early .faq-box                { background: #232323; }
html.dark-early .history-box            { background: #232323; }
html.dark-early .tabs                   { background: #2c2c2c; }
html.dark-early .tab-btn                { color: #b0b0aa; }
html.dark-early .tab-btn.active         { background: #f0f0ec; color: #181818; }
html.dark-early .output-box             { background: #2c2c2c; }
html.dark-early .output-text            { color: #f0f0ec; }
html.dark-early .copy-btn               { background: #555; color: #f0f0ec; }
html.dark-early .generate-btn           { background: #f0f0ec; color: #181818; }
html.dark-early .option-toggle          { background: #2c2c2c; }
html.dark-early .switch-track           { background: #555; }
html.dark-early .switch-knob            { background: #f0f0ec; }
html.dark-early .divider                { background: #333; }
html.dark-early input[type="range"]::-webkit-slider-runnable-track { background: #333; }
html.dark-early input[type="range"]::-moz-range-track { background: #333; }
html.dark-early .option-toggle.active   { background: #3a3a3a; }
html.dark-early .sep-option,
html.dark-early .bits-option,
html.dark-early .format-option          { background: #2c2c2c; color: #b0b0aa; }
html.dark-early .sep-option.active,
html.dark-early .bits-option.active,
html.dark-early .format-option.active   { background: #f0f0ec; color: #181818; }
html.dark-early .sk-use-case            { background: #2c2c2c; }
html.dark-early .ad-container           { background: transparent; }
html.dark-early .faq-question           { color: #f0f0ec; }
html.dark-early .page-footer-row a      { color: #b0b0aa; }

:root {
  --bg: #f5f4f0;
  --card: #ffffff;
  --text: #1a1a1a;
  --muted: #5c5c58;
  --text-soft: #3a3a37;
  --accent-light: #f0f0ee;
  --border: #e4e4e0;
  --green: #2d7a4f;
  --radius: 12px;
  --toggle-bg: #d8d8d4;
  --toggle-knob: #ffffff;
  --toggle-hover: #e8e8e4;
  --toggle-active: #e2e2de;
  --checkbox-bg: #d0d0cc;
  --btn-text: #ffffff;
}

body.dark {
  --bg: #181818;
  --card: #232323;
  --text: #f0f0ec;
  --muted: #b0b0aa;
  --text-soft: #d2d2cc;
  --accent-light: #2c2c2c;
  --border: #333;
  --green: #3ac470;
  --toggle-bg: #555;
  --toggle-knob: #f0f0ec;
  --toggle-hover: #333333;
  --toggle-active: #3a3a3a;
  --checkbox-bg: #4a4a4a;
  --btn-text: #181818;
}

body {
  transition: background 0.25s, color 0.25s;
  font-family: 'IBM Plex Sans', sans-serif;
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
  padding-top: 32px;
  color: var(--text);
}

.card {
  background: var(--card);
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 640px;
  box-shadow: 0 2px 24px rgba(0,0,0,0.06);
}

@media (max-width: 600px) {
  body { padding: 16px; padding-top: 20px; }
  .card { padding: 28px 20px; border-radius: 16px; }
}

/* Header */
header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}

.header-text h1 { font-size: 18px; font-weight: 500; letter-spacing: -0.3px; }
.header-text p  { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* Theme toggle */
.theme-switch { flex-shrink: 0; display: flex; align-items: center; gap: 7px; margin-top: 2px; }
.theme-switch-label { font-size: 11px; color: var(--muted); user-select: none; }
.switch-track { position: relative; width: 36px; height: 20px; background: var(--toggle-bg); border-radius: 99px; cursor: pointer; transition: background 0.25s; flex-shrink: 0; }
.switch-track input { display: none; }
.switch-knob { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--toggle-knob); transition: transform 0.22s cubic-bezier(.4,0,.2,1), background 0.25s; box-shadow: 0 1px 3px rgba(0,0,0,0.18); }
.switch-track input:checked ~ .switch-knob { transform: translateX(16px); }

/* Tabs */
.tabs { display: flex; gap: 4px; background: var(--accent-light); border-radius: 10px; padding: 4px; margin-bottom: 28px; }
.tab-btn { flex: 1; padding: 8px 12px; font-family: 'IBM Plex Sans', sans-serif; font-size: 13px; font-weight: 500; color: var(--muted); background: none; border: none; border-radius: 7px; cursor: pointer; transition: all 0.18s; text-decoration: none; display: flex; align-items: center; justify-content: center; text-align: center; }
.tab-btn:hover { color: var(--text); }
.tab-btn.active { background: var(--text); color: var(--btn-text); font-weight: 600; box-shadow: 0 2px 6px rgba(0,0,0,0.18); }
.tab-btn.active:hover { color: var(--btn-text); }

/* Output box */
.output-box { background: var(--accent-light); border-radius: var(--radius); padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 28px; min-height: 60px; }
.output-text { font-family: 'IBM Plex Mono', monospace; font-size: 15px; font-weight: 400; letter-spacing: 0.5px; word-break: break-all; flex: 1; color: var(--text); transition: opacity 0.15s; }
@media (max-width: 600px) { .output-text { font-size: 13px; } }
.output-text.flash { opacity: 0.3; }

/* Copy button */
.copy-btn {
  background: var(--toggle-bg);
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  min-height: 38px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.copy-btn:hover { background: var(--toggle-hover); }
.copy-btn:active { transform: scale(0.96); }
.copy-btn.copied { background: var(--green); color: #fff; }

/* Strength */
.strength-row { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.strength-label { font-size: 13px; font-weight: 500; color: var(--text); flex-shrink: 0; }
.strength-bars { display: flex; gap: 4px; flex: 1; }
.bar { height: 10px; border-radius: 4px; flex: 1; background: var(--border); }
.bar.active-1 { background: #e84040; }
.bar.active-2 { background: #e87820; }
.bar.active-3 { background: #d4a800; }
.bar.active-4 { background: #1aaa55; }
.strength-name { font-size: 12px; color: var(--muted); width: 44px; text-align: right; }

/* Divider */
.divider { height: 1px; background: var(--border); margin-bottom: 24px; }

/* Controls */
.control-group { margin-bottom: 22px; }
.control-label { font-size: 13px; font-weight: 500; color: var(--text); display: flex; justify-content: space-between; margin-bottom: 10px; }
.control-label span { font-family: 'IBM Plex Mono', monospace; font-size: 13px; font-weight: 400; color: var(--muted); }

/* Range slider */
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 20px; margin: 0; padding: 0; background: transparent; outline: none; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 99px; background: var(--border); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 99px; background: var(--border); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--text); border: none; margin-top: -7px; transition: transform 0.15s; box-shadow: 0 1px 4px rgba(0,0,0,0.15); }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--text); border: none; transition: transform 0.15s; box-shadow: 0 1px 4px rgba(0,0,0,0.15); }
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type="range"]::-moz-range-thumb:hover { transform: scale(1.15); }

/* Options grid */
.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 28px; }
@media (max-width: 400px) { .options-grid { grid-template-columns: 1fr; } }

.option-toggle { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: none; border-radius: 10px; background: var(--accent-light); cursor: pointer; transition: all 0.15s; user-select: none; }
.option-toggle:hover { background: var(--toggle-hover); }
.option-toggle.active { background: var(--toggle-active); }
.option-toggle input { display: none; }

.checkbox { width: 16px; height: 16px; border: none; border-radius: 4px; background: var(--checkbox-bg); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.15s; }
.option-toggle.active .checkbox { background: var(--text); }
.checkbox svg { display: none; }
.option-toggle.active .checkbox svg { display: block; }
.option-toggle.active .checkbox svg path { stroke: var(--btn-text); }

.option-text { font-size: 13px; font-weight: 400; color: var(--text); }
.option-hint { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--muted); margin-left: 2px; }

/* Generate button */
.generate-btn { width: 100%; padding: 15px; background: var(--text); color: var(--btn-text); border: none; border-radius: var(--radius); font-family: 'IBM Plex Sans', sans-serif; font-size: 16px; font-weight: 500; cursor: pointer; letter-spacing: 0.2px; transition: opacity 0.15s, transform 0.1s; }
.generate-btn:hover { opacity: 0.85; }
.generate-btn:active { transform: scale(0.98); }

/* SEO description */
.seo-desc { margin-top: 16px; font-size: 12.5px; line-height: 1.7; color: var(--text-soft); }
.seo-desc strong { color: var(--text); font-weight: 600; }
.seo-desc code { font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; background: var(--accent-light); padding: 1px 5px; border-radius: 4px; }

/* Passphrase separator options */
.sep-grid { display: flex; gap: 6px; flex-wrap: wrap; }
.sep-option { padding: 6px 14px; border-radius: 8px; font-family: 'IBM Plex Mono', monospace; font-size: 13px; background: var(--accent-light); color: var(--muted); cursor: pointer; border: none; transition: all 0.15s; font-weight: 500; }
.sep-option:hover { background: var(--toggle-hover); color: var(--text); }
.sep-option.active { background: var(--toggle-active); color: var(--text); }

/* PIN large digit output */
.output-text.pin-digits { font-size: 28px; letter-spacing: 6px; }

/* Copy history */
.history-box {
  width: 100%;
  max-width: 640px;
  margin-top: 20px;
  background: var(--card);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 2px 24px rgba(0,0,0,0.06);
}

.history-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.history-clear {
  font-size: 11.5px;
  font-weight: 500;
  color: #e84040;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s;
}

.history-clear:hover { opacity: 0.7; text-decoration: underline; }

.history-list { display: flex; flex-direction: column; gap: 6px; }

.history-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  background: var(--accent-light);
  border-radius: 8px;
}

.history-item-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.history-countdown {
  font-size: 10.5px;
  color: var(--muted);
  font-family: 'IBM Plex Mono', monospace;
}

.history-text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--text);
  word-break: break-all;
  flex: 1;
  align-self: center;
}

.history-copy {
  background: var(--toggle-bg);
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  min-height: 32px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: center;
}

.history-copy:hover { background: var(--toggle-hover); }
.history-copy:active { transform: scale(0.96); }
.history-copy.copied { background: var(--green); color: #fff; }

@media (max-width: 600px) {
  .history-box { padding: 28px 20px; border-radius: 16px; }
  .copy-btn { min-height: 42px; padding: 10px 18px; font-size: 13px; }
  .history-copy { min-height: 36px; padding: 8px 16px; font-size: 12px; }
}

/* Footer links */
.footer-links {
  text-align: center;
  margin-top: 24px;
  padding-bottom: 8px;
  font-size: 12px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover { color: var(--text); text-decoration: underline; }

/* Ad containers */
.ad-container {
  width: 100%;
  max-width: 640px;
  margin: 12px auto 0;
  text-align: center;
  min-height: 0; /* collapses when empty */
}

.ad-container:has(.adsbygoogle) {
  min-height: 90px;
}

/* Empty container (no ad configured) takes no space at all, margin included */
.ad-container:not(:has(.adsbygoogle)) { display: none; }

/* AdSense marks ad units it could not fill — collapse those too */
.ad-container:has(.adsbygoogle[data-ad-status="unfilled"]) { display: none; }

/* Privacy policy content */
.privacy-content {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text);
}

.privacy-content h2 {
  font-size: 14px;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 8px;
  color: var(--text);
}

.privacy-content p {
  margin-bottom: 12px;
  color: var(--text);
}

.privacy-content ul {
  margin: 8px 0 12px 20px;
}

.privacy-content ul li {
  margin-bottom: 4px;
}

.privacy-content a {
  color: var(--text);
  text-decoration: underline;
  opacity: 1;
}

.privacy-content a:hover { opacity: 1; }

/* 4-tab nav — smaller font on mobile to fit */
@media (max-width: 480px) {
  .tab-btn { font-size: 11px; padding: 7px 6px; }
}

/* Secret key output — smaller mono font for long keys */
.sk-output {
  font-size: 12px;
  letter-spacing: 0.3px;
  word-break: break-all;
}

/* Char count row */
.sk-meta-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -18px;
  margin-bottom: 20px;
}

.sk-char-count {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--muted);
}

/* Bit-size and format selectors — reuse sep-option style */
.bits-option,
.format-option {
  padding: 6px 14px;
  border-radius: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  background: var(--accent-light);
  color: var(--muted);
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  font-weight: 500;
}

.bits-option:hover,
.format-option:hover { background: var(--toggle-hover); color: var(--text); }

.bits-option.active,
.format-option.active { background: var(--toggle-active); color: var(--text); }

/* Use-cases section */
.sk-use-cases {
  margin-top: 20px;
}

.sk-use-cases-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.sk-use-cases-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

@media (max-width: 400px) {
  .sk-use-cases-grid { grid-template-columns: 1fr; }
}

.sk-use-case {
  background: var(--accent-light);
  border-radius: 8px;
  padding: 9px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sk-use-case-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
}

.sk-use-case-hint {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  color: var(--muted);
}

/* Clickable use-case cards */
.sk-use-case {
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.sk-use-case:hover {
  background: var(--toggle-hover);
}

.sk-use-case:active {
  transform: scale(0.97);
  background: var(--toggle-active);
}

/* Scroll to copied history link — pill style */
.scroll-to-history {
  display: block;
  text-align: center;
  margin-top: 0;
  margin-bottom: 16px;
  animation: fadeInDown 0.25s ease;
  text-decoration: none;
}

.scroll-to-history span {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  background: var(--toggle-active);
  border-radius: 99px;
  padding: 6px 16px;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}

.scroll-to-history:hover span {
  background: var(--toggle-hover);
}

.scroll-to-history:active span {
  transform: scale(0.96);
}

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

/* Keyboard shortcut hint */
.kb-hint {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
  user-select: none;
}

kbd {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-style: normal;
  background: var(--accent-light);
  color: var(--text);
  border-radius: 4px;
  padding: 1px 5px;
  margin: 0 1px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.15);
}

/* History actions row */
.history-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.history-actions-sep {
  font-size: 11px;
  color: var(--muted);
}

.history-download {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s;
}

.history-download:hover { color: var(--text); text-decoration: underline; }

@media (max-width: 400px) {
  .history-header { flex-wrap: wrap; gap: 6px; }
  .history-actions { flex-wrap: wrap; }
}

/* ── Two-column page layout ───────────────────────────────── */
.page-layout {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 28px;
  width: 100%;
  max-width: 1060px;
  align-items: flex-start;
}

.page-footer-row {
  flex-basis: 100%;
  width: 100%;
  text-align: right;
  padding-bottom: 8px;
}

/* Override old footer-links centering */
.page-footer-row .footer-links {
  text-align: right;
}

.main-col {
  flex: 0 0 640px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.faq-col {
  flex: 1;
  min-width: 0;
  max-width: 380px;
}

/* On narrow screens stack vertically */
@media (max-width: 1100px) {
  .page-layout {
    flex-direction: column;
    max-width: 640px;
  }
  .main-col {
    flex: none;
    width: 100%;
  }
  .faq-col {
    width: 100%;
    max-width: 100%;
  }
}

/* ── FAQ box & accordion ──────────────────────────────────── */
.faq-box {
  background: var(--card);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 24px rgba(0,0,0,0.06);
  position: sticky;
  top: 24px;
}

@media (max-width: 1100px) {
  .faq-box {
    position: static;
    border-radius: 16px;
    padding: 20px;
  }
}

.faq-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
  letter-spacing: -0.2px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.faq-item {
  border-radius: 8px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  background: none;
  border: none;
  border-radius: 8px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
  line-height: 1.4;
}

.faq-question:hover { background: var(--accent-light); }
.faq-question[aria-expanded="true"] { background: var(--accent-light); border-radius: 8px 8px 0 0; }

.faq-icon {
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 300;
  color: var(--muted);
  line-height: 1;
  margin-top: 1px;
  transition: transform 0.2s;
}

.faq-question[aria-expanded="true"] .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  background: var(--accent-light);
  border-radius: 0 0 8px 8px;
  padding: 0 12px 12px;
  animation: faqOpen 0.2s ease;
}

.faq-answer p {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-soft);
  margin: 0;
}

@keyframes faqOpen {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Footer tagline */
.footer-tagline {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  margin-bottom: 4px;
}

/* ── "What to avoid" FAQ items — bold red question text only ── */
:root { --avoid-text: #c62828; }

/* html.dark-early is set before first paint, so no light-red flash in dark mode */
body.dark,
html.dark-early { --avoid-text: #ff7b7b; }

.faq-item.faq-avoid .faq-question { color: var(--avoid-text); font-weight: 600; }
.faq-item.faq-avoid .faq-icon     { color: var(--avoid-text); }

/* a little air between the normal questions and the "avoid" group */
.faq-item:not(.faq-avoid) + .faq-item.faq-avoid { margin-top: 10px; }

/* ── Selected / hover state of option buttons (separator, key size, format) ── */
.sep-option:hover,
.bits-option:hover,
.format-option:hover {
  background: var(--toggle-active);
  color: var(--text);
}
.sep-option.active,
.bits-option.active,
.format-option.active,
.sep-option.active:hover,
.bits-option.active:hover,
.format-option.active:hover {
  background: var(--text);
  color: var(--btn-text);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}
body.dark .sep-option:hover, body.dark .bits-option:hover, body.dark .format-option:hover,
html.dark-early .sep-option:hover, html.dark-early .bits-option:hover, html.dark-early .format-option:hover {
  background: #3a3a3a; color: #f0f0ec;
}
html.dark-early .sep-option.active, html.dark-early .bits-option.active, html.dark-early .format-option.active,
html.dark-early .sep-option.active:hover, html.dark-early .bits-option.active:hover, html.dark-early .format-option.active:hover {
  background: #f0f0ec; color: #181818;
}

/* ── Feature badges + SEO sentence ───────────────────────── */
.feature-list { list-style: none; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid var(--border); display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.feature-list li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500; color: var(--text); }
.feature-list svg { flex-shrink: 0; color: var(--green); }
.feature-text { margin-top: 12px; font-size: 12.5px; line-height: 1.7; color: var(--text-soft); }
@media (max-width: 400px) { .feature-list { grid-template-columns: 1fr; } }

/* Info box (SEO text + feature badges) above the FAQ */
.info-box { background: var(--card); border-radius: 16px; padding: 24px; margin-bottom: 16px; box-shadow: 0 2px 24px rgba(0,0,0,0.06); }
html.dark-early .info-box { background: #232323; }
.info-text { font-size: 12.5px; line-height: 1.7; color: var(--text-soft); margin: 0; }
.info-text strong { color: var(--text); font-weight: 600; }
.info-text code { font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; background: var(--accent-light); padding: 1px 5px; border-radius: 4px; }
.feature-list { grid-template-columns: 1fr; }
@media (max-width: 1100px) { .info-box { padding: 20px; } .feature-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 400px) { .feature-list { grid-template-columns: 1fr; } }

/* Countdown turns red when 30 seconds or less remain */
.history-countdown.expiring { color: var(--avoid-text); font-weight: 600; }

/* Estimated time to crack — small text under the strength bar.
   Spacing: strength row -> 8px -> text -> 28px -> divider (same 28px the strength row had alone),
   so the "scroll to history" pill (margin-top: -12px) always sits cleanly below the text. */
.strength-row { margin-bottom: 0; }
.crack-time { margin: 8px 0 28px; min-height: 16px; font-size: 11.5px; line-height: 1.4; color: var(--muted); }
@media (max-width: 600px) { .crack-time { min-height: 32px; } }

/* Secret key page: text sits under the right-aligned character count */
.sk-meta-row { margin-bottom: 0; }
.sk-meta-row + .crack-time { text-align: right; margin: 4px 0 28px; }

/* ── Copy buttons: hover + "Skopiowano" state ─────────────── */
/* Light theme: hover looks like the Generate button */
html:not(.dark-early) .copy-btn:hover,
html:not(.dark-early) .history-copy:hover { background: var(--text); color: var(--btn-text); }

/* Dark theme: no hover change at all */
html.dark-early .copy-btn:hover           { background: #555; color: #f0f0ec; }
html.dark-early .history-copy:hover       { background: var(--toggle-bg); color: var(--text); }

/* "Skopiowano" state stays green in both themes (and while hovered) */
html:not(.dark-early) .copy-btn.copied,
html:not(.dark-early) .copy-btn.copied:hover,
html:not(.dark-early) .history-copy.copied,
html:not(.dark-early) .history-copy.copied:hover { background: var(--green); color: #fff; }
html.dark-early .copy-btn.copied,
html.dark-early .copy-btn.copied:hover,
html.dark-early .history-copy.copied,
html.dark-early .history-copy.copied:hover { background: #3ac470; color: #181818; }

/* PIN: second line explaining the crack-time estimate */
.crack-note { display: block; margin-top: 2px; }
.crack-time.has-note { min-height: 34px; }
@media (max-width: 600px) { .crack-time.has-note { min-height: 62px; } }

/* Keyboard focus — visible ring for everything clickable */
button:focus-visible, a:focus-visible, .sk-use-case:focus-visible, input:focus-visible,
.option-toggle:has(input:focus-visible) {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}
input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--text); outline-offset: 2px; }
input[type="range"]:focus-visible::-moz-range-thumb { outline: 2px solid var(--text); outline-offset: 2px; }
input[type="range"]:focus-visible { outline: none; }
