/* dotnet-gitmoji.com: palette from the demo video (One Half Dark on graphite) */

@font-face {
  font-family: "Inter";
  src: url("fonts/InterVariable-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --ground: #17191D;
  --panel: #1E2127;
  --term: #282C34;
  --line: #3E4451;
  --ink: #F0F2F5;
  --term-fg: #DCDFE4;
  --accent: #C678DD;
  --yellow: #E5C07B;
  --green: #98C379;
  --cyan: #56B6C2;
  --mute: #9DA5B4;
  --accent-soft: #2E2234;

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  --emoji: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  --radius: 10px;
  --gutter: clamp(16px, 4vw, 32px);
  --max: 960px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.mono, code, pre { font-family: var(--mono); }
code { font-size: .92em; }
:not(pre) > code { color: var(--term-fg); background: var(--panel); border: 1px solid var(--line); border-radius: 5px; padding: .05em .35em; }
td code { white-space: nowrap; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--panel); padding: 8px 12px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(23, 25, 29, .92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; }
.site-header ul { display: flex; flex-wrap: wrap; gap: 4px 18px; list-style: none; margin: 0; padding: 0; font-size: 15px; }
.site-header nav a { color: var(--mute); text-decoration: none; }
.site-header nav a:hover { color: var(--ink); }

/* type */
h1, h2, h3 { line-height: 1.08; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 em, h2 em { color: var(--accent); font-style: normal; }
h2 { font-size: clamp(28px, 4.5vw, 40px); font-weight: 800; }
h3 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }

main > section { padding-block: clamp(48px, 8vw, 88px) 0; }

/* hero */
.hero { padding-top: clamp(40px, 9vw, 96px); }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; font-size: clamp(20px, 3.4vw, 30px); font-weight: 700; color: var(--term-fg); flex-wrap: wrap; }
.pill { font: 600 .62em/1 var(--sans); color: var(--accent); background: var(--accent-soft); border-radius: 7px; padding: .45em .6em; }
.hero h1 { font-size: clamp(40px, 8vw, 76px); font-weight: 800; letter-spacing: -.035em; }
.lede { max-width: 62ch; color: var(--term-fg); font-size: 18px; }
.hero-cmd { max-width: 560px; margin-top: 28px; }
.cue { margin: 10px 0 0; font-size: 15px; }
.cue a { color: var(--mute); }
.cue a:hover { color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-block; border-radius: 8px; padding: 10px 18px; font-weight: 600; text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--ground); }
.btn-primary:hover { background: var(--ink); color: var(--ground); }
.btn-secondary { border: 1px solid var(--line); color: var(--ink); }
.btn-secondary:hover { border-color: var(--accent); color: var(--ink); }

/* code blocks with copy */
.code { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin: 12px 0; min-width: 0; }
.code pre { margin: 0; padding: 14px 84px 14px 16px; overflow-x: auto; color: var(--term-fg); font-size: 15px; line-height: 1.55; }
.code .prompt { color: var(--green); user-select: none; }
.copy {
  position: absolute; top: 8px; right: 8px;
  font: 600 13px/1 var(--sans); color: var(--mute);
  background: var(--term); border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; cursor: pointer;
}
.copy:hover { color: var(--ink); border-color: var(--accent); }
.copy.is-copied { color: var(--green); border-color: var(--green); }

/* footer */
.site-footer { margin-top: clamp(56px, 9vw, 96px); border-top: 1px solid var(--line); padding-block: 24px; color: var(--mute); font-size: 15px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; }
.footer-row p { margin: 0; }
.footer-row ul { display: flex; flex-wrap: wrap; gap: 4px 18px; list-style: none; margin: 0; padding: 0; }
.footer-row a { color: var(--mute); }
.footer-row a:hover { color: var(--accent); }
.site-footer p a { color: var(--ink); font-weight: 600; }

/* shared section bits */
.section-lede { max-width: 64ch; color: var(--term-fg); margin: 0 0 20px; }
.note { color: var(--mute); font-size: 15px; border-left: 2px solid var(--line); padding-left: 12px; }
.note strong { color: var(--ink); }
.fine { color: var(--mute); font-size: 14px; margin: 6px 0 0; }
.callout { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; padding: 12px 14px; font-size: 15px; color: var(--term-fg); }
.callout-warn { border-left-color: var(--yellow); }
.callout strong { color: var(--ink); }

/* video */
.video-frame { aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--term); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.video, .video iframe { display: block; width: 100%; height: 100%; border: 0; position: relative; }
.video img { width: 100%; height: 100%; object-fit: cover; display: block; }
.play {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--accent); box-shadow: 0 8px 30px rgba(0, 0, 0, .45);
}
.play::after { content: ""; position: absolute; left: 31px; top: 24px; border-style: solid; border-width: 14px 0 14px 22px; border-color: transparent transparent transparent var(--ground); }
.video:hover .play, .video:focus-visible .play { background: var(--ink); }
.caption { color: var(--mute); font-size: 14px; text-align: center; margin: 12px 0 0; }

