/* PASS.LT — dark-first, red accent, premium minimal.
   Adapted from the redesign prototype, expanded for the password checker
   and full multi-page site. System font stack — no external font fetches.
*/

:root {
  --bg: #060606;
  --bg-grad: radial-gradient(1200px 600px at 50% -10%, #1a0808 0%, #060606 55%);
  --surface: #0f0f10;
  --surface-2: #141416;
  --surface-3: #1c1c1f;
  --border: #232326;
  --border-strong: #34343a;
  --text: #f1f1f2;
  --text-2: #b7b7bb;
  --muted: #76767c;
  --accent: #e50914;
  --accent-hi: #ff3a44;
  --accent-ink: #ffffff;
  --accent-soft: rgba(229, 9, 20, 0.14);
  --accent-line: rgba(229, 9, 20, 0.35);
  --accent-deep: #7f0d13;
  --warn: #f59e0b;
  --danger: #ef4444;
  --success: #22c55e;
  --info: #b7b7bb;
  --shadow-card: 0 1px 0 rgba(255,255,255,0.04) inset, 0 24px 60px -30px rgba(0,0,0,0.8);
  --radius: 14px;
  --radius-lg: 22px;
  --radius-sm: 8px;
  --font-ui: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg-grad: radial-gradient(1200px 600px at 50% -10%, #fff1f1 0%, #ffffff 55%);
  --surface: #ffffff;
  --surface-2: #fafafa;
  --surface-3: #f3f3f4;
  --border: #e7e7ea;
  --border-strong: #d6d6db;
  --text: #0a0a0a;
  --text-2: #3a3a3e;
  --muted: #6b7280;
  --accent: #9f111b;
  --accent-hi: #7f0d13;
  --accent-ink: #ffffff;
  --accent-soft: rgba(159, 17, 27, 0.10);
  --accent-line: rgba(159, 17, 27, 0.35);
  --accent-deep: #3a070a;
  --warn: #b45309;
  --danger: #b91c1c;
  --success: #15803d;
  --info: #3a3a3e;
  --shadow-card: 0 1px 0 rgba(255,255,255,0.6) inset, 0 24px 50px -30px rgba(20,20,20,0.10);
  color-scheme: light;
}

* { box-sizing: border-box; }
*::selection { background: var(--accent-soft); color: var(--text); }

html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  background: var(--bg);
  background-image: var(--bg-grad);
  color: var(--text);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  width: 100%;
}

img, svg, video, canvas { max-width: 100%; height: auto; }

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

svg { display: inline-block; flex: 0 0 auto; }
svg.ic { width: 14px; height: 14px; }
svg.chev { width: 14px; height: 14px; }

a { color: inherit; }
img { max-width: 100%; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 8px 12px;
  border-radius: 0 0 8px 0;
  z-index: 100;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Layout ---------- */
.app {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 24px 96px;
  width: 100%;
}
@media (max-width: 640px) {
  .app { padding: 16px 14px 80px; }
}
@media (max-width: 380px) {
  .app { padding: 12px 12px 80px; }
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  width: 100%;
  min-width: 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 18px;
  text-decoration: none;
  color: var(--text);
}
.brand:hover { color: var(--text); }
.brand-mark {
  width: 22px; height: 22px;
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 2px;
}
.brand-mark span {
  background: var(--text-2);
  border-radius: 1px;
}
.brand-mark span.on { background: var(--accent); }
.brand .lt { color: var(--muted); font-weight: 500; }

.topnav {
  display: flex;
  gap: 4px;
  margin-left: auto;
  flex-wrap: wrap;
  min-width: 0;
}
.topnav a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
  transition: color .15s ease, background .15s ease;
}
.topnav a:hover { color: var(--text); background: var(--surface-2); }
.topnav a[aria-current="page"] { color: var(--accent); }

.topbar-right { display: flex; align-items: center; gap: 8px; }

@media (max-width: 560px) {
  .topbar-right { margin-left: auto; }
  .topnav { order: 3; width: 100%; justify-content: flex-start; margin-left: 0; gap: 2px; }
  .topnav a { padding: 6px 8px; font-size: 13px; }
}

.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  gap: 2px;
}
.seg > * {
  border: 0; background: transparent; color: var(--text-2);
  font: inherit; font-size: 13px; font-weight: 500;
  padding: 6px 10px; border-radius: 8px;
  cursor: pointer; min-width: 36px;
  text-decoration: none;
  text-align: center;
  transition: background .15s ease, color .15s ease;
}
.seg > *:hover { color: var(--text); }
.seg > *.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,0.2); }

