/* QuickTools — shared styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #ffffff;
  --bg2: #f7f7f5;
  --bg3: #f0efeb;
  --text: #1a1a18;
  --text2: #5a5a56;
  --text3: #9a9a94;
  --border: rgba(0,0,0,0.10);
  --border2: rgba(0,0,0,0.18);
  --accent: #378ADD;
  --accent-bg: #E6F1FB;
  --accent-text: #0C447C;
  --green: #3B6D11;
  --green-bg: #EAF3DE;
  --amber: #854F0B;
  --amber-bg: #FAEEDA;
  --red: #A32D2D;
  --red-bg: #FCEBEB;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: none;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1c1a;
    --bg2: #252523;
    --bg3: #2e2e2b;
    --text: #f0efe8;
    --text2: #a0a09a;
    --text3: #666660;
    --border: rgba(255,255,255,0.10);
    --border2: rgba(255,255,255,0.18);
    --accent: #5aa0e8;
    --accent-bg: #0c2a4a;
    --accent-text: #85B7EB;
    --green: #97C459;
    --green-bg: #173404;
    --amber: #FAC775;
    --amber-bg: #412402;
    --red: #F09595;
    --red-bg: #501313;
  }
}

body {
  font-family: var(--font);
  background: var(--bg3);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

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

/* Layout */
.page { max-width: 520px; margin: 0 auto; padding: 0 1rem 4rem; }
.page-wide { max-width: 800px; margin: 0 auto; padding: 0 1rem 4rem; }

/* Header / Nav */
.site-nav {
  background: var(--bg);
  border-bottom: 0.5px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.3px;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  font-size: 13px;
  color: var(--text2);
  padding: 5px 10px;
  border-radius: var(--radius);
  transition: background 0.12s, color 0.12s;
  text-decoration: none;
}
.nav-links a:hover { background: var(--bg2); color: var(--text); text-decoration: none; }
.nav-links a.active { background: var(--bg2); color: var(--text); }

/* Page hero */
.page-hero { padding: 2rem 0 1.5rem; text-align: center; }
.page-hero h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.5px; color: var(--text); }
.page-hero p { font-size: 14px; color: var(--text2); margin-top: 4px; }

/* Cards */
.card {
  background: var(--bg);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 10px;
}
.card-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text3);
  margin-bottom: 8px;
}

