/* Ledger: shared light design system for codylabs.uk.
   Fonts are self-hosted (see /fonts/OFL.txt). No third-party requests. */

@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --paper: #F6F5F1;
  --sheet: #FFFFFF;
  --rule: #DAD8D1;
  --rule-soft: #ECEAE4;
  --header-cell: #F0EFEA;
  --ink: #16181D;
  --ink-2: #3B4049;
  --graphite: #5B616C;
  --blue: #1F4FD1;
  --blue-hover: #173C9F;
  --live: #1C6B3C;
  --live-bg: #E2F0E6;
  --soon: #8A5300;
  --soon-bg: #FAEFD8;
  --fix: #A33A1F;
  --fix-bg: #FDF1EE;
  --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
}
h1, h2, h3, p, figure, ul, table { margin: 0; padding: 0; }
ul { list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-hover); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
[hidden] { display: none !important; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }

/* Type */
.display { font-size: clamp(2.4rem, 6vw, 3.5rem); line-height: 1.08; font-weight: 600; letter-spacing: -0.025em; }
h2, .h2 { font-size: clamp(1.75rem, 4vw, 2.25rem); line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; }
h3, .h3 { font-size: 20px; line-height: 1.3; font-weight: 600; }
.lead { font-size: 19px; line-height: 1.55; color: var(--ink-2); }
.label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--graphite);
  font-weight: 400;
}
.mono { font-family: var(--font-mono); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 6px;
  border: 1px solid transparent;
  font: 500 16px/1 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
}
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-2); color: #fff; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-hover); color: #fff; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }

/* Status pill */
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-live { color: var(--live); background: var(--live-bg); }
.status-soon { color: var(--soon); background: var(--soon-bg); }
.status-fix { color: var(--fix); background: var(--fix-bg); }

/* Platform chip */
.chip {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  font: 400 13px/1.5 var(--font-mono);
  color: var(--ink-2);
  white-space: nowrap;
}

/* Step component */
.step { border-top: 2px solid var(--ink); padding-top: 16px; }
.step-num { font: 500 13px/1 var(--font-mono); color: var(--graphite); letter-spacing: 0.04em; }
.step h3 { margin: 12px 0 8px; }
.step p { color: var(--ink-2); }

/* ---- Homepage (namespaced) ---- */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .container { display: flex; align-items: center; gap: 32px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 18px; }
.brand:hover { color: var(--ink); }
.brand svg { width: 32px; height: 32px; }
.site-nav { display: flex; gap: 8px; flex: 1; }
.site-nav a { color: var(--ink-2); text-decoration: none; padding: 10px 12px; border-radius: 6px; font-weight: 500; }
.site-nav a:hover { color: var(--ink); background: var(--rule-soft); }
.header-mail { font: 400 14px/1 var(--font-mono); color: var(--ink-2); text-decoration: none; }
.header-mail:hover { color: var(--ink); text-decoration: underline; }

.home-hero { padding: 80px 0 96px; }
.home-hero .container { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.home-hero .display { margin: 16px 0 24px; }
.home-hero .lead { max-width: 560px; }
.home-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.preview { background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; box-shadow: 0 1px 0 var(--rule), 0 12px 32px rgba(22, 24, 29, 0.06); overflow-x: auto; }
.preview-bar { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--rule); background: var(--header-cell); font-weight: 600; font-size: 15px; }
.preview-bar .mono { font-weight: 400; font-size: 13px; color: var(--graphite); white-space: nowrap; }
.preview table { width: 100%; min-width: 440px; border-collapse: collapse; font: 400 13px/1.4 var(--font-mono); }
.preview th, .preview td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--rule-soft); white-space: nowrap; }
.preview th { background: var(--header-cell); color: var(--graphite); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
.preview th:first-child, .preview td:first-child { width: 40px; color: var(--graphite); text-align: right; }
.preview .ready { color: var(--live); }
.preview tr.fix td { background: var(--fix-bg); color: var(--fix); }
.preview figcaption { padding: 14px 16px; font-size: 14px; color: var(--ink-2); }

.facts { background: var(--sheet); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.facts ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.facts li { padding: 32px 32px 32px 0; }
.facts li + li { padding-left: 32px; border-left: 1px solid var(--rule); }
.facts h3 { font-size: 17px; margin-bottom: 6px; }
.facts p { color: var(--ink-2); font-size: 15px; }

.directory-head { margin-bottom: 32px; }
.directory-head p { color: var(--ink-2); margin-top: 8px; font-size: 17px; }
.task-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.task-filter button {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 16px;
  background: var(--sheet); color: var(--ink);
  border: 1px solid var(--rule); border-radius: 6px;
  font: 500 15px/1 var(--font-sans); cursor: pointer;
}
.task-filter button:hover { border-color: var(--ink); }
.task-filter button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.task-filter .count { font: 400 13px/1 var(--font-mono); opacity: 0.8; }
.result-count { font-size: 14px; color: var(--graphite); margin-bottom: 16px; min-height: 1.6em; }
html:not(.js) .task-filter { display: none; }

.table-panel { background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; overflow-x: auto; }
.directory { width: 100%; min-width: 880px; border-collapse: collapse; text-align: left; }
.directory th { background: var(--header-cell); border-bottom: 1px solid var(--rule); padding: 12px 20px; font: 400 13px/1.4 var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--graphite); }
.directory td { padding: 18px 20px; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
.directory tr:last-child td { border-bottom: 0; }
.directory .p-name { font-weight: 600; color: var(--ink); text-decoration: none; }
.directory .p-name:hover { text-decoration: underline; color: var(--ink); }
.directory .p-desc { color: var(--graphite); font-size: 14px; line-height: 1.5; margin-top: 4px; max-width: 520px; }
.directory .p-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 14px; }
.directory .p-price { color: var(--ink-2); font-size: 14px; white-space: nowrap; }

.how-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 40px; }

