/* Colordoku website — light theme matching the app's light palette (ui/theme/Theme.kt and RegionPalette.kt). */
:root {
  --bg: #EAF2FF;
  --bg-bottom: #D9E8FF;
  --card: #FFFFFF;
  --card-alt: #F4F7FD;
  --ink: #2F3A56;
  --ink-soft: #8A94AD;
  --line: #DCE5F5;
  --accent: #FFD53D;
  --on-accent: #3A2F10;
  --blue: #4A8DF5;
  --green: #4CC38A;
  --danger: #FF5D73;
  --r1: #8BD3A1;
  --r2: #F58DAE;
  --r3: #6EC1F2;
  --r4: #9C8DEB;
  --r5: #FFB86B;
  --radius: 20px;
  --radius-lg: 28px;
  --shadow: 0 10px 30px rgba(47, 58, 86, 0.10);
  --measure: 68ch;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg) 0, var(--bg-bottom) 100%) fixed;
  color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans CJK TC", "PingFang TC", "Helvetica Neue", Arial, sans-serif;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration-color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.9rem, 1.2rem + 3vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 1rem + 1.6vw, 2rem); font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
.lead { color: var(--ink-soft); font-size: 1.1rem; max-width: var(--measure); }
.eyebrow { color: var(--blue); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; margin: 0 0 .4em; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--card); padding: 8px 12px; border-radius: 10px; z-index: 10; }
.skip:focus { top: 12px; }

/* Header -------------------------------------------------------------------------------- */
.top {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 16px; max-width: 1120px; margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; text-decoration: none; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.nav a { text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 600; color: var(--ink); }
.nav a:hover { background: var(--card); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.lang-menu { position: relative; }
.lang-menu summary {
  list-style: none; cursor: pointer; padding: 8px 14px; border-radius: 999px; font-weight: 700;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line);
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu ul {
  position: absolute; left: 0; top: calc(100% + 8px); z-index: 20; min-width: 190px; margin: 0; padding: 8px; list-style: none;
  background: var(--card); border-radius: 16px; box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
}
.lang-menu li a { display: block; padding: 8px 12px; border-radius: 10px; text-decoration: none; font-weight: 600; }
.lang-menu li a:hover { background: var(--bg); }
.lang-menu li a[aria-current="true"] { color: var(--blue); }

main { max-width: 1120px; margin: 0 auto; padding: 8px 16px 56px; }
section { margin: 40px 0; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 20px 0 0; }
.btn {
  display: inline-block; padding: 14px 24px; border-radius: 999px; font-weight: 800; text-decoration: none;
  background: var(--blue); color: #fff; box-shadow: var(--shadow); transition: transform .15s ease;
}
.btn:hover { transform: translateY(-1px); color: #fff; }
.btn-play { background: var(--ink); }
.btn-play::before { content: "▶"; font-size: .8em; margin-right: 10px; color: var(--accent); }
.btn-soft { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-soft:hover { color: var(--blue); }
.badge-link img { height: 60px; width: auto; }

/* Hero ---------------------------------------------------------------------------------- */
.hero { display: grid; gap: 32px; align-items: center; grid-template-columns: 1fr; margin-top: 24px; }
.hero-icon { width: 72px; height: 72px; margin-bottom: 12px; }
.facts { list-style: none; padding: 0; margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.facts li { background: var(--accent); color: var(--on-accent); font-weight: 700; padding: 6px 12px; border-radius: 999px; font-size: .9rem; }
.hero-board { margin: 0; justify-self: center; }
.board {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; padding: 10px;
  width: min(320px, 78vw); aspect-ratio: 1; border-radius: var(--radius-lg); background: var(--ink); box-shadow: var(--shadow);
}
.board i { display: grid; place-items: center; border-radius: 8px; }
.board .c1 { background: var(--r1); }
.board .c2 { background: var(--r2); }
.board .c3 { background: var(--r3); }
.board .c4 { background: var(--r4); }
.board .c5 { background: var(--r5); }
.board .panda::before {
  content: ""; width: 58%; height: 58%; border-radius: 50%; background: #fff;
  box-shadow: inset 0 0 0 3px var(--ink), -0.28em -0.28em 0 -0.04em var(--ink), 0.28em -0.28em 0 -0.04em var(--ink);
}
@media (min-width: 760px) {
  .hero { grid-template-columns: 1.3fr 1fr; }
  .lang-menu ul { left: auto; right: 0; }
}

/* Features and rules --------------------------------------------------------------------- */
.feature-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.feature { background: var(--card); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); border-top: 6px solid var(--r1); }
.feature:nth-child(2) { border-top-color: var(--r2); }
.feature:nth-child(3) { border-top-color: var(--r3); }
.feature:nth-child(4) { border-top-color: var(--r5); }
.feature p { margin: 0; color: var(--ink-soft); }
.rule-list { counter-reset: rule; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; max-width: var(--measure); }
.rule-list li { position: relative; padding: 14px 18px 14px 60px; background: var(--card); border-radius: 14px; box-shadow: var(--shadow); }
.rule-list li::before {
  counter-increment: rule; content: counter(rule); position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800;
  background: var(--accent); color: var(--on-accent);
}

/* Privacy summary and prose pages --------------------------------------------------------- */
.privacy-summary { background: var(--card); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow); }
.privacy-summary ul { margin: 0; padding-left: 1.2em; }
.privacy-summary li { margin-bottom: .4em; }

.prose { max-width: var(--measure); margin: 24px auto 0; }
.prose .updated { color: var(--ink-soft); margin-top: -8px; }
.prose h2 { margin-top: 1.8em; font-size: 1.35rem; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose code { background: var(--card-alt); padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.prose a { word-break: break-word; }
.notfound { text-align: center; }

/* Footer ---------------------------------------------------------------------------------- */
.foot { max-width: 1120px; margin: 0 auto; padding: 24px 16px 40px; color: var(--ink-soft); border-top: 1px solid var(--line); font-size: .9rem; }
.foot p { margin: 0 0 .4em; }
