/* Kathará package repository — visual theme lifted from www.kathara.org
   (Be Vietnam Pro, --bs-primary #05f, Bootstrap grays, soft-primary chips,
   8px "rounded-lg" corners, 1140px container). Light only, by design. */

:root {
  /* straight out of the kathara.org bootstrap build */
  --blue:       #05f;
  --blue-hover: rgba(0, 85, 255, .8);
  --blue-soft:  rgba(0, 85, 255, .12);
  --gray-100:   #f4f5f7;
  --gray-200:   #f3f4f7;
  --gray-300:   #dee2e6;
  --gray-600:   #787878;
  --gray-700:   #495057;
  --gray-800:   #343a40;
  --gray-900:   #212529;
  --lead:       #8a90a2;
  --hairline:   rgba(0, 0, 0, .05);

  --sans: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: .32px;
  color: var(--gray-700);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1140px; margin: 0 auto; padding: 0 1rem; }

h1, h2, h3 { color: var(--gray-800); font-weight: 600; line-height: 1.3; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-hover); text-decoration: underline; }
code { font-family: var(--mono); font-size: .9em; }
p { max-width: 66ch; }

/* ---- navbar ------------------------------------------------------------ */
.topnav {
  background: #fff;
  border-bottom: 1px solid var(--hairline);
}
.topnav .container {
  display: flex; align-items: center; gap: 1rem;
  flex-wrap: wrap; padding-top: 1rem; padding-bottom: 1rem;
}
.logo { display: block; height: 40px; width: auto; }
.nav { display: flex; align-items: center; gap: .25rem; margin-left: auto; flex-wrap: wrap; }
.nav a {
  font-size: 15px; font-weight: 500; color: var(--gray-700);
  padding: .25rem .5rem;
}
.nav a:hover { color: var(--blue-hover); text-decoration: none; }
.nav a.btn { color: #fff; padding: .45rem .85rem; margin-left: .4rem; }
.nav a.btn:hover { color: #fff; }

/* the blue pill from the kathara.org masthead */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--sans); font-size: 13.125px; font-weight: 500;
  color: #fff; background: var(--blue);
  border: 1px solid var(--blue); border-radius: 4px;
  padding: .45rem .85rem; cursor: pointer;
}
.btn:hover { background: #0048d8; border-color: #0048d8; color: #fff; text-decoration: none; }
.btn:focus-visible { outline: 2px solid var(--gray-800); outline-offset: 2px; }
.btn.ghost { background: #fff; color: var(--blue); border-color: var(--gray-300); }
.btn.ghost:hover { background: var(--gray-100); color: var(--blue); border-color: var(--gray-300); }
.btns { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }

.repo-url { font-family: var(--mono); font-size: .78rem; color: var(--gray-600); }

/* ---- hero -------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; background: var(--gray-100); padding: 5.5rem 0; }
/* the animated network canvas from kathara.org, full-bleed behind the text */
#graph {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: auto; height: auto; min-width: 100%; min-height: 100%;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 {
  font-size: clamp(2rem, 1.3rem + 2.4vw, 48px);
  margin: 0 0 .75rem;
}
.hero p { font-size: 16px; line-height: 1.6; color: var(--lead); margin: 0; }
.hero .repo-url { margin-top: 1rem; }

/* ---- section rhythm ---------------------------------------------------- */
section { padding: 3rem 0; }
section + section { border-top: 1px solid var(--gray-200); }
.section-title { font-size: 1.5rem; margin: 0 0 1.5rem; }
.section-title + p { margin-top: -1rem; }

/* ---- pickers ----------------------------------------------------------- */
.pickers {
  display: grid; gap: 2rem;
  grid-template-columns: minmax(12rem, 15rem) 1fr;
}
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-weight: 600; color: var(--gray-800); font-size: 15px; padding: 0 0 .75rem; }

.opts { display: flex; flex-direction: column; gap: .5rem; }
.picker-distro .opts {
  display: grid; gap: .5rem;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
}

/* one card per choice, the same card kathara.org uses everywhere */
.opt {
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem .85rem;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  cursor: pointer; font-size: 14px;
}
.opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.opt:hover { border-color: rgba(0, 85, 255, .35); }
.opt:has(input:checked) { background: var(--blue-soft); border-color: var(--blue); }
.opt:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.opt b { font-weight: 600; color: var(--gray-800); }
.opt i { font-style: normal; color: var(--gray-600); }
.opt .latest {
  margin-left: auto; font-size: .72rem; font-weight: 500; color: var(--blue);
  background: var(--blue-soft); border-radius: 999px; padding: .1rem .55rem;
}

