/* techbard labs — soft dark, Solarized base (+1)
   Single stylesheet. Design is fixed; content lives in content/*.json and content/guides/*.md
   Palette: Solarized hue family (base03/cyan), lifted one step off pure black so
   the page reads as a soft dark rather than a void. */

:root {
  --bg: #053a46;
  --bg-soft: #0a4653;
  --surface: #0c4b57;
  --line: #166270;
  --line-soft: #115360;
  --fg: #f0ebd9;
  --fg-dim: #a8bcc0;
  --fg-faint: #78989e;
  --accent: #30b3a8;
  --accent-dim: #217a73;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: "Pretendard", "Pretendard Variable", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Malgun Gothic", "Apple SD Gothic Neo", Roboto, sans-serif;
  --max: 60rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code, kbd, pre, .mono { font-family: var(--mono); }

::selection { background: var(--accent-dim); color: var(--fg); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }

/* ---------- header ---------- */

.site-head {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: saturate(140%) blur(8px);
}

.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 3.25rem;
}

.brand {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  color: var(--fg);
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
}
.brand:hover { color: var(--accent); text-decoration: none; border-bottom-color: var(--accent-dim); }
.brand::before { content: "← "; color: var(--fg-faint); font-family: var(--mono); font-weight: 400; }
.brand:hover::before { color: var(--accent); }

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  font-size: 0.85rem;
}

.site-nav a { color: var(--fg-dim); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--fg); }

.lang-toggle { display: flex; gap: 0.35rem; font-family: var(--mono); font-size: 0.78rem; margin-left: auto; padding-left: 1.5rem; }
.lang-toggle button {
  font: inherit;
  color: var(--fg-faint);
  background: none;
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 0.1rem 0.35rem;
  cursor: pointer;
}
.lang-toggle button[aria-pressed="true"] { color: var(--accent); border-color: var(--line); }
.lang-toggle button:hover { color: var(--fg); }
/* a listed but switched-off language: visible, struck through, not clickable */
.lang-toggle button.is-off,
.lang-toggle button:disabled {
  color: var(--fg-faint);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  cursor: not-allowed;
  opacity: 0.75;
}
.lang-toggle button.is-off:hover,
.lang-toggle button:disabled:hover { color: var(--fg-faint); }

/* ---------- hero ---------- */

.hero { padding: 3rem 0 2.5rem; border-bottom: 1px solid var(--line); }
.hero h1 {
  font-size: 1.6rem;
  line-height: 1.3;
  margin: 0 0 0.6rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.hero p { margin: 0; color: var(--fg-dim); max-width: 46rem; }

.hero-meta {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.6rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--fg-faint);
}
.hero-meta b { color: var(--fg-dim); font-weight: 500; }

/* ---------- sections ---------- */

section { padding: 2.25rem 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: 0; }

.sec-head {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}
.sec-head h2 {
  font-size: 0.95rem;
  font-family: var(--mono);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg);
  margin: 0;
}
.sec-head .count { font-family: var(--mono); font-size: 0.8rem; color: var(--fg-faint); }
.sec-head .spacer { margin-left: auto; }

/* ---------- program list ---------- */

.programs { border-top: 1px solid var(--line); }

.program {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1.5rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line-soft);
  align-items: baseline;
}
.program:hover { background: var(--bg-soft); }

.program-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
  grid-column: 1;
}
.program-name:hover { color: var(--accent); text-decoration: none; }

.program-tagline { grid-column: 1; color: var(--fg-dim); font-size: 0.9rem; }

.program-meta {
  grid-column: 1;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--fg-faint);
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.9rem;
}
.program-meta .ver { color: var(--accent); }

.program-actions { grid-column: 2; grid-row: 1 / span 3; align-self: center; display: flex; gap: 0.5rem; }

