/* Tiny Password Helper – clean, security-flavored design */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #ffffff;
  --surface: #f8fafc;
  --text: #0f172a;
  --text-muted: #475569;
  --accent: #1e3a8a;
  --accent-light: #3b82f6;
  --warn: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --border: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f172a;
    --surface: #1e293b;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --accent: #3b82f6;
    --accent-light: #60a5fa;
    --warn: #fbbf24;
    --success: #34d399;
    --danger: #f87171;
    --border: #334155;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.4), 0 2px 4px -2px rgba(0,0,0,0.3);
  }
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
}
.logo svg {
  flex-shrink: 0;
}

.site-header nav a {
  margin-left: 1.5rem;
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s;
}
.site-header nav a:hover {
  color: var(--accent);
}

/* Hero */
.hero {
  padding: 4rem 0 3rem;
  text-align: center;
  background: linear-gradient(135deg, var(--accent) 0%, #1e40af 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.1) 0%, transparent 60%);
  pointer-events: none;
}
.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.hero-sub {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 520px;
  margin: 0 auto 2rem;
}
.btn-primary {
  display: inline-block;
  background: #fbbf24;
  color: #0f172a;
  font-weight: 700;
  padding: 0.75rem 2rem;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

/* Tool section */
.tool-section {
  padding: 3rem 0;
}
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.input-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.input-group input {
  flex: 1 1 240px;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s;
}
.input-group input:focus {
  outline: none;
  border-color: var(--accent-light);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.3);
}
.btn-secondary {
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.btn-secondary:hover {
  background: var(--accent-light);
}

.strength-meter {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.meter-bar {
  flex: 1;
  height: 10px;
  background: var(--border);
  border-radius: 5px;
  overflow: hidden;
  transition: background-color 0.3s;
}
.meter-bar::after {
  content: '';
  display: block;
  height: 100%;
  width: 0%;
  background: var(--danger);
  border-radius: 5px;
  transition: width 0.3s, background-color 0.3s;
}
#strength-label {
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 90px;
  color: var(--text-muted);
}

.checklist {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.checklist li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  padding: 0.25rem 0;
  border-radius: 6px;
  transition: color 0.2s;
}
.checklist li::before {
  content: '○';
  font-size: 1.1rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.checklist li.pass::before {
  content: '✓';
  color: var(--success);
  font-weight: bold;
}
.checklist li.fail::before {
  content: '✗';
  color: var(--danger);
  font-weight: bold;
}

.btn-copy {
  align-self: flex-end;
  padding: 0.6rem 1.5rem;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 8px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-copy:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-copy:not(:disabled):hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Tips */
.tips-section {
  padding: 3rem 0 4rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.tips-section h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 2rem;
}
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}
.tip h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--accent);
}
.tip p {
  color: var(--text-muted);
  line-height: 1.6;
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-top: auto;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.site-footer nav a {
  margin-left: 1.5rem;
  text-decoration: none;
  color: var(--text-muted);
}
.site-footer nav a:hover {
  color: var(--accent);
}

/* Legal pages */
.legal-page {
  padding: 3rem 0;
  flex: 1;
}
.legal-page h1 {
  font-size: 2rem;
  margin-bottom: 2rem;
}
.legal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  line-height: 1.7;
  color: var(--text-muted);
}

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

@media (max-width: 600px) {
  .hero h1 {
    font-size: 2rem;
  }
  .checklist {
    grid-template-columns: 1fr;
  }
  .tool-card {
    padding: 1.5rem;
  }
}


/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}
