/* DecodeDevOps: Aurora theme, dark and light. No frameworks; one tiny script for the theme switch. */
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url("../fonts/Poppins-Bold.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../fonts/Inter-Regular.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("../fonts/Inter-SemiBold.woff") format("woff"); }

:root {
  --ink: #111827;
  --ink-2: #0d1320;
  --panel: #1a2333;
  --panel-2: #1e293b;
  --line: #2b3748;
  --line-2: #3b4a60;
  --text: #e5e7eb;
  --muted: #a3b0c2;
  --quiet: #7f8ea3;
  --teal: #5eead4;
  --cyan: #22d3ee;
  --violet: #a78bfa;
  --red: #f87171;
  --grad: linear-gradient(90deg, #5eead4, #22d3ee 50%, #a78bfa);
  --grad-text: var(--grad);
  --head-c: #f3f4f6;
  --body-c: #d6dce5;
  --code-c: #e2e8f0;
  --header-bg: rgba(17, 24, 39, .88);
  --dot: rgba(148, 163, 184, .09);
  --tint: rgba(94, 234, 212, .08);
  --tint-line: rgba(94, 234, 212, .25);
  --code-bg: rgba(148, 163, 184, .12);
  --shadow: 0 20px 60px rgba(0, 0, 0, .35);
  --on-grad: #0b1220;
  --term-bg: #0d1320;
  --term-line: #2b3748;
  --term-text: #a3b0c2;
  --term-head: #e5e7eb;
  --term-cyan: #22d3ee;
  color-scheme: dark;
  --radius: 14px;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --head: "Poppins", var(--sans);
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
  --wrap: 1180px;
}

/* Light theme: follows the device setting unless the reader picks one with the switch. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --ink: #f6f7f4;
    --ink-2: #eef0ec;
    --panel: #ffffff;
    --panel-2: #fbfcfa;
    --line: #e1e5e2;
    --line-2: #cdd4d0;
    --text: #1f2a37;
    --muted: #4a5566;
    --quiet: #66717f;
    --teal: #0f766e;
    --cyan: #0e7490;
    --violet: #6d28d9;
    --red: #b91c1c;
    --grad-text: linear-gradient(90deg, #0d9488, #0891b2 50%, #7c3aed);
    --head-c: #111827;
    --body-c: #283444;
    --code-c: #1f2a37;
    --header-bg: rgba(246, 247, 244, .9);
    --dot: rgba(15, 23, 42, .06);
    --tint: rgba(13, 148, 136, .07);
    --tint-line: rgba(13, 148, 136, .3);
    --code-bg: rgba(15, 23, 42, .05);
    --shadow: 0 18px 50px rgba(15, 23, 42, .14);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --ink: #f6f7f4;
  --ink-2: #eef0ec;
  --panel: #ffffff;
  --panel-2: #fbfcfa;
  --line: #e1e5e2;
  --line-2: #cdd4d0;
  --text: #1f2a37;
  --muted: #4a5566;
  --quiet: #66717f;
  --teal: #0f766e;
  --cyan: #0e7490;
  --violet: #6d28d9;
  --red: #b91c1c;
  --grad-text: linear-gradient(90deg, #0d9488, #0891b2 50%, #7c3aed);
  --head-c: #111827;
  --body-c: #283444;
  --code-c: #1f2a37;
  --header-bg: rgba(246, 247, 244, .9);
  --dot: rgba(15, 23, 42, .06);
  --tint: rgba(13, 148, 136, .07);
  --tint-line: rgba(13, 148, 136, .3);
  --code-bg: rgba(15, 23, 42, .05);
  --shadow: 0 18px 50px rgba(15, 23, 42, .14);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background-color: var(--ink);
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--text);
  font: 17px/1.7 var(--sans);
  text-rendering: optimizeLegibility;
}
body::before { content: ""; display: block; height: 4px; background: var(--grad); }
img { max-width: 100%; height: auto; }
a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--teal); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--head); line-height: 1.2; letter-spacing: -.01em; color: var(--head-c); }
h1 { font-size: clamp(2rem, 4.2vw, 3rem); margin: .2em 0 .35em; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); margin: 2em 0 .6em; }
h3 { font-size: 1.15rem; margin: 1.6em 0 .4em; }
.muted { color: var(--muted); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--cyan); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 12px; }
.grad { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { font: 600 .78rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); margin: 0 0 .9em; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 62ch; margin: 0 0 1.2em; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: var(--header-bg); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.wordmark { font: 700 1.25rem/1 var(--head); color: var(--head-c); text-decoration: none; letter-spacing: -.01em; }
.wordmark span { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.site-header nav { display: flex; align-items: center; gap: 22px; }
.header-tools { display: flex; align-items: center; gap: 22px; }
.theme-toggle { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--text); cursor: pointer; }
.theme-toggle:hover { border-color: var(--cyan); color: var(--cyan); }
.theme-toggle[hidden] { display: none; }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; } :root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-toggle .sun { display: block; } :root:not([data-theme="light"]) .theme-toggle .moon { display: none; } }
.site-header nav a { color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; }
.site-header nav a:hover { color: var(--cyan); }
.nav-cta { border: 1px solid var(--cyan); padding: 7px 14px; border-radius: 999px; color: var(--cyan) !important; }

/* Buttons and pills */
.btn { display: inline-block; font: 600 .98rem/1 var(--sans); padding: 14px 20px; border-radius: 10px; text-decoration: none; border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--grad); color: var(--on-grad); }
.btn-primary:hover { color: var(--on-grad); box-shadow: 0 6px 24px rgba(34, 211, 238, .25); }
.btn-ghost { border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }
.pill { display: inline-block; font: 600 .74rem/1 var(--sans); letter-spacing: .02em; color: var(--teal); background: var(--tint); border: 1px solid var(--tint-line); padding: 5px 9px; border-radius: 999px; text-decoration: none; }
a.pill:hover { border-color: var(--teal); }
.pill span { color: var(--quiet); margin-left: 4px; }

/* Hero */
.hero { border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 3.9rem); margin-top: 0; }
.hero h1 .grad { white-space: nowrap; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.ticket { margin: 0; background: var(--term-bg); border: 1px solid var(--term-line); border-radius: var(--radius); box-shadow: var(--shadow), 0 0 0 1px rgba(34, 211, 238, .06); overflow: hidden; transform: rotate(-1.2deg); }
.ticket-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--term-line); }
.ticket-bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); }
.ticket-bar span:nth-child(1) { background: #f87171; } .ticket-bar span:nth-child(2) { background: #fbbf24; } .ticket-bar span:nth-child(3) { background: #34d399; }
.ticket-bar b { margin-left: auto; font: 600 .75rem/1 var(--mono); color: #7f8ea3; }
.ticket pre { margin: 0; padding: 18px 20px; font: .9rem/1.7 var(--mono); color: var(--term-text); overflow-x: auto; }
.ticket .c { color: var(--term-cyan); } .ticket .r { color: #f87171; font-weight: 600; }
.ticket figcaption { padding: 14px 20px; border-top: 1px solid var(--term-line); font-size: .95rem; color: var(--term-head); }
.ticket figcaption a { color: var(--term-cyan); }

/* Sections and cards */
.section { padding-top: 56px; padding-bottom: 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 600; text-decoration: none; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card-grid.compact { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card-list { display: grid; gap: 14px; }
.post-card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; transition: border-color .15s ease, transform .15s ease; }
.post-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.post-card h3 { margin: .5em 0 .4em; font-size: 1.1rem; }
.post-card h3 a { color: var(--head-c); text-decoration: none; }
.post-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.post-card p { margin: 0; font-size: .95rem; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .82rem; color: var(--quiet); }
.read-more { margin-top: 12px !important; font-weight: 600; color: var(--cyan); font-size: .88rem !important; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-bottom: 72px; }
.pillar { border-top: 2px solid var(--line-2); padding-top: 16px; }
.pillar:first-child { border-image: var(--grad) 1; }
.pillar h3 { margin: .4em 0 .3em; }
.pillar p { margin: 0; font-size: .95rem; }
.pillar-num { font: 700 .9rem/1 var(--head); color: var(--cyan); }

/* Product cards */
.product-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.product-row.large .product-card { padding: 30px; }
.product-card { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.product-card.featured { border-color: transparent; background: linear-gradient(180deg, var(--panel-2), var(--panel)) padding-box, var(--grad) border-box; border: 1.5px solid transparent; }
.product-name { font-size: 1.2rem; margin: 0 0 .5em; }
.product-summary { color: var(--muted); font-size: .95rem; margin: 0 0 .8em; }
.ticks { list-style: none; padding: 0; margin: 0 0 1.1em; font-size: .92rem; }
.ticks li { position: relative; padding-left: 24px; margin: .35em 0; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 10px; height: 6px; border-left: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(-45deg); }
.product-card .btn { width: 100%; text-align: center; }
.price-line { margin: .8em 0 0; text-align: center; font-size: .9rem; color: var(--quiet); }

/* Content + sidebar layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; padding-top: 40px; padding-bottom: 72px; align-items: start; }
.sidebar { align-self: stretch; }
.sidebar-inner { position: sticky; top: 88px; display: grid; gap: 16px; }
.sidebar .product-card { padding: 20px; }
.sidebar .product-name { font-size: 1.05rem; }
.sidebar .product-summary, .sidebar .ticks { font-size: .88rem; }
.sidebar-note { font-size: .85rem; margin: 0; text-align: center; }
.sidebar .product-card + .product-card .ticks { display: none; }
@media (max-height: 760px) { .sidebar-inner { position: static; } }
.page-head { margin-bottom: 26px; }
.page-head.narrow, .narrow { max-width: 760px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }

/* Posts */
.post { min-width: 0; }
.crumbs { font-size: .85rem; color: var(--quiet); margin-bottom: 14px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--cyan); }
.post-head { border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 26px; }
.post-meta { font-size: .88rem; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.toc { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--cyan); border-radius: 10px; padding: 14px 18px; margin: 0 0 28px; }
.toc-title { margin: 0 0 6px; font-weight: 600; color: var(--head-c); font-size: .9rem; }
.toc ol { margin: 0; padding-left: 20px; font-size: .92rem; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--cyan); }
.prose { max-width: 72ch; }
.prose > :first-child { margin-top: 0; }
.prose h2 { padding-top: 6px; scroll-margin-top: 84px; }
.prose h3 { scroll-margin-top: 84px; }
.prose .headerlink { margin-left: 8px; color: var(--line-2); text-decoration: none; opacity: 0; transition: opacity .15s; }
.prose h2:hover .headerlink, .prose h3:hover .headerlink, .prose .headerlink:focus { opacity: 1; }
.prose p, .prose li { color: var(--body-c); }
.prose strong { color: var(--head-c); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.prose blockquote { margin: 1.4em 0; padding: 4px 18px; border-left: 3px solid var(--violet); color: var(--muted); background: rgba(167, 139, 250, .06); border-radius: 0 10px 10px 0; }
.prose code { font: .88em var(--mono); background: var(--code-bg); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; color: var(--code-c); }
.prose .highlight { margin: 1.3em 0; border: 1px solid var(--term-line); border-radius: 12px; overflow: hidden; background: #0d1117; }
.prose .highlight pre { margin: 0; padding: 16px 18px; overflow-x: auto; font: .88rem/1.65 var(--mono); color: #e6edf3; }
.prose :not(pre) > code { overflow-wrap: break-word; }
.prose .highlight code { background: none; border: 0; padding: 0; color: inherit; }
.table-wrap { overflow-x: auto; margin: 1.3em 0; border: 1px solid var(--line); border-radius: 12px; }
.prose table { border-collapse: collapse; width: 100%; font-size: .93rem; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--ink-2); color: var(--head-c); font-weight: 600; }
.prose tr:last-child td { border-bottom: 0; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.4em 0; }
.admonition { border: 1px solid var(--line-2); border-left: 3px solid var(--cyan); background: rgba(34, 211, 238, .06); border-radius: 0 12px 12px 0; padding: 12px 18px; margin: 1.4em 0; }
.admonition-title { font-weight: 600; color: var(--head-c); margin: 0 0 4px; }
.admonition.warning { border-left-color: #f59e0b; background: rgba(251, 191, 36, .06); }
.admonition.danger { border-left-color: var(--red); background: rgba(248, 113, 113, .06); }

/* FAQ (native details, no JS) */
.faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); margin: 10px 0; }
.faq summary { cursor: pointer; padding: 14px 18px; font-weight: 600; color: var(--head-c); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--cyan); font-weight: 700; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0; padding: 0 18px 16px; color: var(--muted); }

/* End-of-post call to action */
.cta-box { margin: 44px 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 28px; border-radius: var(--radius); background: linear-gradient(135deg, rgba(94, 234, 212, .10), rgba(167, 139, 250, .10)); border: 1px solid var(--line-2); }
.cta-box h2 { margin: 0 0 .3em; font-size: 1.3rem; }
.cta-box p { margin: 0; color: var(--muted); font-size: .95rem; }
.cta-box .btn { white-space: nowrap; }
.related h2 { margin-top: 2.2em; }

/* 404 */
.notfound { padding-top: 90px; padding-bottom: 110px; max-width: 760px; }
.mini-term { background: var(--term-bg); border: 1px solid var(--term-line); border-radius: 12px; padding: 16px 18px; font: .9rem/1.6 var(--mono); color: var(--term-text); overflow-x: auto; }
.mini-term .c { color: var(--term-cyan); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--ink-2); padding: 36px 0 26px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer-inner p { margin: .5em 0 0; font-size: .92rem; max-width: 42ch; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.footer-inner nav a { color: var(--muted); text-decoration: none; font-size: .92rem; }
.footer-inner nav a:hover { color: var(--cyan); }
.legal { font-size: .8rem; margin-top: 22px; }

/* Responsive */
@media (max-width: 1020px) {
  .layout { grid-template-columns: 1fr; gap: 36px; }
  .sidebar-inner { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .sidebar-note { grid-column: 1 / -1; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; padding-top: 48px; padding-bottom: 48px; }
  .ticket { transform: none; }
  .pillars, .product-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .site-header nav, .header-tools { gap: 12px; }
  .theme-toggle { width: 34px; height: 34px; }
  .site-header nav a:not(.nav-cta) { font-size: .88rem; }
  .site-header nav a[href$="/about/"] { display: none; }
  .card-grid { grid-template-columns: 1fr; }
  .cta-box { flex-direction: column; align-items: flex-start; }
  .cta-box .btn { width: 100%; text-align: center; }
}
@media (max-width: 400px) {
  .nav-cta { display: none; }
}
@media print {
  .site-header, .sidebar, .site-footer, .cta-box, .related { display: none; }
  body { background: #fff; color: #000; }
}