.icon-btn {
  width: 34px; height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  display: inline-grid; place-items: center;
  transition: all .15s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn .ic { width: 16px; height: 16px; }
[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark { display: inline-block; }
[data-theme="light"] .theme-icon-dark { display: none; }
[data-theme="light"] .theme-icon-light { display: inline-block; }

/* ---------- Hero ---------- */
.hero { margin-bottom: 22px; max-width: 100%; }
.hero h1 {
  font-size: clamp(24px, 6.5vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  font-weight: 600;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.hero p {
  color: var(--muted);
  margin: 0 0 14px;
  font-size: 15px;
  max-width: 60ch;
}
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-line);
  font-size: 12.5px;
  font-weight: 500;
  margin: 0;
}
.trust-badge .ic { width: 14px; height: 14px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  max-width: 100%;
  min-width: 0;
}
.pwcard { padding: 14px 14px 16px; }
@media (max-width: 480px) {
  .pwcard { padding: 12px 12px 14px; border-radius: 18px; }
}
.settings-card { margin-bottom: 14px; border-radius: var(--radius); }

/* ---------- Tabs ---------- */
.modetabs {
  display: flex;
  gap: 2px;
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  margin-bottom: 14px;
  width: 100%;
}
.modetab {
  flex: 1 1 0;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  padding: 10px 8px;
  border-radius: 999px;
  cursor: pointer;
  white-space: normal;
  line-height: 1.2;
  transition: color .15s ease, background .15s ease, box-shadow .15s ease;
  text-align: center;
}
@media (max-width: 420px) {
  .modetab { font-size: 12.5px; padding: 9px 6px; }
}
.modetab:hover { color: var(--text); }
.modetab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0,0,0,0.25), 0 0 0 1px var(--border-strong);
}

.submodetabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  max-width: 100%;
}
.submodetab {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s ease;
}
.submodetab:hover { color: var(--text); border-color: var(--border-strong); }
.submodetab.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.tabpanel[hidden] { display: none; }

/* ---------- Password display ---------- */
.pwdisplay {
  position: relative;
  padding: 22px 18px 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent), var(--surface-2);
  border: 1px solid var(--border);
  overflow: hidden;
  max-width: 100%;
}
@media (max-width: 480px) {
  .pwdisplay { padding: 18px 14px 14px; }
}
.pwdisplay::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(420px 80px at 20% 0%, var(--accent-soft), transparent 70%);
  pointer-events: none;
  opacity: .9;
}
.pwtext {
  position: relative;
  display: block;
  font-size: clamp(18px, 4.5vw, 30px);
  line-height: 1.3;
  font-weight: 500;
  word-break: break-all;
  overflow-wrap: anywhere;
  min-height: 1.3em;
  max-width: 100%;
  color: var(--text);
}
.pwtext .num { color: var(--info); }
.pwtext .sym { color: var(--accent); }
.pwtext .upp { color: var(--text); }
.pwtext .low { color: var(--text-2); }
.pwtext.hidden { letter-spacing: 0.18em; }

