/* Shared styles — AI Daily Intelligence (index + reports) */

:root {
  --text: #1a1a1a;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-dark: #1e40af;
  --bg: #f3f4f6;
  --card: #ffffff;
  --border: #e5e7eb;
  --width-home: 760px;
  --width-report: 1160px;
  --sidebar-width: 220px;
}

* { box-sizing: border-box; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  max-width: var(--width-home);
  margin: 0 auto;
  padding: 24px 16px;
  background: var(--bg);
}

body.report-page {
  max-width: var(--width-report);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Homepage */
header, section, footer.site-footer {
  background: var(--card);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

footer.site-footer {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

h1 { margin: 0 0 8px; font-size: 28px; }
.page-home h2 { margin-top: 0; font-size: 20px; color: var(--accent-dark); }

.subtitle { color: var(--muted); margin: 0; }
.label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: #6366f1;
  font-weight: 700;
  margin: 0 0 8px;
}

.meta { color: var(--muted); font-size: 14px; }

.button {
  display: inline-block;
  margin-top: 12px;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 600;
}

.button:hover { text-decoration: none; opacity: 0.92; }

.archive-more { margin-top: 12px; font-size: 14px; }
.empty { color: var(--muted); }

ul { padding-left: 20px; }
li { margin: 6px 0; }

/* Report pages */
.report-page .container {
  background: var(--card);
  padding: 32px 36px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.report-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.report-header h1 {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.report-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

.report-sidebar {
  position: sticky;
  top: 20px;
}

.report-sidebar .toc {
  margin: 0;
  padding: 14px 16px;
}

.report-sidebar .toc h2 {
  font-size: 11px;
  margin-bottom: 8px;
}

.report-sidebar .toc ul {
  columns: 1;
  padding-left: 14px;
  font-size: 14px;
}

.report-sidebar .toc li {
  margin: 3px 0;
}

.report-content {
  min-width: 0;
}

.report-page h1 {
  font-size: 24px;
  color: #111;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 12px;
}

.report-page h2 {
  font-size: 18px;
  color: var(--accent-dark);
  margin-top: 32px;
  margin-bottom: 12px;
}

.report-page h3 {
  font-size: 16px;
  color: #111;
  margin-top: 20px;
  margin-bottom: 8px;
}

.report-page p { margin: 8px 0; }
.intro { color: #4b5563; font-size: 15px; }

.dev-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  margin: 16px 0;
  background: #fafafa;
}

.stars { color: #f59e0b; }

.takeaway {
  display: inline-block;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
}

.security-item {
  border: 1px solid #fecaca;
  background: #fef2f2;
  border-radius: 6px;
  padding: 14px;
  margin: 12px 0;
}

.bottom-line {
  background: #1e3a5f;
  color: #fff;
  padding: 20px;
  border-radius: 6px;
  margin-top: 24px;
}

.bottom-line h3 { color: #fff; margin-top: 0; }

.signature {
  margin-top: 32px;
  color: var(--muted);
  font-size: 14px;
}

/* Table of contents (inline fallback if not in sidebar) */
.toc {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px 20px;
  margin: 20px 0 28px;
}

.toc h2 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 10px;
}

.toc ul {
  margin: 0;
  padding-left: 18px;
}

.toc li { margin: 4px 0; break-inside: avoid; }

@media (max-width: 860px) {
  body.report-page {
    max-width: 100%;
  }

  .report-page .container {
    padding: 20px 18px;
  }

  .report-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .report-sidebar {
    position: static;
  }

  .report-sidebar .toc ul {
    columns: 2;
    column-gap: 24px;
  }

  .report-page h1 { font-size: 20px; }
}

@media (max-width: 520px) {
  .report-sidebar .toc ul {
    columns: 1;
  }
}
