/* ═══════════════════════════════════════════════
   time.md — Documentation + blog pages
   Extends ../style.css with the same Geist/app tokens.
   ═══════════════════════════════════════════════ */

.docs-page {
  padding-top: var(--nav-height);
  min-height: 100vh;
  background: var(--bg);
}

.docs-hero {
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at 82% 10%, color-mix(in srgb, var(--accent-muted) 72%, transparent) 0, transparent 32vw),
    var(--surface-alt);
}

.docs-hero-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 88px) 32px 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: 40px;
  align-items: end;
}

.docs-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
}

.docs-title,
.docs-hero h1 {
  max-width: 820px;
  margin-bottom: 20px;
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: clamp(-4px, -0.055em, -1.6px);
}

.docs-subtitle,
.docs-hero-inner > div > p {
  max-width: 760px;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 28px;
}

.docs-hero-card,
.docs-sidebar,
.doc-card,
.doc-callout,
.doc-step,
.doc-table-wrap,
.doc-faq details,
.doc-meta,
.docs-next a {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.docs-hero-card {
  padding: 22px;
}

.docs-hero-card h2,
.docs-sidebar-title,
.docs-sidebar > strong,
.doc-card-number,
.doc-meta span,
.docs-next a span,
.doc-table th {
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
}

.docs-hero-card h2 { margin-bottom: 14px; }
.docs-hero-card ul { list-style: none; display: grid; gap: 10px; }
.docs-hero-card li {
  position: relative;
  padding-left: 18px;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 20px;
}
.docs-hero-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.docs-shell,
.docs-layout {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 48px 32px 96px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 48px;
}

.docs-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  align-self: start;
  padding: 16px;
}

.docs-sidebar-title,
.docs-sidebar > strong {
  display: block;
  margin-bottom: 12px;
}

.docs-sidebar nav,
.docs-nav-list { display: grid; gap: 2px; }

.docs-sidebar a,
.docs-nav-list a {
  display: block;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 20px;
  transition: background-color var(--transition), color var(--transition);
}

.docs-sidebar a:hover,
.docs-sidebar a[aria-current="page"],
.docs-nav-list a:hover,
.docs-nav-list a[aria-current="page"] {
  background: var(--gray-alpha-100);
  color: var(--text-primary);
}

.docs-content { min-width: 0; }
.docs-content > *:first-child { margin-top: 0; }

.doc-section,
.docs-section {
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
}
.doc-section:last-child,
.docs-section:last-child { border-bottom: 0; }

.doc-section h2,
.docs-section h2 {
  margin-bottom: 16px;
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -1.2px;
}
.doc-section h3,
.docs-section h3 {
  margin: 28px 0 10px;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: -0.36px;
}
.doc-section h4,
.docs-section h4 {
  margin: 20px 0 8px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.doc-section p,
.doc-section li,
.docs-section p,
.docs-section li {
  color: var(--text-primary);
  font-size: 15px;
  line-height: 26px;
}
.doc-section p,
.docs-section p { margin-bottom: 12px; }
.doc-section ul,
.doc-section ol,
.docs-section ul,
.docs-section ol { margin: 10px 0 14px 22px; }
.doc-section li + li,
.docs-section li + li { margin-top: 4px; }
.doc-section a,
.docs-section a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.doc-section code,
.docs-section code,
.doc-code,
kbd {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--accent-muted);
  color: var(--text-primary);
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 18px;
}
kbd { background: var(--surface); box-shadow: inset 0 -1px 0 var(--border); }