.pwmeta {
  position: relative;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.pwmeta-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12.5px;
  flex-wrap: wrap;
  min-width: 0;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 9px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
}
.pwactions { display: inline-flex; gap: 6px; flex-wrap: wrap; max-width: 100%; }
@media (max-width: 420px) {
  #pw-copy span { display: none; }
  #pw-copy { padding: 0 10px; }
  .pwmeta { gap: 8px; }
}
.act-btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: all .15s ease;
}
.act-btn:hover { border-color: var(--border-strong); background: var(--surface-3); }
.act-btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
}
.act-btn.primary:hover { background: var(--accent-hi); }
.act-btn .ic { width: 14px; height: 14px; }

/* eye/eye-off icons inside any toggle button */
#pw-show-toggle[aria-pressed="true"] .icon-eye-off,
#pw-show-toggle[aria-pressed="false"] .icon-eye,
#check-show-toggle[aria-pressed="false"] .icon-eye-off,
#check-show-toggle[aria-pressed="true"] .icon-eye {
  display: inline-block;
}
#pw-show-toggle[aria-pressed="true"] .icon-eye,
#pw-show-toggle[aria-pressed="false"] .icon-eye-off,
#check-show-toggle[aria-pressed="false"] .icon-eye,
#check-show-toggle[aria-pressed="true"] .icon-eye-off {
  display: none;
}

