/* SnappyFreeTools.com — shared styles */

/* =====================================================================
   MASTER COLOR PALETTE
   Every color on the site is pulled from these variables. To try a new
   theme, change values here — the whole site (85+ tool pages) updates
   from this one file. Grouped by role, not by hue.
   ===================================================================== */
:root {
  /* --- Brand (teal): header accents, primary buttons, links --- */
  --teal-dark: #0f766e;
  --teal: #0d9488;
  --teal-light: #14b8a6;

  /* --- Accent (orange): CTA buttons, highlights, "pop" moments --- */
  --accent: #f97316;
  --accent-dark: #ea580c;
  --accent-light: #fdba74;

  /* --- Text --- */
  --ink: #1e293b;        /* headings, primary text */
  --slate: #475569;      /* body copy */
  --slate-light: #94a3b8; /* secondary/muted text */

  /* --- Surfaces --- */
  --bg: #eaf2f3;          /* page background — visible tint, not stark white */
  --bg-soft: #f8fafc;     /* inset panels (result boxes, code blocks) */
  --card-bg: #ffffff;     /* cards, widgets, inputs */

  /* --- Borders --- */
  --border: #d6e0e8;          /* default dividers, subtle lines */
  --border-strong: #7c93a8;   /* dark, visible borders — inputs & widget cards */
  --border-focus: var(--teal);

  /* --- Workflow boxes (collections) --- */
  --workflow-bg: #ffffff;
  --workflow-color: #1e293b;

  /* --- Shape & elevation --- */
  --radius: 14px;
  --shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 8px 24px rgba(15, 23, 42, 0.14);
  --shadow-btn: 0 4px 14px rgba(13, 148, 136, 0.35);
  --shadow-btn-accent: 0 4px 14px rgba(249, 115, 22, 0.38);
}

/* --- Dark Mode Theme --- */
html[data-theme="dark"] {
  /* --- Brand (teal): brighter for dark backgrounds --- */
  --teal-dark: #2dd4bf;
  --teal: #20c997;
  --teal-light: #2dd4bf;

  /* --- Accent (orange): same or brighter --- */
  --accent: #fd7e14;
  --accent-dark: #ff922b;
  --accent-light: #ffa94d;

  /* --- Text --- */
  --ink: #f1f5f9;           /* headings, primary text */
  --slate: #cbd5e1;         /* body copy */
  --slate-light: #94a3b8;   /* secondary/muted text */

  /* --- Surfaces --- */
  --bg: #0f172a;            /* page background — deep dark navy */
  --bg-soft: #1e293b;       /* inset panels (result boxes, code blocks) */
  --card-bg: #1e293b;       /* cards, widgets, inputs */

  /* --- Borders --- */
  --border: #334155;        /* default dividers, subtle lines */
  --border-strong: #475569; /* dark, visible borders — inputs & widget cards */
  --border-focus: var(--teal);

  /* --- Workflow boxes (collections) --- */
  --workflow-bg: #334155;
  --workflow-color: #f1f5f9;
  --workflow-text: #cbd5e1;

  /* --- Shape & elevation --- */
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-btn: 0 4px 14px rgba(32, 201, 151, 0.3);
  --shadow-btn-accent: 0 4px 14px rgba(253, 126, 20, 0.3);
}

/* --- Placeholder text in dark mode --- */
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #64748b;
  opacity: 1;
}

html[data-theme="dark"] .site-category-select {
  background-color: #1e293b;
  color: #f1f5f9;
  border-color: var(--border-strong);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

html[data-theme="dark"] .site-category-select option {
  background-color: #1e293b;
  color: #f1f5f9;
}

html[data-theme="dark"] .workflow-step {
  background-color: #334155 !important;
  border-color: #475569;
  color: #f1f5f9;
}

html[data-theme="dark"] .workflow-step h2,
html[data-theme="dark"] .workflow-step h3 {
  color: #f1f5f9;
}

html[data-theme="dark"] .workflow-step p {
  color: #cbd5e1;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

/* Internal links between tools */
a.internal-link { color: var(--teal); font-weight: 500; border-bottom: 1px dotted var(--teal-light); }
a.internal-link:hover { border-bottom-style: solid; }


img, svg { max-width: 100%; }

/* ---------- Header ---------- */

.site-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  color: var(--ink);
}

.logo:hover { text-decoration: none; }

.logo-img {
  height: 34px;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 15px;
  font-weight: 600;
}

.site-nav a { color: var(--slate); }
.site-nav a:hover { color: var(--teal-dark); text-decoration: none; }

.site-search {
  order: 3;
  flex: 1 1 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-search-box {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.site-search-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--slate-light);
  pointer-events: none;
}

/* Remove browser's native search input icons */
input[type="search"] {
  -webkit-appearance: textfield !important;
}

input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: none !important;
}

.site-search-input {
  -webkit-appearance: textfield !important;
}

.site-search-input::-webkit-search-decoration,
.site-search-input::-webkit-search-cancel-button,
.site-search-input::-webkit-search-results-button,
.site-search-input::-webkit-search-results-decoration {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: none !important;
}

.hero-search input {
  -webkit-appearance: textfield !important;
}

