/* strongpasswordgen.org — dark slate + emerald security theme */
:root {
  --primary: #0f172a;
  --primary-dark: #020617;
  --accent: #10b981;
  --accent-dark: #059669;
  --bg: #f2f7f5;
  --card: #ffffff;
  --text: #0f172a;
  --text-light: #52616f;
  --border: #e2e8f0;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 17px;
}

.container { max-width: 860px; margin: 0 auto; padding: 0 20px; }

/* Header */
header {
  background: var(--primary);
  color: #fff;
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.logo { font-size: 1.25rem; font-weight: 800; color: #fff; text-decoration: none; letter-spacing: -0.02em; }
.logo span { color: var(--accent); }
nav a {
  color: #c6ead9;
  text-decoration: none;
  margin-left: 18px;
  font-size: 0.95rem;
  font-weight: 500;
}
nav a:hover { color: var(--accent); }

/* Hero */
.hero { padding: 40px 0 10px; text-align: center; }
.hero h1 { font-size: 2rem; line-height: 1.25; margin-bottom: 12px; color: var(--primary-dark); }
.hero p.sub { color: var(--text-light); max-width: 640px; margin: 0 auto 8px; }

/* Calculator card */
.calc-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin: 24px 0 36px;
}
.calc-card h2 { color: var(--primary-dark); margin-bottom: 18px; font-size: 1.3rem; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; color: var(--text); }
.field input, .field select {
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: #fff;
  color: var(--text);
}
.field input:focus, .field select:focus { outline: 2px solid var(--primary); border-color: var(--primary); }
.unit-row { display: flex; gap: 8px; }
.unit-row input { flex: 1; }
.unit-row select { width: 90px; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #1e1e1e;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 14px 30px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  width: 100%;
  margin-top: 6px;
}
.btn:hover { background: var(--accent-dark); }

/* Results */
.results {
  display: none;
  margin-top: 24px;
  border-top: 2px dashed var(--border);
  padding-top: 20px;
}
.results.visible { display: block; }
.results h3 { color: var(--primary-dark); margin-bottom: 14px; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.result-box {
  background: #e9f7f1;
  border: 1px solid #c6ead9;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}
.result-box .value { font-size: 1.5rem; font-weight: 800; color: var(--primary-dark); }
.result-box .label { font-size: 0.85rem; color: var(--text-light); margin-top: 4px; }
.result-note { font-size: 0.9rem; color: var(--text-light); margin-top: 14px; }
.result-actions { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.result-actions button {
  background: #fff;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
}
.result-actions button:hover { background: var(--primary); color: #fff; }

/* Content sections */
section.content { padding: 10px 0 26px; }
section.content h2 {
  color: var(--primary-dark);
  font-size: 1.5rem;
  margin: 26px 0 12px;
  padding-top: 10px;
}
section.content h3 { color: var(--primary-dark); font-size: 1.15rem; margin: 20px 0 8px; }
section.content p { margin-bottom: 14px; }
section.content ul, section.content ol { margin: 0 0 14px 24px; }
section.content li { margin-bottom: 6px; }

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 22px;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 0.95rem;
}
th {
  background: var(--primary);
  color: #fff;
  text-align: left;
  padding: 12px 14px;
  font-weight: 600;
}
td { padding: 11px 14px; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
tr:nth-child(even) td { background: #f4f8fc; }

/* FAQ */
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-item summary {
  padding: 16px 18px;
  font-weight: 700;
  cursor: pointer;
  color: var(--primary-dark);
  list-style: none;
  position: relative;
  padding-right: 40px;
}
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: var(--accent-dark);
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item .faq-body { padding: 0 18px 16px; color: var(--text); }

/* Callout */
.callout {
  background: #e9f7f1;
  border-left: 4px solid var(--accent);
  padding: 16px 18px;
  border-radius: 0 8px 8px 0;
  margin: 16px 0;
  font-size: 0.97rem;
}

/* Related links */
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 16px 0; }
.related-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.12s;
  display: block;
}
.related-card:hover { transform: translateY(-2px); border-color: var(--primary); }
.related-card strong { color: var(--primary-dark); display: block; margin-bottom: 6px; }
.related-card span { font-size: 0.88rem; color: var(--text-light); }

/* Breadcrumb */
.breadcrumb { font-size: 0.85rem; color: var(--text-light); padding: 14px 0 0; }
.breadcrumb a { color: var(--primary); text-decoration: none; }

/* Footer */
footer {
  background: var(--primary-dark);
  color: #a9d6c2;
  padding: 34px 0;
  margin-top: 40px;
  font-size: 0.9rem;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
footer h4 { color: #fff; margin-bottom: 10px; font-size: 1rem; }
footer a { color: #a9d6c2; text-decoration: none; display: block; margin-bottom: 6px; }
footer a:hover { color: var(--accent); }
.footer-bottom { text-align: center; margin-top: 26px; padding-top: 16px; border-top: 1px solid #134e4a; font-size: 0.82rem; }

/* Ad slots (placeholders, activate after approval) */
.ad-slot {
  background: repeating-linear-gradient(45deg, #f0f0ec, #f0f0ec 12px, #e9e9e4 12px, #e9e9e4 24px);
  border: 1px dashed #c9c9c2;
  border-radius: 8px;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9a9a92;
  font-size: 0.8rem;
  margin: 22px 0;
}

@media (max-width: 640px) {
  .calc-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.5rem; }
  nav a { margin-left: 10px; font-size: 0.85rem; }
}

/* --- Additional classes used across pages --- */

/* Hero tagline */
.tagline { color: var(--text-light); max-width: 640px; margin: 0 auto 8px; }

/* Generic content card */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin: 24px 0;
}
.card h2 { color: var(--primary-dark); margin-bottom: 14px; font-size: 1.4rem; }
.card h3 { color: var(--primary-dark); font-size: 1.1rem; margin: 18px 0 8px; }
.card p { margin-bottom: 14px; }
.card p:last-child { margin-bottom: 0; }
.card ul, .card ol { margin: 0 0 14px 24px; }
.card li { margin-bottom: 6px; }

/* Form grid (alias of calc-grid) */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 8px; }

/* Primary button (alias of .btn) */
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #1e1e1e;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 14px 30px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  width: 100%;
  margin-top: 10px;
}
.btn-primary:hover { background: var(--accent-dark); }

/* Result tiles */
.result-tile {
  background: #e9f7f1;
  border: 1px solid #c6ead9;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}
.result-value { font-size: 1.6rem; font-weight: 800; color: var(--primary-dark); }
.result-label { font-size: 0.85rem; color: var(--text-light); margin-top: 4px; }
.result-tile .big { font-size: 2rem; }
.stage { font-size: 1.2rem; font-weight: 700; color: var(--accent-dark); }

/* Article pages */
.article { max-width: 720px; margin: 0 auto; }
.article-meta { color: var(--text-light); font-size: 0.85rem; margin-bottom: 18px; }

/* Embed code block */
.code-block {
  background: #0b1220;
  color: #d2efe3;
  border-radius: 8px;
  padding: 18px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 14px 0;
}

/* Rows / misc */
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.out { font-weight: 700; color: var(--primary-dark); }
.credit { font-size: 0.78rem; color: var(--text-light); text-align: center; margin-top: 8px; }
.credit a { color: var(--primary); }
.disclaimer { font-size: 0.82rem; color: var(--text-light); margin-top: 18px; }

/* Widget (embed page body) */
.widget {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  max-width: 420px;
  margin: 0 auto;
}

/* Footer links row */
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; justify-content: center; margin-bottom: 14px; }
.footer-links a { display: inline-block; margin-bottom: 0; }

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}

/* --- shared result/tile classes used by page markup --- */
.subtitle { color: var(--text-light); max-width: 640px; margin: 0 auto 8px; }

.form-field { display: flex; flex-direction: column; }
.form-field label { font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; color: var(--text); }
.form-field input, .form-field select {
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: #fff;
  color: var(--text);
}
.form-field input:focus, .form-field select:focus { outline: 2px solid var(--primary); border-color: var(--primary); }

.result {
  margin-top: 24px;
  border-top: 2px dashed var(--border);
  padding-top: 20px;
}
.result h3 { color: var(--primary-dark); margin-bottom: 14px; }
.result-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.tile {
  background: #e9f7f1;
  border: 1px solid #c6ead9;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}
.tile-num { font-size: 1.55rem; font-weight: 800; color: var(--primary-dark); }
.tile-label { font-size: 0.85rem; color: var(--text-light); margin-top: 4px; }

.tip-box {
  background: #e9f7f1;
  border-left: 4px solid var(--accent);
  padding: 16px 18px;
  border-radius: 0 8px 8px 0;
  margin: 16px 0;
  font-size: 0.97rem;
}

.spoke-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 16px 0; }
.spoke-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-decoration: none;
  color: var(--text-light);
  box-shadow: var(--shadow);
  transition: transform 0.12s;
  display: block;
  font-size: 0.9rem;
}
.spoke-card:hover { transform: translateY(-2px); border-color: var(--primary); }
.spoke-card strong { color: var(--primary-dark); display: block; margin-bottom: 6px; font-size: 1rem; }

/* --- password generator widgets --- */
.pw-output-wrap { display: flex; gap: 10px; align-items: stretch; margin: 14px 0 10px; }
.pw-output-wrap output {
  flex: 1; display: block; font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 1.15rem; word-break: break-all; background: #0b1220; color: #34d399;
  border-radius: var(--radius); padding: 14px 16px; border: 1px solid #134e4a; min-height: 1.4em;
}
.btn-copy {
  background: var(--accent); color: #fff; border: none; border-radius: var(--radius);
  padding: 0 22px; font-size: 1rem; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn-copy:hover { background: var(--accent-dark); }
.strength-wrap { margin: 4px 0 16px; }
.strength-bar { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.strength-bar > div { height: 100%; width: 0; background: var(--accent); border-radius: 4px; transition: width .25s, background .25s; }
.strength-label { margin-top: 6px; font-size: .92rem; font-weight: 600; }
.form-field input[type="range"] { width: 100%; accent-color: var(--accent); }
.form-field label { display: block; margin-bottom: 6px; }