@media (max-width: 40rem) {
  .program { grid-template-columns: 1fr; }
  .program-actions { grid-column: 1; grid-row: auto; margin-top: 0.6rem; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--fg-dim);
  background: var(--surface);
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { border-color: var(--accent-dim); color: var(--fg); text-decoration: none; }
.btn-primary { color: #052b34; border-color: var(--accent); background: var(--accent); }
.btn-primary:hover { background: #46c7ba; border-color: #46c7ba; color: #052b34; }

/* ---------- changelog ---------- */

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0 1.25rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.9rem;
}
.timeline li:last-child { border-bottom: 0; }
.timeline .when { font-family: var(--mono); font-size: 0.78rem; color: var(--fg-faint); padding-top: 0.1rem; }
.timeline .what { display: block; min-width: 0; }
.timeline .what .prog { color: var(--fg); font-weight: 600; }
.timeline .what .ver { font-family: var(--mono); font-size: 0.78rem; color: var(--accent); font-weight: 500; }
.timeline .tnote { display: block; color: var(--fg-dim); font-size: 0.88rem; }

@media (max-width: 40rem) {
  .timeline li { grid-template-columns: 1fr; gap: 0.2rem; }
}

/* ---------- article / program detail ---------- */

.crumbs {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--fg-faint);
  padding: 1.5rem 0 0;
}
.crumbs a { color: var(--accent); }
.crumbs a:hover { color: var(--fg); }
.crumbs .sep { margin: 0 0.5rem; color: var(--line); }
.crumbs .cur { color: var(--fg-dim); }

.detail-head { padding: 1.25rem 0 1.75rem; border-bottom: 1px solid var(--line); }
.detail-head h1 {
  font-size: 1.5rem;
  margin: 0 0 0.4rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.detail-head h1 .ver {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
  vertical-align: middle;
}
.detail-head .tagline { color: var(--fg-dim); margin: 0 0 1.1rem; max-width: 46rem; }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0.9rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  margin-bottom: 1.3rem;
}
.facts div span { display: block; color: var(--fg-faint); margin-bottom: 0.15rem; }
.facts div b { font-weight: 500; color: var(--fg-dim); }

.dl-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  padding: 0.85rem 1rem;
}
.dl-bar .pw {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--fg-faint);
}
.dl-bar .pw code { color: #69d0c5; background: #135a67; padding: 0.1rem 0.35rem; border-radius: 3px; }
.dl-bar .spacer { margin-left: auto; }

.prose { max-width: 46rem; }
.prose p { margin: 0.9rem 0; color: var(--fg-dim); }
.prose ul, .prose ol { color: var(--fg-dim); padding-left: 1.3rem; margin: 0.8rem 0; }
.prose li > ul, .prose li > ol { margin: 0.3rem 0 0.15rem; }
/* a paragraph inside a list item must not push the bullets apart */
.prose li > p { margin: 0.35rem 0; }
.prose li > p:first-child { margin-top: 0; }
.prose li > p:last-child { margin-bottom: 0; }
.prose li { margin: 0.3rem 0; }
.prose li code { color: #69d0c5; background: #135a67; padding: 0.1rem 0.3rem; border-radius: 3px; font-size: 0.86em; }
.prose strong { color: var(--fg); font-weight: 600; }

/* section titles: mono, upper case, the structural markers of a page */
h2.sec {
  font-size: 0.95rem;
  font-family: var(--mono);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg);
  margin: 0 0 1.1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
}

/* headings inside a guide body: sans, sentence case, one step below the section title */
h1.gsec,
h2.gsec {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--fg);
  margin: 1.9rem 0 0.6rem;
  letter-spacing: -0.005em;
}
h1.gsec { font-size: 1rem; }
h3.gsec {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg);
  margin: 1.35rem 0 0.45rem;
}
h4.gsec {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fg-dim);
  margin: 1.1rem 0 0.35rem;
}
.prose > .gsec:first-child { margin-top: 0; }

pre {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.85rem 1rem;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--fg-dim);
  margin: 0.9rem 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.85rem;
  margin: 1rem 0;
}
th, td { text-align: left; padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-faint);
  font-weight: 500;
  border-bottom-color: var(--line);
}
td:first-child { white-space: nowrap; }
table code { color: var(--accent); }

