@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Instrument+Sans:wght@400;500&display=swap');

:root {
  --bg:      #f4efe6;
  --surface: #ece6d8;
  --surface2:#e2dace;
  --border:  #d6cfc2;
  --border2: #c5bdb0;
  --text:    #1c2238;
  --muted:   #5c6070;
  --hint:    #9ca2b2;
  --gold:    #b8912a;
}

[data-theme="dark"] {
  --bg:      #131210;
  --surface: #1b1916;
  --surface2:#23211d;
  --border:  #2c2924;
  --border2: #3b3730;
  --text:    #f0e9d8;
  --muted:   #98908a;
  --hint:    #585450;
  --gold:    #d4a83a;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
  font-size: 16px;
}

a { color: inherit; text-decoration: none; }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 32px; }

/* ── Header ── */
header {
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  background: var(--bg); transition: background .3s;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 17px 0;
}

.logo {
  font-family: 'Instrument Serif', serif;
  font-size: 19px;
  text-decoration: none;
  color: var(--text);
  letter-spacing: -.015em;
}

.logo em { font-style: italic; color: var(--gold); }

.nav { display: flex; align-items: center; gap: 16px; }

.nav a {
  font-size: 13px; font-weight: 500;
  color: var(--muted); letter-spacing: .02em;
  transition: color .2s;
}

.nav a:hover { color: var(--text); }

.theme-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  transition: border-color .2s, color .2s;
}

.theme-btn:hover { border-color: var(--border2); color: var(--text); }
.theme-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.i-sun, .i-moon { display: none; }
[data-theme="light"] .i-sun  { display: block; }
[data-theme="dark"]  .i-moon { display: block; }

/* ── Main ── */
main { padding: 56px 0 80px; }

.page-label {
  font-size: 11px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--hint); margin-bottom: 8px;
}

.page-title {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 400; line-height: 1.1;
  letter-spacing: -.02em; color: var(--text);
  margin-bottom: 8px;
}

.page-title em { font-style: italic; color: var(--gold); }

.page-sub {
  font-size: 15px; color: var(--muted); line-height: 1.65;
  margin-bottom: 48px;
}

/* ── Section ── */
.section-label {
  font-size: 11px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--hint); margin-bottom: 16px;
}

/* ── Group cards ── */
.groups { display: flex; flex-direction: column; gap: 8px; }

.group-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  text-decoration: none;
  transition: border-color .2s, background .2s, transform .15s;
}

.group-card:hover {
  border-color: var(--gold);
  background: var(--surface2);
  transform: translateX(3px);
}

.gc-info { display: flex; flex-direction: column; gap: 3px; }

.gc-title {
  font-size: 15px; font-weight: 500;
  color: var(--text); line-height: 1.2;
}

.gc-sub {
  font-size: 12px; color: var(--hint);
}

.gc-arrow {
  font-size: 18px; color: var(--hint);
  transition: transform .2s, color .2s;
}

.group-card:hover .gc-arrow {
  transform: translate(3px, -3px);
  color: var(--gold);
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}

footer p { font-size: 12px; color: var(--hint); }
footer a { color: var(--hint); transition: color .2s; }
footer a:hover { color: var(--muted); }

/* ── Responsive ── */
@media (max-width: 600px) {
  .wrap { padding: 0 20px; }
  main { padding: 40px 0 60px; }
  .page-sub { margin-bottom: 36px; }
}