.doc-grid,
.doc-card-grid,
.docs-screenshot-grid {
  display: grid;
  gap: 16px;
  margin: 20px 0;
}
.doc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.doc-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.docs-screenshot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.docs-screenshot-grid figure {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.docs-screenshot-grid picture,
.docs-screenshot-grid img { display: block; width: 100%; }
.docs-screenshot-grid figcaption {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
}

.doc-card,
.doc-callout,
.doc-step { padding: 20px; }
a.doc-card {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: background-color var(--transition), border-color var(--transition), transform var(--transition);
}
a.doc-card:hover { background: var(--surface-alt); border-color: var(--border-hover); transform: translateY(-1px); }
.doc-card h3,
.doc-card h4 { margin-top: 0; }
.doc-card p:last-child,
.doc-callout p:last-child,
.doc-step p:last-child { margin-bottom: 0; }
.doc-card-number { display: inline-flex; margin-bottom: 12px; color: var(--accent); }

.doc-callout {
  margin: 18px 0;
  border-color: color-mix(in srgb, var(--accent) 48%, var(--border));
  background: color-mix(in srgb, var(--accent-muted) 78%, transparent);
}
.doc-callout strong:first-child {
  display: block;
  margin-bottom: 6px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}
.doc-callout.warning {
  border-color: color-mix(in srgb, var(--warning) 52%, var(--border));
  background: color-mix(in srgb, var(--warning) 12%, var(--surface));
}
.doc-callout.danger {
  border-color: color-mix(in srgb, var(--danger) 48%, var(--border));
  background: color-mix(in srgb, var(--danger) 10%, var(--surface));
}

.doc-steps { display: grid; gap: 12px; counter-reset: docs-step; margin: 18px 0; }
.doc-step { position: relative; padding-left: 58px; }
.doc-step::before {
  counter-increment: docs-step;
  content: counter(docs-step, decimal-leading-zero);
  position: absolute;
  left: 20px;
  top: 20px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 18px;
}

.doc-table-wrap { overflow-x: auto; margin: 18px 0; padding: 0; }
.doc-table { width: 100%; min-width: 560px; border-collapse: collapse; }
.doc-table th,
.doc-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
  line-height: 22px;
}
.doc-table th { background: var(--surface-alt); }
.doc-table tr:last-child td { border-bottom: 0; }

.doc-pre {
  overflow-x: auto;
  margin: 18px 0;
  padding: 18px;
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-md);
  background: var(--dark-bg);
  color: var(--dark-text);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 22px;
}
.doc-pre code { background: transparent; border: 0; padding: 0; color: inherit; }

.doc-checklist { list-style: none !important; margin-left: 0 !important; }
.doc-checklist li { position: relative; padding-left: 28px; }
.doc-checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 600;
}

.doc-faq details { margin-bottom: 10px; overflow: hidden; }
.doc-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 18px;
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
}
.doc-faq summary::-webkit-details-marker { display: none; }
.doc-faq details[open] summary { border-bottom: 1px solid var(--border); }
.doc-faq details > div { padding: 16px 18px 18px; }

.doc-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.doc-meta { padding: 16px; }
.doc-meta span { display: block; margin-bottom: 4px; }
.doc-meta strong { display: block; font-size: 14px; line-height: 20px; }

.docs-next {
  margin-top: 42px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.docs-next a {
  min-width: 180px;
  padding: 14px 16px;
  text-decoration: none;
  transition: background-color var(--transition), border-color var(--transition), transform var(--transition);
}
.docs-next a:hover { background: var(--surface-alt); border-color: var(--border-hover); transform: translateY(-1px); }
.docs-next a span { display: block; margin-bottom: 4px; }
.docs-next a strong { display: block; color: var(--text-primary); font-size: 14px; line-height: 20px; }
.docs-next a.btn-primary { background: var(--primary); color: var(--background-100); border-color: var(--primary); }
.docs-next a.btn-outline { background: var(--background-100); color: var(--text-primary); }
.docs-next a.btn-primary:hover,
.docs-next a.btn-outline:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.btn-secondary { background: var(--background-100); color: var(--text-primary); border-color: var(--border); }
.btn-secondary:hover { background: var(--gray-alpha-100); border-color: var(--border-hover); }

.footer-content {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.footer-brand,
.footer-links { display: flex; align-items: center; gap: 16px; }
.footer-icon { width: 24px; height: 24px; border-radius: var(--radius-sm); }
.footer-brand span,
.footer-links a { color: var(--dark-text-secondary); font-size: 12px; line-height: 16px; }
.footer-links a:hover { color: var(--dark-text); }

@media (max-width: 1000px) {
  .docs-hero-inner,
  .docs-shell,
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { position: static; }
  .doc-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .docs-hero-inner,
  .docs-shell,
  .docs-layout { padding-left: 20px; padding-right: 20px; }
  .doc-grid,
  .doc-card-grid,
  .docs-screenshot-grid,
  .doc-meta-grid { grid-template-columns: 1fr; }
  .footer-content { flex-direction: column; text-align: center; }
  .footer-brand,
  .footer-links { justify-content: center; flex-wrap: wrap; }
}