/* ---------- Strength meter ---------- */
.strength { margin-top: 14px; }
.strength-bar {
  display: flex; gap: 4px; height: 6px;
}
.strength-bar span {
  flex: 1; height: 100%;
  background: var(--surface-3);
  border-radius: 3px;
  transition: background .25s ease;
}
/* Color filled segments based on the parent's strength tier — red → orange → amber → lime → green */
.strength-bar[data-tier="0"] span.on { background: #ef4444; } /* very weak */
.strength-bar[data-tier="1"] span.on { background: #f97316; } /* weak */
.strength-bar[data-tier="2"] span.on { background: #f59e0b; } /* medium */
.strength-bar[data-tier="3"] span.on { background: #84cc16; } /* strong */
.strength-bar[data-tier="4"] span.on { background: #22c55e; } /* very strong */
.strength-bar[data-tier="5"] span.on { background: #16a34a; } /* very strong+ */

.strength-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 8px;
  font-size: 12.5px;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 100%;
}
.strength-meta .label,
.strength-meta .crack { min-width: 0; word-break: break-word; overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .strength-meta { font-size: 12px; }
}
.strength-meta .label { font-weight: 600; }
.strength-meta .label[data-tier="0"] { color: #ef4444; }
.strength-meta .label[data-tier="1"] { color: #f97316; }
.strength-meta .label[data-tier="2"] { color: #f59e0b; }
.strength-meta .label[data-tier="3"] { color: #65a30d; }
.strength-meta .label[data-tier="4"],
.strength-meta .label[data-tier="5"] { color: #16a34a; }
[data-theme="light"] .strength-meta .label[data-tier="3"] { color: #4d7c0f; }
[data-theme="light"] .strength-meta .label[data-tier="4"],
[data-theme="light"] .strength-meta .label[data-tier="5"] { color: #15803d; }
.strength-meta .crack { color: var(--muted); }
.strength-meta .crack b { color: var(--text-2); font-weight: 500; }

/* ---------- CTA row ---------- */
.cta-row {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.cta {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: background .15s ease, transform .05s ease;
}
.cta:hover { background: var(--accent-hi); }
.cta:active { transform: translateY(1px); }
.cta-secondary {
  width: 48px;
  display: inline-grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  cursor: pointer;
}
.cta-secondary:hover { border-color: var(--border-strong); }

/* ---------- Sections ---------- */
.section-label {
  display: flex; align-items: center; gap: 10px;
  font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); font-weight: 600;
  margin: 26px 4px 10px;
}
.section-label::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}

/* ---------- Presets ---------- */
.presets { display: flex; flex-wrap: wrap; gap: 6px; max-width: 100%; }
.preset {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px; padding: 0 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  font: inherit;
  font-size: 12.5px; font-weight: 500;
  cursor: pointer;
  transition: all .15s ease;
  max-width: 100%;
  white-space: nowrap;
}
.preset:hover { border-color: var(--border-strong); color: var(--text); }
.preset.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.preset .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .9;
}

/* ---------- Settings ---------- */
.settings {
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
}
.settings.hidden { display: none; }
@media (max-width: 640px) {
  .settings { grid-template-columns: 1fr; gap: 16px; padding: 16px; }
}
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  color: var(--text-2);
  font-weight: 500;
}
.field-label .val { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* slider */
.slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 28px;
  background: transparent;
  margin: 0;
}
.slider:focus { outline: none; }
.slider::-webkit-slider-runnable-track {
  height: 4px;
  background: linear-gradient(to right, var(--accent) var(--p, 50%), var(--surface-3) var(--p, 50%));
  border-radius: 2px;
}
.slider::-moz-range-track {
  height: 4px;
  background: var(--surface-3);
  border-radius: 2px;
}
.slider::-moz-range-progress {
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  margin-top: -8px;
  border-radius: 50%;
  background: var(--text);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--border-strong);
  cursor: pointer;
}
.slider::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--text);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--border-strong);
  cursor: pointer;
}

/* checkbox row */
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; margin-top: 6px; }
@media (max-width: 420px) { .checks { grid-template-columns: 1fr; } }
.check {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  font: inherit;
  font-size: 13px;
  color: var(--text-2);
  text-align: left;
  transition: all .15s ease;
}
.check:hover { border-color: var(--border-strong); color: var(--text); }
.check.on { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.check .box {
  width: 18px; height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--border-strong);
  display: inline-grid; place-items: center;
  flex: 0 0 auto;
  background: var(--surface);
  transition: all .15s ease;
}
.check.on .box { background: var(--accent); border-color: var(--accent); }
.check.on .box svg { display: block; width: 11px; height: 11px; color: var(--accent-ink); }
.check .box svg { display: none; width: 11px; height: 11px; color: var(--accent-ink); }
.check .check-label { flex: 1; }
.check .check-hint { color: var(--muted); font-size: 11.5px; }

/* toggle row */
.toggles { display: grid; gap: 8px; margin-top: 10px; }
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 10px;
  font-size: 13px;
  gap: 12px;
}
.toggle-row > span:first-child { min-width: 0; flex: 1 1 auto; }
.toggle {
  width: 40px; height: 22px;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: all .15s ease;
  flex: 0 0 auto;
}
.toggle .knob {
  position: absolute; top: 1px; left: 1px;
  width: 18px; height: 18px;
  background: var(--text);
  border-radius: 50%;
  transition: all .2s ease;
}
.toggle.on { background: var(--accent); border-color: var(--accent); }
.toggle.on .knob { left: 19px; background: var(--accent-ink); }

/* text input */
.input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color .15s ease, background .15s ease;
}
.input:focus { border-color: var(--accent); background: var(--surface); }
.input::placeholder { color: var(--muted); }

/* ---------- Trust strip ---------- */
.trust {
  margin-top: 14px;
  display: flex; flex-wrap: wrap; gap: 8px 12px;
  align-items: center; justify-content: center;
  color: var(--text-2);
  font-size: 12px;
  max-width: 100%;
  text-align: center;
}
.trust span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.10);
  border: 1px solid rgba(34, 197, 94, 0.28);
  color: var(--success);
  font-weight: 500;
}
.trust .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
  flex: 0 0 auto;
}
[data-theme="light"] .trust span {
  background: rgba(21, 128, 61, 0.08);
  border-color: rgba(21, 128, 61, 0.30);
}

.muted-note {
  color: var(--muted);
  font-size: 12.5px;
}
.muted-note.small { font-size: 12px; margin: 10px 0 0; }

