:root {
  --bg: #eef3fb;
  --surface: #ffffff;
  --ink: #1c2433;
  --muted: #59657a;
  --accent: #0a6d8f;
  --accent-2: #e05a36;
  --accent-3: #1e3a8a;
  --ring: #d7dfeb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Source Sans 3", "Segoe UI", Tahoma, sans-serif;
  line-height: 1.5;
  background:
    radial-gradient(circle at 12% 10%, rgba(10, 109, 143, 0.18), transparent 38%),
    radial-gradient(circle at 88% 0%, rgba(224, 90, 54, 0.16), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.85)),
    var(--bg);
}

a {
  color: var(--accent);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--ring);
  backdrop-filter: blur(10px);
}

.header-wrap,
.page-wrap,
.site-footer {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
}

.header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.main-nav a {
  text-decoration: none;
  color: var(--ink);
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
}

.main-nav a.active,
.main-nav a:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  color: #fff;
}

.page-wrap {
  padding: 2rem 0 2.5rem;
}

.hero,
.panel {
  background: var(--surface);
  border: 1px solid var(--ring);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 10px 24px rgba(22, 34, 57, 0.06);
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.4rem, 2vw, 2rem);
}

.hero-media {
  position: relative;
  overflow: hidden;
  min-height: 340px;
  padding: 0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
}

.hero-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  max-width: 760px;
  width: min(760px, calc(100% - 2rem));
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(10, 20, 38, 0.76), rgba(10, 20, 38, 0.58));
  color: #f5f8ff;
  box-shadow: 0 14px 34px rgba(8, 18, 36, 0.35);
  text-align: center;
}

.hero-overlay .lead {
  color: #e8f1ff;
}

.hero-kicker {
  margin: 0.55rem 0 0;
  color: #d8e7ff;
}

.lead {
  color: var(--muted);
  margin: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.9rem;
}

.doc-item {
  border: 1px solid var(--ring);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  padding: 0.8rem;
}

.doc-item .kind {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-2), #c13f1f);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  margin-bottom: 0.45rem;
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline li {
  border-left: 3px solid var(--accent);
  padding: 0 0 0.75rem 1rem;
  margin-left: 0.4rem;
}

.timeline li strong {
  display: block;
}

.timeline-nav li {
  margin-bottom: 0.45rem;
  border-left-width: 2px;
}

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

.timeline-nav a:hover {
  color: var(--accent-3);
  text-decoration: underline;
}

#timeline-top {
  display: block;
  position: relative;
  top: -5.5rem;
  visibility: hidden;
}

[id^="timeline-card-"] {
  scroll-margin-top: 5.5rem;
}

.story-feed {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.story-item {
  border: 1px solid var(--ring);
  border-radius: 12px;
  padding: 0.9rem;
  background: linear-gradient(180deg, #ffffff, #f6f9ff);
}

.story-item h3 {
  margin: 0.35rem 0 0.4rem;
  font-size: 1rem;
}

.story-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.story-date {
  color: var(--ink);
  font-weight: 700;
}

.story-category {
  display: inline-block;
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  color: #fff;
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
}

.story-summary {
  margin: 0.2rem 0 0.6rem;
  color: var(--muted);
}

.story-link {
  margin: 0 0 0.55rem;
}

.story-open {
  display: block;
  margin: 0.1rem auto 0;
  border: 1px solid var(--ring);
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  color: #fff;
  border-radius: 999px;
  padding: 0.38rem 0.82rem;
  cursor: pointer;
  font-weight: 600;
}

.story-category-vote-evidence {
  background: linear-gradient(135deg, #b91c1c, #ef4444);
}

.story-category-regulatory {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
}

.story-category-court {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
}

.story-category-media {
  background: linear-gradient(135deg, #7c2d12, #ea580c);
}

.story-category-shareholder-record {
  background: linear-gradient(135deg, #5b21b6, #8b5cf6);
}

.story-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.attachment-chip {
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--ring);
  background: #fff;
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  font-size: 0.85rem;
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
}

.attachment-chip .kind {
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent-2), #c13f1f);
  border-radius: 999px;
  font-size: 0.67rem;
  padding: 0.08rem 0.4rem;
}

.story-dialog {
  border: none;
  border-radius: 16px;
  padding: 0;
  width: min(860px, calc(100% - 1.5rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  box-shadow: 0 22px 56px rgba(15, 26, 48, 0.32);
}

.story-dialog::backdrop {
  background: rgba(10, 19, 37, 0.62);
}

.story-dialog-card {
  padding: 1rem 1rem 1.1rem;
  background: #fff;
}

.story-dialog-card h3 {
  margin: 0.2rem 0 0.65rem;
}

.story-detail {
  color: var(--ink);
  margin: 0.2rem 0 0.95rem;
}

.story-links-block h4 {
  margin: 0 0 0.45rem;
  font-size: 0.98rem;
}

.story-source-block {
  margin: 0.2rem 0 0.9rem;
}

.story-source-block h4 {
  margin: 0 0 0.45rem;
  font-size: 0.98rem;
}

.source-content {
  border: 1px solid var(--ring);
  border-radius: 12px;
  padding: 0.75rem;
  background: #f8fbff;
}

.source-content p {
  margin: 0 0 0.6rem;
  color: var(--ink);
}

.source-content p:last-child {
  margin-bottom: 0;
}

.no-links {
  color: var(--muted);
  font-size: 0.86rem;
}

.story-dialog-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}

.story-dialog-actions button {
  border: 1px solid var(--ring);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.32rem 0.84rem;
  cursor: pointer;
}

.site-footer {
  padding: 1.3rem 0 2rem;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 720px) {
  .header-wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  .story-feed {
    grid-template-columns: 1fr;
  }
}