.ink-band { background: var(--ink); color: #E9EAEC; padding: 96px 0; }
.ink-band .label { color: #B4B9C2; }
.ink-band h2 { color: #fff; margin: 12px 0 16px; }
.ink-band p { max-width: 640px; color: #D5D8DE; font-size: 18px; }
.ink-band .home-actions .btn-light { background: var(--paper); color: var(--ink); }
.ink-band .home-actions .btn-light:hover { background: #fff; color: var(--ink); }
.ink-band .home-actions .btn-ghost { color: var(--paper); border-color: var(--graphite); }
.ink-band .home-actions .btn-ghost:hover { background: var(--ink-2); color: #fff; }
.ink-band :focus-visible { outline-color: #8FB0FF; }

.site-footer { padding: 32px 0 48px; font-size: 14px; color: var(--graphite); }
.site-footer a { color: var(--ink-2); }
.site-footer a:hover { color: var(--ink); }

@media (max-width: 900px) {
  .section { padding: 64px 0; }
  .site-header .container { flex-wrap: wrap; gap: 8px 24px; padding-top: 12px; padding-bottom: 12px; }
  .site-header .header-mail { margin-left: auto; }
  .site-nav { display: flex; order: 3; flex-basis: 100%; flex-wrap: wrap; gap: 0 4px; }
  .site-nav .nav-extra { display: none; }
  .home-hero { padding: 48px 0 64px; }
  .home-hero .container { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .facts ul { grid-template-columns: minmax(0, 1fr); }
  .facts li, .facts li + li { padding: 24px 0; border-left: 0; }
  .facts li + li { border-top: 1px solid var(--rule); }
  .how-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .ink-band { padding: 64px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- Product page components (namespaced .pp-, reused by every product page) ---- */
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.site-header .nav-install { margin-left: auto; }
.pp-actions .btn { height: auto; min-height: 48px; padding: 14px 22px; line-height: 1.25; text-align: center; }

.crumbs { font-size: 14px; color: var(--graphite); margin-bottom: 48px; }
.crumbs a { color: var(--graphite); }
.crumbs a:hover { color: var(--ink); }

.pp-hero { padding: 32px 0 72px; }
.pp-hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.pp-hero-copy { display: flex; flex-direction: column; gap: 22px; }
.pp-hero-copy .display { margin: 0; }
.pp-hero-copy .lead { max-width: 600px; margin: 0; font-size: 20px; }
.pp-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pp-tags .chip { background: var(--sheet); }
.pp-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

.spec { margin: 0; background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; font-size: 15px; }
.spec > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--rule-soft); }
.spec > div:last-child { border-bottom: 0; }
.spec dt { font: 400 13px/1.6 var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--graphite); padding-top: 2px; }
.spec dd { margin: 0; overflow-wrap: anywhere; }

.pp-band { background: var(--sheet); border-top: 1px solid var(--rule); }
.pp-section { padding: 88px 0; }
.pp-section h2 { margin-bottom: 24px; }
.pp-section .pp-intro { color: var(--ink-2); max-width: 760px; margin-bottom: 32px; }
.pp-section .pp-note { color: var(--graphite); font-size: 15px; margin-top: 20px; max-width: 760px; }
.pp-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin-top: 16px; }
.pp-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 16px; }
.pp-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 64px; }
.pp-split h2 { margin-bottom: 0; }

.pp-panel { background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; padding: 12px; }
.pp-shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.pp-shots img { width: 100%; height: auto; }

.pp-steps { list-style: none; margin: 0; padding: 0; }
.pp-steps li { display: grid; grid-template-columns: 56px minmax(0, 1fr); padding: 20px 0; border-top: 1px solid var(--rule); }
.pp-steps li:last-child { border-bottom: 1px solid var(--rule); }
.pp-steps .step-num { padding-top: 5px; }

.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.plan { border: 1px solid var(--rule); border-radius: 8px; padding: 32px; display: flex; flex-direction: column; gap: 16px; background: var(--paper); }
.plan-pro { border: 2px solid var(--ink); padding: 31px; background: var(--sheet); }
.plan-name { font-size: 20px; font-weight: 600; line-height: 1.3; }
.plan-price { font-size: 40px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.plan-price small { font-size: 17px; font-weight: 400; color: var(--graphite); letter-spacing: 0; }
.plan ul { color: var(--ink-2); display: flex; flex-direction: column; gap: 6px; }
.plan ul li::before { content: "\2022"; color: var(--graphite); margin-right: 10px; }
.plan .btn { margin-top: auto; }

.faq details { border-top: 1px solid var(--rule); padding: 20px 0; }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; }
.faq summary h3 { display: inline; font-size: 18px; }
.faq details p { margin-top: 12px; color: var(--ink-2); }

.pp-links li { padding: 12px 0; border-top: 1px solid var(--rule); }
.pp-links li:last-child { border-bottom: 1px solid var(--rule); }

.pp-related { border-top: 1px solid var(--rule); }
.pp-related .container { padding-top: 48px; padding-bottom: 48px; display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
.pp-related .label { margin-bottom: 6px; }
.pp-related .related-name { font-size: 20px; font-weight: 600; }

.site-footer .footer-row { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer .footer-legal { margin-top: 16px; font-size: 13px; max-width: 760px; }

/* ---- Contribution heatmap demo (azure-commit-graph/demo.js) ---- */
.demo { background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; padding: 28px; overflow: hidden; }
.demo-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.demo-toolbar strong { font-weight: 600; }
.demo-toolbar label { font-size: 14px; font-weight: 600; }
.demo-toolbar select { margin-left: 8px; min-height: 40px; padding: 0 10px; border: 1px solid var(--rule); border-radius: 6px; background: var(--sheet); color: var(--ink); font: inherit; }
.demo-scroll { overflow-x: auto; padding-bottom: 8px; }
.demo-graph { display: grid; grid-template-rows: repeat(7, 12px); grid-auto-columns: 12px; grid-auto-flow: column; gap: 3px; min-width: 792px; }
.demo-day { width: 12px; height: 12px; padding: 0; border: 0; border-radius: 2px; background: #ECEAE4; cursor: pointer; }
.demo-day.level-1 { background: #C9D6F7; }
.demo-day.level-2 { background: #8BA6EC; }
.demo-day.level-3 { background: #4C72DD; }
.demo-day.level-4 { background: #1F4FD1; }
.demo-day:focus-visible { outline: 3px solid var(--ink); outline-offset: 1px; }
.demo-tooltip { position: fixed; display: none; pointer-events: none; z-index: 1000; padding: 6px 10px; border-radius: 4px; background: var(--ink); color: #fff; font-size: 13px; white-space: nowrap; box-shadow: 0 2px 8px rgba(22, 24, 29, 0.3); }
.demo-stats { margin: 14px 0 0; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.demo-note { margin: 8px 0 0; color: var(--graphite); font-size: 14px; }
.demo-legend { display: flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 13px; color: var(--graphite); }
.demo-legend span { width: 12px; height: 12px; border-radius: 2px; }

@media (max-width: 900px) {
  .pp-hero { padding: 24px 0 48px; }
  .pp-hero-grid, .pp-split, .pp-grid-4, .pp-grid-3, .plans, .pp-shots { grid-template-columns: minmax(0, 1fr); }
  .pp-hero-grid { gap: 40px; }
  .pp-hero-copy .lead { font-size: 18px; }
  .pp-split { gap: 24px; }
  .pp-grid-4, .pp-grid-3 { gap: 28px; }
  .pp-section { padding: 56px 0; }
  .crumbs { margin-bottom: 32px; }
}
@media (max-width: 640px) {
  .demo-toolbar { align-items: flex-start; flex-direction: column; }
  .spec > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .demo, .plan { padding: 20px; }
  .plan-pro { padding: 19px; }
}