@media (max-width: 640px) {
  .hide-mobile { display: none; }
}

/* ---------- Check tab ---------- */
.check-intro { margin-bottom: 14px; }
.check-h2 {
  font-size: clamp(20px, 3.4vw, 26px);
  letter-spacing: -0.015em;
  margin: 0 0 6px;
  font-weight: 600;
}
.check-sub {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  max-width: 64ch;
}
.check-input-wrap { margin: 14px 0 12px; }
.check-input-wrap .field-label { margin-bottom: 8px; }
.check-input-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  flex-wrap: wrap;
  width: 100%;
}
.check-input {
  flex: 1 1 100%;
  min-width: 0;
  font-size: 16px;
  letter-spacing: 0.02em;
}
@media (min-width: 480px) {
  .check-input { flex: 1 1 200px; }
}
.check-input-row .act-btn { flex: 1 1 auto; justify-content: center; min-width: 0; }
@media (min-width: 480px) {
  .check-input-row .act-btn { flex: 0 0 auto; }
}
.trust-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 8px;
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 500;
}
.privacy-box {
  margin-top: 8px;
  padding: 12px 14px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 12px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
}
.privacy-box strong { color: var(--accent); margin-right: 4px; }

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--text-2);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.check-item > span:last-child { min-width: 0; flex: 1 1 auto; }
.check-item .check-item-icon {
  width: 20px; height: 20px;
  border-radius: 6px;
  display: inline-grid; place-items: center;
  background: var(--surface-3);
  color: var(--muted);
  flex: 0 0 auto;
}
.check-item[data-state="pass"] {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.10);
  color: var(--text);
}
.check-item[data-state="pass"] .check-item-icon {
  background: var(--success);
  color: #ffffff;
}
.check-item[data-state="fail"] {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.07);
  color: var(--text-2);
}
.check-item[data-state="fail"] .check-item-icon {
  background: var(--danger);
  color: #ffffff;
}
[data-theme="light"] .check-item[data-state="pass"] {
  border-color: rgba(21, 128, 61, 0.40);
  background: rgba(21, 128, 61, 0.08);
}
[data-theme="light"] .check-item[data-state="fail"] {
  border-color: rgba(185, 28, 28, 0.35);
  background: rgba(185, 28, 28, 0.06);
}
.check-item[data-state="neutral"] .icon-tick,
.check-item[data-state="neutral"] .icon-cross,
.check-item[data-state="pass"] .icon-cross,
.check-item[data-state="fail"] .icon-tick { display: none; }
.check-item .icon-tick, .check-item .icon-cross { width: 11px; height: 11px; }

.check-messages {
  display: grid;
  gap: 6px;
  margin: 14px 0 0;
}
.check-msg {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.check-msg.warn { background: rgba(245, 158, 11, 0.08); color: var(--warn); border: 1px solid rgba(245, 158, 11, 0.25); }
.check-msg.danger { background: rgba(239, 68, 68, 0.08); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.25); }
.check-msg.success { background: rgba(34, 197, 94, 0.06); color: var(--success); border: 1px solid rgba(34, 197, 94, 0.25); }

