/* Shared styles for zebras.paulinavl.com: white, soft teal gradient,
   #4A9B8E accent. The ZebraUp beta site (zebraup-beta.netlify.app) moved
   here on 2026-11-19; its blog, landing and diagnostic panel styles are
   at the bottom, rewritten on these tokens so they follow dark mode. */

:root {
  --bg: #ffffff;
  --bg-alt: #f7f8f9;
  --border: #e4e6e8;
  --ink: #1a1a1a;
  --muted: #555555;
  --accent: #3a7d72;        /* text and button fill: 4.9:1 with white */
  --accent-hover: #2f6a60;
  --accent-light: #4A9B8E;  /* ZebraUp brand teal, for borders/accents */
  --accent-soft: #edf5f3;
  --on-accent: #ffffff;
  --soon-bg: #fdf1e4;
  --footer-bg: #1a1a1a;
  --footer-ink: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141716;
    --bg-alt: #1b1f1e;
    --border: #2c3331;
    --ink: #eef2f1;
    --muted: #a9b3b1;
    --accent: #7cc4b7;
    --accent-hover: #95d3c8;
    --accent-light: #4A9B8E;
    --accent-soft: #1d2f2c;
    --on-accent: #0f1312;
    --soon-bg: #33291f;
    --footer-bg: #0c0e0d;
    --footer-ink: #eef2f1;
  }
}
:root[data-theme="dark"] {
  --bg: #141716;
  --bg-alt: #1b1f1e;
  --border: #2c3331;
  --ink: #eef2f1;
  --muted: #a9b3b1;
  --accent: #7cc4b7;
  --accent-hover: #95d3c8;
  --accent-light: #4A9B8E;
  --accent-soft: #1d2f2c;
  --on-accent: #0f1312;
  --soon-bg: #33291f;
  --footer-bg: #0c0e0d;
  --footer-ink: #eef2f1;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, var(--accent-soft) 0, var(--bg) 560px) no-repeat, var(--bg);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans TC", "PingFang TC", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Language: elements carry data-l="es" / "en" / "zh"; lang.js sets a
   class on <html>. Without JS every language shows, one after the other. */
html.l-es [data-l]:not([data-l="es"]),
html.l-en [data-l]:not([data-l="en"]),
html.l-zh [data-l]:not([data-l="zh"]),
html.l-pt [data-l]:not([data-l="pt"]) { display: none !important; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
/* Long paragraphs stay readable on wide screens; cards and grids use the full width. */
main > p, main > ul, section > p, section > ul, .lead { max-width: 78ch; }

/* Header (ZebraUp's topbar) */
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px;
  padding-top: 28px; padding-bottom: 12px;
}
.brand {
  font-weight: 600; font-size: 1.1rem; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none; margin-right: auto;
}
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.95rem; font-weight: 500; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); }
.lang-switch { display: flex; gap: 6px; }
.lang-switch button {
  font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer;
  padding: 0.35rem 0.75rem; border-radius: 999px;
  border: 1px solid var(--border); background: transparent; color: var(--muted);
  transition: border-color 200ms ease, color 200ms ease;
}
.lang-switch button:hover { color: var(--accent); border-color: var(--accent-light); }
.lang-switch button[aria-pressed="true"] { color: var(--accent); border-color: var(--accent-light); background: var(--bg); }

/* Type */
main { padding: 8px 0 72px; }
h1 { font-size: 2rem; line-height: 1.25; font-weight: 700; letter-spacing: -0.02em; margin: 40px 0 16px; }
h2 { font-size: 1.5rem; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; margin: 56px 0 16px; }
h3 { font-size: 1.1rem; font-weight: 700; margin: 0 0 6px; }
p { margin: 0 0 16px; }
.lead { font-size: 1.1rem; color: var(--muted); }
.meta { color: var(--muted); font-size: 0.95rem; }
a { color: var(--accent); }
ul { padding-left: 22px; }
li { margin: 6px 0; }
@media (min-width: 640px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.75rem; }
}
@media (min-width: 900px) { h1 { font-size: 2.75rem; } }

/* App cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin: 32px 0; }
.card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
  padding: 24px; display: flex; flex-direction: column; gap: 12px;
}
.card p { margin: 0; }
.card > p:not(:first-of-type) { color: var(--muted); }
.card .actions { margin-top: auto; padding-top: 8px; }
.app-head { display: flex; align-items: center; gap: 14px; }
.app-icon {
  width: 56px; height: 56px; border-radius: 14px; flex: none;
  display: grid; place-items: center; font-size: 32px;
  background: var(--accent-soft); border: 1px solid var(--border); overflow: hidden;
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.app-name { font-size: 1.35rem; font-weight: 700; margin: 0; }
.status {
  display: inline-block; font-size: 0.8rem; font-weight: 600;
  padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent);
}
.status.soon { background: var(--soon-bg); color: var(--ink); }

/* Boxes */
.panel { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 12px; padding: 24px; margin: 24px 0; }
.panel > :last-child { margin-bottom: 0; }
.note {
  background: var(--accent-soft); border-left: 4px solid var(--accent-light);
  border-radius: 8px; padding: 16px 20px; margin: 24px 0;
}

