/* =====================================================================
   Lembaran — Ghost theme
   Concept: an engineering computation pad. Every post is a numbered
   sheet; the red margin rule doubles as reading progress.
   Light = green pad, ballpoint ink. Dark = blueprint.
   ===================================================================== */

/* ---------- fonts (self-hosted) ---------- */
@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-display: swap; font-weight: 200 800; font-stretch: 75% 100%;
  src: url("../fonts/bricolage-grotesque-latin-standard-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-display: swap; font-weight: 200 800; font-stretch: 75% 100%;
  src: url("../fonts/bricolage-grotesque-latin-ext-standard-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Literata"; font-style: normal; font-display: swap; font-weight: 200 900;
  src: url("../fonts/literata-latin-standard-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Literata"; font-style: normal; font-display: swap; font-weight: 200 900;
  src: url("../fonts/literata-latin-ext-standard-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Literata"; font-style: italic; font-display: swap; font-weight: 200 900;
  src: url("../fonts/literata-latin-standard-italic.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Literata"; font-style: italic; font-display: swap; font-weight: 200 900;
  src: url("../fonts/literata-latin-ext-standard-italic.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url("../fonts/jetbrains-mono-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- tokens: light "pad" ---------- */
:root {
  color-scheme: light;
  --pad: #dae6d1;
  --grid: #bcd0b1;
  --grid-major: #a9c19c;
  --sheet: #f8fbf4;
  --tab-idle: #e6eedf;
  --ink: #1d2d7c;           /* ballpoint blue: headings, links, lines */
  --ink-soft: #4b5a9e;
  --text: #242a38;          /* graphite: body copy */
  --text-strong: #151a27;
  --muted: #5d6573;
  --margin: #cf2a3c;        /* exercise-book margin rule */
  --marker: #f2e15b;        /* highlighter */
  --on-marker: #1d2d7c;
  --line: rgba(29, 45, 124, .35);
  --chrome: #1d2d7c;        /* header + footer */
  --chrome-text: #dfe4ff;
  --btn-bg: #1d2d7c;
  --btn-fg: #ffffff;
  --btn-hover: #142266;
  --code-bg: #16204f;
  --code-head: #1d2a66;
  --code-text: #e6ebff;
  --code-muted: #aab6f2;
  --inline-code: #e3ecdb;
  --shadow: rgba(29, 45, 124, .35);

  --t-keamanan: #cf2a3c;
  --t-programming: #6a3fc9;
  --t-teknologi: #0d7568;
  --t-technology: #0d7568;
  --t-serba-serbi: #b67c00;

  --display: var(--gh-font-heading, "Bricolage Grotesque", system-ui, sans-serif);
  --read: var(--gh-font-body, "Literata", Georgia, serif);
  --code: "JetBrains Mono", ui-monospace, monospace;

  --row: 24px;
  --margin-x: 72px;
  --wrap: 1180px;
}

/* ---------- tokens: dark "blueprint" ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --pad: #0e1736;
  --grid: #18234b;
  --grid-major: #1f2c5a;
  --sheet: #141f47;
  --tab-idle: #111b40;
  --ink: #e8ecff;
  --ink-soft: #aab4e6;
  --text: #d3d9f2;
  --text-strong: #f2f4ff;
  --muted: #98a3cf;
  --margin: #ff6476;
  --marker: #f2e15b;
  --on-marker: #141f47;
  --line: rgba(232, 236, 255, .3);
  --chrome: #0a1130;
  --chrome-text: #c9d0f5;
  --btn-bg: #f2e15b;
  --btn-fg: #141f47;
  --btn-hover: #fff06a;
  --code-bg: #0a1130;
  --code-head: #111a40;
  --code-text: #e6ebff;
  --code-muted: #8f9bd6;
  --inline-code: #1d2a5a;
  --shadow: rgba(0, 0, 0, .55);

  --t-keamanan: #ff6476;
  --t-programming: #a98bff;
  --t-teknologi: #36c9b0;
  --t-technology: #36c9b0;
  --t-serba-serbi: #f3b72c;
}
/* no-JS fallback: follow the system setting */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --pad: #0e1736; --grid: #18234b; --grid-major: #1f2c5a; --sheet: #141f47; --tab-idle: #111b40;
    --ink: #e8ecff; --ink-soft: #aab4e6; --text: #d3d9f2; --text-strong: #f2f4ff; --muted: #98a3cf;
    --margin: #ff6476; --on-marker: #141f47; --line: rgba(232, 236, 255, .3);
    --chrome: #0a1130; --chrome-text: #c9d0f5; --btn-bg: #f2e15b; --btn-fg: #141f47; --btn-hover: #fff06a;
    --code-bg: #0a1130; --code-head: #111a40; --code-muted: #8f9bd6; --inline-code: #1d2a5a; --shadow: rgba(0, 0, 0, .55);
    --t-keamanan: #ff6476; --t-programming: #a98bff; --t-teknologi: #36c9b0; --t-technology: #36c9b0; --t-serba-serbi: #f3b72c;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0;
  color: var(--text);
  font: 400 17px/1.5 var(--display);
  background-color: var(--pad);
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, var(--row) var(--row), var(--row) var(--row);
  background-position: -1px -1px;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--marker); color: #151a27; }
a { color: var(--ink); }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--margin); outline-offset: 3px; border-radius: 2px; }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--marker); color: #151a27; padding: 10px 14px; border-radius: 6px; font-weight: 700; }
.skip:focus { top: 12px; }
main { display: block; min-height: 60vh; }

/* ---------- header ---------- */
.site-head { position: sticky; top: 0; z-index: 20; background: var(--chrome); color: #fff; box-shadow: 0 1px 0 rgba(0, 0, 0, .2); }
.site-head .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.brand svg { flex: none; }
.brand b { font: 800 24px/1 var(--display); font-variation-settings: "opsz" 48; letter-spacing: -0.02em; }
.brand span { font-size: 14px; color: var(--chrome-text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topnav { margin-left: auto; }
.topnav .nav { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.topnav .nav a { display: block; color: var(--chrome-text); text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 6px; }
.topnav .nav a:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.topnav .nav-current a { color: #151a27; background: var(--marker); }
.topnav .nav-current a:hover { color: #151a27; background: #fff06a; }
.head-actions { display: flex; gap: 8px; flex: none; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; min-width: 38px; padding: 0 12px;
  font: 600 15px/1 var(--display); color: #fff; text-decoration: none;
  background: transparent; border: 1.5px solid rgba(255, 255, 255, .4); border-radius: 6px; cursor: pointer;
}
.icon-btn:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
.icon-btn svg { flex: none; }
.theme-toggle { padding: 0; width: 38px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
.menu-btn { display: none; }

/* ---------- sheet + pad devices ---------- */
.sheet { background: var(--sheet); border-radius: 2px; box-shadow: 0 1px 0 var(--grid-major), 0 18px 40px -24px var(--shadow); }
.perforated { position: relative; }
.perforated::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 22px; pointer-events: none;
  background: radial-gradient(circle at 12px 11px, var(--pad) 4.5px, transparent 5px) repeat-x;
  background-size: 24px 22px;
}
.sheet-stack { position: relative; }
.sheet-stack::before, .sheet-stack::after { content: ""; position: absolute; inset: 0; background: var(--sheet); border-radius: 2px; box-shadow: 0 1px 0 var(--grid-major); }
.sheet-stack::before { transform: translate(10px, 10px); opacity: .5; }
.sheet-stack::after { transform: translate(5px, 5px); opacity: .8; }
.sheet-stack > .sheet { position: relative; z-index: 1; }

.has-margin { position: relative; padding-left: calc(var(--margin-x) + 32px); }
.has-margin > .rule { position: absolute; top: 0; bottom: 0; left: var(--margin-x); width: 2px; background: color-mix(in srgb, var(--margin) 28%, transparent); }
.has-margin > .rule::after { content: ""; position: absolute; inset: 0; background: var(--margin); transform-origin: top; transform: scaleY(var(--p, 1)); }
@media (prefers-reduced-motion: no-preference) {
  .draw-rule > .rule::after { animation: draw-rule .9s cubic-bezier(.6, 0, .2, 1) .1s both; }
  @keyframes draw-rule { from { transform: scaleY(0); } to { transform: scaleY(1); } }
}

.topic-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; background: var(--c, var(--ink-soft)); flex: none; }

/* ---------- title block ---------- */
.titleblock { display: grid; grid-template-columns: auto 1fr; margin: 0; border: 1.5px solid var(--ink); color: var(--ink); font-size: 14px; background: var(--sheet); }
.titleblock > div { display: contents; }
.titleblock dt, .titleblock dd { margin: 0; padding: 7px 12px; border-top: 1px solid var(--line); }
.titleblock dt { color: var(--ink-soft); border-right: 1px solid var(--line); }
.titleblock dd { font-weight: 700; min-width: 0; }
.titleblock > div:first-child dt, .titleblock > div:first-child dd { border-top: 0; }
.titleblock .sheetno dd { font: 800 22px/1.1 var(--display); font-variation-settings: "opsz" 48; }
.titleblock a { color: inherit; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 16px/1 var(--display); text-decoration: none; cursor: pointer;
  color: var(--btn-fg); background: var(--btn-bg); border: 0; border-radius: 6px; padding: 14px 20px;
}
.btn:hover { background: var(--btn-hover); box-shadow: 0 0 0 4px color-mix(in srgb, var(--marker) 70%, transparent); }

/* ---------- home hero ---------- */
.hero { margin-top: 48px; }
.hero .sheet { padding-top: 72px; padding-bottom: 56px; padding-right: 48px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: end; }
.hero-title {
  margin: 0; color: var(--ink);
  font: 750 64px/72px var(--display); font-variation-settings: "opsz" 96; letter-spacing: -0.025em;
  background-image: linear-gradient(transparent 71px, var(--grid) 71px); background-size: 100% 72px;
  text-wrap: balance;
}
.hero-title a { color: inherit; text-decoration: none; }
.hero-title a:hover { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--marker) 80%, transparent) 62%, color-mix(in srgb, var(--marker) 80%, transparent) 92%, transparent 92%); }
:root[data-theme="dark"] .hero-title a:hover { color: #151a27; background: var(--marker); }
.hero-lead { font: 400 20px/1.6 var(--read); max-width: 60ch; margin: 24px 0 32px; }

/* ---------- list header + topic tabs + register ---------- */
.list { margin-top: 72px; }
.list-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.list-head h1, .list-head h2 { margin: 0; font: 750 39px/48px var(--display); font-variation-settings: "opsz" 72; letter-spacing: -0.02em; color: var(--ink); }
.list-head p { margin: 0 0 6px; color: var(--muted); max-width: 52ch; }
.list-head .avatar-lg { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }

.tabs { display: flex; gap: 6px; margin-top: 24px; padding-left: 16px; position: relative; z-index: 2; flex-wrap: wrap; }
.tab {
  display: inline-flex; align-items: center;
  font: 600 15px/1 var(--display); color: var(--text); text-decoration: none;
  background: var(--tab-idle); border: 1.5px solid var(--grid-major); border-bottom: 0;
  border-radius: 10px 10px 0 0; padding: 12px 16px 13px;
  box-shadow: inset 0 4px 0 var(--c, var(--ink));
}
.tab small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 7px; }
.tab:hover, .tab[aria-current="page"] { background: var(--sheet); }
.tab[aria-current="page"] { position: relative; top: 1.5px; padding-bottom: 14px; color: var(--ink); }

.register-sheet { padding-top: 8px; padding-bottom: 16px; }
.register { list-style: none; margin: 0; padding: 0; }
.reg-row > a {
  display: grid; grid-template-columns: 58px minmax(0, 1fr) 150px 120px 88px; gap: 24px; align-items: baseline;
  padding: 20px 32px 20px 0; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--grid);
  margin-left: calc(-1 * (var(--margin-x) + 32px)); padding-left: 0;
}
.reg-row:last-child > a { border-bottom: 0; }
.reg-no { color: var(--margin); font: 700 15px/1 var(--display); text-align: right; font-variant-numeric: tabular-nums; }
.reg-main { min-width: 0; padding-left: 10px; }
.reg-title { display: block; font: 700 21px/1.3 var(--display); color: var(--ink); text-wrap: pretty; }
.reg-ex { font: 400 15px/1.55 var(--read); color: var(--muted); margin-top: 6px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.reg-meta { display: contents; }
.reg-topic, .reg-date, .reg-min { font-size: 15px; color: var(--text); }
.reg-topic { display: inline-flex; align-items: baseline; }
.reg-min { text-align: right; color: var(--muted); }
.reg-row > a:hover { background: linear-gradient(90deg, transparent calc(var(--margin-x) + 2px), color-mix(in srgb, var(--marker) 38%, transparent) calc(var(--margin-x) + 2px)); }
:root[data-theme="dark"] .reg-row > a:hover { background: linear-gradient(90deg, transparent calc(var(--margin-x) + 2px), rgba(242, 225, 91, .1) calc(var(--margin-x) + 2px)); }
.reg-row > a:hover .reg-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.empty { padding: 32px 32px 32px 0; color: var(--muted); font: 400 18px/1.6 var(--read); }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; }
.pager span { color: var(--muted); font-size: 15px; }
.pager a { font-weight: 700; text-decoration: none; padding: 10px 14px; border: 1.5px solid var(--ink); border-radius: 6px; background: var(--sheet); }
.pager a:hover { background: var(--marker); color: #151a27; border-color: #151a27; }

/* ---------- post / page ---------- */
.article { margin-top: 40px; }
.article > .sheet { padding-top: 72px; padding-bottom: 64px; }
.art-head { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; align-items: start; padding-right: 48px; }
.page-template .art-head { grid-template-columns: minmax(0, 1fr); }
.crumb { display: inline-flex; align-items: center; font-weight: 700; font-size: 15px; text-decoration: none; color: var(--ink); margin-bottom: 20px; }
.crumb:hover { text-decoration: underline; text-underline-offset: 4px; }
.art-title { margin: 0; color: var(--ink); font: 750 52px/60px var(--display); font-variation-settings: "opsz" 96; letter-spacing: -0.025em; text-wrap: balance; }
.art-lead { font: 400 21px/1.6 var(--read); color: var(--muted); margin: 24px 0 0; max-width: 58ch; }
.art-image { margin: 48px 48px 0 0; }
.art-image img { display: block; width: 100%; max-height: 560px; object-fit: cover; border: 1.5px solid var(--ink); border-radius: 2px; }
.art-image figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }

.art-body { display: grid; grid-template-columns: minmax(0, 680px) 1fr; gap: 64px; margin-top: 56px; padding-right: 48px; }
.page-template .art-body { grid-template-columns: minmax(0, 720px); }
.art-aside { min-width: 0; }
.aside-inner { position: sticky; top: 96px; font-size: 15px; }
.aside-inner h2 { font: 700 15px/1.4 var(--display); color: var(--muted); margin: 0 0 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--grid); }
.toc a { display: block; padding: 7px 0 7px 16px; margin-left: -2px; border-left: 2px solid transparent; color: var(--text); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--ink); }
.toc a[aria-current="true"] { border-left-color: var(--margin); color: var(--ink); font-weight: 700; }
.toc + .aside-tags { margin-top: 32px; }
.taglist { display: flex; flex-wrap: wrap; gap: 6px; }
.taglist a { font-size: 14px; font-weight: 600; text-decoration: none; color: var(--ink); border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 11px; }
.taglist a:hover { border-color: #151a27; background: var(--marker); color: #151a27; }

.art-end { margin-top: 64px; padding-right: 48px; }
.author { display: flex; gap: 16px; align-items: center; padding: 24px 0; border-top: 1px solid var(--grid); border-bottom: 1px solid var(--grid); max-width: 680px; }
.author .avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--btn-bg); color: var(--btn-fg); display: grid; place-items: center; font: 800 22px/1 var(--display); flex: none; object-fit: cover; text-decoration: none; }
.author p { margin: 2px 0 0; color: var(--muted); font: 400 16px/1.5 var(--read); }
.author a.name { font-weight: 700; color: var(--ink); text-decoration: none; }
.author a.name:hover { text-decoration: underline; text-underline-offset: 4px; }
.comments { margin-top: 48px; max-width: 680px; }

