/* kk3w.com: same palette as the RotatorMap user manual */
:root {
  --bg: #fbfaf7; --panel: #f1efe9; --text: #1f2328; --muted: #5d636b; --rule: #dcd8ce;
  --accent: #b85c00; --accent-dark: #954a00; --accent-soft: #fff1e0; --link: #0b5cad; --head: #1d2430;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 "Segoe UI", system-ui, -apple-system, sans-serif; }
a { color: var(--link); }
img { max-width: 100%; height: auto; }
code { font-family: Consolas, "Cascadia Mono", monospace; font-size: 0.9em; background: #ecebe6; padding: 1px 5px; border-radius: 4px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.small { font-size: 14px; color: var(--muted); }
.muted { color: var(--muted); }
h1, h2, h3 { line-height: 1.25; }
h2 { font-size: 24px; margin: 40px 0 12px; }

/* header and footer */
header.site { background: var(--head); color: #fff; }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: 0.5px; }
header.site nav { display: flex; gap: 4px; flex-wrap: wrap; }
header.site nav a { color: #d8dde6; text-decoration: none; padding: 6px 12px; border-radius: 6px; font-size: 15px; }
header.site nav a:hover, header.site nav a.active { background: rgba(255,255,255,0.12); color: #fff; }
footer.site { margin-top: 64px; border-top: 1px solid var(--rule); background: var(--panel); }
footer.site .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 18px; padding-bottom: 18px; font-size: 14px; color: var(--muted); }

/* home page */
.hero { background: linear-gradient(180deg, #fff 0%, var(--bg) 100%); border-bottom: 1px solid var(--rule); padding: 48px 0 40px; }
.hero-grid { display: grid; grid-template-columns: minmax(280px, 5fr) 7fr; gap: 40px; align-items: center; }
.hero h1 { font-size: 46px; margin: 0 0 12px; letter-spacing: -0.5px; }
.lead { font-size: 19px; color: #3a4048; margin: 0 0 24px; }
.shot { border-radius: 10px; border: 1px solid var(--rule); box-shadow: 0 12px 32px rgba(29,36,48,0.18); }
.download .small { margin-top: 10px; }
.button { display: inline-block; padding: 10px 20px; border-radius: 8px; border: 1px solid var(--accent); color: var(--accent); background: #fff;
          text-decoration: none; font-weight: 600; }
.button:hover { background: var(--accent-soft); }
.button.primary { background: var(--accent); color: #fff; font-size: 18px; padding: 13px 26px; }
.button.primary:hover { background: var(--accent-dark); }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.feature { background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 16px 18px; }
.feature h3 { margin: 0 0 6px; font-size: 17px; color: var(--accent-dark); }
.feature p { margin: 0; font-size: 15px; color: #3a4048; }
.two { display: grid; grid-template-columns: 3fr 2fr; gap: 40px; align-items: start; }
.club { background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 24px; text-align: center; margin-top: 40px; }
.club h2 { margin-top: 12px; }
.prose { max-width: 800px; }
.prose h1 { margin-top: 36px; }

/* statistics */
.stats h1 { margin: 32px 0 4px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 20px 0; }
.card { background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 12px 14px; }
.card .value { font-size: 26px; font-weight: 700; color: var(--head); }
.card .label { font-size: 13px; color: var(--muted); }
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.chart { margin: 0; background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 12px 14px; }
.chart svg { width: 100%; height: 90px; display: block; }
.chart rect { fill: var(--accent); }
.chart figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.map { height: 440px; border-radius: 10px; border: 1px solid var(--rule); }
.grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 24px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.table { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; background: #fff; }
th, td { border: 1px solid var(--rule); padding: 5px 9px; text-align: left; vertical-align: top; }
th { background: var(--panel); font-weight: 600; white-space: nowrap; }
td.num, th.num { text-align: right; white-space: nowrap; }
details summary { cursor: pointer; }
details pre { white-space: pre-wrap; font-size: 12px; max-width: 700px; margin: 6px 0 0; }
.ua { color: var(--muted); }

@media (max-width: 860px) {
  .hero-grid, .two, .charts, .grid2 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 36px; }
}

/* cookie question (public/consent.js) */
#cookie-bar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 1000; max-width: calc(100% - 24px);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--head); color: #e8ebf0; font-size: 14px;
  padding: 8px 10px 8px 14px; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,0.25); }
#cookie-bar a { color: #9cc7f5; }
#cookie-bar button { font: inherit; padding: 4px 14px; border-radius: 6px; border: 1px solid #6b7686; background: transparent; color: #fff; cursor: pointer; }
#cookie-bar button[data-yes] { background: var(--accent); border-color: var(--accent); }
.linklike { font: inherit; background: none; border: none; padding: 0; color: var(--link); text-decoration: underline; cursor: pointer; }

/* screenshots under the main one, and the full-screen viewer (public/gallery.js) */
img[data-gallery] { cursor: zoom-in; }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.thumbs img { display: block; width: 100%; aspect-ratio: 1917 / 1031; object-fit: cover; border-radius: 6px;
  border: 1px solid var(--rule); box-shadow: 0 3px 10px rgba(29,36,48,0.12); transition: transform 0.12s; }
.thumbs img:hover, .thumbs img:focus { transform: translateY(-2px); outline: 2px solid var(--accent); outline-offset: 1px; }
.lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(12,16,22,0.92); display: none;
  align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox figure { margin: 0; max-width: calc(100vw - 140px); max-height: calc(100vh - 60px); display: flex;
  flex-direction: column; align-items: center; justify-content: center; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 100px); border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
.lightbox figcaption { color: #d8dde6; font-size: 14px; margin-top: 10px; text-align: center; }
.lightbox button { position: absolute; background: rgba(255,255,255,0.12); color: #fff; border: none; cursor: pointer;
  border-radius: 50%; width: 52px; height: 52px; font-size: 34px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.lightbox button:hover, .lightbox button:focus { background: rgba(255,255,255,0.25); outline: none; }
.lightbox .lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-close { right: 18px; top: 18px; width: 44px; height: 44px; font-size: 30px; }
@media (max-width: 860px) {
  .lightbox figure { max-width: 100vw; }
  .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 14px; transform: none; }
}