blockquote {
  margin: 1rem 0;
  padding: 0.1rem 0 0.1rem 1rem;
  border-left: 2px solid var(--line);
  color: var(--fg-dim);
}

/* ---------- screenshots ---------- */

.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.9rem; }
.shots a { display: block; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; background: var(--surface); }
.shots a:hover { border-color: var(--accent-dim); }
.shots img { display: block; width: 100%; height: auto; }

.shot-cap { font-family: var(--mono); font-size: 0.72rem; color: var(--fg-faint); margin: 0.5rem 0 0; }

/* ---------- console block ----------
   One step darker than the page so it still reads as a terminal, but tinted to
   the same family instead of being a foreign near-black. */

.console {
  border: 1px solid #135a67;
  border-radius: 5px;
  background: #052b34;
  overflow: hidden;
  margin: 1rem 0;
  max-width: 46rem;
}
.console-bar {
  padding: 0.45rem 0.85rem;
  border-bottom: 1px solid #135a67;
  background: #0a4653;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: #88a5ab;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.console-bar::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #33444d;
  flex: none;
}
.console pre {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 1rem 1.1rem;
  color: #c3d0d7;
  font-size: 0.78rem;
  line-height: 1.5;
  white-space: pre;
  overflow-x: auto;
}

/* ---------- 404 ---------- */

.nf { border-bottom: 0; padding: 4.5rem 0 3rem; }
.nf-lead { margin: 0 0 1.6rem; color: var(--fg-dim); }
.nf-links { list-style: none; margin: 0; padding: 0; max-width: 24rem; border-top: 1px solid var(--line); }
.nf-links li { border-bottom: 1px solid var(--line-soft); }
.nf-links a {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  padding: 0.6rem 0.2rem;
  color: var(--fg);
}
.nf-links a:hover { color: var(--accent); text-decoration: none; }
.nf-links .mono { color: var(--fg-faint); font-size: 0.75rem; flex: none; }

/* ---------- inline svg mockups: carousel + lightbox ---------- */

/* The mockup, its caption and the pager form one centred block the width of a
   thumbnail, so they line up with each other instead of the pager stretching
   across the whole text column. */
.mockwrap { max-width: 22.5rem; margin-left: auto; margin-right: auto; }
.mocks { display: block; }
.is-carousel .mock { display: none; }
.is-carousel .mock.is-on { display: block; }