.flip { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 56px; }
.flip a { display: block; text-decoration: none; padding: 24px; border: 1.5px solid var(--ink); border-radius: 4px; background: var(--sheet); color: var(--text); }
.flip a:hover { box-shadow: 6px 6px 0 var(--ink); transform: translate(-3px, -3px); }
.flip .dir { display: block; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.flip .t { display: block; font: 700 21px/1.3 var(--display); color: var(--ink); }
.flip .next { text-align: right; grid-column: 2; }
@media (prefers-reduced-motion: no-preference) { .flip a { transition: transform .15s ease, box-shadow .15s ease; } }

/* ---------- article content (Ghost editor output) ---------- */
.gh-content { font: 400 20px/1.75 var(--read); color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.gh-content > * { margin: 0 0 1.2em; }
.gh-content > *:last-child { margin-bottom: 0; }
.post-template .gh-content > p:first-child { font-size: 23px; line-height: 1.6; color: var(--text-strong); }
.gh-content h2, .gh-content h3, .gh-content h4, .gh-content h5 {
  font-family: var(--display); color: var(--ink); letter-spacing: -0.015em; line-height: 1.25; margin: 2em 0 .6em; scroll-margin-top: 96px; text-wrap: balance;
}
.gh-content h2 { font-size: 34px; font-weight: 750; }
.gh-content h3 { font-size: 28px; font-weight: 750; }
.gh-content h4 { font-size: 26px; font-weight: 750; }
.gh-content h5 { font-size: 21px; font-weight: 700; }
.gh-content :is(h2, h3, h4, h5) strong { font-weight: inherit; color: inherit; }
.gh-content a { color: var(--ink); text-decoration-color: color-mix(in srgb, var(--ink) 40%, transparent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.gh-content a:hover { background: var(--marker); color: #151a27; text-decoration-color: #151a27; }
.gh-content strong { font-weight: 700; color: var(--text-strong); }
.gh-content em { color: var(--muted); }
.gh-content ul, .gh-content ol { padding-left: 1.3em; }
.gh-content li { margin: .35em 0; }
.gh-content li::marker { color: var(--margin); font-family: var(--display); font-weight: 700; }
.gh-content hr { border: 0; height: 22px; margin: 2em 0; background: radial-gradient(circle at 12px 11px, var(--grid-major) 3px, transparent 3.5px) repeat-x; background-size: 24px 22px; }
.gh-content blockquote { margin-left: 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--marker); font-style: italic; color: var(--muted); }
.gh-content blockquote.kg-blockquote-alt { border: 0; padding: 0; text-align: center; font-size: 1.25em; color: var(--ink); }
.gh-content pre { margin: 1.4em 0; padding: 0; border-radius: 6px; overflow: hidden; background: var(--code-bg); color: var(--code-text); font: 400 15.5px/1.65 var(--code); box-shadow: 0 0 0 1.5px var(--ink); }
.gh-content pre[data-lang]::before { content: attr(data-lang); display: block; padding: 7px 14px; font: 600 13px/1.4 var(--display); color: var(--code-muted); background: var(--code-head); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.gh-content pre code { display: block; padding: 16px 18px; overflow-x: auto; white-space: pre; background: none; color: inherit; font: inherit; overflow-wrap: normal; }
.gh-content pre code .prompt { color: var(--marker); user-select: none; }
.gh-content :not(pre) > code { font: 500 .85em var(--code); background: var(--inline-code); color: var(--ink); padding: .1em .35em; border-radius: 4px; }
.gh-content table { width: 100%; border-collapse: collapse; font: 400 16px/1.5 var(--display); display: block; overflow-x: auto; }
.gh-content th, .gh-content td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.gh-content th { color: var(--ink); background: color-mix(in srgb, var(--grid) 40%, transparent); }
.gh-content figure { margin-inline: 0; }
.gh-content figure img { border-radius: 2px; }
.gh-content figcaption { margin-top: 10px; font: 400 14px/1.5 var(--display); color: var(--muted); text-align: left; }
.gh-content iframe { max-width: 100%; }
/* the reading column is the widest area on the sheet (the right margin holds the contents list),
   so wide and full cards fill the column edge to edge */
.kg-width-wide, .kg-width-full { width: 100%; }
.kg-width-wide img, .kg-width-full img { width: 100%; }
.gh-content .kg-image-card img { display: block; margin-inline: auto; }
.gh-content .kg-callout-card { border-radius: 4px; }
.gh-content .kg-bookmark-card a.kg-bookmark-container { background: var(--sheet); color: var(--text); border-color: var(--line); }
.gh-content .kg-bookmark-card a.kg-bookmark-container:hover { color: var(--text); background: var(--sheet); }

/* contact form card (Kontak page): adopt theme colors in both modes */
.gh-content .lb-contact { font-family: var(--display); }
.gh-content .lb-contact input:not([type="checkbox"]), .gh-content .lb-contact textarea { color: var(--text); border-color: var(--line); background: var(--sheet); font-family: var(--read); }
.gh-content .lb-contact input:not([type="checkbox"]):focus, .gh-content .lb-contact textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--marker) 70%, transparent); }
.gh-content .lb-contact button { background: var(--btn-bg); color: var(--btn-fg); }
.gh-content .lb-contact button:hover { background: var(--btn-hover); }
.gh-content .lb-contact .lb-success { color: var(--text); }
.gh-content .lb-contact .lb-success h3 { color: var(--ink); margin-top: 0; }
.gh-content .lb-contact altcha-widget { --altcha-color-border: var(--line); --altcha-color-base: var(--sheet); --altcha-color-text: var(--text); }

/* ---------- 404 ---------- */
.notfound .sheet { padding-top: 72px; padding-bottom: 64px; padding-right: 48px; }
.notfound .code { font: 800 96px/1 var(--display); color: var(--margin); margin: 0 0 16px; letter-spacing: -0.03em; }
.notfound p { font: 400 20px/1.6 var(--read); max-width: 52ch; margin: 16px 0 32px; }

/* ---------- footer ---------- */
.site-foot { margin-top: 96px; background: var(--chrome); color: var(--chrome-text); }
.site-foot .wrap { padding: 56px 0 40px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; }
.site-foot h2 { margin: 0 0 12px; color: #fff; font: 750 31px/1.2 var(--display); letter-spacing: -0.015em; }
.site-foot p { margin: 0 0 24px; max-width: 48ch; font: 400 17px/1.6 var(--read); }
.site-foot .btn { background: var(--marker); color: #151a27; }
.site-foot .btn:hover { background: #fff06a; box-shadow: 0 0 0 4px rgba(255, 255, 255, .25); }
.foot-links .nav { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; }
.foot-links .nav + .nav { margin-top: 6px; }
.foot-links a { color: #fff; text-decoration: none; font-weight: 600; display: inline-block; padding: 4px 0; }
.foot-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot-base { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, .2); padding-top: 20px; font-size: 14px; color: var(--chrome-text); opacity: .85; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot-base a { color: inherit; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .menu-btn { display: inline-flex; }
  .head-actions { margin-left: auto; }
  .topnav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--chrome); padding: 8px 16px 16px; border-top: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .5); }
  .site-head.menu-open .topnav { display: block; }
  .topnav .nav { flex-direction: column; gap: 2px; }
  .topnav .nav a { font-size: 17px; padding: 12px; }
  .hero-grid, .art-head { grid-template-columns: 1fr; }
  .titleblock { max-width: 420px; }
  .art-body { grid-template-columns: minmax(0, 1fr); }
  .art-aside { order: -1; }
  .aside-inner { position: static; }
  .aside-tags { display: none; }
  .reg-row > a { grid-template-columns: 40px minmax(0, 1fr) 130px 80px; }
  .reg-date { display: none; }
}
@media (max-width: 720px) {
  :root { --margin-x: 28px; }
  .wrap { width: min(100% - 20px, var(--wrap)); }
  .brand span { display: none; }
  .search-label { display: none; }
  .icon-btn.search { width: 38px; padding: 0; }
  .has-margin { padding-left: calc(var(--margin-x) + 18px); }
  .hero { margin-top: 24px; }
  .hero .sheet { padding-top: 48px; padding-bottom: 32px; padding-right: 20px; }
  .hero-title { font-size: 38px; line-height: 48px; background-image: linear-gradient(transparent 47px, var(--grid) 47px); background-size: 100% 48px; }
  .hero-lead { font-size: 18px; }
  .list { margin-top: 48px; }
  .list-head h1, .list-head h2 { font-size: 31px; line-height: 40px; }
  .tabs { padding-left: 4px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .tab { flex: none; padding: 11px 13px 12px; }
  .reg-row > a { grid-template-columns: 1fr; gap: 6px; padding: 18px 16px 18px 0; margin-left: 0; }
  .reg-no { display: none; }
  .reg-main { padding-left: 0; }
  .reg-title { font-size: 19px; }
  .reg-ex { -webkit-line-clamp: 2; }
  .reg-meta { display: flex; gap: 14px; flex-wrap: wrap; }
  .reg-topic, .reg-min, .reg-date { display: inline-flex; font-size: 14px; text-align: left; color: var(--muted); }
  .article > .sheet, .notfound .sheet { padding-top: 48px; padding-bottom: 40px; }
  .art-head, .art-body, .art-end, .notfound .sheet { padding-right: 18px; }
  .art-image { margin-right: 18px; }
  .art-title { font-size: 34px; line-height: 42px; }
  .art-lead { font-size: 18px; }
  .gh-content { font-size: 18px; line-height: 1.7; }
  .post-template .gh-content > p:first-child { font-size: 20px; }
  .gh-content h2 { font-size: 27px; } .gh-content h3, .gh-content h4 { font-size: 22px; }
  .flip { grid-template-columns: 1fr; }
  .flip .next { grid-column: auto; }
  .titleblock { grid-template-columns: 1fr 1fr; max-width: none; }
  .titleblock > div { display: block; padding: 7px 10px; border-top: 1px solid var(--line); }
  .titleblock > div:nth-child(even) { border-left: 1px solid var(--line); }
  .titleblock > div:nth-child(-n+2) { border-top: 0; }
  .titleblock dt, .titleblock dd { padding: 0; border: 0 !important; }
  .titleblock dt { font-size: 12px; }
  .titleblock .sheetno dd { font-size: 18px; }
  .art-head { gap: 24px; }
  .notfound .code { font-size: 64px; }
  .site-foot .wrap { grid-template-columns: 1fr; padding: 44px 0 32px; }
}
@media print {
  .site-head, .site-foot, .art-aside, .flip, .rule { display: none !important; }
  body { background: #fff; }
  .sheet { box-shadow: none; }
}

/* small additions */
.author span.avatar { background: var(--pad); border: 1.5px solid var(--ink); }
.author span.avatar svg { width: 24px; height: 28px; }
.list-head h1 .topic-dot { width: 16px; height: 16px; margin-right: 12px; vertical-align: 4px; }