/* before / after log */
.terminal { background: var(--term); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.terminal-bar { background: var(--panel); border-bottom: 1px solid var(--line); padding: 8px 16px; font-size: 13px; color: var(--mute); }
.log { margin: 0; padding: 16px; overflow-x: auto; color: var(--term-fg); font-size: 15px; line-height: 1.7; }
.log > span { display: block; padding-left: 12px; }
.log-cmd { padding-left: 0 !important; margin-bottom: 4px; }
.log-new { border-left: 2px solid var(--accent); }
.log-setup { margin-bottom: 6px; }
.log-old { opacity: .42; border-left: 2px solid transparent; }
.log .hash { color: var(--yellow); }
.log .ref { color: var(--yellow); }
.log .head { color: var(--cyan); font-weight: 700; }
.log .branch { color: var(--green); font-weight: 700; }
.log, .code pre { font-variant-emoji: emoji; }
.prompt { color: var(--green); }

/* setup steps */
.steps { list-style: none; margin: 28px 0 0; padding: 0; }
.step { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 16px; padding: 22px 0; border-top: 1px solid var(--line); }
.step:first-child { border-top: 0; }
.step-num { color: var(--accent); font-weight: 700; font-size: 22px; line-height: 1.3; }
.step-body > p { margin: 0 0 8px; color: var(--term-fg); }
.step-body h3 { margin-bottom: 6px; }
.targets summary { cursor: pointer; color: var(--mute); font-size: 15px; padding: 6px 0; }
.targets summary:hover { color: var(--ink); }
.targets .code pre { font-size: 13.5px; }
@media (max-width: 560px) {
  .step { grid-template-columns: minmax(0, 1fr); }
}

/* usage + config */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; min-width: 0; }
.card .code { background: var(--ground); }
.card > p { color: var(--term-fg); margin: 0 0 8px; }
.table-scroll { overflow-x: auto; margin-top: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 7px 10px 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--mute); font-weight: 600; }
.config-example { margin: 20px 0 24px; }
.config-example { align-items: stretch; }
.config-example .code { margin: 0; display: flex; flex-direction: column; }
.config-example .code pre { flex: 1; display: flex; align-items: center; }
.keys { margin: 0; }
.keys dt { margin-top: 10px; }
.keys dt:first-child { margin-top: 0; }
.keys dd { margin: 2px 0 0; color: var(--term-fg); font-size: 15px; }

/* credits */
.credits {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
.credits li { padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.5; }
.credits li:nth-child(odd) { border-right: 1px solid var(--line); }
.credits li:nth-last-child(-n + 2):nth-child(odd), .credits li:last-child { border-bottom: 0; }
@media (max-width: 760px) {
  .credits { grid-template-columns: minmax(0, 1fr); }
  .credits li:nth-child(odd) { border-right: 0; }
  .credits li:nth-last-child(-n + 2):nth-child(odd) { border-bottom: 1px solid var(--line); }
  .credits li:last-child { border-bottom: 0; }
}
.credits li > a { font-weight: 600; }
.credits span { color: var(--mute); }

/* long identifiers (package names, paths) wrap instead of widening the page on phones */
.credits li, .keys dd, p > code { overflow-wrap: anywhere; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.video-frame iframe { display: block; width: 100%; height: 100%; border: 0; }

.log { white-space: normal; }
.log > span { white-space: pre; }
.emoji { font-family: var(--emoji); font-style: normal; }

@media (max-width: 560px) {
  .code pre { padding: 46px 16px 14px; }
  .site-header ul { font-size: 14px; gap: 2px 14px; }
}

/* config example: balance the JSON panel against the key list */
.config-example .code pre { font-size: 15.5px; line-height: 2.05; padding-block: 20px; }
.keys dt { margin-top: 12px; }
.keys dt code { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 700; }
.keys dd { font-size: 15px; line-height: 1.5; }

/* mobile menu: only when JS is on (.has-menu); without JS the links just wrap */
.menu-toggle { display: none; }
@media (max-width: 640px) {
  .has-menu .header-row { flex-wrap: nowrap; gap: 0; }
  .has-menu nav { order: -1; flex: 0 0 0; }
  .has-menu .brand { order: -2; }
  .has-menu .menu-toggle { margin-left: auto; }
  .has-menu .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin-right: -10px;
    background: none; border: 0; border-radius: 8px; cursor: pointer; color: var(--ink);
  }
  .menu-bars, .menu-bars::before, .menu-bars::after {
    display: block; width: 22px; height: 2px; border-radius: 2px; background: currentColor; position: relative;
  }
  .menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
  .menu-bars::before { top: -7px; }
  .menu-bars::after { top: 7px; }
  .nav-open .menu-bars { background: transparent; }
  .nav-open .menu-bars::before { top: 0; transform: rotate(45deg); }
  .nav-open .menu-bars::after { top: 0; transform: rotate(-45deg); }

  .has-menu nav ul { display: none; }
  .has-menu.nav-open nav ul {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--ground); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 12px; font-size: 17px;
  }
  .has-menu.nav-open nav a { display: block; padding: 12px 0; color: var(--ink); border-bottom: 1px solid var(--panel); }
  .has-menu.nav-open nav li:last-child a { border-bottom: 0; }
}
@media (max-width: 640px) and (prefers-reduced-motion: no-preference) {
  .menu-bars, .menu-bars::before, .menu-bars::after { transition: transform .2s ease, top .2s ease, background-color .2s ease; }
}