.hero-search input::-webkit-search-decoration,
.hero-search input::-webkit-search-cancel-button,
.hero-search input::-webkit-search-results-button,
.hero-search input::-webkit-search-results-decoration {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: none !important;
}

.site-search-input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border: 2px solid var(--border-strong);
  border-radius: 999px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}

.site-search-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18);
}

.site-category-select {
  flex: 0 0 auto;
  max-width: 42%;
  padding: 9px 28px 9px 14px;
  border: 2px solid var(--border-strong);
  border-radius: 999px;
  font-size: 14px;
  font-family: inherit;
  background-color: #fff;
  color: var(--ink);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
}

.site-category-select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18);
}

@media (min-width: 640px) {
  .site-search {
    order: 0;
    flex: 1 1 380px;
    max-width: 560px;
    margin: 0 8px;
  }

  .site-category-select {
    max-width: 180px;
  }
}

.search-status {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 8px;
  font-size: 14px;
  color: var(--slate);
}

.no-results {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 24px;
  text-align: center;
  color: var(--slate);
  font-size: 16px;
}

/* --- Theme Toggle Buttons --- */
.theme-toggle {
  display: flex;
  gap: 8px;
  align-items: center;
}

.theme-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate);
  font-size: 20px;
  transition: all 0.2s ease;
}

.theme-btn:hover {
  color: var(--teal);
  border-color: var(--teal);
}

.theme-btn.active {
  background: var(--border);
  color: var(--teal);
  border-color: var(--teal);
}

@media (max-width: 640px) {
  .theme-toggle {
    order: 2;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 64px;
  padding: 32px 24px;
  text-align: center;
  color: var(--slate-light);
  font-size: 14px;
}

.site-footer a { color: var(--slate); }

.site-footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

/* ---------- Homepage: hero ---------- */

.hero {
  max-width: 1400px;
  margin: 0 auto;
  padding: 56px 24px 32px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  margin: 0 0 12px;
}

.hero h1 .accent { color: var(--accent); }

.tool-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  padding: 10px 22px;
  border-radius: 999px;
  box-shadow: var(--shadow-btn-accent);
  margin-bottom: 20px;
}

.tool-count-badge svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.hero p {
  color: var(--slate);
  font-size: 18px;
  max-width: 560px;
  margin: 0 auto;
}

/* ---------- Homepage: tool directory grid ---------- */

.section-block { margin-bottom: 8px; }

/* Alternating full-bleed backgrounds between homepage sections — reuses
   the existing surface colors (white vs. the page's own tinted bg) so
   sections read as distinct bands without introducing new colors. */
.home-band-white { background: var(--card-bg); }
.home-band-tint { background: var(--bg); }

.section-heading {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 24px 0;
}

.section-heading h2 {
  font-size: 22px;
  color: var(--ink);
  margin: 0;
}

.tool-grid {
  max-width: 1400px;
  margin: 0 auto;
  padding: 8px 24px 64px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.tool-card {
  position: relative;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
  color: var(--ink);
}

.tool-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  text-decoration: none;
}

.tool-fav-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  color: var(--slate-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: transform 0.1s ease, color 0.1s ease;
}

.tool-fav-btn:hover { transform: scale(1.15); }

.tool-fav-btn.is-fav { color: #f59e0b; }

/* Homepage category boxes — full background color per category (set inline
   via categories-data.js: bg + accent), border/heading/count tint to match. */
.category-card {
  border-width: 2px;
}

.category-card:hover {
  transform: translateY(-3px) scale(1.01);
}

.category-card h3 {
  font-weight: 800;
}

.tool-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tool-icon svg { width: 28px; height: 28px; }

.tool-card h3 {
  margin: 0;
  font-size: 17px;
}

.tool-card p {
  margin: 0;
  font-size: 14px;
  color: var(--slate);
}

.tool-card.is-coming-soon {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

.category-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--teal-dark);
}

.badge-soon {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--border);
  color: var(--slate);
  padding: 3px 8px;
  border-radius: 999px;
}

/* ---------- Tool page layout: header / center widget / ad rails ---------- */

.tool-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 16px 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

.ad-slot {
  display: none;
}

.ad-slot-inner {
  width: 160px;
  min-height: 600px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-light);
  font-size: 12px;
  text-align: center;
  position: sticky;
  top: 84px;
  background: #fff;
}

.ad-slot .adsbygoogle {
  position: sticky;
  top: 84px;
}

.ad-slot-mobile {
  margin: 24px auto 0;
  text-align: center;
  overflow: hidden;
}

@media (min-width: 1100px) {
  .tool-layout {
    grid-template-columns: 160px minmax(0, 920px) 160px;
    justify-content: center;
  }
  .ad-slot {
    display: flex;
    justify-content: center;
  }
  .ad-slot-mobile {
    display: none;
  }
}

.tool-main {
  min-width: 0;
}

.tool-header {
  text-align: center;
  margin-bottom: 24px;
}

.tool-header h1 {
  font-size: clamp(24px, 3.5vw, 32px);
  margin: 0 0 10px;
}

.tool-header p {
  color: var(--slate);
  font-size: 16px;
  max-width: 620px;
  margin: 0 auto;
}

