:root {
  --bg: #f4f6f9; --panel: #ffffff; --ink: #13203a; --muted: #5b6678; --line: #d8dee7;
  --accent: #0f9e87; --accent-ink: #ffffff;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0e1626; --panel: #16223a; --ink: #e8eef7; --muted: #9dabc0; --line: #2a3a55; --accent: #2dd4bf; --accent-ink: #0e1626; }
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: 3px; text-decoration-color: var(--accent); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
header.site { border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.3rem; text-decoration: none; letter-spacing: -.01em; }
.brand img { width: 32px; height: 32px; }
header.site nav { margin-left: auto; display: flex; gap: 6px 20px; flex-wrap: wrap; }
header.site nav a { text-decoration: none; color: var(--muted); }
header.site nav a:hover, header.site nav a[aria-current="page"] { color: var(--ink); }
header.site nav a[aria-current="page"] { font-weight: 650; }
.hero { padding: 56px 0 28px; }
.hero h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.2rem); line-height: 1.12; margin: 0 0 14px; letter-spacing: -.02em; max-width: 18ch; }
.hero p { font-size: 1.15rem; color: var(--muted); max-width: 60ch; margin: 0; }
h2 { font-size: 1.5rem; margin: 40px 0 16px; letter-spacing: -.01em; }
.products { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.product {
  display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden; text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.product:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0,0,0,.12); border-color: var(--pc); }
