/* Pluto's Place — friendly space theme */
:root {
  --night: #1b1d4a;
  --night-2: #2b2d6e;
  --indigo: #4b3fa8;
  --indigo-soft: #ece9ff;
  --peach: #ffb86b;
  --peach-deep: #b4521b;
  --sun: #ffd98a;
  --bg: #f6f4fd;
  --card: #ffffff;
  --ink: #1f2240;
  --muted: #555a78;
  --line: #e3e0f3;
  --mark: #ffe5b8;
  --ok: #1e6b4a;
  --ok-bg: #e3f6ec;
  --paid: #8a3b12;
  --paid-bg: #fff0e3;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(27,29,74,.06), 0 6px 20px rgba(27,29,74,.07);
  --shadow-hover: 0 4px 10px rgba(27,29,74,.10), 0 18px 40px rgba(75,63,168,.16);
  --head: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
.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;
}
a { color: var(--indigo); text-underline-offset: 3px; }
a:hover { color: var(--night-2); }
:focus-visible { outline: 3px solid var(--peach); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--head); color: var(--ink); letter-spacing: -0.01em; }

/* ---------- Header ---------- */
.site-header {
  background: var(--night);
  color: #fff;
  position: sticky; top: 0; z-index: 10;
  box-shadow: 0 2px 14px rgba(15,16,45,.25);
}
.header-inner, main, .footer-inner {
  width: min(72rem, calc(100% - 2.5rem));
  margin-left: auto; margin-right: auto;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem 1.25rem; flex-wrap: wrap;
  padding: .7rem 0;
}
.wordmark {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--head); font-size: 1.4rem; font-weight: 900;
  text-decoration: none; color: #fff; letter-spacing: -0.01em;
}
.wordmark:hover { color: var(--sun); }
.logo { width: 2.4rem; height: 2.4rem; flex: none; transition: transform .4s ease; }
.wordmark:hover .logo { transform: rotate(-12deg) scale(1.05); }
.site-header nav { display: flex; gap: .25rem; font-size: .95rem; font-weight: 500; }
.site-header nav a {
  color: #e6e5ff; text-decoration: none; padding: .45rem .85rem; border-radius: 999px;
  transition: background .2s, color .2s;
}
.site-header nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.site-header nav a[aria-current="page"] { background: var(--peach); color: var(--night); font-weight: 600; }