.tool-updated-date {
  color: var(--slate-light);
  font-size: 13px;
  margin: 12px 0 0;
  font-style: italic;
}

.tool-widget {
  background: var(--card-bg);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: var(--shadow);
}

.tool-content {
  margin-top: 40px;
  color: var(--slate);
}

.tool-content h2 {
  color: var(--ink);
  font-size: 20px;
  margin-top: 32px;
}

.tool-content h2:first-child { margin-top: 0; }

/* ---------- Legal / info pages (privacy, terms, contact) ---------- */

.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 64px;
  color: var(--slate);
}

.legal-page h1 {
  color: var(--ink);
  font-size: clamp(26px, 4vw, 34px);
  margin: 0 0 8px;
}

.legal-page .updated {
  color: var(--slate-light);
  font-size: 14px;
  margin-bottom: 32px;
}

.legal-page h2 {
  color: var(--ink);
  font-size: 20px;
  margin-top: 32px;
}

.legal-page h2:first-of-type {
  margin-top: 0;
}

.legal-page ul,
.legal-page ol {
  padding-left: 20px;
}

.legal-page a {
  color: var(--teal-dark);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 32px;
  align-items: start;
  margin-top: 24px;
}

@media (max-width: 760px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

.contact-card {
  background: var(--card-bg);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  margin-top: 24px;
}

.contact-layout .contact-card {
  margin-top: 0;
}

.contact-info-col {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.contact-form-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form-col label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.contact-form-col textarea.text-input {
  resize: vertical;
  font-family: inherit;
}

.form-status {
  font-size: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  margin-top: 4px;
}

.form-status.is-success {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.form-status.is-error {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.contact-card h2 {
  margin-top: 0;
  font-size: 17px;
}

/* ---------- Form fields (QR generator, password generator, etc.) ---------- */

.field-group {
  margin-bottom: 20px;
}

.field-group label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.text-input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border-strong);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
}

.text-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18);
}

.qr-preview {
  display: flex;
  justify-content: center;
  padding: 20px 0;
}

.qr-preview canvas {
  border: 2px solid var(--border-strong);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

/* ---------- Password generator ---------- */

.password-output {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-soft);
  border: 2px solid var(--border-strong);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

.password-output input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 20px;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.password-output input:focus {
  outline: none;
}

.option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.option-row:last-of-type {
  border-bottom: none;
}

.option-row label {
  font-size: 15px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.option-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.option-row input[type="range"] {
  width: 140px;
  accent-color: var(--teal);
}

.strength-meter {
  margin-top: 4px;
  margin-bottom: 24px;
}

.strength-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  overflow: hidden;
}

.strength-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.15s ease, background-color 0.15s ease;
}

.strength-label {
  font-size: 13px;
  color: var(--slate);
  margin-top: 6px;
}

/* ---------- Calculator tools (BMI, age, percentage, random number) ---------- */

.unit-toggle {
  display: flex;
  border: 2px solid var(--border-strong);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
}

.unit-toggle button {
  flex: 1;
  padding: 10px;
  border: none;
  background: #fff;
  color: var(--slate);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.unit-toggle button.is-active {
  background: var(--teal);
  color: #fff;
}

.calc-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 16px;
}

.calc-field {
  flex: 1;
}

.calc-field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.result-box {
  background: var(--bg-soft);
  border: 2px solid var(--border-strong);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  margin: 20px 0;
}

.result-box .result-value {
  font-size: 40px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
}

.result-box .result-label {
  font-size: 14px;
  color: var(--slate);
  margin-top: 6px;
}

.result-value.is-list {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.6;
  word-break: break-word;
}

.result-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.calc-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.calc-tabs button {
  padding: 9px 16px;
  border: 2px solid var(--border-strong);
  background: #fff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--slate);
  cursor: pointer;
}

.calc-tabs button.is-active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.calc-panel {
  display: none;
}

.calc-panel.is-active {
  display: block;
}

.calc-sentence {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 16px;
}

.calc-sentence input {
  width: 90px;
  padding: 8px 10px;
  border: 2px solid var(--border-strong);
  border-radius: 8px;
  font-size: 15px;
  text-align: center;
  font-family: inherit;
}

.calc-sentence input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18);
}

.breadcrumb {
  max-width: 1200px;
  margin: 16px auto 0;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--teal-dark);
}

.breadcrumb a { color: var(--teal-dark); }

/* ---------- Dropzone (HEIC converter & future upload tools) ---------- */

.dropzone {
  border: 2px dashed var(--teal-light);
  border-radius: 12px;
  background: #f0fdfa;
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.dropzone:hover,
.dropzone.is-dragover {
  background: #ccfbf1;
  border-color: var(--teal);
}

.dropzone-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  color: var(--teal);
}

.dropzone h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.dropzone p {
  margin: 0;
  color: var(--slate);
  font-size: 14px;
}

.dropzone-browse {
  color: var(--teal-dark);
  font-weight: 700;
  text-decoration: underline;
}

.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.file-list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 2px solid var(--border-strong);
  border-radius: 10px;
  background: #fff;
}

.file-row-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg);
  flex-shrink: 0;
}

