:root {
  --blue: #2f6df4;
  --text: #1b1f27;
  --muted: #5b6475;
  --bg: #ffffff;
  --card: #f4f7fe;
  --line: #dde3f0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --blue: #6f9bff;
    --text: #e8ebf2;
    --muted: #a3abbd;
    --bg: #11141b;
    --card: #1a1f2b;
    --line: #2a3142;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}

main { max-width: 760px; margin: 0 auto; padding: 24px 16px 64px; }

header { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
header img { width: 44px; height: 44px; border-radius: 10px; }
header .name { font-weight: 700; font-size: 19px; color: var(--text); text-decoration: none; }
header nav { margin-left: auto; display: flex; gap: 16px; font-size: 15px; }

a { color: var(--blue); }
h1 { font-size: 30px; line-height: 1.25; margin: 28px 0 4px; }
h2 { font-size: 20px; margin: 32px 0 8px; }
p, li { color: var(--text); }
.date { color: var(--muted); margin: 0 0 20px; }
.summary { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px 20px; }
.summary li { margin: 6px 0; }
footer { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

.hero { text-align: center; padding: 40px 0 8px; }
.hero img { width: 96px; height: 96px; border-radius: 22px; }
.hero h1 { margin-top: 16px; }
.hero p { color: var(--muted); max-width: 520px; margin: 8px auto 24px; }
.button { display: inline-block; background: var(--blue); color: #fff; text-decoration: none; padding: 12px 22px; border-radius: 999px; font-weight: 600; }
.links { display: flex; justify-content: center; gap: 20px; margin-top: 28px; }

/* ── Landing and guide pages ── */
.tagline { font-size: 20px; color: var(--text) !important; font-weight: 600; margin-bottom: 4px !important; }
.cta-note { color: var(--muted); font-size: 14px; margin-top: 10px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 28px 0 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card a { font-size: 15px; }
.carousel { position: relative; margin: 8px -16px 0; }
.shots { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 10px 24px 18px; scroll-padding: 0 24px; scrollbar-width: none; outline: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.shots::-webkit-scrollbar { display: none; }
.shots img { flex: none; width: min(62vw, 210px); height: auto; aspect-ratio: 9 / 16; border-radius: 18px;
  scroll-snap-align: start; box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18); background: var(--card); }
.shots:focus-visible img { outline: 2px solid var(--blue); outline-offset: 3px; }
.carousel-btn { position: absolute; top: calc(50% - 32px); z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(15, 23, 42, 0.16);
  transition: opacity 0.2s, transform 0.2s; }
.carousel-btn:hover { transform: scale(1.06); }
.carousel-btn.prev { left: 6px; }
.carousel-btn.next { right: 6px; }
.carousel-btn[disabled] { opacity: 0; pointer-events: none; }
@media (hover: none) { .carousel-btn { display: none; } }
.dots { display: flex; justify-content: center; gap: 8px; margin-top: 2px; }
.dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--line); transition: width 0.25s, background 0.25s; }
.dots button[aria-current="true"] { width: 24px; background: var(--blue); }
details { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 10px 0; background: var(--bg); }
details summary { cursor: pointer; font-weight: 600; }
details p { margin: 10px 0 2px; }
.steps { padding-left: 22px; }
.steps li { margin: 8px 0; }
.table-wrap { overflow-x: auto; margin: 12px 0; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 14px; }
td small { color: var(--muted); }
.note { color: var(--muted); font-size: 14px; }
.lang { font-size: 14px; }
.guides { padding-left: 20px; }
.guides li { margin: 6px 0; }

/* Form-size tables become one card per form on narrow screens. */
@media (max-width: 600px) {
  .forms-table thead { display: none; }
  .forms-table, .forms-table tbody, .forms-table tr, .forms-table td { display: block; width: 100%; }
  .forms-table tr { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 10px 0; background: var(--card); }
  .forms-table td { border: 0; padding: 3px 0; }
  .forms-table td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-weight: 600; }
}
