/* WASHways site styles: homepage (tool cards), contact and privacy pages. */
:root {
  --bg: #f6f7fb; --surface: #ffffff; --text: #12151c; --text-2: #4a5468; --muted: #737d93;
  --border: #e3e7ef; --accent: #E8505B; --accent-ink: #ffffff; --accent-2: #9AC4F8;
  --chip-bg: #eef2f8; --chip-ink: #3c4a63; --shadow: 0 2px 10px rgba(18, 21, 28, 0.06);
  --hero-from: #fff1f2; --hero-to: #eaf3ff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f14; --surface: #161922; --text: #e8eaf0; --text-2: #a3acbe; --muted: #7d869a;
    --border: #262b3b; --chip-bg: #1f2433; --chip-ink: #b8c3d9; --shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
    --hero-from: #1a1420; --hero-to: #111a28;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 6px 10px; border-radius: 6px; z-index: 10; }

/* free / non-commercial / experimental note above the header on every page */
.ethos { background: var(--chip-bg); color: var(--chip-ink); font-size: 0.82rem; border-bottom: 1px solid var(--border); }
.ethos .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding-top: 7px; padding-bottom: 7px; }
.ethos-tags { display: inline-flex; gap: 6px; }
.ethos-tags b { font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 0.7rem; padding: 2px 7px; border-radius: 999px; border: 1px solid currentColor; }
.ethos a { color: inherit; font-weight: 600; }

/* header + footer */
header.site { border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 5; }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.brand img { width: 28px; height: 28px; }
.brand span b { color: var(--accent); }
nav.site { display: flex; gap: 18px; }
nav.site a { text-decoration: none; color: var(--text-2); font-size: 0.92rem; }
nav.site a:hover, nav.site a[aria-current] { color: var(--accent); }
footer.site { border-top: 1px solid var(--border); color: var(--muted); font-size: 0.85rem; padding: 20px 0 28px; margin-top: 24px; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 16px; }
footer.site a { color: var(--text-2); text-decoration: none; }
footer.site a:hover { color: var(--accent); }
footer.site button { border: 0; background: none; padding: 0; font: inherit; color: var(--text-2); cursor: pointer; }
footer.site button:hover { color: var(--accent); }

/* hero */
.hero { background: linear-gradient(120deg, var(--hero-from), var(--hero-to)); border-bottom: 1px solid var(--border); }
.hero .wrap { padding-top: 44px; padding-bottom: 34px; }
.hero h1 { margin: 0 0 10px; font-size: clamp(1.7rem, 3.6vw, 2.5rem); line-height: 1.15; letter-spacing: -0.015em; max-width: 820px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { margin: 0; color: var(--text-2); max-width: 680px; font-size: 1.05rem; }
.hero p.ethos-lede { margin-top: 10px; font-size: 0.95rem; }
.hero p.ethos-lede a { color: var(--accent); }
.hero .facts { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.hero .facts span { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; font-size: 0.82rem; color: var(--text-2); }

/* toolbar */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 22px 0 14px; }
.search { flex: 1 1 260px; min-width: 0; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }
.search:focus, .sort:focus { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.sort { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-size: 0.9rem; }
.count { color: var(--muted); font-size: 0.88rem; }
.active-filter { display: none; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--text-2); }
.active-filter button { border: 0; background: var(--chip-bg); color: var(--chip-ink); border-radius: 999px; padding: 4px 10px; cursor: pointer; font: inherit; font-size: 0.8rem; }

/* topic buttons */
.topics { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 0 18px; }
.topic { border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 6px 13px; font: inherit; font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: background .12s, color .12s, border-color .12s; }
.topic .n { color: var(--muted); font-size: 0.75rem; margin-left: 2px; }
.topic:hover { border-color: var(--accent); color: var(--accent); }
.topic.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.topic.is-on .n { color: rgba(255,255,255,.8); }
.topic:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
@media (max-width: 600px) {
  .topics { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 14px; scrollbar-width: none; }
  .topic { flex: none; }
}

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; padding-bottom: 32px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(18, 21, 28, 0.12); }
.card[hidden] { display: none; }
.thumb { display: block; aspect-ratio: 1200 / 630; background: linear-gradient(135deg, #1b2030, #2b3350); position: relative; overflow: hidden; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 12px; text-align: center; color: #fff; font-weight: 700; font-size: 1rem; background: linear-gradient(135deg, #E8505B 0%, #7f5fa8 55%, #9AC4F8 100%); }
.featured { position: absolute; top: 8px; left: 8px; background: rgba(15,17,21,0.75); color: #fbbf24; font-size: 0.7rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card h3 { margin: 0; font-size: 1.02rem; line-height: 1.3; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.desc { margin: 0; color: var(--text-2); font-size: 0.87rem; line-height: 1.5; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.chip { border: 0; background: var(--chip-bg); color: var(--chip-ink); border-radius: 999px; padding: 2px 9px; font: inherit; font-size: 0.72rem; cursor: pointer; }
.chip:hover { background: var(--accent-2); color: #12151c; }
.actions { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.open { display: inline-block; background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 600; font-size: 0.84rem; padding: 7px 14px; border-radius: 8px; }
.open:hover { filter: brightness(0.93); }
.empty { color: var(--text-2); padding: 40px 0; text-align: center; grid-column: 1 / -1; }

/* retired tools */
.retired-list { margin: 0 0 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.retired-list summary { cursor: pointer; padding: 12px 16px; color: var(--text-2); font-weight: 600; font-size: 0.92rem; }
.retired-list ul { list-style: none; margin: 0; padding: 0 16px 10px; }
.retired-list li { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--border); font-size: 0.9rem; }
.retired-list li b { font-weight: 600; }
.retired-list li span { color: var(--text-2); flex: 1 1 240px; }
.retired-list li a { color: var(--accent); text-decoration: none; font-weight: 600; }
.retired-list li a.old { color: var(--muted); font-weight: 400; }

/* about strip */
.about { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; padding: 8px 0 8px; }
.about div { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.about h2 { margin: 0 0 6px; font-size: 1rem; }
.about p { margin: 0; color: var(--text-2); font-size: 0.9rem; }

/* simple content pages */
.page { max-width: 760px; padding-top: 36px; padding-bottom: 24px; }
.page h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 12px; letter-spacing: -0.01em; }
.page h2 { font-size: 1.15rem; margin: 26px 0 8px; }
.page p, .page li { color: var(--text-2); }
.page a { color: var(--accent); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; font-weight: 600; color: var(--text-2); }
.form .full { grid-column: 1 / -1; }
.form input, .form textarea, .form select { font: inherit; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); }
.form input:focus, .form textarea:focus, .form select:focus { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.form input, .form textarea, .form select { font-weight: 400; }
.form ::placeholder { color: var(--muted); }
.form .check { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 400; }
.form .check input { margin-top: 3px; }
.form button { justify-self: start; border: 0; border-radius: 8px; background: var(--accent); color: #fff; font: inherit; font-weight: 600; padding: 10px 20px; cursor: pointer; }
.form button[disabled] { opacity: .5; cursor: not-allowed; }
.note { background: var(--chip-bg); color: var(--chip-ink); border-radius: 8px; padding: 10px 12px; font-size: 0.9rem; }

[hidden] { display: none !important; }
@media (max-width: 600px) {
  nav.site { gap: 14px; }
  .hero .wrap { padding-top: 28px; padding-bottom: 24px; }
  .form { grid-template-columns: 1fr; }
}
