/* ════════════════════════════════════════════════
   PEAK AUTOMATIONS — FREE TOOLS
   Used only by /tools/* pages. Uses the existing
   tokens; changes nothing on other pages.
   ════════════════════════════════════════════════ */

/* ── Ad slots (hidden until AdSense is configured) ── */
ad-slot[hidden] { display: none !important; }
.ad-slot {
  display: block;
  position: relative;
  width: 100%;
  max-width: 970px;
  margin: 24px auto;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
}
.ad-slot-label {
  position: absolute; top: 4px; left: 8px;
  font-size: .62rem; letter-spacing: 1px; text-transform: uppercase;
  color: var(--muted); z-index: 1; pointer-events: none;
}
.ad-slot .adsbygoogle { width: 100%; height: 100%; }
/* Fixed heights: reserved before the ad loads, so nothing shifts. */
.ad-slot--leaderboard { min-height: 100px; height: 100px; }
.ad-slot--sidebar,
.ad-slot--incontent   { min-height: 280px; height: 280px; max-width: 336px; }
.ad-slot--incontent   { max-width: 728px; }
@media (max-width: 760px) {
  .ad-slot--leaderboard { min-height: 100px; height: 100px; }
  .ad-slot--incontent   { max-width: 336px; }
}

/* ── Tools hub ─────────────────────────────────── */
.tools-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin: 8px 0 48px;
}
.tool-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color var(--t-base), transform var(--t-base), box-shadow var(--t-base);
}
.tool-card:hover {
  border-color: rgba(29,203,175,0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
}
.tool-card-icon {
  width: 44px; height: 44px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(29,203,175,0.1); color: var(--teal); font-size: 1.1rem;
}
.tool-card h2 { font-size: 1.1rem; color: var(--white); margin: 0; }
.tool-card p { font-size: .88rem; color: var(--muted); line-height: 1.7; margin: 0; flex: 1; }
.tool-card .tool-card-go { font-size: .82rem; font-weight: 600; color: var(--teal); }

/* ── Tool interface ────────────────────────────── */
.tool-head { padding: 40px 0 8px; }
.tool-head h1 {
  font-family: var(--font-heading); font-weight: 800;
  font-size: clamp(1.8rem, 3.6vw, 2.5rem); letter-spacing: -1px; color: var(--white);
  margin-bottom: 12px;
}
.tool-head .lead { color: var(--muted); font-size: 1rem; line-height: 1.7; max-width: 760px; }
.tool-privacy-note {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 14px;
  font-size: .78rem; color: var(--teal);
  background: rgba(29,203,175,0.07); border: 1px solid rgba(29,203,175,0.18);
  padding: 6px 14px; border-radius: var(--radius-pill);
}
.tool-shell {
  background: var(--surface);
  border: 1px solid var(--border-lg);
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0 8px;
}
.tool-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 860px) { .tool-cols { grid-template-columns: 1fr; } }
.tool-label {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: .78rem; font-weight: 600; letter-spacing: .4px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}
.tool-text,
.tool-input,
.tool-select {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-lg);
  border-radius: var(--radius-md);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .8rem; line-height: 1.6;
  padding: 12px 14px;
}
.tool-text { height: 320px; resize: vertical; }
.tool-input, .tool-select { font-family: var(--font-body); font-size: .9rem; }
.tool-text:focus, .tool-input:focus, .tool-select:focus {
  outline: none; border-color: rgba(29,203,175,0.5);
  box-shadow: 0 0 0 3px rgba(29,203,175,0.12);
}
.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.tool-actions button { font-size: .85rem; padding: 10px 18px; }
.tool-opts { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 4px 0 16px; }
.tool-opts label { font-size: .84rem; color: var(--text); display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.tool-opts input[type=checkbox] { accent-color: var(--teal); width: 15px; height: 15px; }
.tool-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.tool-stat {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 10px 14px; font-size: .8rem; color: var(--muted);
}
.tool-stat b { display: block; font-size: 1.15rem; color: var(--white); font-family: var(--font-heading); }
.tool-msg { margin-top: 14px; font-size: .84rem; color: var(--muted); min-height: 1.4em; }
.tool-msg.err { color: var(--danger); }
.tool-msg.ok { color: var(--teal); }
.tool-list { margin-top: 14px; font-size: .8rem; color: var(--muted); max-height: 180px; overflow: auto; }
.tool-list code { color: var(--gold); }

/* Result tables / cost cards */
.tool-table { width: 100%; border-collapse: collapse; font-size: .85rem; margin-top: 16px; }
.tool-table th, .tool-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.tool-table th { color: var(--muted); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .5px; }
.tool-table td { color: var(--text); }
.tool-table tr.best td { color: var(--teal); font-weight: 700; }
.cost-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 20px; }
@media (max-width: 760px) { .cost-cards { grid-template-columns: 1fr; } }
.cost-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; }
.cost-card.best { border-color: rgba(29,203,175,0.5); box-shadow: 0 0 0 1px rgba(29,203,175,0.2) inset; }
.cost-card h3 { font-size: .85rem; color: var(--muted); margin: 0 0 6px; font-weight: 600; }
.cost-card .price { font-family: var(--font-heading); font-weight: 800; font-size: 1.8rem; color: var(--white); }
.cost-card small { display: block; color: var(--muted); margin-top: 6px; font-size: .75rem; line-height: 1.5; }
.tool-range { width: 100%; accent-color: var(--teal); }
.tool-range-row { display: flex; align-items: center; gap: 14px; }
.tool-range-row output { min-width: 110px; text-align: right; font-family: var(--font-heading); font-weight: 700; color: var(--white); }

