/* neoral.cz 2026 prototype. Mobile-first, light/dark via tokens. */
:root {
  --bg: #f4f7fb; --surface: #ffffff; --surface-2: #e8eff7; --text: #14202e; --muted: #4b5a6c;
  --line: #d3deea; --accent: #2f5f9a; --accent-ink: #ffffff; --link: #2a5890;
  --pbi: #8a5900; --pbi-bg: #fbefd6; --fab: #0a6650; --fab-bg: #d9f1ea; --ai: #5b45c9; --ai-bg: #e8e3fb;
  --leg: #585c63; --leg-bg: #eceae4; --warn-bg: #fff4dc; --warn-line: #e6c36a;
  --radius: 14px; --shadow: 0 1px 2px rgb(0 0 0 / .04), 0 4px 16px rgb(0 0 0 / .05);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1522; --surface: #132031; --surface-2: #1a2b40; --text: #e6edf5; --muted: #9fb2c6;
    --line: #23374d; --accent: #8ab6e6; --accent-ink: #0b1726; --link: #93bdea;
    --pbi: #f2c14e; --pbi-bg: #3a2f14; --fab: #5fd3b4; --fab-bg: #143229; --ai: #b3a3ff; --ai-bg: #2a2445;
    --leg: #a6a9ae; --leg-bg: #2a2d32; --warn-bg: #2f2814; --warn-line: #7a6424;
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c1522; --surface: #132031; --surface-2: #1a2b40; --text: #e6edf5; --muted: #9fb2c6;
  --line: #23374d; --accent: #8ab6e6; --accent-ink: #0b1726; --link: #93bdea;
  --pbi: #f2c14e; --pbi-bg: #3a2f14; --fab: #5fd3b4; --fab-bg: #143229; --ai: #b3a3ff; --ai-bg: #2a2445;
  --leg: #a6a9ae; --leg-bg: #2a2d32; --warn-bg: #2f2814; --warn-line: #7a6424;
  --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 var(--font); overflow-x: hidden; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.8rem, 6vw, 2.8rem); }
h2 { font-size: clamp(1.25rem, 4vw, 1.6rem); }
.dim { color: var(--muted); }
.small { font-size: .875rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); }
.wrap-narrow { max-width: 740px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); }
main { padding-bottom: 48px; }
section { margin-top: 40px; }

.proto { background: var(--warn-bg); border-bottom: 1px solid var(--warn-line); font-size: .8rem; text-align: center; padding: 6px 16px; }

/* header */
.top { background: var(--bg); position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.top-in { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); display: flex; align-items: center; gap: 8px; min-height: 56px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; margin-right: auto; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-size: .95rem; }
.nav { display: flex; gap: 2px; }
.nav a { min-height: 44px; display: inline-flex; align-items: center; color: var(--text); text-decoration: none; padding: 8px 9px; border-radius: 8px; font-size: .95rem; white-space: nowrap; }
.nav a[aria-current="page"], .nav a:hover { background: var(--surface-2); }
.tools { display: flex; gap: 2px; }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--text); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }
@media (max-width: 420px) { .top-in { gap: 2px; } .nav a { padding: 8px 5px; font-size: .9rem; } .brand { gap: 6px; } .brand .dim { display: none; } }
@media (max-width: 340px) { .brand > span:last-child { display: none; } }

/* hero */
.hero { padding-top: 40px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--accent); margin: 0 0 .5em; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 62ch; margin: 0 0 1em; }
.hero-search { display: flex; gap: 8px; max-width: 560px; margin-top: 16px; }
.hero-search input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.hero-search button, .btn { font: inherit; font-weight: 600; padding: 12px 16px; border-radius: 12px; border: 0; background: var(--accent); color: var(--accent-ink); cursor: pointer; }

