:root {
  --bg: #fbfaf7; --surface: #ffffff; --ink: #1c1b1a; --muted: #6b6760; --line: #e8e4dc;
  --accent: #e0673a; --accent-ink: #ffffff; --radius: 18px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #121212; --surface: #1c1c1e; --ink: #f2f0ec; --muted: #a19d96; --line: #2c2c2e; --accent: #ff8a5b; --accent-ink: #1a0d07; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Helvetica, Arial, sans-serif; }
a { color: var(--accent); }
header.site, main, footer.site { max-width: 920px; margin: 0 auto; padding: 0 22px; }
header.site { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; font-size: 19px; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
header nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 15px; }
header nav a { color: var(--muted); text-decoration: none; }
header nav a:hover, header nav a[aria-current="page"] { color: var(--ink); }
main { padding-top: 44px; padding-bottom: 64px; }
h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.1; letter-spacing: -0.025em; margin: 0 0 12px; }
h2 { font-size: 22px; letter-spacing: -0.01em; margin: 40px 0 12px; }
h3 { font-size: 18px; margin: 0 0 4px; }
.lead { font-size: 20px; color: var(--muted); max-width: 640px; }
.tag { font-size: 19px; color: var(--muted); margin: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card { display: flex; gap: 16px; align-items: flex-start; padding: 20px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); color: inherit; text-decoration: none; transition: transform .15s ease, border-color .15s ease; }
.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