/* Features (ZebraUp's feature grid) */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin: 24px 0; }
.feature { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.feature-icon { font-size: 2rem; line-height: 1; margin-bottom: 10px; }
.feature p { margin: 0; font-size: 0.95rem; color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0.85rem 1.5rem;
  font: inherit; font-size: 0.95rem; font-weight: 600; text-decoration: none; text-align: center;
  border-radius: 8px; border: 2px solid var(--accent);
  background: var(--accent); color: var(--on-accent);
  transition: background-color 200ms ease, border-color 200ms ease;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: transparent; color: var(--accent); border-color: var(--accent-light); }
.btn.secondary:hover { background: var(--accent-soft); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 12px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent-light); outline-offset: 2px; }

/* Footer (ZebraUp's dark footer) */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); padding: 40px 0; font-size: 0.9rem; text-align: center; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 8px; margin-bottom: 16px; }
.site-footer nav a { color: var(--footer-ink); text-decoration: none; padding: 0.5rem 0.75rem; border-radius: 8px; }
.site-footer nav a:hover { background: rgba(255, 255, 255, 0.1); }
.site-footer p { margin: 0 auto 8px; max-width: 70ch; opacity: 0.6; }

/* ------------------------------------------------------------------ */
/* From the ZebraUp beta site                                         */
/* ------------------------------------------------------------------ */

.check-list { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; max-width: 78ch; }
.check-list li { position: relative; padding-left: 1.75rem; margin: 0; line-height: 1.5; }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 700; }

.sources { font-size: 0.85rem; color: var(--muted); max-width: 78ch; }
.quote { font-style: italic; }

/* Sign-up forms (Netlify Forms) */
.email-form { display: grid; gap: 10px; max-width: 420px; margin: 16px 0; }
.email-form .hp-field { position: absolute; left: -9999px; }
.email-form input[type="email"], .email-form select {
  width: 100%; min-height: 48px; padding: 0.75rem 1rem;
  font: inherit; font-size: 0.95rem; color: var(--ink); background: var(--bg);
  border: 2px solid var(--border); border-radius: 8px;
}
.email-form input[type="email"]:focus, .email-form select:focus { border-color: var(--accent-light); outline: none; }
.email-form label.field { display: grid; gap: 4px; font-size: 0.9rem; font-weight: 600; }
.checkbox-row { display: flex; align-items: flex-start; gap: 8px; font-size: 0.9rem; color: var(--muted); }
.checkbox-row input { margin-top: 0.2rem; width: 1.1rem; height: 1.1rem; accent-color: var(--accent); flex: none; }
.form-note { font-size: 0.8rem; color: var(--muted); margin: 0; }

.qr { display: block; max-width: 160px; border-radius: 8px; border: 1px solid var(--border); background: #fff; margin-top: 12px; }

/* Blog */
.blog-intro { max-width: 78ch; }
.blog-post { max-width: 78ch; padding: 32px 0; border-bottom: 1px solid var(--border); }
.blog-post:last-child { border-bottom: none; }
.blog-date {
  display: inline-block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em;
  color: var(--accent); background: var(--accent-soft);
  padding: 0.25rem 0.65rem; border-radius: 999px; margin-bottom: 12px;
}
.blog-app { margin-left: 6px; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.blog-post-title { font-size: 1.35rem; line-height: 1.35; margin: 0 0 16px; }
.blog-entry-title { font-size: 1.1rem; margin: 24px 0 8px; color: var(--accent); }
.blog-entry-body { color: var(--muted); margin: 0 0 12px; }
ul.blog-entry-body { padding-left: 22px; }
.blog-fallback { font-size: 0.85rem; color: var(--muted); font-style: italic; margin: 0 0 12px; }
@media (min-width: 640px) { .blog-post-title { font-size: 1.6rem; } }

/* hEDS diagnostic support panel (/up/heds/) */
.dx-tool { background: var(--bg); border: 1px solid var(--border); border-radius: 16px; padding: 28px; max-width: 760px; }
@media (max-width: 400px) { .dx-tool { padding: 20px 16px; } }
.dx-progress { height: 8px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; margin-bottom: 24px; }
.dx-progress-bar { height: 100%; width: 0%; background: var(--accent-light); transition: width 0.3s ease; }
.dx-step { display: none; }
.dx-step.active { display: block; }
.dx-step h3 { font-size: 1.15rem; }
.dx-illustration {
  display: block; max-width: 100%; height: auto; max-height: 260px; margin: 12px auto;
  border-radius: 12px; border: 1px solid var(--border); background: #fafafa;
}
.dx-option {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  border: 2px solid var(--border); border-radius: 12px; padding: 12px 16px; margin-bottom: 10px;
}
.dx-option:hover { border-color: var(--accent-light); background: var(--accent-soft); }
.dx-option input { width: 18px; height: 18px; margin-top: 3px; flex: none; accent-color: var(--accent); }
.dx-label { display: block; font-weight: 700; margin-bottom: 4px; }
.dx-input {
  width: 100%; max-width: 220px; min-height: 48px; padding: 0.75rem 1rem; margin-top: 8px;
  font: inherit; color: var(--ink); background: var(--bg); border: 2px solid var(--border); border-radius: 8px;
}
.dx-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.dx-nav button { cursor: pointer; }
.dx-summary-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.dx-summary-item:last-child { border-bottom: none; }
.dx-summary-item ul { margin: 6px 0 0 18px; padding: 0; }
.dx-status-ok, .dx-status-no { font-weight: 700; }
.dx-print-btn { width: 100%; margin-top: 14px; cursor: pointer; }
@media print {
  .site-header, .site-footer, .dx-nav, .dx-progress, .dx-intro, .dx-print-btn { display: none !important; }
  .dx-tool { border: none; padding: 0; }
}