/* featured series */
.feature-in { background: var(--surface); border-radius: calc(var(--radius) + 6px); padding: 24px 20px; border: 1px solid var(--line); }
.feature h2 a { color: var(--text); text-decoration: none; }
.feature p { max-width: 70ch; }
.feature-parts, .series-list { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 8px; }
.feature-parts li, .series-list li { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 12px; padding: 10px 12px; border: 1px solid var(--line); }
.num { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); font-weight: 700; font-size: .85rem; }
.pt { flex: 1; min-width: 0; }
.badge { flex: none; font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 99px; white-space: nowrap; }
.badge-live { background: var(--fab-bg); color: var(--fab); }
.badge-plan { background: var(--surface-2); color: var(--muted); }
.series-list .is-live .num { background: var(--accent); color: var(--accent-ink); }
.more { font-weight: 600; text-decoration: none; }
@media (max-width: 480px) {
  .feature-parts li { flex-wrap: wrap; }
  .feature-parts .pt { flex: 1 1 calc(100% - 44px); }
  .feature-parts .badge { margin: -4px 0 0 40px; }
  .proto { font-size: .72rem; padding: 4px 12px; }
}

/* cards */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-head h2 { margin: 0; }
.sec-head h2 a { color: var(--text); text-decoration: none; }
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card-img { display: block; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; aspect-ratio: 16 / 9; }
.card-title a::after { content: ""; position: absolute; inset: 0; }
.card .pill, .card .meta a { position: relative; z-index: 1; }
.card-body { padding: 14px 16px 16px; }
.card-title { font-size: 1.08rem; margin: 6px 0 6px; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a:hover { color: var(--accent); }
.card-ex { color: var(--muted); font-size: .95rem; margin: 0; }
.lead-card { margin-bottom: 16px; }
@media (min-width: 760px) {
  .lead-card .card { flex-direction: row; }
  .lead-card .card-img { flex: 0 0 52%; aspect-ratio: auto; min-height: 260px; }
  .lead-card .card-body { padding: 24px; align-self: center; }
  .lead-card .card-title { font-size: 1.5rem; }
}
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .85rem; color: var(--muted); }

