/* ── Design tokens ─────────────────────────────────────────── */
:root {
  --color-yellow:     #F2D000;
  --color-grey:       #333333;
  --color-coral:      #EF7051;
  --color-sky:        #59ACE1;
  --color-green:      #2E5F3B;
  --color-white:      #FFFFFF;
  --color-bg:         #FFFFFF;
  --color-bg-card:    #F7F7F7;
  --color-bg-header:  #333333;
  --color-text:       #333333;
  --color-text-muted: #888888;
  --color-border:     #E0E0E0;
  --color-highlight:  rgba(242, 208, 0, 0.3);

  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 16px;
  --sp-4: 24px;
  --sp-5: 32px;
  --sp-6: 48px;
  --sp-7: 64px;
}

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

body {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
}

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

/* ── Header ────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg-header);
  color: var(--color-white);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  max-width: 900px;
  margin: 0 auto;
}

/* Logo image — full on desktop, cropped to icon on mobile */
.logo-img-wrap {
  display: inline-block;
  overflow: hidden;
  height: 32px;
  flex-shrink: 0;
}

.logo-img-wrap img {
  height: 32px;
  width: auto;
  display: block;
}

.logo-text {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.logo-text::before {
  content: '';
  display: inline-block;
  width: 1px;
  height: 1.1em;
  background: rgba(255, 255, 255, 0.3);
  margin-right: var(--sp-3);
  vertical-align: middle;
}

/* ── Navigation stripe ─────────────────────────────────────── */
.nav-stripe {
  background: var(--color-bg-card);
  border-bottom: 1px solid var(--color-border);
}

.nav-stripe-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--sp-2) var(--sp-4);
  display: flex;
  align-items: center;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: var(--sp-1) var(--sp-2);
  transition: border-color 150ms ease, background 150ms ease;
  cursor: pointer;
  background: transparent;
}

.nav-link:hover {
  border-color: var(--color-grey);
  background: rgba(0,0,0,0.04);
}

.nav-link .arrow {
  font-size: 0.9rem;
  line-height: 1;
}

/* ── Responsive header ─────────────────────────────────────── */
@media (max-width: 767px) {
  /* Crop logo to icon portion only (~left 148px of 568px native width) */
  /* At 32px display height, full image renders at ~129px wide.         */
  /* 32 * (148/141) ≈ 33.6px shows only the icon.                      */
  .logo-img-wrap {
    width: 34px;
  }
}

/* ── Main content ──────────────────────────────────────────── */
#app {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-4);
}

/* ── Issue ─────────────────────────────────────────────────── */
.issue {
  animation: issue-in 250ms ease both;
}

@keyframes issue-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.issue-date {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 900;
  color: var(--color-text);
  line-height: 1;
  margin-bottom: var(--sp-6);
  letter-spacing: -0.02em;
}

/* ── Section ───────────────────────────────────────────────── */
.section {
  margin-bottom: var(--sp-6);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}

.section-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.section-name {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text);
  white-space: nowrap;
}

.section-rule {
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* ── Items ─────────────────────────────────────────────────── */
.items {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

/* Item card */
.item-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  border-left-width: 3px;
  border-left-color: var(--color-border);
  transition: border-left-color 150ms ease, background 150ms ease;
  overflow: hidden;
}

.item-card:has(.item-card-link:hover) {
  background: var(--color-bg-card);
  border-left-color: var(--accent, var(--color-border));
}

.item-card-link {
  display: block;
  padding: var(--sp-2) var(--sp-3);
}

.item-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
}

.item-domain {
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* Text note */
.item-note {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  padding: var(--sp-1) 0 var(--sp-1) var(--sp-3);
}

/* ── Child items (tree line) ─────────────────────────────────── */
.item-children {
  position: relative;
  padding-left: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  margin-top: var(--sp-1);
}

/* Vertical line running the full height of the children group */
.item-children::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--color-border);
}

/* Horizontal connector from the line to each child card */
.item-children .item-card {
  position: relative;
}

.item-children .item-card::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--sp-4) + 10px);
  top: 50%;
  width: calc(var(--sp-4) - 10px - 3px);
  height: 1px;
  background: var(--color-border);
}

.item-children .item-label { font-size: 0.82rem; }
.item-children .item-domain { font-size: 0.65rem; }

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--color-border);
}

.footer-about {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  max-width: 900px;
  margin: 0 auto;
  padding: var(--sp-3) var(--sp-4) 0;
}

.footer-about a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-license {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  max-width: 900px;
  margin: 0 auto;
  padding: var(--sp-2) var(--sp-4) var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  flex-wrap: wrap;
}

.footer-license a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
