/* edu.siwarp.si — BookAI structure + Rundown/Davide light clean */
:root {
  --bg: #FAF9F6;
  --bg-soft: #F3F1EB;
  --card: #FFFFFF;
  --text: #1A1A1A;
  --muted: #6B7280;
  --accent: #2563EB;
  --accent-hover: #1D4ED8;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --warm: #E07A3D;
  --warm-soft: rgba(224, 122, 61, 0.12);
  --border: #E8E4DC;
  --border-strong: #D6D1C7;
  --shadow: 0 1px 2px rgba(26, 26, 26, 0.04), 0 8px 24px rgba(26, 26, 26, 0.04);
  --shadow-hover: 0 4px 12px rgba(26, 26, 26, 0.06), 0 16px 40px rgba(26, 26, 26, 0.06);
  --radius: 14px;
  --radius-sm: 10px;
  --max: 1100px;
  --ease: 160ms ease;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--ease), border-color var(--ease), background var(--ease),
    opacity var(--ease), box-shadow var(--ease), transform var(--ease);
}
a:hover { color: var(--accent); }

img { max-width: 100%; display: block; }

.wrap {
  width: min(100% - 48px, var(--max));
  margin-inline: auto;
}

/* —— Nav —— */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(250, 249, 246, 0.88);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.logo {
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.03em;
  color: var(--text);
}
.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  font-size: 14px;
  color: var(--muted);
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); font-weight: 500; }

.nav-cta {
  font-size: 13px !important;
  color: var(--muted) !important;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.nav-cta:hover {
  color: var(--text) !important;
  background: var(--bg-soft);
  border-color: var(--border);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.lang-sep {
  color: var(--border-strong);
  user-select: none;
}

.lang-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 2px;
  line-height: 1;
  transition: color var(--ease);
}

.lang-btn:hover { color: var(--text); }

.lang-btn.is-active {
  color: var(--text);
  font-weight: 600;
}


/* —— Hero (Davide / Rundown light clean) —— */
.hero {
  padding: 88px 0 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% 10% auto;
  height: 420px;
  background: radial-gradient(ellipse at center, rgba(37, 99, 235, 0.07) 0%, transparent 68%);
  pointer-events: none;
  z-index: 0;
}

.hero .wrap { position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}
.hero-badge strong { color: var(--text); font-weight: 500; }

.hero h1 {
  font-size: clamp(34px, 5.2vw, 52px);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.18;
  max-width: 14em;
  margin: 0 auto 20px;
  color: var(--text);
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  font-size: 18px;
  color: var(--muted);
  max-width: 34em;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.hero-optional {
  display: block;
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
}
.hero-optional a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border-strong);
}
.hero-optional a:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--ease), color var(--ease), border-color var(--ease),
    opacity var(--ease), box-shadow var(--ease), transform var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--card);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--card);
}

.btn-sm {
  height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

/* —— Sections —— */
section { padding: 56px 0; }

.section-head {
  text-align: center;
  margin-bottom: 36px;
}

.section-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 8px;
}

.section-desc {
  font-size: 15px;
  color: var(--muted);
  max-width: 36em;
  margin: 0 auto;
}

/* —— Tool cards (BookAI-style primary entry) —— */
#tools {
  padding-top: 24px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 220px;
  position: relative;
  overflow: hidden;
}
.tool-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--tool-tint, var(--accent));
  opacity: 0.85;
}

a.tool-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-hover);
  color: var(--text);
  transform: translateY(-2px);
}

.tool-card.tint-chatgpt { --tool-tint: #10A37F; background: linear-gradient(180deg, #F3FBF8 0%, #FFFFFF 42%); }
.tool-card.tint-claude { --tool-tint: #D97757; background: linear-gradient(180deg, #FDF6F3 0%, #FFFFFF 42%); }
.tool-card.tint-grok { --tool-tint: #1A1A1A; background: linear-gradient(180deg, #F5F5F5 0%, #FFFFFF 42%); }

.tool-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}

.tool-name {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  color: var(--text);
}

.tool-blurb {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 18px;
  flex: 1;
}

.tool-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.tool-meta .row { display: flex; gap: 8px; }
.tool-meta .label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
  min-width: 2.8em;
  font-weight: 500;
}

.tool-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
}

