/* GG Analytics public site — buildless, no external resources. */
:root {
  --bg: #fbfaf7;
  --subtle: #f4f2ec;
  --surface: #ffffff;
  --border: rgba(22, 24, 28, 0.12);
  --border-strong: rgba(22, 24, 28, 0.24);
  --text: #16181c;
  --muted: #5c616a;
  --accent: #1d3763;
  --accent-dark: #152a4d;
  --paper: #fbfaf7;
  --radius: 3px;
  --max: 1120px;
  --section: 96px;
  --serif: "Noto Serif JP", "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", "YuMincho", "BIZ UDPMincho", serif;
  --sans: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", "Meiryo", system-ui, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
  word-break: normal;
  line-break: strict;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-dark); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.45; letter-spacing: 0.04em; margin: 0; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 32px; }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--accent); color: #fff; padding: 8px 16px; border-radius: var(--radius);
}
.skip-link:focus { top: 12px; color: #fff; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Brand mark: SVG used as mask so it can take any colour. */
.brand-mark {
  display: inline-block; flex: none;
  width: 44px; aspect-ratio: 3750 / 2120;
  background-color: currentColor;
  -webkit-mask: url("/assets/gg-logo.svg") center / contain no-repeat;
  mask: url("/assets/gg-logo.svg") center / contain no-repeat;
}

/* Header */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--accent); text-decoration: none; }
.brand:hover { color: var(--accent-dark); }
.brand-name { font-family: var(--serif); font-size: 1.15rem; font-weight: 500; letter-spacing: 0.06em; color: var(--text); }
.brand-sub { display: block; font-size: 0.7rem; color: var(--muted); letter-spacing: 0.08em; line-height: 1.4; font-family: var(--sans); }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 4px 28px; list-style: none; margin: 0; padding: 0; font-size: 0.875rem; }
.site-nav a { color: var(--text); text-decoration: none; padding: 4px 0; border-bottom: 1px solid transparent; }
.site-nav a:hover { color: var(--accent); border-bottom-color: currentColor; }
.site-nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }

/* Shared labels */
.eyebrow { display: flex; align-items: baseline; gap: 14px; font-size: 0.75rem; letter-spacing: 0.16em; color: var(--accent); margin: 0 0 20px; text-transform: uppercase; }
.eyebrow .num { font-family: var(--serif); font-size: 0.95rem; letter-spacing: 0.04em; }
.eyebrow .num::after { content: ""; display: inline-block; width: 28px; height: 1px; background: currentColor; vertical-align: middle; margin-left: 14px; }
.status { display: inline-block; font-size: 0.75rem; letter-spacing: 0.08em; color: var(--muted); border: 1px solid var(--border-strong); border-radius: 2px; padding: 2px 10px; line-height: 1.7; background: var(--surface); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 28px; border-radius: var(--radius); border: 1px solid var(--accent); font-size: 0.95rem; letter-spacing: 0.06em; text-decoration: none; transition: background-color .2s, color .2s; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-secondary { background: transparent; color: var(--accent); }
.btn-secondary:hover { background: var(--surface); }
.btn .arrow { font-family: var(--serif); }

/* Sections */
.section { padding: var(--section) 0; border-top: 1px solid var(--border); }
.section-subtle { background: var(--subtle); }
.section-head { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 48px; margin-bottom: 64px; align-items: end; }
.section-head h2 { font-size: 2.25rem; }
.section-head .lead { color: var(--muted); }

/* Hero */
.hero { padding: 104px 0 var(--section); }
.hero .container { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 64px; align-items: center; }
.hero h1 { font-size: 56px; letter-spacing: 0.05em; margin-bottom: 32px; }
.hero .lead { font-size: 1.05rem; color: var(--muted); max-width: 34em; margin-bottom: 40px; }
.hero .status { margin-bottom: 28px; }
.actions { display: flex; flex-wrap: wrap; gap: 16px; }

.figure { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.figure figcaption { font-size: 0.8rem; color: var(--muted); margin-top: 16px; line-height: 1.7; }
.figure svg text { font-family: var(--sans); }

/* Editorial rows */
.rows { border-top: 1px solid var(--border-strong); }
.row { display: grid; grid-template-columns: 96px minmax(0, 4fr) minmax(0, 7fr); gap: 32px; padding: 40px 0; border-bottom: 1px solid var(--border); }
.row .num { font-family: var(--serif); color: var(--accent); font-size: 1.25rem; }
.row h3 { font-size: 1.4rem; }
.row p { color: var(--muted); }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 48px; }
.about h2 { font-size: 2.25rem; }
.facts { margin: 32px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--border-strong); }
.facts div { padding: 20px 20px 0 0; }
.facts dt { font-size: 0.75rem; letter-spacing: 0.1em; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-family: var(--serif); font-size: 1.1rem; line-height: 1.6; }