.product:focus-visible { outline: 3px solid var(--pc); outline-offset: 3px; }
.product .shot { aspect-ratio: 16 / 10; background: #dfe4eb; border-bottom: 1px solid var(--line); overflow: hidden; }
.product .shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.product .body { padding: 18px 20px 20px; display: grid; gap: 8px; flex: 1; }
.product h3 { margin: 0; font-size: 1.35rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.badge { font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 9px; border-radius: 999px; border: 1.5px solid var(--pc); color: var(--pc); }
.product p { margin: 0; color: var(--muted); }
.product .url { font-size: .88rem; color: var(--muted); }
.product .cta { margin-top: auto; padding-top: 6px; font-weight: 700; color: var(--pc); }
.product.emaki { --pc: #c98a00; }
.product.radenhance { --pc: #0f9e87; }
@media (prefers-color-scheme: dark) { .product.emaki { --pc: #f0b429; } .product.radenhance { --pc: #2dd4bf; } }
.values { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.values div { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.values h3 { margin: 0 0 6px; font-size: 1.05rem; }
.values p { margin: 0; color: var(--muted); }
.doc { max-width: 760px; padding: 40px 0 10px; }
.doc h1 { font-size: clamp(1.8rem, 1.4rem + 1.5vw, 2.4rem); margin: 0 0 8px; }
.doc .updated { color: var(--muted); margin: 0 0 20px; font-size: .92rem; }
.doc h2 { font-size: 1.2rem; margin: 28px 0 8px; }
.doc address { font-style: normal; }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 16px 0; }
.cards > div { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.cards h3 { margin: 0 0 6px; font-size: 1rem; }
footer.site { margin-top: 56px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
footer.site .wrap { padding-top: 22px; padding-bottom: 30px; }
footer.site nav { display: flex; gap: 6px 18px; flex-wrap: wrap; margin-bottom: 12px; }
footer.site nav a { text-decoration: none; }
footer.site p { margin: 4px 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .product { transition: none; } .product:hover { transform: none; } }

/* ---- Product cards: new products and guide links ---- */
.product.yadink { --pc: #2d5c4a; }
.product.chess { --pc: #7c3aed; }
@media (prefers-color-scheme: dark) { .product.yadink { --pc: #6fcfa5; } .product.chess { --pc: #b794f6; } }
.product .links { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 6px 20px; font-weight: 700; }
.product .links a { color: var(--pc); text-decoration: none; }
.product .links a:hover { text-decoration: underline; }
.product .shot a { display: block; height: 100%; }
article.product:hover { transform: none; }

/* ---- Guide pages ---- */
.guide { max-width: 820px; padding: 32px 0 10px; }
.guide h1 { font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.6rem); line-height: 1.15; margin: 0 0 12px; letter-spacing: -.02em; }
.guide .lead { font-size: 1.12rem; color: var(--muted); margin: 0; }
.guide h2 { font-size: 1.4rem; margin: 40px 0 12px; }
.guide h3 { font-size: 1.08rem; margin: 22px 0 6px; }
.guide p, .guide li { max-width: 72ch; }
.breadcrumb { font-size: .9rem; color: var(--muted); margin: 0 0 14px; }
.breadcrumb a { text-decoration: none; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 6px; }
.btn { display: inline-block; padding: 10px 20px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--accent); }
.btn:hover { filter: brightness(1.05); }
.note { border-left: 4px solid var(--accent); background: var(--panel); padding: 12px 16px; border-radius: 0 12px 12px 0; margin: 20px 0; }
ol.steps { padding-left: 1.4em; }
ol.steps li { margin: 10px 0; }
.table-wrap { overflow-x: auto; margin: 12px 0; border: 1px solid var(--line); border-radius: 12px; }
.table-wrap table { border-collapse: collapse; width: 100%; font-size: .95rem; background: var(--panel); }
.table-wrap th, .table-wrap td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap th { font-weight: 700; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 2px 18px; margin: 10px 0; }
.faq summary { cursor: pointer; font-weight: 650; padding: 12px 0; }
.faq details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.faq details p, .faq details ul { margin: 8px 0 14px; }
.cards p { margin: 0; color: var(--muted); }
code { font-size: .92em; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }

/* ---- Learn: article lists ---- */
.post-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); margin: 14px 0; }
.post { display: grid; gap: 6px; align-content: start; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; text-decoration: none; color: inherit; transition: border-color .15s ease, transform .15s ease; }
.post:hover { border-color: var(--accent); transform: translateY(-2px); }
.post-title { font-weight: 700; font-size: 1.06rem; line-height: 1.35; }
.post-meta { font-size: .85rem; color: var(--muted); }
.post-summary { color: var(--muted); font-size: .95rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.chips a { text-decoration: none; padding: 5px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); font-size: .92rem; }
.chips a:hover { border-color: var(--accent); }
section[id] { scroll-margin-top: 16px; }
section[id] h2 a { text-decoration: none; }
.more { margin-top: 36px; }

/* ---- Learn: article pages ---- */
.byline { color: var(--muted); font-size: .93rem; margin: 0 0 14px; }
.article-body { font-size: 1.05rem; line-height: 1.75; }
.article-body p, .article-body li { max-width: 70ch; }
.article-body h2 { font-size: 1.35rem; margin: 36px 0 10px; }
.article-body h3 { font-size: 1.12rem; margin: 26px 0 6px; }
.article-body img { display: block; max-width: 100%; height: auto; margin: 18px 0 6px; border-radius: 10px; border: 1px solid var(--line); }
.article-body a { text-decoration: underline; text-decoration-color: var(--accent); }
.article-body blockquote { margin: 20px 0; padding: 4px 18px; border-left: 4px solid var(--accent); color: var(--muted); }
.article-body .table-wrap td p, .article-body .table-wrap th p { margin: 0; }
.article-body table:not(:has(th)) tr:first-child td { font-weight: 700; }
.video { position: relative; aspect-ratio: 16 / 9; margin: 20px 0; border-radius: 12px; overflow: hidden; background: #000; }
.video.short { aspect-ratio: 9 / 16; max-width: 340px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tool-box { margin: 36px 0 0; padding: 16px 20px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0; }
.tool-box p { margin: 4px 0; }
.tool-box a { font-weight: 650; }
.draft-banner { background: #fff4d6; color: #5c4400; border: 1px solid #e8c766; border-radius: 10px; padding: 10px 14px; margin: 0 0 18px; }
@media (prefers-reduced-motion: reduce) { .post { transition: none; } .post:hover { transform: none; } }