/* —— Path cards —— */
#paths {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
  transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}

a.card:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: var(--shadow-hover);
  color: var(--text);
  transform: translateY(-2px);
}

.card-icon {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 14px;
  letter-spacing: 0.04em;
}

.card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.015em;
  color: var(--text);
}

.card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}

.card-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}

/* —— Guides —— */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.guide-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow);
  transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}

a.guide-card:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: var(--shadow-hover);
  color: var(--text);
  transform: translateY(-1px);
}

.guide-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
}

.read-time {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.guide-card h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.4;
  color: var(--text);
}

.open-note {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
}

/* —— Principles —— */
.principles {
  padding: 40px 0;
}

.principles-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  list-style: none;
}

.principles-list li {
  font-size: 14px;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 18px;
}

.principles-list strong {
  display: block;
  color: var(--text);
  font-weight: 560;
  margin-bottom: 4px;
  font-size: 14px;
}

/* —— Optional subscribe (never a gate) —— */
#subscribe {
  padding: 64px 0;
}

.subscribe-box {
  background: var(--card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 36px 32px;
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.subscribe-box .eyebrow {
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.subscribe-box h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--text);
}

.subscribe-box p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}

.subscribe-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.subscribe-form input[type="email"] {
  flex: 1 1 200px;
  max-width: 280px;
  height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  outline: none;
}
.subscribe-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.subscribe-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}

/* —— Footer CTA —— */
.footer-cta {
  padding: 72px 0 48px;
  text-align: center;
}

.footer-cta h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
  color: var(--text);
}

.footer-cta p {
  color: var(--muted);
  margin-bottom: 28px;
  font-size: 16px;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  background: var(--card);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-brand {
  font-size: 14px;
  color: var(--muted);
}
.footer-brand strong { color: var(--text); font-weight: 500; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
  font-size: 13px;
  color: var(--muted);
}

/* —— Stub pages —— */
.stub {
  padding: 100px 0 80px;
  max-width: 640px;
}
.stub.wide { max-width: 100%; }

.stub .hero-eyebrow,
.stub-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.stub h1 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
  color: var(--text);
}

.stub > p,
.stub .lead {
  color: var(--muted);
  margin-bottom: 28px;
}

.open-pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 16px;
}

/* —— Responsive —— */
@media (max-width: 900px) {
  .grid-3, .tools-grid, .principles-list { grid-template-columns: 1fr; }
  .guides-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 16px; font-size: 13px; }
  .hero { padding: 64px 0 40px; }
  .tool-card { min-height: 0; }
}

@media (max-width: 600px) {
  .wrap { width: min(100% - 32px, var(--max)); }
  .nav-links { display: none; }
  .nav-right { gap: 0; }
  .hero h1 { font-size: 30px; }
  .subscribe-box { padding: 28px 20px; }
}