.check-recommendation {
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.rec-title { margin: 0 0 6px; font-size: 13.5px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; }
.rec-body { margin: 0; font-size: 14px; color: var(--text); line-height: 1.55; }

/* ---------- Section blocks ---------- */
.section { margin-top: 36px; }
.section h2 {
  font-size: clamp(18px, 2.5vw, 22px);
  letter-spacing: -0.015em;
  font-weight: 600;
  margin: 0 0 14px;
}
.tips { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.tip {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.tip .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 22px;
  border-radius: 6px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 11px; font-weight: 700;
  margin-bottom: 10px;
}
.tip h3 { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.tip p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

.tips-list {
  margin: 0;
  padding: 0 0 0 1.4em;
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.65;
}
.tips-list li { margin-bottom: 4px; }

/* ---------- History ---------- */
.history {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 14px;
  overflow: hidden;
}
.history-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
  width: 100%;
  background: transparent;
  border: 0;
  color: var(--text);
  font: inherit;
}
.history-head h3 { margin: 0; font-size: 14px; font-weight: 600; }
.history-head .meta { color: var(--muted); font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }
.history-head[aria-expanded="true"] .chev { transform: rotate(180deg); }
.history-body { border-top: 1px solid var(--border); padding: 6px 0 6px; }
.history-empty { padding: 22px; text-align: center; color: var(--muted); font-size: 13px; }
.history-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.history-row:last-child { border-bottom: 0; }
.history-row .pw { font-family: var(--font-mono); font-size: 13px; color: var(--text-2); word-break: break-all; overflow-wrap: anywhere; flex: 1 1 0; min-width: 0; }
.history-row .when { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.history-row .copyc {
  background: transparent; border: 0; color: var(--muted); cursor: pointer;
  padding: 6px 8px; border-radius: 6px;
}
.history-row .copyc:hover { color: var(--text); background: var(--surface-2); }
.history-foot {
  padding: 10px 14px;
  display: flex; justify-content: space-between; align-items: center;
  color: var(--muted); font-size: 11.5px;
  border-top: 1px solid var(--border);
  gap: 10px; flex-wrap: wrap;
}
.history-foot > span { min-width: 0; flex: 1 1 auto; }
.linklike {
  background: transparent;
  border: 0;
  color: var(--text-2);
  cursor: pointer;
  font: inherit;
  font-size: 12.5px;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.linklike:hover { color: var(--accent); }
.inline-link { font-size: 14px; }

/* ---------- FAQ ---------- */
.faq {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: 0; }
.faq-item > summary {
  list-style: none;
  cursor: pointer;
  padding: 16px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.faq-item > summary > span:first-child { min-width: 0; flex: 1 1 auto; }
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary .chev {
  width: 14px; height: 14px; color: var(--muted);
  transition: transform .2s ease;
}
.faq-item[open] > summary .chev { transform: rotate(180deg); color: var(--accent); }
.faq-a {
  padding: 0 16px 16px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
}

/* ---------- Legal pages ---------- */
.legal {
  max-width: 70ch;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 28px 32px;
  box-shadow: var(--shadow-card);
  overflow-wrap: anywhere;
}
@media (max-width: 640px) {
  .legal { padding: 18px 16px; border-radius: 16px; }
}
.legal-head { margin-bottom: 12px; }
.legal h1 {
  font-size: clamp(24px, 4vw, 32px);
  margin: 0 0 4px;
  letter-spacing: -0.02em;
  font-weight: 600;
}
.legal-section { margin-top: 18px; }
.legal h2 {
  font-size: 16px;
  margin: 0 0 6px;
  font-weight: 600;
}
.legal p { margin: 0; color: var(--text-2); font-size: 14.5px; line-height: 1.65; }

/* ---------- Footer ---------- */
footer {
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12.5px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-inner > span { min-width: 0; flex: 1 1 auto; }
@media (max-width: 480px) {
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .footer-inner > span { flex: 0 0 auto; }
}
footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--text-2); text-decoration: none; }
footer a:hover { color: var(--accent); }
.credit-link { color: var(--accent); font-weight: 500; text-decoration: none; }
.credit-link:hover { color: var(--accent-hi); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%; bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 50;
  box-shadow: 0 10px 40px rgba(0,0,0,0.35);
  max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast .ic { color: var(--accent); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Focus ---------- */
button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
.input:focus-visible,
.slider:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Print ---------- */
@media print {
  body { background: #fff; color: #000; }
  .topbar, footer, .toast, .pwactions, .cta-row, .presets, .checks, .toggles, .check-input-row, .modetabs, .submodetabs { display: none !important; }
  .card, .legal { box-shadow: none; border-color: #ccc; }
}
