/* Daniel's Corner | light blue theme, WCAG-friendly */

:root {
  --bg-page: #f0f9ff;
  --bg-section: #e0f2fe;
  --bg-section-alt: #bae6fd;
  --bg-card: #ffffff;
  --text-body: #1e293b;
  --text-heading: #0f172a;
  --accent: #0284c7;
  --accent-hover: #0369a1;
  --border: #bae6fd;
  --focus-ring: #0284c7;
  --radius: 12px;
  --shadow: 0 1px 3px rgb(2 132 199 / 12%), 0 8px 24px rgb(2 132 199 / 8%);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max-width: 1100px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-body);
  background: var(--bg-page);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-hover);
}

img,
iframe {
  max-width: 100%;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.85rem;
  flex-wrap: wrap;
}

.logo {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-heading);
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.site-nav a {
  text-decoration: none;
  font-weight: 500;
  padding: 0.35rem 0.25rem;
}

.site-nav a[aria-current="page"] {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hero {
  background: linear-gradient(180deg, var(--bg-section-alt) 0%, var(--bg-section) 55%, var(--bg-page) 100%);
  padding: 3rem 0 2.5rem;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--text-heading);
  line-height: 1.2;
}

.hero-lead {
  margin: 0 0 1.5rem;
  font-size: 1.125rem;
  max-width: 42rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--accent);
  border-color: var(--accent);
}

.btn-secondary:hover {
  background: var(--bg-section);
}

section {
  padding: 2.75rem 0;
}

section:nth-of-type(even) {
  background: var(--bg-section);
}

section h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  color: var(--text-heading);
}

.section-lead {
  margin: 0 0 1.5rem;
  max-width: 46rem;
}

.card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--text-heading);
}

.card p {
  margin: 0 0 0.75rem;
}

.card-meta {
  font-size: 0.875rem;
  color: #475569;
}

.status-pill {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-live {
  background: #dcfce7;
  color: #166534;
}

.status-dev {
  background: #fef9c3;
  color: #854d0e;
}

.status-planned {
  background: #e2e8f0;
  color: #475569;
}

.data-table-wrap {
  overflow-x: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

table.data-table th,
table.data-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

table.data-table th {
  background: var(--bg-section);
  color: var(--text-heading);
  font-weight: 600;
}

table.data-table tr:last-child td {
  border-bottom: none;
}

.video-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.video-card iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: var(--radius);
  background: var(--bg-section);
}

.video-card h3 {
  margin: 0.75rem 0 0.35rem;
  font-size: 1rem;
}

.prompt-block,
.answer-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 1rem 0;
}

.prompt-block h3,
.answer-block h3 {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #475569;
}

.prompt-block p,
.answer-block p {
  margin: 0;
  white-space: pre-wrap;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.8rem;
}

.thought-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.thought-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow);
}

.thought-item time {
  display: block;
  font-size: 0.85rem;
  color: #475569;
  margin-bottom: 0.35rem;
}

.capture-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.capture-panel label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text-heading);
}

.capture-panel textarea {
  width: 100%;
  min-height: 120px;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
  background: var(--bg-page);
}

.capture-panel input[type="text"] {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  margin-bottom: 1rem;
  background: var(--bg-page);
}

.capture-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.status-msg {
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.status-msg[hidden] {
  display: none;
}

.status-msg.success {
  color: #166534;
}

.status-msg.error {
  color: #b91c1c;
}

.ai-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0369a1;
  margin: 0.35rem 0 0.75rem;
}

.publish-cadence {
  font-size: 0.95rem;
  color: var(--text-body);
  margin: 0 0 1rem;
  max-width: 72ch;
}

.section-answer {
  font-size: 1.05rem;
  color: var(--text-heading);
  margin: 0 0 0.75rem;
  max-width: 72ch;
}

.cloudflare-account-block + .cloudflare-account-block {
  margin-top: 2rem;
}

.cloudflare-account-block h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  color: var(--text-heading);
}

.section-links {
  margin: 0.75rem 0 0;
  font-size: 0.925rem;
}

.section-links a {
  font-weight: 600;
}

.faq-list {
  margin: 1rem 0 0;
}

.faq-list dt {
  font-weight: 700;
  color: var(--text-heading);
  margin-top: 1rem;
}

.faq-list dt:first-child {
  margin-top: 0;
}

.faq-list dd {
  margin: 0.35rem 0 0;
  max-width: 72ch;
}

.article-body h2 {
  margin-top: 2rem;
}

.article-body h2:first-of-type {
  margin-top: 1rem;
}

.prompt-block,
.answer-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}

.prompt-block h3,
.answer-block h3 {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.tldr {
  background: var(--bg-section-alt);
  border-left: 4px solid var(--accent);
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1rem 0;
  font-size: 0.95rem;
}

.site-footer {
  background: var(--bg-section);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 1rem;
}

.footer-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.footer-address {
  font-style: normal;
  font-size: 0.925rem;
  line-height: 1.55;
  margin: 0 0 0.75rem;
}

.footer-email {
  margin: 0;
  font-size: 0.925rem;
  line-height: 1.55;
}

.footer-email a {
  word-break: break-all;
}

.site-footer h2 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
  color: var(--text-heading);
}

.site-footer p,
.site-footer ul {
  margin: 0;
  font-size: 0.925rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
}

.site-footer li + li {
  margin-top: 0.35rem;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-copy {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: #475569;
}

.empty-state {
  padding: 1.5rem;
  text-align: center;
  color: #475569;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.knowledge-category {
  margin-bottom: 2.5rem;
  scroll-margin-top: 5rem;
}

.knowledge-category > h2 {
  margin-bottom: 0.35rem;
}

.knowledge-category > .category-subtitle {
  margin: 0 0 1.25rem;
  color: #475569;
  font-size: 0.975rem;
}

.knowledge-topic {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.knowledge-topic h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--text-heading);
}

.knowledge-topic p {
  margin: 0 0 0.65rem;
}

.knowledge-topic p:last-child {
  margin-bottom: 0;
}

.pillar-list {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.pillar-list li {
  margin-bottom: 0.45rem;
}

.pillar-list strong {
  color: var(--text-heading);
}

.detail-list {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.detail-list li {
  margin-bottom: 0.35rem;
}

.knowledge-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.knowledge-nav a {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
}

.knowledge-nav a:hover {
  background: var(--bg-section);
}

@media (max-width: 640px) {
  .hero {
    padding-top: 2rem;
  }

  table.data-table {
    font-size: 0.875rem;
  }
}