/* —— Guide articles —— */
.guide-article {
  padding: 72px 0 80px;
  max-width: 720px;
}
.guide-meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 20px;
}
.guide-body h1 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin-bottom: 16px;
  color: var(--text);
}
.guide-body h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 36px 0 12px;
  color: var(--text);
}
.guide-body h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 24px 0 8px;
}
.guide-body p {
  color: var(--text);
  margin-bottom: 14px;
  font-size: 16px;
  line-height: 1.7;
}
.guide-body ul, .guide-body ol {
  margin: 0 0 16px 1.25rem;
  color: var(--text);
}
.guide-body li { margin-bottom: 6px; line-height: 1.6; }
.guide-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}
.guide-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.guide-body a:hover { color: var(--accent-hover); }
.guide-body code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--bg-soft);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.guide-pre {
  background: #1A1A1A;
  color: #E8EEF5;
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  overflow-x: auto;
  margin: 12px 0 20px;
  font-size: 13px;
  line-height: 1.55;
  border: 1px solid #2A2A2A;
}
.guide-pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}
.table-wrap {
  overflow-x: auto;
  margin: 12px 0 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
}
.guide-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.guide-body th, .guide-body td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.guide-body th {
  background: var(--bg-soft);
  font-weight: 600;
  font-size: 13px;
}
.guide-body tr:last-child td { border-bottom: none; }
.guide-back {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--muted);
}
.guide-back a { color: var(--accent); }
.guides-list {
  display: grid;
  gap: 10px;
  margin: 20px 0 28px;
  list-style: none;
}
.guides-list a {
  display: block;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
}
.guides-list a:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  color: var(--text);
}
.guides-list .g-meta {
  display: block;
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  font-family: var(--mono);
}

/* —— AdSense slots (invisible when disabled; no layout jump) —— */
.ad-slot {
  margin: 0;
  padding: 0;
  min-height: 0;
  border: none;
  background: transparent;
}
.ad-slot:empty {
  display: none;
}
.ad-slot--live {
  display: block;
  margin: 28px auto;
  max-width: var(--max, 1120px);
  width: min(100% - 48px, var(--max, 1120px));
  padding: 0;
}
.ad-slot--live.ad-slot-in-article {
  width: 100%;
  max-width: none;
  margin: 28px 0;
}
.ad-unit {
  display: block;
  text-align: center;
}
.ad-label {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--mono, ui-monospace, monospace);
}
.ad-slot--debug {
  display: block;
  margin: 20px auto;
  max-width: var(--max, 1120px);
  width: min(100% - 48px, var(--max, 1120px));
  padding: 28px 16px;
  text-align: center;
  font-size: 13px;
  color: #6b7280;
  background: #e5e7eb;
  border: 1px dashed #9ca3af;
  border-radius: 8px;
}
.guide-article .ad-slot--debug,
.guide-article .ad-slot--live {
  width: 100%;
  max-width: none;
}

/* —— Collapsible worked examples in guides —— */
.guide-example {
  margin: 12px 0 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 10px);
  background: var(--bg-soft);
  overflow: hidden;
}
.guide-example > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
}
.guide-example > summary::-webkit-details-marker { display: none; }
.guide-example > summary::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 5px solid var(--accent);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.guide-example[open] > summary::before {
  transform: rotate(90deg);
}
.guide-example > summary:hover {
  background: var(--accent-soft);
}
.guide-example-body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--border);
}
.guide-example-body > :first-child { margin-top: 12px; }
.guide-example-body p {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--text);
}
.guide-example-body ul {
  margin: 0 0 8px;
  padding-left: 1.2em;
  font-size: 14px;
  color: var(--muted);
}
.guide-example-body li { margin: 4px 0; }
.guide-example-body .guide-pre {
  margin: 8px 0 12px;
  font-size: 12.5px;
}
.guide-example-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-transform: uppercase;
  font-family: var(--mono, ui-monospace, monospace);
  margin: 10px 0 6px;
}

[hidden] { display: none !important; }

/* —— Legal pages (privacy / contact) —— */
.stub.legal { max-width: 760px; }
.legal h2 { font-size: 18px; font-weight: 600; margin: 28px 0 10px; color: var(--text); }
.legal p, .legal li { color: var(--muted); line-height: 1.7; }
.legal p { margin-bottom: 12px; }
.legal ul { padding-left: 1.2em; margin-bottom: 12px; }
.legal li { margin-bottom: 8px; }
.legal li strong { color: var(--text); }
.legal .btn { margin-top: 24px; }
.legal p a, .legal li a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
