@import "./global.css";
@import "./main.css";

/* Arc index */
.arcs-page-container,
.arc-detail-container { max-width: var(--container); }

.arcs-page-header { text-align: left; }

.arcs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.arc-card {
  display: flex;
  min-height: 210px;
  padding: 22px;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-decoration: none;
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}

.arc-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in oklch, var(--accent) 52%, var(--border));
  background: var(--surface-hover);
}

.arc-card-title {
  margin: 0 0 8px;
  color: var(--fg);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
}

.arc-card-subtitle {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: var(--fs-body);
  line-height: 1.6;
}

.arc-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  flex-wrap: wrap;
  margin-top: auto;
  color: var(--muted);
  font: 600 11px/1.5 var(--font-mono);
}

.arc-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* Arc detail */
.arc-hero {
  margin-bottom: 48px;
  padding: 0;
  border: 0;
  text-align: left;
}

.arc-detail-grid { margin-top: 0; }

.arc-abstract {
  margin: 0 0 48px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--fg);
  font-size: var(--type-body);
  line-height: 1.7;
}

.arc-chapter {
  margin-bottom: 48px;
  scroll-margin-top: 144px;
}

.arc-chapter-header {
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.arc-chapter-title {
  color: var(--fg);
  font-size: var(--type-section);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.018em;
}

.arc-chapter-narrative {
  margin-bottom: 18px;
  color: var(--fg);
  font-size: var(--type-body);
  line-height: 1.7;
}

.arc-key-insight {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.arc-key-insight-label {
  margin-bottom: 5px;
  color: var(--accent);
  font: 700 var(--type-overline)/1.4 var(--font-mono);
  letter-spacing: .055em;
  text-transform: uppercase;
}

.arc-key-insight p {
  color: var(--fg);
  font-size: var(--type-support);
  font-weight: 600;
  line-height: 1.65;
}

.arc-anchor-events {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.arc-anchor-event {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: var(--type-meta);
  text-decoration: none;
  transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}

.arc-anchor-event:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.arc-anchor-event .event-date {
  color: var(--muted);
  font: 600 var(--type-overline)/1.4 var(--font-mono);
}

.arc-anchor-event .event-name { color: currentColor; font-weight: 650; }
.arc-anchor-event .sig-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.sig-dot.l3 { background: var(--fg); }
.sig-dot.l2 { background: var(--muted); }
.sig-dot.l1 { background: var(--border); }

.arc-conclusion {
  margin-top: 8px;
  padding: 24px 0 0;
  border-top: 1px solid var(--border);
}

.arc-conclusion h3,
.related-arcs-section > h3 {
  margin-bottom: 12px;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: var(--type-section);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.018em;
}

.arc-conclusion-text {
  color: var(--fg);
  font-size: var(--type-body);
  line-height: 1.7;
}

.related-arcs-section {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.related-arcs-grid { display: grid; gap: 10px; }

.related-arc-card {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .2s ease, background-color .2s ease;
}

.related-arc-card:hover { border-color: var(--accent); background: var(--accent-soft); }
.related-arc-title {
  margin: 0 0 5px;
  color: var(--fg);
  font-size: var(--type-item);
  font-weight: 700;
  line-height: 1.45;
}
.related-arc-subtitle {
  color: var(--muted);
  font-size: var(--type-support);
  line-height: 1.65;
}

@media (max-width: 700px) {
  .arcs-grid { grid-template-columns: 1fr; }
  .arc-card { min-height: 0; }
}

@media (max-width: 560px) {
  .arc-anchor-events { flex-direction: column; }
  .arc-anchor-event { border-radius: var(--radius); }
}