/* Illustrative table */
.sample { margin-top: 64px; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 48px; align-items: start; }
.sample h3 { font-size: 1.4rem; margin-bottom: 16px; }
.sample p { color: var(--muted); font-size: 0.95rem; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
caption { text-align: left; padding: 16px 20px; font-size: 0.8rem; color: var(--muted); border-bottom: 1px solid var(--border); caption-side: top; }
th, td { padding: 14px 20px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
thead th { font-weight: 500; font-size: 0.75rem; letter-spacing: 0.08em; color: var(--muted); background: var(--subtle); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 500; }
.na { color: var(--muted); font-size: 0.8rem; }

/* Process */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--accent); }
.steps li { padding: 28px 28px 0 0; position: relative; }
.steps li::before { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; background: var(--accent); border-radius: 50%; }
.steps .num { font-family: var(--serif); color: var(--accent); font-size: 0.9rem; letter-spacing: 0.1em; }
.steps h3 { font-size: 1.15rem; margin: 6px 0 12px; }
.steps p { color: var(--muted); font-size: 0.92rem; }

/* Link block */
.doc-links { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border-strong); }
.doc-links a { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) 32px; gap: 32px; align-items: baseline; padding: 32px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); }
.doc-links a:hover .doc-title { color: var(--accent); }
.doc-links .doc-title { font-family: var(--serif); font-size: 1.3rem; transition: color .2s; }
.doc-links .doc-title small { display: block; font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.16em; color: var(--accent); text-transform: uppercase; }
.doc-links .doc-desc { color: var(--muted); font-size: 0.95rem; }
.doc-links .arrow { font-family: var(--serif); color: var(--accent); text-align: right; }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 48px; }
.contact h2 { font-size: 2.25rem; }
.contact-mail { font-family: var(--serif); font-size: 1.75rem; display: inline-block; margin: 8px 0 24px; overflow-wrap: anywhere; }
.note { font-size: 0.875rem; color: var(--muted); border-left: 2px solid var(--accent); padding-left: 16px; }

/* Footer */
.site-footer { background: var(--text); color: var(--paper); padding: 64px 0 40px; font-size: 0.875rem; }
.site-footer a { color: var(--paper); }
.site-footer a:hover { color: #fff; }
.footer-top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; padding-bottom: 40px; border-bottom: 1px solid rgba(251, 250, 247, 0.16); }
.footer-brand { display: flex; align-items: center; gap: 14px; color: var(--paper); margin-bottom: 16px; }
.footer-brand .brand-mark { width: 52px; }
.footer-brand .brand-name { color: var(--paper); }
.footer-text { color: rgba(251, 250, 247, 0.72); }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 32px; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
.footer-bottom { padding-top: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; color: rgba(251, 250, 247, 0.6); font-size: 0.8rem; }