.file-row-info {
  flex: 1;
  min-width: 0;
}

.file-row-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-row-status {
  font-size: 13px;
  color: var(--slate);
}

.file-row-status.is-error { color: #dc2626; }
.file-row-status.is-done { color: var(--teal-dark); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--teal);
  color: #fff;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  background: var(--teal-dark);
  text-decoration: none;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(13, 148, 136, 0.42);
}

.btn:active { transform: translateY(0); }

.btn-accent { background: var(--accent); box-shadow: var(--shadow-btn-accent); }
.btn-accent:hover { background: var(--accent-dark); box-shadow: 0 6px 18px rgba(234, 88, 12, 0.45); }

.btn-sm { padding: 7px 14px; font-size: 13px; }

.tool-actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.tool-actions[hidden] {
  display: none;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.privacy-note {
  margin-top: 18px;
  font-size: 13px;
  color: var(--slate-light);
  text-align: center;
}

/* ---------- Share row ---------- */

.share-row {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.share-row-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--slate);
  margin-right: 4px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 10px;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.share-btn svg { width: 12px; height: 12px; }

.share-btn-facebook { background: #1877f2; }
.share-btn-x { background: #000000; }
.share-btn-reddit { background: #ff4500; }
.share-btn-linkedin { background: #0a66c2; font-size: 8px; }
.share-btn-whatsapp { background: #25d366; }
.share-btn-email { background: var(--slate); }

/* ---------- Stopwatch ---------- */

.stopwatch-display {
  text-align: center;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: clamp(40px, 9vw, 64px);
  font-weight: 800;
  color: var(--ink);
  padding: 32px 0 16px;
  font-variant-numeric: tabular-nums;
}

.stopwatch-ms {
  font-size: 0.5em;
  color: var(--slate);
}

.lap-list {
  margin-top: 20px;
  max-height: 260px;
  overflow-y: auto;
}

.lap-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 14px;
  color: var(--ink);
}

.lap-number {
  color: var(--slate);
  font-family: inherit;
  min-width: 60px;
}

/* ---------- GPA calculator ---------- */

.gpa-header-row {
  display: grid;
  grid-template-columns: 1fr 90px 80px 32px;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0 0 8px;
}

.gpa-row {
  display: grid;
  grid-template-columns: 1fr 90px 80px 32px;
  gap: 8px;
  margin-bottom: 10px;
  align-items: center;
}

.gpa-row .text-input {
  padding: 9px 10px;
  font-size: 14px;
}

.gpa-remove {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 6px;
  color: var(--slate);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.gpa-remove:hover {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

@media (max-width: 480px) {
  .gpa-header-row, .gpa-row {
    grid-template-columns: 1fr 70px 60px 28px;
  }
}

/* ---------- Typing test ---------- */

.typing-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 20px;
}

.typing-stat {
  text-align: center;
}

.typing-stat span {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
}

.typing-stat label {
  font-size: 12px;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.typing-passage {
  background: var(--bg-soft);
  border: 2px solid var(--border-strong);
  border-radius: 10px;
  padding: 20px;
  font-size: 18px;
  line-height: 1.8;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  color: var(--slate-light);
  margin-bottom: 16px;
}

.typing-passage .char.correct { color: var(--teal-dark); }
.typing-passage .char.incorrect { color: #dc2626; background: #fef2f2; text-decoration: underline; }
.typing-passage .char.current { background: #ccfbf1; border-radius: 2px; }

.typing-input {
  width: 100%;
  padding: 14px;
  border: 2px solid var(--border-strong);
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  resize: vertical;
}

.typing-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18);
}

.typing-input:disabled {
  background: var(--bg-soft);
  color: var(--slate-light);
}

/* ---------- Scientific calculator ---------- */

.calc-display-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.calc-mode-btn {
  flex-shrink: 0;
  padding: 10px 14px;
  border: 2px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--teal-dark);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.calc-display {
  flex: 1;
  min-width: 0;
  padding: 16px;
  border: 2px solid var(--border-strong);
  border-radius: 8px;
  font-size: 24px;
  text-align: right;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  color: var(--ink);
  background: #fff;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.calc-grid button {
  padding: 14px 4px;
  border: 2px solid var(--border-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.calc-grid button:hover {
  background: var(--bg-soft);
}

.calc-grid button.calc-op {
  background: #f0fdfa;
  color: var(--teal-dark);
}

.calc-grid button.calc-equals {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

.calc-grid button.calc-equals:hover {
  background: var(--teal-dark);
}

@media (max-width: 420px) {
  .calc-grid button {
    padding: 12px 2px;
    font-size: 13px;
  }
}

/* ---------- Coin flip ---------- */

.coin-wrap {
  display: flex;
  justify-content: center;
  padding: 30px 0 20px;
  perspective: 1000px;
}

.coin {
  width: 140px;
  height: 140px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.coin-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 800;
  box-shadow: inset 0 0 0 4px rgba(0, 0, 0, 0.1);
}

.coin-heads {
  background: linear-gradient(145deg, #fde68a, #f59e0b);
  color: #78350f;
}

.coin-tails {
  transform: rotateY(180deg);
  background: linear-gradient(145deg, #e5e7eb, #9ca3af);
  color: #374151;
}

/* ---------- Spin the wheel ---------- */

.wheel-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 20px;
}

.wheel-pointer {
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 22px solid #1e293b;
  margin-bottom: -4px;
  z-index: 2;
}

.wheel-svg-wrap {
  position: relative;
  width: 280px;
  height: 280px;
}

#wheelGroup {
  transition: transform 4s cubic-bezier(0.17, 0.67, 0.24, 0.99);
}

.wheel-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  background: #fff;
  border: 3px solid #1e293b;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.wheel-entries-input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border-strong);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 120px;
}

.wheel-entries-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18);
}

/* ---------- Bottom banner ad ---------- */

.bottom-banner-slot {
  max-width: 970px;
  margin: 48px auto 0;
  padding: 0 16px;
  text-align: center;
  overflow: hidden;
}

/* ---------- Background remover ---------- */

.bg-remover-compare {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

.bg-remover-compare img {
  max-width: 280px;
  max-height: 280px;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: block;
}

.bg-remover-label {
  text-align: center;
  font-size: 13px;
  color: var(--slate);
  margin: 0 0 6px;
}

.checkered-bg {
  background-image:
    linear-gradient(45deg, #e5e7eb 25%, transparent 25%),
    linear-gradient(-45deg, #e5e7eb 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e5e7eb 75%),
    linear-gradient(-45deg, transparent 75%, #e5e7eb 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
}

/* ---------- Voice recorder ---------- */

.voice-recorder-panel {
  text-align: center;
  padding: 20px 0;
}

.voice-recorder-timer {
  font-size: 48px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.voice-recorder-status {
  font-size: 14px;
  color: var(--slate);
  margin: 4px 0 20px;
}

/* ---------- Unit converter widget ---------- */

.converter-swap-row {
  text-align: center;
  margin: -10px 0 16px;
}

.converter-swap-row .btn {
  border-radius: 999px;
}

.reference-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 14px;
}

.reference-table th,
.reference-table td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.reference-table th {
  color: var(--ink);
  font-weight: 700;
}

.reference-table td {
  color: var(--slate);
}

/* ---------- Dice roller ---------- */

.dice-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  padding: 20px 0;
}

.die {
  width: 70px;
  height: 70px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 10px;
  box-shadow: var(--shadow);
  transition: transform 0.4s ease;
}

.die.is-rolling {
  animation: die-shake 0.4s ease;
}

@keyframes die-shake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-15deg); }
  75% { transform: rotate(15deg); }
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink);
  align-self: center;
  justify-self: center;
}

/* ---------- Print utilities (invoice generator, resume builder) ---------- */

.print-only {
  display: none;
}

.document-preview {
  background: #fff;
  border: 2px solid var(--border-strong);
  border-radius: 10px;
  padding: 32px;
  color: var(--ink);
  font-size: 14px;
}

.document-preview h2,
.document-preview h3 {
  color: var(--ink);
}

.document-preview table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.document-preview th,
.document-preview td {
  text-align: left;
  padding: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.repeatable-row {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  align-items: center;
}

.repeatable-remove {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 6px;
  color: var(--slate);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  justify-self: center;
}

.repeatable-remove:hover {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

@media print {
  body * {
    visibility: hidden;
  }
  .print-only,
  .print-only * {
    visibility: visible;
  }
  .print-only {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    border: none;
    padding: 0;
  }
}

/* ---------- Resume builder ---------- */

.resume-form-entry {
  border: 2px solid var(--border-strong);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 14px;
  position: relative;
}

.resume-form-entry .gpa-remove {
  position: absolute;
  top: 10px;
  right: 10px;
}

.resume-preview {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px;
  font-family: Georgia, "Times New Roman", serif;
  color: #1e293b;
}

.resume-preview h2 {
  margin: 0 0 4px;
  font-size: 26px;
}

.resume-contact {
  font-size: 13px;
  color: var(--slate);
  margin-bottom: 4px;
}

.resume-summary {
  font-size: 14px;
  margin-top: 12px;
  line-height: 1.5;
}

.resume-section-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 4px;
  margin: 22px 0 10px;
}

.resume-entry {
  margin-bottom: 12px;
}

.resume-entry-header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px;
  font-weight: 700;
  font-size: 15px;
}

.resume-entry-sub {
  font-size: 13px;
  color: var(--slate);
  font-style: italic;
  margin: 2px 0 4px;
}

.resume-entry-desc {
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-line;
}

.resume-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.resume-skill-tag {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
}

@media print {
  body * {
    visibility: hidden;
  }
  #resumePreview, #resumePreview * {
    visibility: visible;
  }
  #resumePreview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    border: none;
    padding: 0;
  }
}

/* ---------- ISS Tracker ---------- */

.iss-map-wrap {
  border: 2px solid var(--border-strong);
  border-radius: 10px;
  overflow: hidden;
  line-height: 0;
}

.iss-map-wrap svg {
  display: block;
  width: 100%;
  height: auto;
}

.iss-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 20px;
}

@media (min-width: 480px) {
  .iss-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.iss-stat {
  background: var(--bg-soft);
  border: 2px solid var(--border-strong);
  border-radius: 10px;
  padding: 14px 8px;
  text-align: center;
}

.iss-stat span {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.iss-stat label {
  font-size: 12px;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ---------- NASA Astronomy Picture of the Day ---------- */

.apod-image-wrap {
  text-align: center;
  margin-bottom: 16px;
}

.apod-image-wrap img {
  max-width: 100%;
  border-radius: 10px;
  border: 2px solid var(--border-strong);
}

.apod-date-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.apod-title {
  text-align: center;
  font-size: 20px;
  margin: 0 0 4px;
  color: var(--ink);
}

.apod-copyright {
  text-align: center;
  font-size: 13px;
  color: var(--slate-light);
  margin-bottom: 16px;
}

.apod-explanation {
  color: var(--slate);
  line-height: 1.7;
}

/* ---------- Sci-Fi Name Generator ---------- */

.scifi-result-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
}

.scifi-result-item {
  background: var(--bg-soft);
  border: 2px solid var(--border-strong);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
}

/* ---------- Next SpaceX Launch ---------- */

.launch-countdown {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.launch-countdown-unit {
  background: var(--bg-soft);
  border: 2px solid var(--border-strong);
  border-radius: 10px;
  padding: 16px 18px;
  text-align: center;
  min-width: 72px;
}

.launch-countdown-unit span {
  display: block;
  font-size: 32px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.launch-countdown-unit label {
  font-size: 12px;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.launch-details {
  background: var(--bg-soft);
  border: 2px solid var(--border-strong);
  border-radius: 10px;
  padding: 20px;
}

.launch-details dt {
  font-weight: 700;
  color: var(--ink);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 12px;
}

.launch-details dt:first-child {
  margin-top: 0;
}

.launch-details dd {
  margin: 4px 0 0;
  color: var(--slate);
}

/* ---------- Wordle Solver ---------- */

.wordle-grid {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 20px 0;
}

.wordle-cell {
  width: 54px;
  height: 54px;
  border: 2px solid var(--border-strong);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.wordle-cell[data-status="yellow"] {
  background: #eab308;
  border-color: #ca8a04;
}

.wordle-cell[data-status="green"] {
  background: #16a34a;
  border-color: #15803d;
}

.wordle-input {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 26px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
}

.wordle-cell[data-status="yellow"] .wordle-input,
.wordle-cell[data-status="green"] .wordle-input {
  color: #fff;
}

.wordle-input:focus {
  outline: none;
}

/* ---------- Sudoku Solver ---------- */

.sudoku-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  max-width: 450px;
  margin: 0 auto;
  border: 3px solid var(--ink);
  border-radius: 4px;
  overflow: hidden;
}

.sudoku-cell {
  aspect-ratio: 1;
  width: 100%;
  border: 1px solid var(--border-strong);
  text-align: center;
  font-size: clamp(14px, 3.5vw, 20px);
  font-weight: 700;
  color: var(--ink);
  background: #fff;
  font-family: inherit;
  padding: 0;
}

.sudoku-cell:focus {
  outline: none;
  background: #f0fdfa;
}

/* ---------- Constellation Finder ---------- */

.constellation-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
}

.constellation-card {
  background: var(--bg-soft);
  border: 2px solid var(--border-strong);
  border-radius: 10px;
  padding: 16px 18px;
}

.constellation-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  color: var(--ink);
}

.constellation-card p {
  margin: 0;
  font-size: 14px;
  color: var(--slate);
}

/* ---------- Tally Counter ---------- */

.tally-row {
  display: grid;
  grid-template-columns: 1fr auto 32px;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.tally-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-soft);
  border: 2px solid var(--border-strong);
  border-radius: 8px;
  padding: 4px 6px;
}

.tally-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: var(--teal);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.tally-btn:hover { background: var(--teal-dark); }

.tally-count {
  min-width: 48px;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
}

/* ---------- Online Metronome ---------- */

.beat-indicator {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--border);
  margin: 16px auto;
  transition: background 0.05s ease, transform 0.05s ease;
}

.beat-indicator.is-pulse {
  background: var(--accent);
  transform: scale(1.3);
}

/* ---------- Online Notepad ---------- */

.notepad-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
}

.notepad-sidebar {
  border-right: 2px solid var(--border);
  padding-right: 16px;
}

.notepad-note-item {
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--slate);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.notepad-note-item:hover { background: var(--bg-soft); }

.notepad-note-item.is-active {
  background: var(--teal);
  color: #fff;
  font-weight: 700;
}

@media (max-width: 560px) {
  .notepad-layout { grid-template-columns: 1fr; }
  .notepad-sidebar { border-right: none; border-bottom: 2px solid var(--border); padding-right: 0; padding-bottom: 12px; margin-bottom: 12px; }
}

/* ---------- Habit Tracker ---------- */

.habit-card {
  background: var(--bg-soft);
  border: 2px solid var(--border-strong);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
}

.habit-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.habit-name {
  font-weight: 700;
  color: var(--ink);
  flex: 1;
}

.habit-streak {
  font-size: 13px;
  color: var(--slate);
  white-space: nowrap;
}

.habit-week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.habit-day {
  border: 2px solid var(--border-strong);
  background: #fff;
  border-radius: 8px;
  padding: 10px 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--slate);
  cursor: pointer;
}

.habit-day.is-today { border-color: var(--teal); }

.habit-day.is-done {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal-dark);
}

/* ---------- Eisenhower Matrix ---------- */

.eisenhower-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

.eisenhower-quadrant {
  border: 2px solid var(--border-strong);
  border-radius: 10px;
  padding: 12px;
  min-height: 120px;
}

.eisenhower-quadrant h3 {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--ink);
}