/* Form elements */
input[type=text], input[type=number], input[type=date], select, textarea {
  font-family: var(--font);
  font-size: 14px;
  color: #111111;
  -webkit-text-fill-color: #111111;
  background: #efefef;
  border: 0.5px solid #bbbbbb;
  border-radius: var(--radius);
  padding: 10px 12px;
  transition: border-color 0.12s;
  width: 100%;
}
@media (prefers-color-scheme: dark) {
  input[type=text], input[type=number], input[type=date], select, textarea {
    color: #eeeeee;
    -webkit-text-fill-color: #eeeeee;
    background: #2a2a2a;
    border-color: #555555;
  }
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
input[type=range] { width: 100%; accent-color: var(--accent); cursor: pointer; }
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Buttons */
.btn {
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 0.5px solid var(--border2);
  cursor: pointer;
  transition: all 0.12s;
  background: var(--bg);
  color: var(--text2);
}
.btn:hover { background: var(--bg2); color: var(--text); }
.btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.btn-primary:hover { opacity: 0.85; }
.btn-sm { font-size: 12px; padding: 6px 12px; }
.btn-full { width: 100%; }
.btn-ok { color: var(--green) !important; border-color: var(--green) !important; }

/* Metric cells */
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.metrics-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.metrics-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.metric {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 10px 8px;
  text-align: center;
}
.metric-val { font-size: 20px; font-weight: 600; color: var(--text); line-height: 1.2; }
.metric-lbl { font-size: 11px; color: var(--text3); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.4px; }

/* Divider */
.divider { height: 0.5px; background: var(--border); margin: 1rem 0; }

/* Toggle pills */
.toggle-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opt-toggle {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg2); border: 0.5px solid var(--border);
  border-radius: var(--radius); padding: 10px 12px; cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.opt-toggle:hover { border-color: var(--border2); }
.opt-toggle.active { border-color: var(--accent); background: var(--accent-bg); }
.opt-label { font-size: 13px; color: var(--text); }
.opt-sub { font-size: 11px; color: var(--text2); margin-top: 1px; }
.pip { width: 32px; height: 18px; border-radius: 9px; background: var(--border2); position: relative; flex-shrink: 0; transition: background 0.2s; }
.pip::after { content:''; position:absolute; top:3px; left:3px; width:12px; height:12px; border-radius:50%; background:#fff; transition: transform 0.2s; }
.opt-toggle.active .pip { background: var(--accent); }
.opt-toggle.active .pip::after { transform: translateX(14px); }

/* Related tools strip */
.also { display: flex; gap: 8px; flex-wrap: wrap; }
.also-pill {
  font-size: 12px; padding: 5px 12px;
  border: 0.5px solid var(--border2); border-radius: 999px;
  color: var(--text2); background: var(--bg);
  cursor: pointer; transition: all 0.12s; text-decoration: none;
}
.also-pill:hover { background: var(--bg2); color: var(--text); text-decoration: none; }

/* Footer */
.site-footer {
  background: var(--bg);
  border-top: 0.5px solid var(--border);
  padding: 1.5rem 1rem;
  margin-top: 3rem;
}
.footer-inner {
  max-width: 800px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.footer-logo { font-size: 14px; font-weight: 600; color: var(--text); }
.footer-logo span { color: var(--accent); }
.footer-links { display: flex; gap: 16px; }
.footer-links a { font-size: 12px; color: var(--text2); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 12px; color: var(--text3); }

/* Action row */
.action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.action-row .btn { width: 100%; }

/* Swap button */
.swap-row { display: flex; align-items: center; justify-content: center; margin: 0.5rem 0; position: relative; }
.swap-row::before { content:''; position:absolute; left:0; right:0; top:50%; height:0.5px; background:var(--border); }
.swap-btn { position:relative; z-index:1; width:36px; height:36px; border-radius:50%; border:0.5px solid var(--border2); background:var(--bg); cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:16px; transition:transform 0.2s, background 0.12s; }
.swap-btn:hover { background:var(--bg2); }
.swap-btn:active { transform:rotate(180deg); }

/* Homepage grid */
.tools-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media(max-width:400px) { .tools-grid { grid-template-columns: 1fr; } }
.tool-card {
  background: var(--bg); border: 0.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 1rem;
  cursor: pointer; transition: border-color 0.12s, background 0.12s;
  display: flex; flex-direction: column; gap: 6px;
  text-decoration: none;
}
.tool-card:hover { border-color: var(--border2); background: var(--bg2); text-decoration: none; }
.tool-card.featured { border-color: var(--accent); }
.tc-icon { width: 34px; height: 34px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 16px; }
.tc-title { font-size: 14px; font-weight: 600; color: var(--text); }
.tc-desc { font-size: 12px; color: var(--text2); line-height: 1.4; }
.tc-badge { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--accent-bg); color: var(--accent-text); align-self: flex-start; }

/* Search */
.search-wrap { position: relative; margin-bottom: 1rem; }
.search-wrap svg { position:absolute; left:13px; top:50%; transform:translateY(-50%); width:16px; height:16px; color:var(--text3); pointer-events:none; }
.search-wrap input { padding-left: 38px; font-size: 15px; border-radius: var(--radius-lg); border-color: var(--border2); }

/* Popular list */
.popular-list { display:flex; flex-direction:column; gap:1px; background:var(--border); border:0.5px solid var(--border); border-radius:var(--radius-lg); overflow:hidden; }
.popular-item { display:flex; align-items:center; gap:12px; padding:10px 14px; background:var(--bg); text-decoration:none; transition:background 0.1s; }
.popular-item:hover { background:var(--bg2); }
.pi-num { font-size:12px; color:var(--text3); min-width:14px; font-weight:600; }
.pi-icon { font-size:15px; }
.pi-name { font-size:13px; font-weight:600; color:var(--text); }
.pi-sub { font-size:11px; color:var(--text2); }
.pi-arrow { font-size:13px; color:var(--text3); margin-left:auto; }

/* Filter pills */
.filter-row { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:1.25rem; }
.filter-btn { font-size:12px; font-family:var(--font); padding:5px 12px; border:0.5px solid var(--border2); border-radius:999px; background:var(--bg); color:var(--text2); cursor:pointer; transition:all 0.12s; }
.filter-btn:hover { background:var(--bg2); color:var(--text); }
.filter-btn.active { background:var(--text); color:var(--bg); border-color:var(--text); }

/* Strength bar */
.strength-bar-wrap { height:4px; background:var(--bg2); border-radius:2px; margin-bottom:6px; overflow:hidden; }
.strength-bar { height:100%; border-radius:2px; transition:width 0.3s, background 0.3s; }

/* Misc */
.hero-num { font-size:52px; font-weight:700; color:var(--text); line-height:1; letter-spacing:-2px; }
.section-label { font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:0.6px; color:var(--text3); margin-bottom:0.75rem; }
.empty-state { text-align:center; padding:2rem; color:var(--text3); font-size:14px; }
.next-bday { background:var(--green-bg); border-radius:var(--radius); padding:10px 14px; margin-top:10px; display:flex; justify-content:space-between; align-items:center; }
.next-bday-label { font-size:13px; color:var(--green); }
.next-bday-days { font-size:15px; font-weight:600; color:var(--green); }
.milestone-item { display:flex; align-items:center; justify-content:space-between; padding:8px 0; border-bottom:0.5px solid var(--border); }
.milestone-item:last-child { border-bottom:none; }
.ms-label { font-size:13px; color:var(--text2); }
.ms-date { font-size:13px; font-weight:500; color:var(--text); }
.ms-badge { font-size:10px; padding:2px 7px; border-radius:999px; font-weight:600; }
.ms-upcoming { background:var(--green-bg); color:var(--green); }
.ms-past { background:var(--bg2); color:var(--text3); }
.pw-display { font-family:var(--mono); font-size:15px; word-break:break-all; line-height:1.6; color:var(--text); background:var(--bg2); border:0.5px solid var(--border); border-radius:var(--radius); padding:12px 14px; min-height:52px; cursor:pointer; user-select:all; transition:border-color 0.12s; }
.pw-display:hover { border-color:var(--border2); }
.bulk-item { font-family:var(--mono); font-size:13px; background:var(--bg2); border:0.5px solid var(--border); border-radius:var(--radius); padding:8px 12px; color:var(--text); cursor:pointer; display:flex; justify-content:space-between; align-items:center; transition:border-color 0.12s; }
.bulk-item:hover { border-color:var(--border2); }
.why-row { display:flex; gap:10px; align-items:flex-start; padding:8px 0; border-bottom:0.5px solid var(--border); }
.why-row:last-child { border-bottom:none; }
.why-icon { width:22px; height:22px; border-radius:var(--radius); display:flex; align-items:center; justify-content:center; font-size:12px; flex-shrink:0; margin-top:2px; }
.why-text { font-size:13px; color:var(--text2); line-height:1.5; }
.why-text strong { font-weight:600; color:var(--text); }

/* Ad slots */
.ad-slot { background:var(--bg2); border:0.5px dashed var(--border2); border-radius:var(--radius-lg); padding:1rem; text-align:center; color:var(--text3); font-size:12px; margin-bottom:10px; min-height:90px; display:flex; align-items:center; justify-content:center; }

@media(max-width:480px) {
  .metrics-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .nav-links a { padding: 5px 7px; }
}