/* Document (legal) pages */
.doc-intro { padding: 88px 0 56px; border-bottom: 1px solid var(--border); }
.doc-intro h1 { font-size: 44px; margin-bottom: 24px; }
.doc-intro .lead { color: var(--muted); max-width: 40em; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; margin-top: 28px; font-size: 0.85rem; color: var(--muted); }
.doc-layout { display: grid; grid-template-columns: 240px minmax(0, 760px); gap: 80px; padding-top: 64px; padding-bottom: var(--section); }
.toc { position: sticky; top: 32px; align-self: start; font-size: 0.85rem; }
.toc h2 { font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.16em; color: var(--muted); font-weight: 500; margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border-strong); counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: block; padding: 6px 0 6px 16px; color: var(--muted); text-decoration: none; line-height: 1.6; }
.toc a::before { content: counter(toc, decimal-leading-zero) "  "; font-family: var(--serif); color: var(--accent); white-space: pre; }
.toc a:hover { color: var(--accent); }

.prose { max-width: 760px; }
.prose section { padding-bottom: 48px; margin-bottom: 48px; border-bottom: 1px solid var(--border); scroll-margin-top: 24px; }
.prose section:last-child { border-bottom: 0; margin-bottom: 0; }
.prose h2 { font-size: 1.6rem; margin-bottom: 24px; }
.prose h2 .n { font-size: 0.95rem; color: var(--accent); margin-right: 14px; letter-spacing: 0.06em; }
.prose h3 { font-size: 1.15rem; margin: 32px 0 12px; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--accent); }
.prose dl { margin: 0 0 1em; border-top: 1px solid var(--border); }
.prose dl div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 5fr); gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.prose dt { font-weight: 500; }
.prose dd { margin: 0; color: var(--muted); }
.callout { background: var(--subtle); border-left: 2px solid var(--accent); padding: 20px 24px; margin: 24px 0; font-size: 0.95rem; }
.mail-template { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; margin: 16px 0 24px; font-size: 0.9rem; white-space: pre-wrap; font-family: var(--sans); line-height: 1.9; }
.flow { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 24px; }
.flow li { margin: 0; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 2px; padding: 4px 14px; font-size: 0.85rem; }
.flow li + li::before { content: "→"; color: var(--accent); margin: 0 10px 0 -2px; }

/* Responsive */
@media (max-width: 960px) {
  .hero .container, .section-head, .about, .sample, .contact, .footer-top { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .toc { position: static; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; }
}

@media (max-width: 640px) {
  :root { --section: 64px; }
  body { font-size: 15px; }
  .container { padding: 0 20px; }
  .site-header .container { min-height: 0; gap: 12px; }
  .site-nav ul { gap: 2px 18px; font-size: 0.82rem; }
  .hero { padding: 56px 0 var(--section); }
  .hero h1 { font-size: 32px; margin-bottom: 24px; }
  .section-head { margin-bottom: 40px; }
  .section-head h2, .about h2, .contact h2 { font-size: 1.6rem; }
  .figure { padding: 18px; }
  .row { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 28px 0; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts div { padding: 14px 0 0; }
  .steps { grid-template-columns: minmax(0, 1fr); border-top: 0; border-left: 1px solid var(--accent); row-gap: 28px; }
  .steps li { padding: 0 0 0 24px; }
  .steps li::before { top: 8px; left: -5px; }
  .doc-links a { grid-template-columns: minmax(0, 1fr) 24px; gap: 8px 16px; padding: 24px 0; }
  .doc-links .doc-desc { grid-column: 1; grid-row: 2; }
  .doc-links .arrow { grid-column: 2; grid-row: 1; }
  .contact-mail { font-size: 1.3rem; }
  .btn { width: 100%; }
  .footer-nav ul { grid-template-columns: minmax(0, 1fr); }
  .doc-intro { padding: 48px 0 40px; }
  .doc-intro h1 { font-size: 30px; }
  .doc-layout { padding-top: 32px; }
  .prose h2 { font-size: 1.35rem; }
  .prose dl div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .mail-template { padding: 16px; }
}