/* soft-primary square: the "avatar rounded-lg icon" motif from the homepage */
.tag {
  flex: none;
  display: grid; place-items: center;
  min-width: 2.25rem; height: 1.7rem; padding: 0 .45rem;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .02em;
  color: var(--blue); background: var(--blue-soft); border-radius: 8px;
}

.archs { margin: 1rem 0 0; font-size: 14px; color: var(--gray-600); }
.archs code {
  background: var(--gray-100); border: 1px solid var(--hairline);
  border-radius: 4px; padding: .1rem .4rem; margin-right: .3rem; color: var(--gray-700);
}

/* ---- guide ------------------------------------------------------------- */
.guide-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem;
}
.guide-head h2 { margin: 0; }

.switch[hidden] { display: none; }
.switch { display: flex; align-items: center; gap: .5rem; font-size: 14px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.track {
  width: 2.1rem; height: 1.15rem; border-radius: 999px;
  background: var(--gray-300); position: relative; flex: none;
  transition: background .15s;
}
.track::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: .9rem; height: .9rem; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .28);
  transition: transform .15s;
}
.switch input:checked + .track { background: var(--blue); }
.switch input:checked + .track::after { transform: translateX(.95rem); }
.switch input:focus-visible + .track { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .track, .track::after { transition: none; } }

ol.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; }
ol.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 1.75rem 3.5rem;
  min-height: 2.5rem;
}
ol.steps > li:last-child { padding-bottom: 0; }
ol.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: -.25rem;
  width: 2.5rem; height: 2.5rem; border-radius: 8px;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--blue); background: var(--blue-soft);
}
ol.steps h3 { font-size: 16px; margin: .35rem 0 .7rem; }
ol.steps p { margin: .7rem 0 0; font-size: 14px; color: var(--lead); max-width: 62ch; }
ol.steps p code { color: var(--gray-700); }

/* ---- terminal blocks --------------------------------------------------- */
.term { position: relative; margin: 0; }
.term + .term { margin-top: .5rem; }
.term pre {
  margin: 0; padding: 1rem 4.75rem 1rem 1.1rem;
  background: var(--gray-900); color: #e9ecef;
  border-radius: 8px; overflow-x: auto;
  scrollbar-width: thin;
  font-family: var(--mono); font-size: 13px; line-height: 1.7; letter-spacing: 0;
}
.term .copy {
  position: absolute; top: .55rem; right: .55rem;
  font: 500 12px var(--sans); color: #adb5bd;
  background: transparent; border: 1px solid #3a4047;
  border-radius: 4px; padding: .2rem .55rem; cursor: pointer;
}
.term .copy:hover { color: #fff; border-color: #6c757d; }
.term .copy:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---- callouts and tables ----------------------------------------------- */
.linkout p { font-size: 15px; }
.notice {
  background: var(--blue-soft); border-radius: 8px;
  padding: 1.25rem 1.4rem; font-size: 14px;
}
.notice p { margin: 0; max-width: none; }

table { border-collapse: collapse; width: 100%; font-size: 14px; margin-top: 1.25rem; }
th, td { text-align: left; padding: .65rem .75rem; border-bottom: 1px solid var(--gray-200); vertical-align: top; }
th { color: var(--gray-800); font-weight: 600; }
td code { color: var(--gray-700); }

/* ---- footer ------------------------------------------------------------ */
footer {
  border-top: 1px solid var(--gray-200);
  padding: 2rem 0 3rem;
  font-size: 14px; color: var(--gray-600);
  text-align: center;
}
footer a { color: var(--gray-600); }
footer a:hover { color: var(--blue); }

@media (max-width: 62rem) {
  .pickers { grid-template-columns: 1fr; }
  .hero { padding: 3rem 0; }
  section { padding: 2.25rem 0; }
  ol.steps > li { padding-left: 3rem; }
  ol.steps > li::before { width: 2.1rem; height: 2.1rem; }
  .term pre { padding-top: 2.75rem; padding-right: 1.1rem; }
}
