/*
Theme Name: Tiny Intelligence
Theme URI: https://tiny-intelligence.ai/
Author: Codex
Description: Minimal editorial theme for tiny-intelligence.ai.
Version: 0.2.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.1
Text Domain: tiny-intelligence
*/

:root {
  --ti-bg: #f6f1e8;
  --ti-surface: #fbf7ef;
  --ti-text: #221f1a;
  --ti-muted: #5f584d;
  --ti-line: rgba(34, 31, 26, 0.16);
  --ti-strong-line: rgba(34, 31, 26, 0.3);
  --ti-accent: #8b3f1f;
  --ti-max: 1120px;
  --ti-reading: 760px;
  --ti-sans: Inter, "Helvetica Neue", Arial, sans-serif;
  --ti-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(180deg, #f8f3eb 0%, var(--ti-bg) 100%);
  color: var(--ti-text);
  font-family: var(--ti-serif);
  line-height: 1.75;
  font-size: 18px;
}
a { color: inherit; text-decoration-color: rgba(139, 63, 31, 0.45); text-underline-offset: 0.18em; }
a:hover { text-decoration-color: var(--ti-accent); }
img { max-width: 100%; height: auto; display: block; }
.site-shell { min-height: 100vh; }
.site-header { padding: 28px 24px 12px; }
.header-inner, .footer-inner, .content-shell { width: min(calc(100% - 32px), var(--ti-max)); margin: 0 auto; }
.header-band { display: grid; gap: 18px; align-items: end; border-bottom: 1px solid var(--ti-line); padding-bottom: 18px; }
@media (min-width: 900px) { .header-band { grid-template-columns: 1fr auto; } }
.branding-row { display: flex; flex-direction: column; gap: 14px; }
.site-logo img { width: min(775px, 100%); height: auto; }
.site-title { margin: 0; font-family: var(--ti-sans); font-size: 1rem; letter-spacing: 0.12em; text-transform: uppercase; }
.site-title a { text-decoration: none; }
.site-tagline { margin: 0; max-width: 56rem; color: var(--ti-muted); font-family: var(--ti-sans); font-size: 0.88rem; line-height: 1.5; letter-spacing: 0.015em; }
.header-nav { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: flex-start; }
@media (min-width: 900px) { .header-nav { justify-content: flex-end; } }
.header-nav .menu-item { list-style: none; }
.header-nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--ti-line); border-radius: 999px; background: rgba(255,255,255,0.38); font-family: var(--ti-sans); font-size: 0.83rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; }
.header-nav a:hover, .header-nav .current-menu-item > a, .header-nav .current_page_item > a, .header-nav a.current-menu-item { border-color: var(--ti-strong-line); background: rgba(139, 63, 31, 0.08); }
.content-shell { padding: 28px 0 72px; }
.home-intro, .page-shell, .post-shell { width: min(calc(100% - 32px), var(--ti-reading)); margin: 0 auto; }
.home-intro { margin-bottom: 30px; }
.home-kicker { margin: 0 0 10px; color: var(--ti-accent); font-family: var(--ti-sans); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.home-summary { margin: 0; color: var(--ti-muted); font-size: 1.05rem; }
.post-list { width: min(calc(100% - 32px), var(--ti-reading)); margin: 0 auto; display: grid; gap: 22px; }
.post-card { padding: 0 0 22px; border-bottom: 1px solid var(--ti-line); }
.post-card:last-child { border-bottom: none; }
.post-meta, .entry-meta, .page-meta { color: var(--ti-muted); font-family: var(--ti-sans); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }
.post-card h2, .entry-title, .page-title { margin: 10px 0 12px; font-family: var(--ti-serif); font-size: clamp(1.8rem, 3vw, 2.9rem); line-height: 1.12; font-weight: 700; letter-spacing: -0.02em; }
.post-card h2 { font-size: clamp(1.45rem, 2.6vw, 2.3rem); }
.post-card h2 a { text-decoration: none; }
.entry-content, .page-content, .post-excerpt { color: var(--ti-text); }
.entry-content > *:first-child, .page-content > *:first-child { margin-top: 0; }
.entry-content > *:last-child, .page-content > *:last-child { margin-bottom: 0; }
.entry-content p, .page-content p, .post-excerpt p { margin: 0 0 1.2em; }
.entry-content h2, .page-content h2 { margin: 2.2em 0 0.6em; font-size: clamp(1.5rem, 2vw, 2rem); line-height: 1.2; }
.entry-content h3, .page-content h3 { margin: 1.9em 0 0.55em; font-size: 1.25rem; line-height: 1.3; }
.entry-content ul, .entry-content ol, .page-content ul, .page-content ol { margin: 0 0 1.35em 1.35em; padding: 0; }
.entry-content li, .page-content li { margin: 0.35em 0; }
.entry-content blockquote, .page-content blockquote { margin: 1.8em 0; padding: 0.2em 0 0.2em 1.2em; border-left: 3px solid var(--ti-accent); color: var(--ti-muted); font-style: italic; }
.wp-block-image, .entry-content figure, .page-content figure { margin: 1.8em 0; }
.wp-block-button__link, .read-more-link { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.85rem 1.2rem; border-radius: 999px; border: 1px solid var(--ti-strong-line); background: rgba(255,255,255,0.55); font-family: var(--ti-sans); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; }
.pagination { width: min(calc(100% - 32px), var(--ti-reading)); margin: 18px auto 0; display: flex; justify-content: space-between; gap: 16px; font-family: var(--ti-sans); font-size: 0.84rem; letter-spacing: 0.06em; text-transform: uppercase; }
.pagination a { text-decoration: none; }
.site-footer { padding: 0 24px 40px; }
.footer-inner { border-top: 1px solid var(--ti-line); padding-top: 18px; color: var(--ti-muted); font-family: var(--ti-sans); font-size: 0.83rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

.page-shell-wide,
.hero-shell,
.section-stack {
  width: min(calc(100% - 32px), var(--ti-max));
  margin: 0 auto;
}
.hero-shell { margin-bottom: 36px; }
.hero-panel,
.feature-card,
.path-card,
.author-panel,
.entry-continue {
  border: 1px solid var(--ti-line);
  background: rgba(255, 255, 255, 0.42);
  border-radius: 26px;
  box-shadow: 0 18px 40px rgba(34, 31, 26, 0.05);
}
.hero-panel {
  padding: clamp(28px, 5vw, 54px);
  background:
    radial-gradient(circle at top right, rgba(139, 63, 31, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.78), rgba(255,255,255,0.46));
}
.hero-title {
  margin: 0 0 16px;
  max-width: 14ch;
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}
.hero-copy {
  max-width: 44rem;
  color: var(--ti-muted);
  font-size: 1.08rem;
}
.hero-actions,
.entry-continue-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
.read-more-link-secondary {
  background: transparent;
}
.section-stack {
  margin-top: 46px;
}
.section-head {
  max-width: 50rem;
  margin-bottom: 20px;
}
.section-head-inline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}
.section-label {
  margin: 0 0 10px;
  color: var(--ti-accent);
  font-family: var(--ti-sans);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.section-title {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.section-copy,
.page-lead {
  margin: 14px 0 0;
  color: var(--ti-muted);
  font-size: 1.02rem;
}
.section-link,
.text-link {
  font-family: var(--ti-sans);
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}
.card-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.feature-card,
.path-card {
  padding: 22px;
}
.feature-card h3,
.path-card h2,
.path-card h3 {
  margin: 10px 0 12px;
  font-size: 1.36rem;
  line-height: 1.2;
}
.feature-card h3 a,
.path-card h2 a,
.path-card h3 a {
  text-decoration: none;
}
.feature-card p,
.path-card p {
  color: var(--ti-muted);
  margin: 0 0 16px;
}
.author-panel {
  padding: 24px;
}
.entry-continue {
  margin-top: 34px;
  padding: 22px;
}
.meta-separator {
  margin: 0 0.45rem;
}
.page-shell .page-title,
.post-shell .entry-title {
  max-width: 18ch;
}

@media (max-width: 640px) { body { font-size: 17px; } .site-header { padding-top: 22px; } .header-nav { gap: 8px; } .header-nav a { min-height: 36px; padding: 0 11px; font-size: 0.78rem; } }
