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

:root {
  --ink: #1a3a6e;
  --muted: #3d5a8a;
  --faint: #8fa4c4;
  --border: #dce6f0;
  --bg: #ffffff;
  --paper: #ffffff;
  --code-bg: #f4f7fb;
  --accent: #1a3a6e;
  --green: #2d5a3d;
  --amber: #8b6914;
}

html { scroll-behavior: smooth; font-size: 18px; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Georgia', 'Times New Roman', serif;
  line-height: 1.7;
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
}

a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--faint); transition: border-color 0.15s; }
a:hover { border-color: var(--ink); }

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 10;
  text-align: left;
}

.nav-mark {
  font-size: 0.95rem;
  font-weight: bold;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.nav-mark:hover { color: var(--ink); }
.nav-mark .hex { font-size: 1.15rem; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.875rem;
}

.nav-right a { color: var(--muted); text-decoration: none; }
.nav-right a:hover { color: var(--ink); }

.nav-version {
  font-size: 0.75rem;
  color: var(--faint);
  font-family: ui-monospace, monospace;
  border: 1px solid var(--border);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 2rem;
}

#hero {
  padding: 5rem 0 4rem;
  border-bottom: 1px solid var(--border);
}

.hero-hex {
  font-size: 3.2rem;
  line-height: 1;
  display: inline;
  vertical-align: baseline;
  margin-right: 0.3rem;
}

h1 {
  font-size: 3.2rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.3rem;
  text-align: left;
  display: inline;
}

#hero .hero-title {
  display: block;
  margin-bottom: 1rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.hero-badges img { height: 20px; }

.version-tag {
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1.75rem;
  display: block;
}

.version-tag code {
  font-size: inherit;
  color: var(--ink);
  background: var(--code-bg);
  padding: 0.1em 0.45em;
  border-radius: 3px;
}

.doc-section {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--border);
}

h2 {
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
  text-align: left;
}

h4 {
  font-size: 1.05rem;
  font-weight: 400;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  text-align: left;
}

p { margin-bottom: 0.8rem; }
p:last-child { margin-bottom: 0; }

blockquote {
  border-left: 2px solid var(--border);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: var(--muted);

}

code {
  font-family: ui-monospace, "Cascadia Code", "Fira Code", monospace;
  font-size: 0.83em;
  background: var(--code-bg);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  color: var(--ink);
}

pre, .level-list, .proc-list, .badge-list, .faq-list, footer, summary, .example-hed, .version-tag, blockquote, .hero-nav { text-align: left; }

.hero-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0;
  margin-top: 1.25rem;
}

.hero-nav a {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding: 0 0.1rem;
  transition: color 0.15s, border-color 0.15s;
}

.hero-nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--faint);
}

.hero-nav-sep {
  color: var(--faint);
  padding: 0 0.5rem;
  user-select: none;
  font-size: 0.75rem;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
  margin: 1rem 0;
  font-family: ui-monospace, "Cascadia Code", "Fira Code", monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #374151;
}

pre code { background: none; padding: 0; border-radius: 0; font-size: inherit; }

.level-list {
  list-style: none;
  margin: 1rem 0;
}

.level-list li {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 1rem;
  align-items: start;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.975rem;
  line-height: 1.6;
}

.level-list li:last-child { border-bottom: none; }

.ltag {
  font-family: ui-monospace, "Cascadia Code", "Fira Code", monospace;
  font-size: 0.775rem;
  font-weight: 600;
  padding: 0.2rem 0;
  border-radius: 4px;
  white-space: nowrap;
  margin-top: 0.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.ltag-none { background: #dcfce7; color: #15803d; }
.ltag-hint { background: #ecfccb; color: #4d7c0f; }
.ltag-assist { background: #fef9c3; color: #a16207; }
.ltag-pair { background: #ffedd5; color: #c2410c; }
.ltag-copilot { background: #fee2e2; color: #b91c1c; }
.ltag-auto { background: #ede9fe; color: #7c3aed; }

.level-desc { color: var(--muted); }

.proc-list {
  list-style: none;
  margin: 1rem 0;
}

.proc-list li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  align-items: start;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.975rem;
}

.proc-list li:last-child { border-bottom: none; }

.ptag {
  font-family: ui-monospace, "Cascadia Code", "Fira Code", monospace;
  font-size: 0.8rem;
  color: var(--accent);
  white-space: nowrap;
  padding-top: 0.1rem;
}

.proc-desc { color: var(--muted); font-size: 0.95rem; }

.example-group { margin-top: 1.5rem; }
.example-group + .example-group { margin-top: 2rem; }

.example-hed {
  font-size: 0.78rem;
  font-weight: bold;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.4rem;
  font-style: normal;
  font-family: ui-monospace, monospace;
}

.badge-list {
  list-style: none;
  margin: 1rem 0;
}

.badge-list li {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}

.badge-list li:last-child { border-bottom: none; }
.badge-list img { height: 20px; flex-shrink: 0; }

.copy-btn {
  margin-left: auto;
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--faint);
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2rem 0.6rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}

.copy-btn:hover { color: var(--ink); border-color: var(--muted); }
.copy-btn.copied { color: #15803d; border-color: #bbf7d0; }

details { border-bottom: 1px solid var(--border); }
details:first-child { border-top: 1px solid var(--border); }

summary {
  padding: 0.9rem 0;
  font-size: 0.95rem;
  font-weight: bold;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

summary::-webkit-details-marker { display: none; }
summary::after { content: '−'; font-size: 1rem; color: var(--faint); font-weight: 300; font-style: normal; }
details:not([open]) summary::after { content: '+'; }

.faq-answer {
  padding-bottom: 1rem;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.75;
}

.faq-answer a { color: var(--accent); }

footer {
  padding: 2.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

footer p {
  font-size: 0.8rem;
  color: var(--faint);
  margin: 0;
}

footer a { color: var(--faint); }
footer a:hover { color: var(--muted); }

@media (max-width: 600px) {
  h1 { font-size: 1.9rem; }
  nav { padding: 1rem 1.25rem; }
  .wrap { padding: 0 1.25rem; }
  .nav-right .nav-version { display: none; }
  .level-list li { grid-template-columns: 60px 1fr; }
  .proc-list li { grid-template-columns: 100px 1fr; }
}
