/* ==========================================================================
   Copy And Paste (copynpaste.top) — Practical Notebook Theme
   Warm paper, ink, and terracotta.
   ========================================================================== */

:root {
  color-scheme: light;
  --bg-surface: #f7f6f2; --bg-card: #fffefa; --bg-card-secondary: #eeede7;
  --bg-hover: #efede5; --border: #dedcd2; --border-focus: #b74d30;
  --text-main: #252821; --text-muted: #66695e; --primary: #ae472d;
  --primary-hover: #8c3521; --primary-light: #f8eae3; --primary-border: #e5baaa;
  --code-bg: #202620; --code-header-bg: #2a3029; --code-text: #efeee5;
  --shadow-card: none; --shadow-hover: 0 12px 24px -20px #25282155;
}
html.dark {
  color-scheme: dark;
  --bg-surface: #1b201b; --bg-card: #232923; --bg-card-secondary: #2a3029;
  --bg-hover: #30392f; --border: #3a4338; --border-focus: #eba07e;
  --text-main: #f0efe5; --text-muted: #a7b0a0; --primary: #eba07e;
  --primary-hover: #f7b99c; --primary-light: #372b23; --primary-border: #704a38;
  --code-bg: #141a15; --code-header-bg: #202720;
  --shadow-card: none; --shadow-hover: 0 12px 24px -20px #0009;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background-color: var(--bg-surface);
  color: var(--text-main);
  line-height: 1.65;
  transition: background-color 0.2s ease, color 0.2s ease;
  min-height: 100vh;
}

code, pre, kbd {
  font-family: 'JetBrains Mono', Consolas, Monaco, monospace;
}

/* Layout Utilities */
.max-w-6xl { max-width: 72rem; }
.max-w-7xl { max-width: 80rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-xl { max-width: 36rem; }
.max-w-md { max-width: 28rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.min-h-screen { min-height: 100vh; }
.w-full { width: 100%; }
.h-full { height: 100%; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-grow { flex-grow: 1; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.flex-wrap { flex-wrap: wrap; }
.flex-shrink-0 { flex-shrink: 0; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:flex { display: flex; }
  .sm\:inline { display: inline; }
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .sm\:py-20 { padding-top: 5rem; padding-bottom: 5rem; }
  .sm\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }
  .sm\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
  .sm\:text-5xl { font-size: 3rem; line-height: 1.15; }
}
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:flex { display: flex; }
  .md\:hidden { display: none; }
  .md\:flex-row { flex-direction: row; }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:col-span-2 { grid-column: span 2 / span 2; }
  .lg\:text-6xl { font-size: 3.75rem; line-height: 1.1; }
}

/* Colors & Surfaces */
.bg-surface { background-color: var(--bg-surface); }
.bg-card {
  background-color: var(--bg-card);
  box-shadow: var(--shadow-card);
}
.bg-hover { background-color: var(--bg-hover); }
.text-main { color: var(--text-main); }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.border-border { border-color: var(--border); }
.border { border-width: 1px; border-style: solid; border-color: var(--border); }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; border-color: var(--border); }
.border-t { border-top-width: 1px; border-top-style: solid; border-color: var(--border); }
.border-l-4 { border-left-width: 4px; border-left-style: solid; }

.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }

/* Spacing */
.p-1 { padding: 0.25rem; }
.p-1\.5 { padding: 0.375rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-10 { padding: 2.5rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-14 { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-1\.5 { margin-bottom: 0.375rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-14 { margin-top: 3.5rem; }
.mt-16 { margin-top: 4rem; }

/* Typography */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.6; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1.15; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.uppercase { text-transform: uppercase; }

/* Interactive & Forms */
a { text-decoration: none; color: inherit; }
button { cursor: pointer; background: transparent; border: none; font-family: inherit; }

input, select, textarea {
  font-family: inherit;
  font-size: 0.875rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-main);
  border-radius: 0.5rem;
  padding: 0.625rem 0.875rem;
  transition: all 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #4338ca 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

/* Category Badges Styling */
.badge-category {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.15s ease;
}
.badge-tricks {
  background-color: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #ddd6fe;
}
.badge-tricks:hover {
  background-color: #ede9fe;
}
.badge-coding {
  background-color: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}
.badge-coding:hover {
  background-color: #d1fae5;
}
.badge-software {
  background-color: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}
.badge-software:hover {
  background-color: #dbeafe;
}
.badge-blog {
  background-color: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}
.badge-blog:hover {
  background-color: #fef3c7;
}

html.dark .badge-tricks { background-color: #2e1065; color: #c4b5fd; border-color: #5b21b6; }
html.dark .badge-coding { background-color: #064e3b; color: #6ee7b7; border-color: #047857; }
html.dark .badge-software { background-color: #1e3a8a; color: #93c5fd; border-color: #1d4ed8; }
html.dark .badge-blog { background-color: #78350f; color: #fde68a; border-color: #b45309; }

/* Article Card Hover Effects */
.post-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow-card);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.post-card:hover {
  border-color: #93c5fd;
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}
html.dark .post-card:hover {
  border-color: #38bdf8;
}

/* Post Typography (Prose) - Maximum Readability */
.prose {
  color: var(--text-main);
  max-width: 100%;
}
.prose h1, .prose h2, .prose h3, .prose h4 {
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 2.25rem;
  margin-bottom: 0.85rem;
  scroll-margin-top: 5rem;
}
.prose h1 { font-size: 2.25rem; line-height: 1.25; }
.prose h2 {
  font-size: 1.5rem;
  line-height: 1.35;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
}
.prose h3 { font-size: 1.25rem; }
.prose p {
  margin-bottom: 1.35rem;
  line-height: 1.8;
  color: #334155;
  font-size: 1.05rem;
}
html.dark .prose p {
  color: #cbd5e1;
}

.prose ul, .prose ol {
  margin-bottom: 1.35rem;
  padding-left: 1.75rem;
}
.prose li {
  margin-bottom: 0.5rem;
  line-height: 1.75;
  color: #334155;
}
html.dark .prose li {
  color: #cbd5e1;
}
.prose a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}
.prose a:hover {
  color: var(--primary-hover);
}
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.875rem;
  margin: 1.75rem 0;
  border: 1px solid var(--border);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}
.prose blockquote {
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem;
  margin: 1.75rem 0;
  background-color: var(--primary-light);
  border-radius: 0 0.75rem 0.75rem 0;
  color: #1e293b;
  font-style: italic;
}
html.dark .prose blockquote {
  background-color: rgba(56, 189, 248, 0.08);
  color: #e2e8f0;
}

/* Hide legacy WordPress plugin duplicate copy buttons & empty artifacts */
.code-block-pro-copy-button,
.cbp-has-line-numbers > span[role="button"] {
  display: none !important;
}

/* Premium Mac-style Code Snippet Box & 1-Click Copy */
.code-wrapper {
  position: relative;
  margin: 1.75rem 0;
  border-radius: 0.875rem;
  background: var(--code-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2);
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: var(--code-header-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #94a3b8;
}

.code-header-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.mac-dots {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.mac-dot {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  display: inline-block;
}
.mac-dot-red { background-color: #ef4444; }
.mac-dot-yellow { background-color: #f59e0b; }
.mac-dot-green { background-color: #10b981; }

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.2s ease;
}
.copy-btn:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #3b82f6;
  transform: scale(1.02);
}
.copy-btn.copied {
  background: #10b981 !important;
  color: #ffffff !important;
  border-color: #10b981 !important;
}

pre {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.65;
}
code {
  font-size: 0.875em;
}
:not(pre) > code {
  background-color: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  padding: 0.2rem 0.45rem;
  border-radius: 0.35rem;
  font-weight: 600;
}
html.dark :not(pre) > code {
  background-color: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.25);
}

/* Utilities for line clamps */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Luminous Hero Mesh Gradient */
.hero-glow {
  background: radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.1) 0%, rgba(248, 250, 252, 0) 70%);
}
html.dark .hero-glow {
  background: radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.12) 0%, rgba(11, 15, 25, 0) 70%);
}

.text-gradient {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
html.dark .text-gradient {
  background: linear-gradient(135deg, #60a5fa 0%, #38bdf8 50%, #22d3ee 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Animations */
@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.animate-scale-up {
  animation: scaleUp 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.sticky { position: sticky; }
.top-0 { top: 0; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.fixed { position: fixed; }
.inset-0 { inset: 0; }
.hidden { display: none; }

/* The notebook: warm paper, ink, and a single terracotta accent. */
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body, input, select, textarea, button { font-family: 'DM Sans', sans-serif; }
h1, h2, h3, .brand-name, .footer-wordmark { font-family: 'Manrope', sans-serif; }
body { font-size: 15px; }
button { color: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 5px; }
::selection { background: var(--primary); color: var(--bg-card); }
.site-body { display: flex; flex-direction: column; min-height: 100vh; }
.site-body > main { flex: 1; }
.site-container { width: min(1200px, calc(100% - 80px)); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--border); background: var(--bg-surface); }
.header-inner { min-height: 92px; display: flex; align-items: center; gap: 30px; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 13px; flex-shrink: 0; }
.brand-mark { font-family: 'JetBrains Mono', monospace; font-size: 27px; font-weight: 600; letter-spacing: -3px; width: 57px; height: 49px; border: 1.5px solid var(--text-main); display: grid; place-content: center; position: relative; }
.brand-mark > span { color: var(--primary); position: absolute; right: 4px; bottom: 4px; }
.brand-name { font-size: 16px; font-weight: 800; letter-spacing: -.5px; }
.brand-name small { display: block; font-family: 'DM Sans', sans-serif; font-size: 10px; color: var(--text-muted); font-weight: 400; letter-spacing: .25px; margin-top: 2px; }
.desktop-nav { display: flex; align-items: center; gap: 22px; font-size: 12px; font-weight: 500; }
.desktop-nav a { position: relative; padding: 30px 0; }
.desktop-nav a:hover, .desktop-nav a.active { color: var(--primary); }
.desktop-nav a.active::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--primary); position: absolute; bottom: 20px; left: calc(50% - 2px); }
.header-actions { display: flex; align-items: center; gap: 9px; }
.search-trigger { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); padding: 9px 12px; border-radius: 5px; font-size: 12px; }
.search-trigger:hover, .icon-button:hover { background: var(--bg-hover); border-color: var(--text-muted); }
kbd { border: 1px solid var(--border); background: var(--bg-card-secondary); padding: 2px 5px; border-radius: 3px; font-size: 10px; color: var(--text-muted); }
.icon-button { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 5px; flex-shrink: 0; }
.menu-toggle { display: none; }
.mobile-nav { border-top: 1px solid var(--border); padding: 16px 24px; }
.mobile-nav a { display: block; padding: 10px; font-weight: 500; }
.mobile-nav a.active { color: var(--primary); }
.notebook-hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 72px; align-items: center; padding-top: 64px; padding-bottom: 48px; }
.eyebrow, .mono-label { font: 10px/1.6 'JetBrains Mono', monospace; letter-spacing: 1.3px; color: var(--text-muted); }
.eyebrow { display: flex; align-items: center; gap: 9px; }
.status-dot { display: inline-block; width: 6px; height: 6px; background: var(--primary); border-radius: 50%; flex-shrink: 0; }
.hero-copy h1 { font-size: clamp(42px, 4.8vw, 66px); line-height: 1.08; letter-spacing: -3.6px; font-weight: 800; margin: 26px 0 22px; }
.hero-accent { color: var(--primary); position: relative; display: inline-block; }
.hero-accent::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 7px; border-top: 2px solid var(--primary); border-radius: 50%; transform: rotate(-2deg); opacity: .6; }
.hero-description { max-width: 390px; font-size: 16px; line-height: 1.8; color: var(--text-muted); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 23px; margin-top: 28px; }
.btn-primary { background: var(--primary); color: #fffaf5 !important; border: none; border-radius: 5px; box-shadow: none; padding: 13px 20px; font-size: 12px; gap: 19px; }
.btn-primary:hover { background: var(--primary-hover); box-shadow: none; transform: translateY(-2px); }
html.dark .btn-primary { color: #201e19 !important; }
.text-button { font-size: 12px; font-weight: 500; border-bottom: 1px solid var(--border); padding: 7px 0; }
.text-button span { margin-left: 10px; }
.text-button:hover { color: var(--primary); }
.hero-footnote { display: flex; flex-wrap: wrap; gap: 23px; margin-top: 43px; }
.hero-footnote .mono-label { font-size: 8px; letter-spacing: .8px; }
.hero-visual { position: relative; }
.terminal-caption { display: flex; justify-content: space-between; align-items: center; color: var(--text-muted); font: 9px 'JetBrains Mono', monospace; letter-spacing: 1px; margin: 0 4px 14px; }
.terminal-caption > :last-child { font-size: 28px; color: var(--primary); line-height: 1; }
.hero-terminal { background: #202620; color: #e8ebdf; border: 1px solid #323a30; border-radius: 9px; overflow: hidden; box-shadow: 9px 12px 0 var(--bg-card-secondary); transform: rotate(-1deg); }
.terminal-top { display: flex; align-items: center; gap: 24px; padding: 15px 18px; border-bottom: 1px solid #3a4238; font: 10px 'JetBrains Mono', monospace; color: #c1c8b9; background: #2a3029; }
.terminal-dots { display: flex; gap: 5px; }
.terminal-dots i { display: block; width: 7px; height: 7px; border-radius: 50%; background: #a35b43; }
.terminal-dots i:nth-child(2) { background: #b9a271; }
.terminal-dots i:nth-child(3) { background: #88987a; }
.terminal-shell { margin-left: auto; opacity: .55; }
.terminal-code { padding: 30px 25px 34px; font: 12px/2.1 'JetBrains Mono', monospace; }
.terminal-comment { color: #a2ae94; font-size: 10px; }
.terminal-code pre { padding: 14px 0; background: none; color: #f1d4ac; line-height: 2; font-size: 13px; }
.terminal-code code { font-size: inherit; }
.terminal-output { color: #b3c29f; font-size: 11px; }
.terminal-cursor { display: inline-block; width: 7px; height: 12px; background: #b3c29f; margin-left: 8px; vertical-align: middle; }
.terminal-bottom { border-top: 1px solid #3a4238; padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; font: 9px 'JetBrains Mono', monospace; color: #a2ae94; }
.terminal-bottom .status-dot { background: #a2ae94; margin-right: 6px; }
.copy-btn { border-radius: 4px; background: #ffffff09; font-size: 10px; }
.copy-btn:hover { background: #ae472d; border-color: #c07352; transform: none; }
.hero-note { margin-top: 25px; display: flex; align-items: center; gap: 15px; padding-left: 18px; }
.note-symbol { color: var(--primary); font-family: 'Manrope', sans-serif; font-size: 58px; line-height: 1; padding-top: 14px; }
.hero-note p { font-size: 12px; line-height: 1.65; color: var(--text-muted); }
.hero-note strong { color: var(--text-main); font-weight: 500; }
.note-number { margin-left: auto; font: 28px 'JetBrains Mono', monospace; color: var(--border); }
.notebook-library { border-top: 1px solid var(--border); padding-top: 39px; padding-bottom: 50px; }
.library-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.library-heading h2 { font-size: clamp(23px, 2.4vw, 31px); letter-spacing: -1.1px; line-height: 1.3; margin-top: 9px; }
.library-heading h2 > span { color: var(--primary); }
.collection-count { font-size: 11px; color: var(--text-muted); flex-shrink: 0; }
.collection-count strong { font: 20px 'Manrope', sans-serif; font-weight: 800; color: var(--text-main); margin-right: 7px; }
.category-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin: 28px 0; }
.category-tabs a { border: 1px solid var(--border); border-radius: 4px; padding: 8px 13px; font-size: 11px; display: inline-flex; gap: 10px; align-items: center; }
.category-tabs a span { font: 9px 'JetBrains Mono', monospace; opacity: .55; }
.category-tabs a.active { background: var(--text-main); color: var(--bg-card); border-color: var(--text-main); }
.category-tabs a:hover { border-color: var(--text-main); }
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.post-card { border-radius: 6px; padding: 23px; min-width: 0; display: flex; flex-direction: column; transition: transform .2s, border-color .2s; }
.post-card:hover, html.dark .post-card:hover { border-color: var(--primary); box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.post-card-featured { background: var(--bg-card-secondary); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.badge-category { border-radius: 3px; font: 9px 'JetBrains Mono', monospace; padding: 5px 7px; letter-spacing: .1px; border: none; }
.badge-tricks, .badge-tricks:hover { color: #8a5229; background: #f1e5cd; }
.badge-coding, .badge-coding:hover { color: #476144; background: #e6ebdc; }
.badge-software, .badge-software:hover { color: #496067; background: #e0e9e9; }
.badge-blog, .badge-blog:hover { color: #914d3b; background: #f2e2da; }
html.dark .badge-tricks { background: #3e3420; color: #e0bc7e; }
html.dark .badge-coding { background: #2e3e2b; color: #a7c199; }
html.dark .badge-software { background: #2c3a3d; color: #a0c2c7; }
html.dark .badge-blog { background: #443128; color: #e9b69d; }
.card-reading { font: 9px 'JetBrains Mono', monospace; color: var(--text-muted); white-space: nowrap; }
.card-main { display: block; flex: 1; margin: 19px 0 23px; }
.card-main h2 { font-size: 18px; line-height: 1.45; letter-spacing: -.55px; font-weight: 800; margin-bottom: 11px; overflow-wrap: anywhere; }
.card-main p { font-size: 12px; color: var(--text-muted); line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-main:hover h2 { color: var(--primary); }
.card-bottom { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 14px; }
.card-bottom time { font: 9px 'JetBrains Mono', monospace; color: var(--text-muted); }
.card-arrow { width: 27px; height: 27px; border: 1px solid var(--border); border-radius: 50%; display: grid; place-items: center; font-size: 16px; }
.card-arrow:hover { background: var(--primary); border-color: var(--primary); color: var(--bg-card); }
.notebook-bottom { display: flex; gap: 24px; align-items: center; justify-content: space-between; padding-top: 30px; }
.notebook-bottom .mono-label { font-size: 8px; }
.notebook-bottom a { font-size: 11px; }
.notebook-bottom a:hover { color: var(--primary); }
.notebook-bottom a span { padding-left: 10px; }
.pagination { display: flex; justify-content: space-between; margin-top: 30px; font-size: 13px; }
.empty-state { text-align: center; border: 1px dashed var(--border); padding: 50px 20px; color: var(--text-muted); }
.site-footer { border-top: 1px solid var(--border); background: var(--bg-card-secondary); margin-top: 35px; }
.footer-main { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-top: 38px; padding-bottom: 32px; }
.footer-wordmark { font-size: 23px; font-weight: 800; letter-spacing: -.8px; }
.footer-wordmark span { color: var(--primary); }
.footer-main p { font-size: 11px; margin-top: 7px; color: var(--text-muted); }
.footer-links { display: flex; gap: 28px; font-size: 11px; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 20px; padding-top: 17px; padding-bottom: 22px; font: 8px 'JetBrains Mono', monospace; color: var(--text-muted); }
.reading-page { max-width: 800px; padding-top: 38px; }
.back-link { display: inline-block; font: 11px 'JetBrains Mono', monospace; color: var(--text-muted); margin-bottom: 32px; }
.back-link:hover { color: var(--primary); }
.article-heading h1 { font-size: clamp(30px, 4vw, 46px); line-height: 1.2; letter-spacing: -1.8px; }
.article-heading { margin-bottom: 34px; }
.preview-notice { padding: 12px 16px; background: var(--primary-light); border: 1px solid var(--primary-border); border-radius: 5px; margin-bottom: 20px; color: var(--primary); font-size: 12px; }
.prose p, .prose li, html.dark .prose p, html.dark .prose li { color: var(--text-muted); }
.prose p { font-size: 16px; line-height: 1.95; }
.prose h2 { font-size: 24px; border-bottom: 1px solid var(--border); }
.prose img { border-radius: 5px; box-shadow: none; }
.prose blockquote { background: var(--primary-light); color: var(--text-main); border-radius: 0 5px 5px 0; }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 24px 0; }
.prose td, .prose th { border: 1px solid var(--border); padding: 10px 15px; }
.prose pre { white-space: pre; }
.prose > pre { margin: 24px 0; border-radius: 6px; }
.code-wrapper { border-radius: 6px; box-shadow: none; }
.code-header { padding: 12px 18px; }
.hero-glow, html.dark .hero-glow { background: var(--bg-card-secondary); }
.text-gradient, html.dark .text-gradient { background: none; -webkit-text-fill-color: var(--primary); }
.bg-gradient-to-tr { background: var(--primary); color: var(--bg-card); }
.search-modal { position: fixed; inset: 0; z-index: 60; background: #151b19aa; backdrop-filter: blur(4px); padding: 110px 20px 25px; overflow-y: auto; }
.search-dialog { width: min(580px, 100%); margin-inline: auto; background: var(--bg-card); border: 1px solid var(--border); border-radius: 9px; overflow: hidden; box-shadow: 0 20px 100px #0004; }
.search-dialog-heading { padding: 20px 24px 10px; display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.search-dialog-heading h2 { font-size: 19px; letter-spacing: -.5px; }
#search-input { width: calc(100% - 48px); margin: 0 24px 18px; background: var(--bg-surface); padding: 13px 15px; }
.search-results { max-height: 360px; overflow-y: auto; border-top: 1px solid var(--border); }
.search-result { display: block; padding: 15px 24px; border-bottom: 1px solid var(--border); }
.search-result:hover, .search-result:focus-visible { background: var(--bg-hover); }
.search-result small { font: 9px 'JetBrains Mono', monospace; color: var(--primary); }
.search-result strong { display: block; font-size: 14px; margin: 4px 0; }
.search-result p { color: var(--text-muted); font-size: 11px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.search-message { padding: 30px 24px; font-size: 13px; color: var(--text-muted); text-align: center; }
.search-hint { display: flex; justify-content: space-between; padding: 13px 24px; font-size: 10px; color: var(--text-muted); background: var(--bg-card-secondary); }
.toast { position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%); z-index: 100; padding: 12px 24px; border: 1px solid var(--border); border-radius: 5px; background: var(--text-main); color: var(--bg-surface); font-size: 12px; box-shadow: 0 5px 30px #0002; }
.skip-link { position: fixed; top: -100px; left: 20px; background: var(--text-main); color: var(--bg-surface); padding: 10px 20px; z-index: 100; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
/* Shared CMS primitives: deliberately independent of a utility CSS build. */
.block { display: block; } .inline-flex { display: inline-flex; } .relative { position: relative; }
.overflow-hidden { overflow: hidden; } .overflow-x-auto { overflow-x: auto; }
.grid-cols-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
.max-w-sm { max-width: 24rem; } .leading-relaxed { line-height: 1.75; }
.font-mono { font-family: 'JetBrains Mono', monospace; } .text-left { text-align: left; }
.text-white { color: #fffaf5; } .text-red-400 { color: #bd4935; } .text-emerald-400 { color: #648257; } .text-amber-400 { color: #ad793a; } .text-cyan-400 { color: var(--primary); }
.p-12 { padding: 3rem; } .pt-2 { padding-top: .5rem; } .pt-4 { padding-top: 1rem; } .pb-2 { padding-bottom: .5rem; } .pb-4 { padding-bottom: 1rem; } .pb-8 { padding-bottom: 2rem; }
.mb-5 { margin-bottom: 1.25rem; } .mb-10 { margin-bottom: 2.5rem; } .mt-10 { margin-top: 2.5rem; } .mt-20 { margin-top: 5rem; } .mr-3 { margin-right: .75rem; }
.space-y-1 > * + * { margin-top: .25rem; } .space-y-4 > * + * { margin-top: 1rem; } .space-y-6 > * + * { margin-top: 1.5rem; }
.w-7 { width: 1.75rem; } .h-7 { height: 1.75rem; } .w-9 { width: 2.25rem; } .h-9 { height: 2.25rem; } .w-12 { width: 3rem; } .h-12 { height: 3rem; }
svg[class] { width: 1.1rem; height: 1.1rem; flex-shrink: 0; }
input, select, textarea { border-radius: 5px; } textarea { resize: vertical; max-width: 100%; }
.admin-body { min-height: 100vh; background: var(--bg-surface); }
.admin-header { background: var(--bg-card); border-bottom: 1px solid var(--border); padding: 18px 0; }
.admin-header-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.admin-header .brand-name small { text-transform: uppercase; font: 9px 'JetBrains Mono', monospace; letter-spacing: 1px; }
.admin-nav { display: flex; gap: 7px; margin-top: 21px; overflow-x: auto; white-space: nowrap; padding-bottom: 3px; }
.admin-nav a { padding: 8px 16px; border: 1px solid transparent; border-radius: 4px; font-size: 12px; color: var(--text-muted); }
.admin-nav a.active { border-color: var(--border); background: var(--bg-card-secondary); color: var(--text-main); }
.admin-nav a:hover { color: var(--primary); }
.admin-main { padding-top: 40px; padding-bottom: 50px; }
.admin-main h1 { letter-spacing: -1px; } .admin-main .rounded-xl { border-radius: 6px; }
.admin-main table { min-width: 600px; } .admin-main th { background: var(--bg-card-secondary); font-size: 10px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-muted); }
.admin-main td { border-top: 1px solid var(--border); padding-top: 16px; padding-bottom: 16px; }
.admin-main tr:hover td { background: var(--bg-hover); }
.admin-main [data-editor-action] { min-width: 32px; min-height: 32px; border-radius: 3px; }
.admin-main [data-editor-action]:hover { background: var(--bg-hover); }
.login-body { background: var(--bg-card-secondary); background-image: radial-gradient(var(--border) 1px, transparent 1px); background-size: 18px 18px; }
.login-panel { box-shadow: 12px 12px 0 var(--border); border-radius: 8px; }
.login-panel h1 { font-size: 26px; }
.hidden { display: none; }
@media (min-width: 640px) { .sm\:flex { display: flex; } .sm\:inline { display: inline; } }
@media (min-width: 768px) { .md\:flex { display: flex; } .md\:hidden { display: none; } .md\:grid-cols-4 { grid-template-columns: repeat(4,minmax(0,1fr)); } }
@media (max-width: 1100px) { .desktop-nav { gap: 14px; } .search-trigger kbd { display: none; } .notebook-hero { gap: 40px; } }
@media (max-width: 980px) { .desktop-nav { display: none; } .menu-toggle { display: inline-flex; } .notebook-hero { gap: 34px; } .hero-copy h1 { font-size: 47px; letter-spacing: -2.5px; } .article-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .footer-links { gap: 16px; } }
@media (min-width: 981px) { #mobile-menu { display: none; } }
@media (max-width: 700px) {
  .site-container { width: calc(100% - 40px); }
  .header-inner { min-height: 76px; gap: 10px; } .brand-name { font-size: 13px; } .brand-name small { font-size: 9px; } .brand-mark { width: 44px; height: 41px; font-size: 23px; } .brand { gap: 9px; }
  .search-trigger span { display: none; } .search-trigger { padding: 9px; } .header-actions { gap: 5px; } .icon-button { width: 34px; height: 34px; }
  .notebook-hero { grid-template-columns: 1fr; gap: 38px; padding-top: 42px; padding-bottom: 43px; } .hero-copy h1 { font-size: clamp(42px, 9vw, 57px); } .hero-copy .eyebrow { font-size: 8px; letter-spacing: 1px; }
  .hero-description { font-size: 14px; max-width: 400px; } .hero-footnote { margin-top: 25px; gap: 18px; } .hero-visual { max-width: 520px; width: 100%; } .hero-note { margin-top: 20px; } .terminal-code { padding: 22px; }
  .library-heading { align-items: flex-start; } .collection-count { padding-top: 3px; font-size: 9px; max-width: 85px; text-align: right; } .collection-count strong { display: block; margin: 0; } .library-heading h2 { font-size: 25px; }
  .notebook-library { padding-top: 28px; } .article-grid { gap: 13px; } .post-card { padding: 18px; } .card-main h2 { font-size: 17px; } .card-reading { font-size: 8px; }
  .notebook-bottom { align-items: flex-start; flex-direction: column; gap: 12px; } .footer-main { align-items: flex-start; flex-direction: column; padding-top: 30px; } .footer-bottom { font-size: 7px; flex-wrap: wrap; }
  .search-modal { padding-top: 85px; } .search-dialog-heading { padding-inline: 18px; } #search-input { margin-inline: 18px; width: calc(100% - 36px); } .search-dialog-heading h2 { font-size: 17px; }
  .admin-header .brand-name { font-size: 14px; } .admin-header-top .text-button { font-size: 10px; } .admin-main { padding-top: 26px; } .admin-main .btn-primary { padding: 10px 13px; } .admin-main > div:first-child { gap: 16px; flex-wrap: wrap; }
}
@media (max-width: 480px) { .article-grid { grid-template-columns: 1fr; } .hero-note .note-number { font-size: 23px; } .brand-name small { display: none; } .brand-name { max-width: 95px; line-height: 1.3; } .card-main h2 { font-size: 20px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

html.dark :not(pre) > code { background: var(--primary-light); color: var(--primary); border-color: var(--primary-border); }
.admin-main tbody td span { background: var(--bg-card-secondary); border: 1px solid var(--border); padding: 4px 8px; border-radius: 3px; font-size: 10px; }
@keyframes notebookReveal { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: no-preference) { .hero-copy { animation: notebookReveal .6s ease both; } .hero-visual { animation: notebookReveal .6s .1s ease both; } }