.icon { flex: none; width: 64px; height: 64px; border-radius: 15px; display: grid; place-items: center;
  font-weight: 800; font-size: 18px; color: #fff; letter-spacing: -0.02em; background-size: cover; background-position: center; }
.hero .icon { width: 96px; height: 96px; border-radius: 22px; font-size: 26px; }
/* Replace each gradient with the real icon, e.g. background-image: url(/img/hexmess.png); and remove the letters in the HTML */
.icon-dtm-double-tap-match { background-image: linear-gradient(135deg, #ff2bd6, #3a2bff); }
.icon-hexmess { background-image: linear-gradient(135deg, #1fb5a5, #5b4bd1); }
.icon-to-buy-for { background-image: linear-gradient(135deg, #d93a3a, #2e8b57); }
.icon-wellish { background-image: linear-gradient(135deg, #7cc6a4, #4a90c2); }

.hero { display: flex; gap: 22px; align-items: center; margin-bottom: 20px; }
.features { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 10px; max-width: 680px; }
.features li { padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.btn { display: inline-block; padding: 11px 20px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.contact { margin-top: 40px; color: var(--muted); }
ul.plain { padding-left: 20px; }

.legal { max-width: 700px; }
.legal h1 { font-size: 34px; }
.legal h2 { font-size: 19px; margin-top: 30px; }
.meta { color: var(--muted); }
.todo { background: #fff3cd; color: #5c4400; padding: 12px 16px; border-radius: 8px; }

footer.site { border-top: 1px solid var(--line); padding-top: 22px; padding-bottom: 40px; color: var(--muted); font-size: 14px; }
@media (max-width: 560px) { .hero { flex-direction: column; align-items: flex-start; } }

/* ---------- Real icons ---------- */
img.icon-img { display: block; object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.08); }

/* ---------- Hexmess theme (palette sampled from the app icon) ---------- */
.theme-hexmess {
  --hx-blue: #B4C7DF; --hx-violet: #D6BEFF; --hx-mint: #B4E8D6;
  --hx-yellow: #FBEC9D; --hx-peach: #F1BF9B; --hx-pink: #F2AABC;
  --accent: #6B4FC4;          /* deepened icon violet: passes contrast for text and white-on-button */
  --accent-ink: #ffffff;
}
@media (prefers-color-scheme: dark) {
  .theme-hexmess { --accent: #D6BEFF; --accent-ink: #1c1530; }  /* the icon's own violet reads well on dark */
}
.theme-hexmess .hero { position: relative; padding: 28px; margin: -8px -28px 24px; border-radius: 28px; overflow: hidden; }
.theme-hexmess .hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .55;
  background: linear-gradient(120deg, var(--hx-blue), var(--hx-violet) 25%, var(--hx-mint) 45%, var(--hx-yellow) 65%, var(--hx-peach) 82%, var(--hx-pink)); }
@media (prefers-color-scheme: dark) { .theme-hexmess .hero::before { opacity: .16; } }
.theme-hexmess .features li { border-left: 4px solid var(--hx-violet); }
.theme-hexmess .features li:nth-child(6n+1) { border-left-color: var(--hx-blue); }
.theme-hexmess .features li:nth-child(6n+2) { border-left-color: var(--hx-violet); }
.theme-hexmess .features li:nth-child(6n+3) { border-left-color: var(--hx-mint); }
.theme-hexmess .features li:nth-child(6n+4) { border-left-color: var(--hx-yellow); }
.theme-hexmess .features li:nth-child(6n+5) { border-left-color: var(--hx-peach); }
.theme-hexmess .features li:nth-child(6n+6) { border-left-color: var(--hx-pink); }
.card-hexmess { position: relative; overflow: hidden; }
.card-hexmess::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, #B4C7DF, #D6BEFF, #B4E8D6, #FBEC9D, #F1BF9B, #F2AABC); }
@media (max-width: 560px) { .theme-hexmess .hero { margin: -8px -12px 24px; padding: 20px; } }

/* ---------- DTM theme (neon palette sampled from the app icon) ---------- */
.theme-dtm-double-tap-match {
  --dtm-cyan: #20DFF8; --dtm-magenta: #E014C8; --dtm-teal: #056161; --dtm-black: #000000;
  --accent: #A80F96;            /* deepened icon magenta for links on light backgrounds (6.3:1) */
  --accent-ink: #000000;
}
@media (prefers-color-scheme: dark) { .theme-dtm-double-tap-match { --accent: #20DFF8; } }
/* The hero is always a black neon panel, in light and dark mode, so the icon sits in its own world */
.theme-dtm-double-tap-match .hero { position: relative; padding: 32px 28px; margin: -8px -28px 24px; border-radius: 28px; overflow: hidden;
  background: radial-gradient(ellipse at 15% 50%, rgba(5,97,97,.9), transparent 55%),
              radial-gradient(ellipse at 90% 30%, rgba(224,20,200,.35), transparent 60%), #000;
  box-shadow: inset 0 0 0 1px rgba(32,223,248,.35), 0 0 32px rgba(32,223,248,.15); }
.theme-dtm-double-tap-match .hero h1 { color: #fff; text-shadow: 0 0 18px rgba(32,223,248,.55); }
.theme-dtm-double-tap-match .hero .tag { color: #9ff3fd; }
.theme-dtm-double-tap-match .hero img.icon-img { box-shadow: 0 0 0 1px rgba(32,223,248,.5), 0 0 24px rgba(32,223,248,.35); }
.theme-dtm-double-tap-match .btn.primary { background: var(--dtm-cyan); border-color: var(--dtm-cyan); color: #000;
  box-shadow: 0 0 18px rgba(32,223,248,.45); }
.theme-dtm-double-tap-match .features li { border-left: 4px solid var(--dtm-cyan); }
.theme-dtm-double-tap-match .features li:nth-child(even) { border-left-color: var(--dtm-magenta); }
.card-dtm-double-tap-match { position: relative; overflow: hidden; }
.card-dtm-double-tap-match::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, #20DFF8, #E014C8); box-shadow: 0 0 10px rgba(224,20,200,.6); }
.card-dtm-double-tap-match img.icon-img { box-shadow: 0 0 0 1px rgba(32,223,248,.3), 0 0 12px rgba(224,20,200,.25); }
@media (max-width: 560px) { .theme-dtm-double-tap-match .hero { margin: -8px -12px 24px; padding: 22px; } }

/* ---------- Wellish theme (petal palette sampled from the app icon; one petal per habit) ---------- */
.theme-wellish {
  --wl-blue: #BBD6E7; --wl-green: #ACC8B7; --wl-lavender: #D6C8DC; --wl-rose: #CB90A7; --wl-sand: #E9D7C7;
  --accent: #3E7560;        /* deepened sage petal: 5.1:1 on the page background */
  --accent-ink: #ffffff;
}
@media (prefers-color-scheme: dark) { .theme-wellish { --accent: #ACC8B7; --accent-ink: #14201a; } }
.theme-wellish .hero { position: relative; padding: 28px; margin: -8px -28px 24px; border-radius: 28px; overflow: hidden; }
.theme-wellish .hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .7;
  background:
    radial-gradient(circle at 8% 20%, var(--wl-blue), transparent 40%),
    radial-gradient(circle at 35% 110%, var(--wl-sand), transparent 45%),
    radial-gradient(circle at 60% -10%, var(--wl-green), transparent 45%),
    radial-gradient(circle at 85% 100%, var(--wl-rose), transparent 45%),
    radial-gradient(circle at 100% 30%, var(--wl-lavender), transparent 45%); }
@media (prefers-color-scheme: dark) { .theme-wellish .hero::before { opacity: .18; } }
/* Habit order on the page: Walk, Nourish, Hydrate, Move, Breathe */
.theme-wellish .features li { border-left: 4px solid var(--wl-green); }
.theme-wellish .features li:nth-child(1) { border-left-color: var(--wl-sand); }
.theme-wellish .features li:nth-child(2) { border-left-color: var(--wl-green); }
.theme-wellish .features li:nth-child(3) { border-left-color: var(--wl-blue); }
.theme-wellish .features li:nth-child(4) { border-left-color: var(--wl-rose); }
.theme-wellish .features li:nth-child(5) { border-left-color: var(--wl-lavender); }
.card-wellish { position: relative; overflow: hidden; }
.card-wellish::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, #E9D7C7, #ACC8B7, #BBD6E7, #CB90A7, #D6C8DC); }
@media (max-width: 560px) { .theme-wellish .hero { margin: -8px -12px 24px; padding: 20px; } }

/* ---------- To Buy For theme (gift-box palette sampled from the app icon) ---------- */
.theme-to-buy-for {
  --tbf-red: #DD473D; --tbf-green: #0B8843;
  --accent: #0A7A3D;        /* slightly deepened box green so links pass 4.5:1 on the page background */
  --accent-ink: #ffffff;
}
@media (prefers-color-scheme: dark) { .theme-to-buy-for { --accent: #3DBE77; --accent-ink: #ffffff; } }
.theme-to-buy-for .btn.primary { background: var(--tbf-green); border-color: var(--tbf-green); color: #fff; }  /* exact icon green, 4.7:1 with white */
/* Hero: a soft green panel tied with a red ribbon, like the icon */
.theme-to-buy-for .hero { position: relative; padding: 28px; margin: -8px -28px 24px; border-radius: 28px; overflow: hidden;
  background: color-mix(in srgb, var(--tbf-green) 9%, var(--surface)); }
.theme-to-buy-for .hero::before, .theme-to-buy-for .hero::after { content: ""; position: absolute; background: var(--tbf-red); opacity: .9; }
.theme-to-buy-for .hero::before { top: 0; bottom: 0; right: 120px; width: 14px; }
.theme-to-buy-for .hero::after  { left: 0; right: 0; bottom: 18px; height: 14px; }
.theme-to-buy-for .hero { padding-bottom: 56px; }
.theme-to-buy-for .hero > * { position: relative; z-index: 1; }
@media (prefers-color-scheme: dark) { .theme-to-buy-for .hero { background: color-mix(in srgb, var(--tbf-green) 22%, var(--surface)); }
  .theme-to-buy-for .hero::before, .theme-to-buy-for .hero::after { opacity: .7; } }
.theme-to-buy-for .features li { border-left: 4px solid var(--tbf-green); }
.theme-to-buy-for .features li:nth-child(even) { border-left-color: var(--tbf-red); }
.card-to-buy-for { position: relative; overflow: hidden; }
.card-to-buy-for::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, #0B8843 50%, #DD473D 50%); }
@media (max-width: 560px) { .theme-to-buy-for .hero { margin: -8px -12px 24px; padding: 20px 52px 56px 20px; } .theme-to-buy-for .hero::before { right: 22px; } }
.legal ul { padding-left: 22px; } .legal li { margin: 8px 0; }
