/* NOTE: Source sets html{font-size:62.5%} (1rem = 10px), so every rem here is pre-scaled ×1.6. */
/* Nebula blog: news-site layout on top of Source's post typography. Colours match kcnebula.com's plain look. */
.nb {
  --nb-bg: #111315; --nb-bg2: #16191c; --nb-panel: #1c1f23; --nb-panel2: #22262b; --nb-line: #2e3338;
  --nb-text: #e8e6e3; --nb-muted: #9a9fa6; --nb-accent: #ff8a1f;
  --nb-mono: ui-monospace, "JetBrains Mono", "Cascadia Code", SFMono-Regular, Menlo, Consolas, monospace;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --gh-font-heading: var(--font-sans); --gh-font-body: var(--font-sans);
  background: var(--nb-bg); color: var(--nb-text); font-family: var(--font-sans);
}
/* topic colours (same family as the tool groups on the main site) */
[data-tag] { --c: var(--nb-accent); }
[data-tag="pdf-documents"] { --c: #ff8a1f; } [data-tag="photos"] { --c: #ff4f7b; } [data-tag="qr-codes"] { --c: #ffc93c; }
[data-tag="privacy-safety"] { --c: #a78bfa; } [data-tag="small-business"] { --c: #38bdf8; } [data-tag="money"] { --c: #4ade80; }
[data-tag="guides"] { --c: #2dd4bf; } [data-tag="news"] { --c: #f87171; } [data-tag="work-money"] { --c: #4ade80; }
[data-tag="social-media"] { --c: #f472b6; } [data-tag="websites"] { --c: #60a5fa; } [data-tag="fun-games"] { --c: #fbbf24; } [data-tag="work-from-home"] { --c: #34d399; }
.nb a { color: inherit; }
.nb-wrap { max-width: 1240px; margin: 0 auto; padding: 24px 20px 56px; }

/* header: translucent bar, logo, topic menu, search + tools */
.nb-top { position: sticky; top: 0; z-index: 50; background: rgba(22, 25, 28, .78); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); border-bottom: 1px solid var(--nb-line); }
.nb-top-in { max-width: 1240px; margin: 0 auto; padding: 0 20px; height: 60px; display: flex; align-items: center; gap: 22px; }
.nb-logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; flex: none; }
.nb-logo svg { width: 24px; height: 24px; fill: none; stroke: var(--nb-accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.nb-logo span { font: 800 1.84rem/1 var(--font-sans); color: var(--nb-text); }
.nb-logo em { font: 600 1.056rem/1 var(--nb-mono); font-style: normal; letter-spacing: .14em; text-transform: uppercase; color: var(--nb-accent); border: 1px solid #ff8a1f55; border-radius: 4px; padding: 3px 5px; }
.nb-nav { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nb-nav::-webkit-scrollbar { display: none; }
.nb-nav .nav { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; white-space: nowrap; }
.nb-nav .nav a { display: block; padding: 8px 11px; border-radius: 6px; font-size: 1.44rem; font-weight: 600; color: var(--nb-muted); text-decoration: none; }
.nb-nav .nav a:hover, .nb-nav .nav-current a { color: var(--nb-text); background: var(--nb-panel); }
.nb-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.nb .gh-search { color: var(--nb-text); width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--nb-line); display: grid; place-items: center; background: none; cursor: pointer; }
.nb .gh-search:hover { border-color: var(--nb-accent); }
.nb .gh-search svg { width: 18px; height: 18px; }
.nb-tools { padding: 9px 14px; border-radius: 6px; background: var(--nb-accent); color: #161616 !important; font-weight: 700; font-size: 1.408rem; text-decoration: none; }
.nb-tools:hover { background: #ff9d45; }
@media (max-width: 860px) {
  .nb-top-in { height: auto; flex-wrap: wrap; row-gap: 0; padding-top: 10px; }
  .nb-actions { margin-left: auto; }
  .nb-nav { order: 3; flex-basis: 100%; margin: 6px -20px 0; padding: 0 14px 8px; }
}

/* section headings: mono caps label with a rule, like a newspaper section */
.nb-h { margin: 0; font: 700 1.216rem/1 var(--nb-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--nb-text); }
.nb-h a { text-decoration: none; }
.nb-section { margin-top: 40px; }
.nb-section-head { display: flex; align-items: center; gap: 14px; padding-bottom: 10px; margin-bottom: 18px; border-bottom: 1px solid var(--nb-line); position: relative; }
.nb-section-head::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 44px; height: 2px; background: var(--c, var(--nb-accent)); }
.nb-more { margin-left: auto; font-size: 1.344rem; font-weight: 600; color: var(--nb-muted) !important; text-decoration: none; }
.nb-more::after { content: " →"; }
.nb-more:hover { color: var(--nb-accent) !important; }

/* story cards */
.nb-card { min-width: 0; }
.nb-img { display: block; overflow: hidden; border-radius: 8px; background: var(--nb-panel); aspect-ratio: 16 / 9; }
.nb-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.nb-card:hover .nb-img img { transform: scale(1.03); }
.nb-tag { display: inline-block; font: 700 1.088rem/1 var(--nb-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--c, var(--nb-accent)) !important; text-decoration: none; margin-bottom: 8px; }
.nb-title { margin: 0; font-weight: 750; letter-spacing: -.01em; text-wrap: balance; }
.nb-title a { text-decoration: none; }
.nb-title a:hover { color: var(--nb-accent); }
.nb-excerpt { margin: 8px 0 0; color: var(--nb-muted); font-size: 1.52rem; line-height: 1.5; }
.nb-meta { display: flex; gap: 10px; margin-top: 10px; font: 1.184rem var(--nb-mono); color: var(--nb-muted); }
.nb-meta span::before { content: "·"; margin-right: 10px; }

/* hero: lead story + stacked top stories */
.nb-hero { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 28px; padding-bottom: 8px; }
.nb-lead .nb-img { border-radius: 10px; }
.nb-lead .nb-body { padding-top: 16px; }
.nb-lead .nb-title { font-size: clamp(2.56rem, 2.6vw, 3.76rem); line-height: 1.12; }
.nb-lead .nb-excerpt { font-size: 1.68rem; max-width: 62ch; }
.nb-hero-side { display: grid; grid-template-rows: repeat(4, auto); gap: 16px; align-content: start; }
.nb-small { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--nb-line); }
.nb-small:last-child { border-bottom: 0; padding-bottom: 0; }
.nb-small .nb-img { border-radius: 6px; }
.nb-small .nb-tag { margin-bottom: 6px; }
.nb-small .nb-title { font-size: 1.632rem; line-height: 1.3; }
.nb-small .nb-meta { margin-top: 6px; }

/* main column + sidebar */
.nb-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.nb-main { min-width: 0; }
.nb-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.nb-tile .nb-body { padding-top: 12px; }
.nb-tile .nb-title { font-size: 1.68rem; line-height: 1.3; }
.nb-list { display: grid; }
.nb-row { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--nb-line); }
.nb-row:first-child { padding-top: 0; }
.nb-row .nb-title { font-size: 1.92rem; line-height: 1.25; }

.nb-side { display: grid; gap: 18px; position: sticky; top: 80px; }
.nb-box { background: var(--nb-bg2); border: 1px solid var(--nb-line); border-radius: 10px; padding: 18px; }
.nb-box .nb-h { margin-bottom: 14px; }
.nb-headlines { margin: 0; padding: 0; list-style: none; counter-reset: h; display: grid; gap: 14px; }
.nb-headlines li { counter-increment: h; display: grid; grid-template-columns: 26px minmax(0, 1fr); column-gap: 8px; }
.nb-headlines li::before { content: counter(h); grid-row: span 2; font: 800 2.08rem/1 var(--font-sans); color: var(--c, var(--nb-accent)); }
.nb-headlines a { font-weight: 650; font-size: 1.488rem; line-height: 1.35; text-decoration: none; }
.nb-headlines a:hover { color: var(--nb-accent); }
.nb-headlines time { font: 1.152rem var(--nb-mono); color: var(--nb-muted); margin-top: 3px; }
.nb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.nb-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--nb-line); font-size: 1.344rem; font-weight: 600; text-decoration: none; }
.nb-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.nb-chip span { color: var(--nb-muted); font: 1.152rem var(--nb-mono); }
.nb-chip:hover { border-color: var(--c); }
.nb-toolbox p { margin: -6px 0 10px; color: var(--nb-muted); font-size: 1.376rem; }
.nb-toolbox a { display: block; padding: 7px 0; border-top: 1px solid var(--nb-line); font-size: 1.472rem; font-weight: 600; text-decoration: none; }
.nb-toolbox a:hover { color: var(--nb-accent); }
.nb-toolbox .nb-all { color: var(--nb-accent) !important; }
.nb-discord { display: grid; gap: 4px; text-decoration: none; background: #5865f214; border-color: #5865f255; }
.nb-discord b { color: #a5acff; } .nb-discord span { color: var(--nb-muted); font-size: 1.376rem; }
.nb-discord:hover { border-color: #5865f2; }

/* topic / author / archive page header */
.nb-page-head { padding: 12px 0 26px; margin-bottom: 26px; border-bottom: 1px solid var(--nb-line); }
.nb-kicker { margin: 0 0 6px; font: 700 1.12rem var(--nb-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--c, var(--nb-accent)); }
.nb-page-head h1 { margin: 0; font-size: clamp(2.88rem, 3vw, 4.16rem); letter-spacing: -.015em; }
.nb-dek { margin: 10px 0 0; max-width: 64ch; color: var(--nb-muted); font-size: 1.76rem; line-height: 1.5; }
.nb-count { margin: 10px 0 0; font: 1.248rem var(--nb-mono); color: var(--nb-muted); }

/* article */
.nb-article-head { max-width: 860px; padding: 8px 0 22px; }
.nb-article-title { margin: 4px 0 0; font-size: clamp(3.2rem, 3.6vw, 4.8rem); line-height: 1.1; letter-spacing: -.02em; text-wrap: balance; }
.nb-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 18px; font: 1.28rem var(--nb-mono); color: var(--nb-muted); }
.nb-byline a { color: var(--nb-text); text-decoration: none; }
.nb-copy { margin-left: auto; font: 600 1.28rem var(--font-sans); color: var(--nb-text); background: var(--nb-panel); border: 1px solid var(--nb-line); border-radius: 6px; padding: 7px 12px; cursor: pointer; }
.nb-copy:hover { border-color: var(--nb-accent); }
.nb-feature { margin: 0 0 32px; }
.nb-feature img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; display: block; }
.nb-feature figcaption { margin-top: 8px; font-size: 1.312rem; color: var(--nb-muted); }
/* post body: one readable column; Source's wide/full cards just fill it */
.nb .nb-content { display: block; max-width: 720px; font-size: 1.728rem; line-height: 1.7; color: #dcdad6; }
.nb .nb-content > * + * { margin-top: 1.1em; }
.nb .nb-content h2 { margin-top: 1.8em; font-size: 2.48rem; line-height: 1.25; color: var(--nb-text); }
.nb .nb-content h3 { margin-top: 1.5em; font-size: 1.952rem; color: var(--nb-text); }
.nb .nb-content a { color: var(--nb-accent); text-decoration: underline; text-underline-offset: 3px; }
.nb .nb-content strong { color: var(--nb-text); }
.nb .nb-content blockquote { border-left: 3px solid var(--nb-accent); padding-left: 18px; color: var(--nb-text); font-style: normal; }
.nb .nb-content .kg-width-wide, .nb .nb-content .kg-width-full { width: 100%; max-width: 100%; margin-left: 0; margin-right: 0; }
.nb-post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--nb-line); }
.nb-related { margin-top: 56px; }

/* footer: same design as kcnebula.com's (px here because Source's 1rem = 10px) */
.nb-foot { margin-top: 40px; background: #16191c; border-top: 1px solid #2e3338; color: #9a9fa6; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.nb-foot-in { max-width: 1240px; margin: 0 auto; padding: 28px 20px 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 40px; }
.nb-foot-about { display: grid; gap: 6px; }
.nb-foot-about p { margin: 0; font-size: 14px; line-height: 1.5; }
.nb-foot-brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.nb-mark { width: 22px; height: 22px; fill: none; stroke: #ff8a1f; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.nb-foot-name { font: 400 23px/1 "Architects Daughter", system-ui, sans-serif; padding-right: .08em;
  background: linear-gradient(90deg, #ffd23f, #ff8a1f 45%, #ff2e63); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.nb-foot-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-left: auto; }
.nb-foot-links a { color: #9a9fa6; text-decoration: none; font-size: 14.4px; } .nb-foot-links a:hover { color: #ff8a1f; }
.nb-join { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: #5865f2; color: #fff !important; text-decoration: none; font: 600 13.5px system-ui, sans-serif; }
.nb-join:hover { background: #4752c4; }
.nb-join .dc { width: 18px; height: 18px; fill: currentColor; flex: none; }
@media (max-width: 760px) { .nb-foot-links { margin-left: 0; } }

/* pagination */
.nb .pagination { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; font: 1.28rem var(--nb-mono); color: var(--nb-muted); }
.nb .pagination a { color: var(--nb-accent); text-decoration: none; }

/* responsive */
@media (max-width: 1080px) { .nb-cols { grid-template-columns: minmax(0, 1fr); } .nb-side { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } }
@media (max-width: 900px) { .nb-hero { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
  .nb-wrap { padding: 16px 16px 48px; }
  .nb-tiles { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .nb-tile { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; }   /* compact rows on phones */
  .nb-tile .nb-body { padding-top: 0; } .nb-tile .nb-title { font-size: 1.6rem; }
  .nb-row { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; }
  .nb-row .nb-title { font-size: 1.632rem; } .nb-row .nb-excerpt { display: none; }
  .nb-small { grid-template-columns: 112px minmax(0, 1fr); }
  .nb-copy { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .nb-img img { transition: none; } .nb-card:hover .nb-img img { transform: none; } }