/* Cron */
.cron-fields { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
@media (max-width: 760px) { .cron-fields { grid-template-columns: repeat(2, 1fr); } }
.cron-fields .tool-input { text-align: center; font-family: ui-monospace, Consolas, monospace; font-size: 1.05rem; }
.cron-human {
  margin: 18px 0 6px; padding: 14px 18px; border-radius: var(--radius-md);
  background: rgba(29,203,175,0.07); border: 1px solid rgba(29,203,175,0.2);
  color: var(--white); font-family: var(--font-heading); font-weight: 600; font-size: 1.05rem;
}
.cron-next { columns: 2; column-gap: 24px; margin-top: 10px; padding: 0; list-style: none; font-family: ui-monospace, Consolas, monospace; font-size: .82rem; color: var(--text); }
.cron-next li { padding: 5px 0; border-bottom: 1px solid var(--border); break-inside: avoid; }
.cron-next li span { color: var(--muted); }
@media (max-width: 640px) { .cron-next { columns: 1; } }
.cron-presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.cron-presets button {
  background: var(--bg); color: var(--text); border: 1px solid var(--border-lg);
  border-radius: var(--radius-pill); padding: 6px 14px; font-size: .78rem; cursor: pointer;
}
.cron-presets button:hover { border-color: rgba(29,203,175,0.4); color: var(--teal); }

/* ── Bottom CTA ────────────────────────────────── */
tool-bottom-cta.tool-cta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 28px 0;
}
@media (max-width: 760px) { tool-bottom-cta.tool-cta { grid-template-columns: 1fr; } }
.tool-cta-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: 26px; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--border-lg);
}
.tool-cta-card--templates { background: linear-gradient(135deg, rgba(29,203,175,0.12), var(--surface-2) 60%); border-color: rgba(29,203,175,0.3); }
.tool-cta-card--vps { background: linear-gradient(135deg, rgba(240,168,48,0.1), var(--surface-2) 60%); border-color: rgba(240,168,48,0.28); }
.tool-cta-eyebrow { font-size: .7rem; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--teal); }
.tool-cta-card--vps .tool-cta-eyebrow { color: var(--gold); }
.tool-cta-card h3 { font-size: 1.15rem; color: var(--white); margin: 0; }
.tool-cta-card p { font-size: .88rem; color: var(--muted); line-height: 1.7; margin: 0; flex: 1; }
.tool-cta-card small { font-size: .7rem; color: var(--muted); }
.tool-cta-card a { text-align: left; }