/* ---------- Hero ---------- */
main { padding-top: 1.75rem; padding-bottom: 2.5rem; flex: 1 0 auto; }
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 85% 20%, rgba(255,184,107,.20), transparent 40%),
    radial-gradient(circle at 10% 110%, rgba(124,108,255,.45), transparent 55%),
    linear-gradient(135deg, var(--night) 0%, var(--night-2) 60%, #3b2f86 100%);
  color: #fff;
  border-radius: 28px;
  padding: 3.25rem clamp(1.25rem, 5vw, 3.5rem) 2.75rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 20px 50px rgba(27,29,74,.25);
}
.hero > *:not(.hero-sky) { position: relative; z-index: 1; max-width: 40rem; }
.hero-sky { position: absolute; inset: 0; pointer-events: none; }
.hero-planet {
  position: absolute; right: -1.5rem; top: 50%; transform: translateY(-50%);
  width: min(23rem, 38%); animation: float 7s ease-in-out infinite;
  filter: drop-shadow(0 18px 30px rgba(0,0,0,.25));
}
@keyframes float { 0%,100% { transform: translateY(-50%); } 50% { transform: translateY(calc(-50% - 10px)); } }
.star { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fff; opacity: .8; animation: twinkle 3.5s ease-in-out infinite; }
.star.s1 { top: 14%; left: 48%; }
.star.s2 { top: 30%; left: 62%; width: 3px; height: 3px; animation-delay: .8s; }
.star.s3 { top: 78%; left: 56%; animation-delay: 1.6s; }
.star.s4 { top: 10%; left: 88%; width: 5px; height: 5px; background: var(--sun); animation-delay: .4s; }
.star.s5 { top: 86%; left: 92%; width: 3px; height: 3px; animation-delay: 2.2s; }
.star.s6 { top: 8%; left: 6%; width: 3px; height: 3px; animation-delay: 1.2s; }
@keyframes twinkle { 0%,100% { opacity: .9; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .hero-planet, .star { animation: none; } .logo { transition: none; } }

.eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--night); background: var(--sun);
  padding: .3rem .8rem; border-radius: 999px; margin: 0 0 1rem;
}
h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); line-height: 1.12; font-weight: 900; margin: 0 0 .9rem; }
.hero h1 { color: #fff; }
.lede { margin: 0 0 1.75rem; font-size: 1.12rem; color: #dcdcf7; }
.search-form {
  display: flex; gap: .5rem; align-items: center;
  background: #fff; border-radius: 999px;
  padding: .4rem .4rem .4rem 1.2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  border: 3px solid transparent;
  transition: border-color .2s;
}
.search-form:focus-within { border-color: var(--peach); }
.search-form::before {
  content: ""; flex: none; width: 1.2rem; height: 1.2rem; opacity: .55;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b1d4a' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
}
.search-form input {
  flex: 1 1 auto; border: 0; background: transparent; font: inherit;
  font-size: 1.08rem; color: var(--ink); min-width: 0; outline: none; padding: .7rem 0;
}
.search-form input::placeholder { color: #7a7e98; }
.search-form button {
  font-family: var(--head); font-weight: 800; font-size: 1rem;
  background: var(--peach); color: var(--night); border: 0; border-radius: 999px;
  padding: .85rem 1.5rem; cursor: pointer; flex: none;
  transition: transform .15s, background .2s;
}
.search-form button:hover { background: #ffc98a; transform: translateY(-1px); }
.suggestions {
  font-size: .9rem; color: #c9c9ef;
  margin: 1.1rem 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: .45rem;
}
.suggestions a {
  color: #fff; text-decoration: none; background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  padding: .3rem .75rem; border-radius: 999px; transition: background .2s;
}
.suggestions a:hover { background: rgba(255,255,255,.24); color: #fff; }

.hero.compact { padding-top: 1.75rem; padding-bottom: 1.6rem; margin-bottom: 1.75rem; }
.hero.compact h1 { font-size: 1.5rem; }
.hero.compact .lede, .hero.compact .hero-planet { display: none; }

/* ---------- Sections ---------- */
h2 { font-size: 1.6rem; font-weight: 800; margin: 0 0 .4rem; }
.tools-section, .topics, .results-section { padding: 0 0 2.5rem; }
.tools-section > p, .topics > p { color: var(--muted); max-width: 46rem; margin: 0; }
.tools-section h2::before, .topics h2::before {
  content: ""; display: inline-block; width: .7rem; height: .7rem; border-radius: 50%;
  background: var(--peach); margin-right: .6rem; vertical-align: .15em;
  box-shadow: 0 0 0 4px rgba(255,184,107,.3);
}

.topic-cards, .filters { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1rem; }
.topic-cards a, .filters button {
  font-family: var(--body); font-size: .92rem; font-weight: 500;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: .55rem 1rem; text-decoration: none; color: var(--ink); cursor: pointer;
  box-shadow: var(--shadow); transition: all .2s;
}
.topic-cards a:hover, .filters button:hover { border-color: var(--indigo); color: var(--indigo); transform: translateY(-2px); }
.filters button[aria-pressed="true"] { background: var(--indigo); border-color: var(--indigo); color: #fff; }

.results-bar { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: baseline; }
.count { color: var(--muted); margin: 0; font-size: .95rem; font-weight: 500; }

/* ---------- Cards ---------- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr));
  gap: 1.1rem; margin-top: 1.4rem;
}
.results { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: .9rem; }
.tool-card, .results li {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem 1.15rem;
  display: flex; flex-direction: column; gap: .5rem;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.tool-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--indigo), var(--peach));
  opacity: 0; transition: opacity .2s;
}
.tool-card:hover, .results li:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: #cfc8f5; }
.tool-card:hover::before { opacity: 1; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.tool-card h3, .results h3 { margin: 0; font-size: 1.2rem; font-weight: 800; line-height: 1.3; }
.tool-card h3 a, .results h3 a { text-decoration: none; color: var(--ink); }
.tool-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.tool-card h3 a:hover, .results h3 a:hover { color: var(--indigo); }
.tool-card .guide-link { position: relative; z-index: 1; }
.tool-card p, .results p { margin: 0; font-size: .97rem; color: #383c5c; }
.meta {
  font-size: .8rem; color: var(--muted);
  display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .55rem;
}
.chip, .badge, .pill {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .76rem; font-weight: 600; line-height: 1;
  border-radius: 999px; padding: .38rem .65rem; border: 1px solid transparent;
  white-space: nowrap;
}
.chip, .pill { background: var(--indigo-soft); color: #3a2f8f; }
.pill.official { background: #e7f0ff; color: #1d4ea0; }
.pill.affiliate { background: #fff5d6; color: #6a4a00; }
.badge.free { background: var(--ok-bg); color: var(--ok); }
.badge.paid { background: var(--paid-bg); color: var(--paid); }
.badge::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
.tool-card .pricing, .results .pricing { font-size: .84rem; color: var(--muted); margin-top: auto; padding-top: .2rem; }
.guide-link { font-size: .88rem; font-weight: 600; }
.tool-card .guide-link, .results .guide-link a { text-decoration: none; }
.tool-card .guide-link::before, .results .guide-link a::before { content: "📘 "; }
.tool-card .guide-link:hover, .results .guide-link a:hover { text-decoration: underline; }
.results li .meta .src { font-weight: 600; color: var(--ink); }
mark { background: var(--mark); color: inherit; padding: 0 .12em; border-radius: 3px; }
.empty {
  color: var(--muted); background: var(--card); border: 1px dashed #cfc8f5;
  border-radius: var(--radius); padding: 1.5rem; text-align: center;
}

/* ---------- Content pages ---------- */
main.about {
  width: min(48rem, calc(100% - 2.5rem));
  background: var(--card); border: 1px solid var(--line); border-radius: 24px;
  box-shadow: var(--shadow);
  margin-top: 2rem; margin-bottom: 3rem;
  padding: clamp(1.5rem, 5vw, 3rem);
  position: relative; overflow: hidden;
}
main.about::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px;
  background: linear-gradient(90deg, var(--night-2), var(--indigo), var(--peach));
}
.about h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-top: 0; }
.about h2 { font-size: 1.3rem; margin-top: 2rem; color: var(--night-2); }
.about p, .about li { color: #33375a; }
.about ul { padding-left: 1.3rem; }
.about li { margin: 0 0 .45rem; }
.about li::marker { color: var(--peach-deep); }
.about .updated {
  display: inline-block; font-size: .82rem; font-weight: 500; color: var(--muted);
  background: var(--indigo-soft); padding: .3rem .75rem; border-radius: 999px; margin: 0 0 1.25rem;
}
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .88em; background: var(--indigo-soft); color: #3a2f8f; padding: .1em .35em; border-radius: 5px; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: auto;
  background: var(--night); color: #c4c5e8;
  font-size: .87rem;
  padding: 2.25rem 0 2.5rem;
  background-image: radial-gradient(circle at 90% 0%, rgba(255,184,107,.12), transparent 40%);
}
.footer-inner { display: block; }
.footer-brand { margin: 0 0 1rem !important; }
.footer-brand .wordmark { font-size: 1.15rem; }
.footer-brand .logo { width: 2rem; height: 2rem; }
.site-footer p { margin: 0 0 .7rem; max-width: 52rem; }
.site-footer a { color: var(--sun); }
.site-footer a:hover { color: #fff; }
.footer-links { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; margin: 0 0 1rem; font-weight: 600; }
.footer-links a { color: #fff; text-decoration: none; }
.footer-links a:hover { color: var(--peach); text-decoration: underline; }
.disclosure { color: #a9abd6; }
.disclosure strong { color: #e6e5ff; }

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  .hero-planet { width: 8rem; right: -2.4rem; top: -1.6rem; transform: none; opacity: .55; animation: none; }
  .hero { border-radius: 22px; padding-top: 2.25rem; }
}
@media (max-width: 600px) {
  .header-inner, main, .footer-inner { width: calc(100% - 1.5rem); }
  main { padding-top: 1rem; }
  .header-inner { justify-content: center; padding: .6rem 0; gap: .35rem; }
  .wordmark { font-size: 1.25rem; }
  .site-header { position: static; }
  .site-header nav a { padding: .4rem .7rem; }
  .lede { font-size: 1.02rem; }
  .search-form { flex-wrap: wrap; border-radius: 20px; padding: .45rem; }
  .search-form::before { display: none; }
  .search-form input { flex: 1 1 100%; padding: .65rem .7rem; }
  .search-form button { flex: 1 1 100%; padding: .8rem; }
  h2 { font-size: 1.35rem; }
  .tool-grid { grid-template-columns: 1fr; }
  main.about { width: calc(100% - 1.5rem); margin-top: 1rem; }
}