/* pills, chips, tiles */
.pill { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; text-decoration: none; background: var(--surface-2); color: var(--text); }
.pill-power-bi { background: var(--pbi-bg); color: var(--pbi); }
.pill-microsoft-fabric { background: var(--fab-bg); color: var(--fab); }
.pill-ai-foundry { background: var(--ai-bg); color: var(--ai); }
.pill-legacy { background: var(--leg-bg); color: var(--leg); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chip { display: inline-flex; gap: 6px; align-items: center; min-height: 44px; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; font-size: .9rem; }
.chip:hover { border-color: var(--accent); }
.topic-tiles { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .topic-tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .topic-tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: var(--radius); text-decoration: none; color: var(--text); border: 1px solid var(--line); background: var(--surface); }
.tile-name { font-weight: 800; font-size: 1.15rem; }
.tile-count { font-size: .85rem; font-weight: 600; }
.tile-blurb { font-size: .9rem; color: var(--muted); }
.tile-power-bi { border-top: 4px solid var(--pbi); } .tile-power-bi .tile-count { color: var(--pbi); }
.tile-microsoft-fabric { border-top: 4px solid var(--fab); } .tile-microsoft-fabric .tile-count { color: var(--fab); }
.tile-ai-foundry { border-top: 4px solid var(--ai); } .tile-ai-foundry .tile-count { color: var(--ai); }
.tile-legacy { border-top: 4px solid var(--leg); } .tile-legacy .tile-count { color: var(--leg); }

/* lists */
.page-head { padding-top: 28px; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 10px; padding-top: 16px; }
.crumbs a { color: var(--muted); display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; margin: -12px 0; }
.list { list-style: none; padding: 0; margin: 0 0 16px; }
.list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.list li a { font-weight: 600; text-decoration: none; color: var(--text); }
.list li a:hover { color: var(--accent); }
.list .dim { font-size: .85rem; display: block; }
.year { margin-top: 28px; font-size: 1.15rem; }
.archive summary { cursor: pointer; font-weight: 700; padding: 12px 14px; background: var(--surface-2); border-radius: 12px; list-style-position: inside; }
.archive[open] summary { margin-bottom: 8px; }
.topic-block { margin-top: 32px; }

/* article */
.post-head { padding-top: 20px; }
.post-head h1 { font-size: clamp(1.7rem, 6vw, 2.5rem); }
.post-head .meta { margin-bottom: 8px; }
.byline { font-size: .9rem; color: var(--muted); }
.post-head .pill { min-height: 44px; display: inline-flex; align-items: center; padding: 6px 12px; font-size: .9rem; }
.note { border-radius: 12px; padding: 12px 14px; margin: 16px 0; font-size: .95rem; border: 1px solid var(--line); background: var(--surface); }
.note-legacy { background: var(--warn-bg); border-color: var(--warn-line); }
.note-series { background: var(--ai-bg); border-color: transparent; }
.note-draft { border-style: dashed; color: var(--muted); }
.prose { font-size: 1.06rem; line-height: 1.7; overflow-wrap: break-word; }
.prose a, .prose code { overflow-wrap: anywhere; }
.prose > * { max-width: 100%; }
.prose h2, .prose h3, .prose b:only-child { margin-top: 1.6em; }
.prose img { border-radius: 8px; display: inline-block; }
.prose .center { text-align: center; }
.prose .separator a { margin: 0 !important; }
.prose pre, .prose code { font-family: var(--mono); font-size: .9em; }
.prose pre { background: var(--surface-2); padding: 14px; border-radius: 10px; overflow-x: auto; white-space: pre; overflow-wrap: normal; }
.prose code { background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { margin: 1em 0; padding: 4px 16px; border-left: 4px solid var(--accent); color: var(--muted); }
.prose iframe { max-width: 100%; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1em 0; }
.prose table { border-collapse: collapse; font-size: .92rem; min-width: 100%; width: auto !important; }
.prose th, .prose td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
.post-foot { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .85rem; }
.post-foot code { overflow-wrap: anywhere; }

/* about */
.facts { display: grid; gap: 10px; grid-template-columns: 1fr; margin: 20px 0; }
@media (min-width: 600px) { .facts { grid-template-columns: repeat(2, 1fr); } }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; }
.fact-k { font-weight: 800; }
.fact-v { color: var(--muted); font-size: .92rem; }

/* search */
.toggle { display: inline-flex; gap: 8px; align-items: center; margin-top: 12px; min-height: 44px; }
.toggle input { width: 20px; height: 20px; }
.results { list-style: none; padding: 0; }
.results li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.results a { font-weight: 700; text-decoration: none; color: var(--text); font-size: 1.05rem; }
.results p { margin: 4px 0 0; color: var(--muted); font-size: .95rem; }
.results mark { background: var(--surface-2); background: color-mix(in srgb, var(--accent) 22%, var(--bg)); color: var(--text); border-radius: 3px; }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 24px 0 calc(24px + env(safe-area-inset-bottom)); font-size: .9rem; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.foot nav a { min-height: 44px; display: inline-flex; align-items: center; }

/* Cookie consent banner (production build only) */
.consent { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 20; max-width: 640px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 30px rgba(0,0,0,.18); padding: 14px 16px; font-size: .92rem; }
.consent[hidden] { display: none; }
.consent p { margin: 0 0 12px; }
.consent-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.consent-btns .btn { flex: 1 1 140px; min-height: 44px; }
.consent-btns .btn, .consent-btns .btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--text); font-weight: 600; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
mark.verify { background: #fff1b8; color: #4a3b00; padding: 1px 6px; border-radius: 6px; font-size: .85em; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) mark.verify { background: #4a3b00; color: #ffe9a0; } }
:root[data-theme="dark"] mark.verify { background: #4a3b00; color: #ffe9a0; }

/* Contact form */
.cform { display: grid; gap: 14px; margin: 20px 0; }
.cform label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.cform input[type=text], .cform input[type=email], .cform select, .cform textarea { font: inherit; font-size: 16px; font-weight: 400; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); width: 100%; box-sizing: border-box; }
.cform textarea { min-height: 140px; resize: vertical; }
.cform .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.cform .check input { width: 22px; height: 22px; margin-top: 2px; flex: none; }
.cform .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.cform .btn { justify-self: start; min-height: 44px; }
.cform-msg { border-radius: 12px; padding: 12px 14px; border: 1px solid var(--line); background: var(--surface); }

/* author photo */
.avatar { border-radius: 50%; object-fit: cover; background: var(--surface-2); display: block; flex: none; }
.avatar-lg { width: 120px; height: 120px; }
.about-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.author-box { display: flex; align-items: center; gap: 14px; margin: 32px 0 8px; padding: 14px 16px; border: 1px solid rgba(128,128,128,.35); border-radius: 12px; }
.author-box .avatar { width: 64px; height: 64px; }
@media (max-width: 480px) { .avatar-lg { width: 96px; height: 96px; } .about-head { gap: 14px; } }
.cform-msg.is-ok { border: 2px solid #2f7d4f; background: var(--surface); background: color-mix(in srgb, #2f7d4f 10%, var(--surface)); }
.cform-msg.is-err { border: 2px solid #b3261e; background: var(--surface); background: color-mix(in srgb, #b3261e 10%, var(--surface)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cform-msg.is-ok { border-color: #5fbf84; } :root:not([data-theme="light"]) .cform-msg.is-err { border-color: #ff8a80; } }
:root[data-theme="dark"] .cform-msg.is-ok { border-color: #5fbf84; }
:root[data-theme="dark"] .cform-msg.is-err { border-color: #ff8a80; }
.cform .check { min-height: 44px; }
@media (max-width: 480px) { .cform .btn { justify-self: stretch; } }
.cform .btn[aria-busy="true"] { opacity: .6; cursor: progress; }
.talks { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 8px; }
.talks li { line-height: 1.45; }
.talk-t { font-weight: 600; }
.talk-t a { text-decoration-thickness: 1px; }
.talks-sec h2 { margin-top: 32px; }
.talk-year { font-size: 1.05rem; font-weight: 700; color: var(--text); margin: 20px 0 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.talks-older { margin-top: 14px; }
.talks-older summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
[id] { scroll-margin-top: calc(72px + env(safe-area-inset-top)); } /* anchors land below the sticky header */
.scheme-pick { position: fixed; left: 12px; bottom: 12px; z-index: 50; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; font-size: .85rem; box-shadow: var(--shadow); }
.scheme-pick select { font: inherit; font-size: 16px; margin-left: 6px; }

/* v2 UX additions */
@media (max-width: 359px) { .nav a { padding: 8px 4px; font-size: .85rem; } .icon-btn { width: 40px; } .brand-mark { width: 26px; height: 26px; } }
.hero-eyebrow { display: flex; align-items: center; gap: 12px; }
.avatar-sm { width: 48px; height: 48px; }
.byline-home { margin: -.4em 0 1.2em; font-size: .95rem; color: var(--muted); }
.hero-search { margin-bottom: 8px; }
section.wrap + section.wrap { margin-top: 40px; } /* .wrap resets margin, so sibling sections need their own gap */
.author-cta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0 0; font-size: .9rem; }
.author-cta a { display: inline-flex; align-items: center; min-height: 44px; }
.author-box { flex-wrap: wrap; }
.story { font-size: 1.12rem; }
/* Home hero: cockpit photo band (one image, one sentence). Mobile: text below the photo; desktop: text over the sky. */
.sky { margin: 8px 0 20px; }
.sky-img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: calc(var(--radius) + 6px); background: #5d90cb; }
.sky-text { padding-top: 18px; }
.sky-tag { font-size: 1.1rem; font-weight: 600; color: var(--accent); margin: 8px 0 0; }
@media (min-width: 720px) {
  .sky { position: relative; }
  .sky-img { aspect-ratio: 3 / 1; }
  .sky-text { position: absolute; inset: 0 0 0 38%; padding: 28px 32px; display: flex; flex-direction: column; justify-content: center; color: #fff;
    border-radius: 0 calc(var(--radius) + 6px) calc(var(--radius) + 6px) 0; background: #0a182c; background: linear-gradient(90deg, rgb(10 24 44 / 0) 0%, rgb(10 24 44 / .7) 22%, rgb(10 24 44 / .78) 100%); }
  .sky-text h1 { color: #fff; margin: 4px 0 0; text-shadow: 0 1px 12px rgb(0 0 0 / .35); }
  .sky-text .eyebrow { color: #fff; }
  .sky-tag { color: #fff; font-weight: 600; text-shadow: 0 1px 8px rgb(0 0 0 / .45); }
}
@media (max-width: 719px) { .hero .lead, .hero .byline-home, .hero-eyebrow .avatar { display: none; } } /* keep the first articles close on phones */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sky-img { filter: brightness(.85) saturate(.95); } }
:root[data-theme="dark"] .sky-img { filter: brightness(.85) saturate(.95); }