.mock { margin: 0; }
.mock svg {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
/* a real screenshot keeps its own pixel size - upscaling a raster looks soft,
   so it is only ever shrunk to fit the thumbnail column */
.mock img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.mock[role="button"] { cursor: zoom-in; }
.mock[role="button"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.mock .shot-cap { margin-top: 0.45rem; }

.mock-nav {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  margin-top: 0.9rem;
}
.mn-arrow {
  font: 400 1.15rem/1 var(--sans);
  color: var(--fg-dim);
  background: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  flex: none;
}
.mn-arrow:hover { color: var(--accent); border-color: var(--accent-dim); }
.mn-dots { display: flex; gap: 0.5rem; flex: 1; }
.mn-dot {
  position: relative;
  flex: 1;
  height: 24px;
  min-width: 30px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
/* the bar is drawn by ::after so the button itself stays a comfortable hit area */
.mn-dot::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 5px;
  transform: translateY(-50%);
  border-radius: 3px;
  background: var(--line);
  transition: height 0.12s, background 0.12s;
}
.mn-dot:hover::after { background: var(--fg-faint); height: 8px; }
.mn-dot.is-on::after { background: var(--accent); }
.mn-dot.is-on:hover::after { background: var(--accent); }
.mn-count { font-family: var(--mono); font-size: 0.75rem; color: var(--fg-faint); flex: none; }
.mn-count b { color: var(--fg-dim); font-weight: 500; }

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 3.5rem 1fr 3.5rem;
  grid-template-rows: 3rem 1fr auto;
  align-items: center;
  justify-items: center;
  background: rgba(5, 39, 47, 0.95);
  padding: 1rem;
}
.lightbox[hidden] { display: none; }

.lb-close {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  width: 2.2rem;
  height: 2.2rem;
  font: 300 1.5rem/1 var(--sans);
  color: #a8bcc0;
  background: none;
  border: 1px solid #166270;
  border-radius: 4px;
  cursor: pointer;
}
.lb-close:hover { color: #f0ebd9; border-color: #30b3a8; }

.lb-arrow {
  width: 2.4rem;
  height: 2.4rem;
  font: 400 1.6rem/1 var(--sans);
  color: #a8bcc0;
  background: none;
  border: 1px solid #166270;
  border-radius: 4px;
  cursor: pointer;
}
.lb-arrow:hover { color: #30b3a8; border-color: #30b3a8; }
.lb-prev { grid-column: 1; grid-row: 2; }
.lb-next { grid-column: 3; grid-row: 2; }

.lb-stage {
  grid-column: 2;
  grid-row: 2;
  width: 100%;
  min-height: 0;
  min-width: 0;
  max-width: none;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}
/* The popup shows the screen at 1.5x its real window size, capped to the
   viewport so a wide mockup scales down instead of being clipped. */
.lb-stage .mock { max-width: 100%; max-height: 100%; }
.lb-stage .mock svg {
  width: calc(var(--vbw, 360) * 1.5px);
  max-width: 80vw;
  max-height: 62vh;
  height: auto;
  border-color: #166270;
}
.lb-stage .mock img {
  width: auto;
  max-width: 80vw;
  max-height: 62vh;
  border-color: #166270;
}

.lb-bar {
  grid-column: 1 / -1;
  grid-row: 3;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  max-width: 40rem;
  margin-top: 1rem;
}
.lb-bar .mn-dot::after { background: #166270; }
.lb-bar .mn-dot:hover::after { background: #2a8f87; }
.lb-bar .mn-dot.is-on::after { background: var(--accent); }

@media (prefers-reduced-motion: no-preference) {
  .lightbox { animation: lbIn 0.14s ease-out; }
  .lightbox .mock svg { animation: lbIn 0.18s ease-out; }
}
@keyframes lbIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 40rem) {
  .lightbox { grid-template-columns: 2.6rem 1fr 2.6rem; }
  .lb-arrow { width: 2rem; height: 2rem; font-size: 1.2rem; }
}

/* ---------- release table ---------- */

.rel { width: 100%; }
.rel td.ver, .rel td.date { font-family: var(--mono); font-size: 0.8rem; white-space: nowrap; }
.rel td.ver { color: var(--accent); }
.rel td.date { color: var(--fg-faint); }
.rel td.get { text-align: right; white-space: nowrap; }

/* ---------- callout ---------- */

.callout {
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent-dim);
  border-radius: 4px;
  background: var(--bg-soft);
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  color: var(--fg-dim);
  margin: 1.25rem 0;
}

/* ---------- skip link ---------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  border: 1px solid var(--accent-dim);
  border-radius: 0 0 4px 0;
  padding: 0.5rem 0.9rem;
  font-size: 0.78rem;
  z-index: 50;
}
.skip:focus { left: 0; }

/* ---------- footer ---------- */

.site-foot {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
  color: var(--fg-faint);
  font-size: 0.82rem;
}
.site-foot .cols {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 3rem;
  align-items: baseline;
}
.site-foot a { color: var(--fg-dim); }
.site-foot .visits { margin-left: auto; font-family: var(--mono); font-size: 0.78rem; }
.site-foot .visits b { color: var(--fg-dim); font-weight: 500; }
.site-foot .sub { margin-top: 0.9rem; color: var(--fg-faint); }

/* ---------- i18n visibility ---------- */

html[data-lang="ko"] [data-lang-only="en"],
html[data-lang="en"] [data-lang-only="ko"] { display: none; }