.eisenhower-quadrant h3 span {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--slate-light);
}

.eisenhower-do { background: #fee2e2; }
.eisenhower-schedule { background: #dcfce7; }
.eisenhower-delegate { background: #fef3c7; }
.eisenhower-eliminate { background: #e5e7eb; }

.eisenhower-task {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #fff;
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--ink);
}

.eisenhower-task button {
  border: none;
  background: none;
  color: var(--slate-light);
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
}

.eisenhower-task button:hover { color: #dc2626; }

/* ---------- Tabata Timer ---------- */

.tabata-display { padding: 20px; }

.tabata-phase {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.tabata-phase-prepare { color: var(--accent); }
.tabata-phase-work { color: #dc2626; }
.tabata-phase-rest { color: var(--teal); }
.tabata-phase-done { color: var(--slate); }

/* ---------- Meeting Planner ---------- */

.meeting-grid-wrap {
  overflow-x: auto;
  margin: 20px 0;
}

.meeting-table {
  border-collapse: collapse;
  width: 100%;
}

.meeting-table th, .meeting-table td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  font-size: 12px;
  text-align: center;
  white-space: nowrap;
}

.meeting-table th { background: var(--bg-soft); color: var(--slate); }

.meeting-city-label {
  text-align: left !important;
  font-weight: 700;
  color: var(--ink);
  background: var(--bg-soft);
  position: sticky;
  left: 0;
}

.meeting-remove {
  border: none;
  background: none;
  color: var(--slate-light);
  font-size: 15px;
  cursor: pointer;
  margin-left: 6px;
}

.meeting-remove:hover { color: #dc2626; }

.meeting-cell.is-business {
  background: #dcfce7;
  font-weight: 700;
  color: #15803d;
}

.meeting-overlap-cell {
  font-weight: 800;
  color: var(--ink);
}

/* ---------- Homepage: Why Choose Us ---------- */

.why-us-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 24px 48px;
}

.why-us-section h2 {
  text-align: center;
  font-size: 26px;
  color: var(--ink);
  margin: 0 0 28px;
}

.why-us-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.why-us-item {
  text-align: center;
  padding: 20px;
}

.why-us-icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.why-us-item h3 {
  font-size: 16px;
  color: var(--ink);
  margin: 0 0 6px;
}

.why-us-item p {
  font-size: 14px;
  color: var(--slate);
  margin: 0;
}

.trust-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px 24px;
  text-align: center;
}

.trust-section h2 {
  font-size: 26px;
  color: var(--ink);
  margin: 0 0 32px;
}

.trust-badges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.trust-badge {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
}

.trust-badge-number {
  font-size: 28px;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 6px;
}

.trust-badge-label {
  font-size: 13px;
  color: var(--slate);
  font-weight: 500;
}

.home-faq {
  margin-top: 0;
  padding-top: 8px;
}

/* "What is SnappyFreeTools?" callout — gradient border via the layered
   background trick (solid card fill + gradient underneath, clipped so
   only the border ring shows the gradient). */
.home-intro-card {
  padding: 32px 28px;
  border-radius: var(--radius);
  border: 3px solid transparent;
  background-image: linear-gradient(var(--card-bg), var(--card-bg)), linear-gradient(135deg, var(--teal) 0%, var(--accent) 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: var(--shadow);
}

/* ---------- Tool page: favorite button + similar tools ---------- */

.tool-page-fav-btn {
  margin-top: 14px;
  border: 2px solid var(--border-strong);
  background: #fff;
  color: var(--slate);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
}

.tool-page-fav-btn:hover { border-color: var(--accent); }

.tool-page-fav-btn.is-fav {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #b45309;
}

.similar-tools-section {
  margin-top: 40px;
}

/* ---------- Planets Visible Tonight ---------- */

.planet-visibility-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.planet-card {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  background: var(--bg-soft);
}

.planet-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  color: var(--ink);
}

.planet-status {
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 13px;
}

.planet-detail {
  margin: 0;
  font-size: 13px;
  color: var(--slate);
}

.planet-card.good .planet-status { color: #15803d; }
.planet-card.low .planet-status { color: #b45309; }
.planet-card.not-visible .planet-status { color: var(--slate-light); }

/* ---------- Blog ---------- */

.blog-card-date {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--slate-light);
}

.blog-card h3 {
  font-size: 18px;
  line-height: 1.3;
}

.blog-post-meta {
  color: var(--slate-light);
  font-size: 14px;
  margin: -8px 0 24px;
}

.blog-post-body {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
}

.blog-related-tool {
  display: block;
  background: var(--bg-soft);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 32px 0;
  color: var(--ink);
}

.blog-related-tool:hover {
  border-color: var(--teal-light);
  text-decoration: none;
}

.blog-related-tool .blog-related-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: 4px;
}

.blog-related-tool strong {
  font-size: 16px;
}

.similar-tools-section h2 {
  color: var(--ink);
  font-size: 20px;
  margin: 0 0 16px;
}

.similar-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}


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

.hero {
  padding-top: 34px;
  padding-bottom: 24px;
}

.hero-search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(760px, 100%);
  margin: 24px auto 16px;
  background: #fff;
  border: 2px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-search:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.15), var(--shadow);
}

.hero-search svg {
  width: 22px;
  height: 22px;
  margin-left: 18px;
  color: var(--slate-light);
  flex: 0 0 auto;
}

.hero-search input {
  min-width: 0;
  flex: 1 1 auto;
  border: 0;
  outline: 0;
  padding: 16px 14px;
  font: inherit;
  font-size: 16px;
  color: #1e293b !important;
  background: #fff !important;
}

html[data-theme="dark"] .hero-search input {
  background: #fff !important;
  color: #1e293b !important;
}

.hero-search button {
  align-self: stretch;
  border: 0;
  padding: 0 24px;
  background: var(--teal-dark);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.hero-search button:hover { background: #115e59; }

.task-shortcuts {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 920px;
  margin: 0 auto;
}

.task-shortcuts a {
  padding: 7px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 700;
}

.task-shortcuts a:hover {
  border-color: var(--teal-dark);
  text-decoration: none;
  transform: translateY(-1px);
}

.hero-trust {
  margin-top: 14px;
  color: var(--slate);
  font-size: 13px;
  font-weight: 600;
}

.hero-trust span { padding: 0 5px; color: var(--teal); }

.popular-tools-section .section-heading {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.popular-tools-section .section-heading p {
  margin: 0;
  color: var(--slate);
  font-size: 14px;
}

.popular-tools-section .tool-grid { padding-bottom: 42px; }

@media (max-width: 640px) {
  .hero { padding: 26px 16px 20px; }
  .hero-search { border-radius: 13px; }
  .hero-search svg { margin-left: 14px; width: 19px; height: 19px; }
  .hero-search input { padding: 14px 10px; font-size: 14px; }
  .hero-search button { padding: 0 15px; font-size: 14px; }
  .task-shortcuts { gap: 7px; }
  .task-shortcuts a { font-size: 12px; padding: 6px 10px; }
  .hero-trust span { display: none; }
  .hero-trust { line-height: 1.7; }
  .popular-tools-section .section-heading { display: block; }
  .popular-tools-section .section-heading p { margin-top: 5px; }
}

/* Engagement and trust features */
.tool-trust-panel,
.tool-feedback-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  margin: 14px 0 22px;
  border: 1px solid #99f6e4;
  border-radius: 12px;
  background: #f0fdfa;
  color: var(--ink);
}

.tool-trust-panel strong { color: var(--teal-dark); }
.tool-trust-panel span { flex: 1; color: var(--slate); font-size: 14px; }
.tool-trust-panel a { font-size: 13px; font-weight: 700; white-space: nowrap; }
.tool-feedback-panel { justify-content: space-between; background: var(--bg-soft); border-color: var(--border); }
.tool-feedback-panel div { display: grid; gap: 3px; }
.tool-feedback-panel span { color: var(--slate); font-size: 14px; }
.result-action-btn {
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--teal-dark);
  padding: 7px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.result-action-btn:hover { border-color: var(--teal-dark); }
.collection-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(230px,1fr)); gap: 18px; }
.collection-card { display: block; padding: 22px; background: #fff; border: 2px solid var(--border); border-radius: var(--radius); color: var(--ink); }
.collection-card:hover { border-color: var(--teal); text-decoration: none; transform: translateY(-2px); }
.collection-card h2,.collection-card h3 { margin-top: 0; }
.collection-kicker { color: var(--teal-dark); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.workflow-list { counter-reset: workflow; display: grid; gap: 18px; }
.workflow-step { position: relative; padding: 20px 20px 20px 66px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--workflow-bg, #fff); color: var(--workflow-color, inherit); }
.workflow-step::before { counter-increment: workflow; content: counter(workflow); position: absolute; left: 18px; top: 18px; width: 32px; height: 32px; display:grid; place-items:center; border-radius:50%; background:var(--teal-dark); color:#fff; font-weight:800; }
.workflow-step h2,.workflow-step h3 { margin: 0 0 6px; }
.inline-tool-links { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }
.inline-tool-links a { padding:7px 11px; border-radius:999px; background:#ccfbf1; color:var(--teal-dark); font-weight:700; font-size:13px; }
@media (max-width:640px) {
  .tool-trust-panel,.tool-feedback-panel { align-items:flex-start; flex-direction:column; }
  .share-row { flex-wrap:wrap; }
}
@media print {
  .site-header,.site-footer,.ad-slot,.ad-slot-mobile,.bottom-banner-slot,.share-row,.tool-feedback-panel,.similar-tools-section { display:none!important; }
  .tool-layout { display:block; }
}