/* ── SEO documentation under each tool ─────────── */
.tool-doc { max-width: 780px; margin: 40px auto 0; padding-bottom: 40px; }
.tool-doc h2 { font-family: var(--font-heading); font-size: 1.45rem; color: var(--white); margin: 38px 0 12px; letter-spacing: -.4px; }
.tool-doc h3 { font-size: 1.05rem; color: var(--white); margin: 24px 0 8px; }
.tool-doc p { font-size: .95rem; color: var(--muted); line-height: 1.85; margin-bottom: 14px; }
.tool-doc p strong { color: var(--text); }
.tool-doc ul, .tool-doc ol { padding-left: 22px; margin-bottom: 16px; color: var(--muted); font-size: .95rem; line-height: 1.8; }
.tool-doc ul { list-style: disc; }
.tool-doc ol { list-style: decimal; }
.tool-doc li { margin-bottom: 6px; }
.tool-doc a { color: var(--teal); text-decoration: underline; text-underline-offset: 2px; }
.tool-doc code { background: var(--surface-2); padding: 1px 6px; border-radius: 4px; font-size: .86em; color: var(--gold); }
.tool-doc .faq-list { margin-top: 12px; }
.tool-related { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.tool-related a {
  text-decoration: none; font-size: .84rem; padding: 8px 14px; border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--border-lg); color: var(--text);
}
.tool-related a:hover { border-color: rgba(29,203,175,0.4); color: var(--teal); }

/* Cron weekly heat grid */
.cron-grid { display: grid; grid-template-columns: 38px repeat(24, 1fr); gap: 2px; margin-top: 12px; font-size: .62rem; color: var(--muted); }
.cron-grid .h { text-align: center; padding-bottom: 2px; }
.cron-grid .d { display: flex; align-items: center; }
.cron-grid .c { height: 16px; border-radius: 3px; background: var(--bg); border: 1px solid var(--border); }
.cron-grid .c.on { background: var(--teal); border-color: var(--teal); }
.cron-grid .c.maybe { background: rgba(240,168,48,0.5); border-color: rgba(240,168,48,0.7); }
@media (max-width: 640px) { .cron-grid { grid-template-columns: 30px repeat(24, minmax(8px, 1fr)); } .cron-grid .h span { display: none; } }

/* Mobile fit: let CTA cards and buttons wrap instead of forcing the page wider */
tool-bottom-cta.tool-cta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { tool-bottom-cta.tool-cta { grid-template-columns: minmax(0, 1fr); } }
.tool-cta-card { min-width: 0; }
.tool-cta-card a { max-width: 100%; white-space: normal; line-height: 1.35; }

/* Hub: PeakHook feature card */
.tool-feature {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: center;
  margin: 8px 0 32px; padding: 28px; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(29,203,175,0.10), var(--surface-2) 55%);
  border: 1px solid rgba(29,203,175,0.3);
}
@media (max-width: 860px) { .tool-feature { grid-template-columns: minmax(0, 1fr); } }
.tool-feature h2 { font-size: 1.35rem; color: var(--white); margin: 8px 0 10px; letter-spacing: -.3px; }
.tool-feature p { font-size: .92rem; color: var(--muted); line-height: 1.75; margin: 0 0 16px; }
.tool-feature small { display: block; margin-top: 12px; font-size: .72rem; color: var(--muted); }
.tool-feature-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.tool-feature-actions a { white-space: normal; line-height: 1.35; }
.tool-feature-code { margin: 0; background: var(--bg); border: 1px solid var(--border-lg); border-radius: var(--radius-md); padding: 16px; overflow-x: auto; font: 12.5px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text); }

/* Trust row: privacy badge + auditable source + offline download */
.tool-trust { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 14px; }
.tool-trust .tool-privacy-note { margin-top: 0; }
.tool-audit-link {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font: inherit; font-size: .78rem; font-weight: 600; color: var(--text); text-decoration: none;
  background: var(--surface); border: 1px solid var(--border-lg);
  padding: 6px 14px; border-radius: var(--radius-pill);
  transition: border-color var(--t-base), color var(--t-base);
}
.tool-audit-link:hover { border-color: rgba(29,203,175,0.45); color: var(--teal); }
.tool-audit-link i { color: var(--teal); }
