/*
 * CoinPub theme — ported verbatim from the Lovable export's src/styles.css
 * (design tokens + @utility classes). Values, class names, and selectors
 * are unchanged. Only the delivery mechanism differs: the Lovable project
 * used Tailwind's build-time @theme/@utility directives; this file provides
 * the same resulting CSS as plain rules so it works via a stylesheet link
 * in a Hugo site with no Node/Tailwind build step. Tailwind's utility
 * classes themselves (grid, flex, px-4, etc.) are loaded separately via the
 * Play CDN in baseof.html — see the flag in the write-up about swapping
 * that for a compiled Tailwind build later.
 */

:root {
  --radius: 0.5rem;
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --radius-2xl: calc(var(--radius) + 8px);
  --radius-3xl: calc(var(--radius) + 12px);
  --radius-4xl: calc(var(--radius) + 16px);

  --background: oklch(0.178 0.018 253.8);
  --foreground: oklch(0.943 0.012 245.4);
  --card: oklch(0.222 0.019 253.9);
  --card-foreground: oklch(0.943 0.012 245.4);
  --popover: oklch(0.222 0.019 253.9);
  --popover-foreground: oklch(0.943 0.012 245.4);
  --primary: oklch(0.784 0.126 178.9);
  --primary-foreground: oklch(0.178 0.018 253.8);
  --secondary: oklch(0.269 0.023 253.5);
  --secondary-foreground: oklch(0.943 0.012 245.4);
  --muted: oklch(0.269 0.023 253.5);
  --muted-foreground: oklch(0.671 0.021 251.6);
  --accent: oklch(0.784 0.126 178.9);
  --accent-foreground: oklch(0.178 0.018 253.8);
  --destructive: oklch(0.577 0.245 27.325);
  --destructive-foreground: oklch(0.984 0.003 247.858);
  --border: oklch(0.313 0.024 252.9);
  --input: oklch(0.313 0.024 252.9);
  --ring: oklch(0.784 0.126 178.9);
  --chart-1: oklch(0.646 0.222 41.116);
  --chart-2: oklch(0.6 0.118 184.704);
  --chart-3: oklch(0.398 0.07 227.392);
  --chart-4: oklch(0.828 0.189 84.429);
  --chart-5: oklch(0.769 0.188 70.08);
  --sidebar: oklch(0.984 0.003 247.858);
  --sidebar-foreground: oklch(0.129 0.042 264.695);
  --sidebar-primary: oklch(0.208 0.042 265.755);
  --sidebar-primary-foreground: oklch(0.984 0.003 247.858);
  --sidebar-accent: oklch(0.968 0.007 247.896);
  --sidebar-accent-foreground: oklch(0.208 0.042 265.755);
  --sidebar-border: oklch(0.929 0.013 255.508);
  --sidebar-ring: oklch(0.704 0.04 256.788);

  /* Tailwind color-* utility bindings (bg-background, text-primary, etc.) */
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--ring);
  --color-ring-offset-background: var(--background);
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --cp-bg: #0d1117;
  --cp-card-bg: #11161d;
  --cp-border: #232a34;
  --cp-accent: #2fd9a8;
  --cp-accent-dim: rgba(47, 217, 168, 0.12);
  --cp-text: #e6e9ef;
  --cp-text-muted: #8b96a5;
}

@layer base {
  * {
    border-color: var(--color-border);
  }

  body {
    background-color: var(--color-background);
    color: var(--color-foreground);
    font-family: var(--font-sans);
    min-width: 320px;
  }

  html {
    scroll-behavior: smooth;
  }

  a {
    text-decoration: none;
  }

  ::selection {
    background: color-mix(in oklab, var(--primary) 25%, transparent);
  }
}

.focus-ring:focus-visible {
  outline: 2px solid var(--color-ring);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

.nav-link {
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  line-height: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted-foreground);
  transition: color 160ms ease, background-color 160ms ease;
}
.nav-link:hover {
  color: var(--color-foreground);
  background-color: var(--color-card);
}
.nav-link:focus-visible {
  outline: 2px solid var(--color-ring);
  outline-offset: 2px;
}
@media (min-width: 640px) {
  .nav-link {
    padding-inline: 0.625rem;
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
  }
}

.nav-link-accent {
  color: color-mix(in oklab, var(--primary) 82%, transparent);
}
.nav-link-accent:hover {
  color: var(--color-primary);
  background-color: color-mix(in oklab, var(--primary) 10%, transparent);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-primary);
}

.icon-box {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in oklab, var(--border) 75%, transparent);
  background-color: var(--color-background);
  color: var(--color-primary);
}

.resource-card {
  display: flex;
  min-height: 12.25rem;
  flex-direction: column;
  gap: 0.75rem;
  border-radius: var(--radius);
  border: 1px solid color-mix(in oklab, var(--border) 78%, transparent);
  background-color: color-mix(in oklab, var(--card) 72%, transparent);
  padding: 1rem;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.resource-card:hover {
  border-color: color-mix(in oklab, var(--primary) 50%, transparent);
  background-color: var(--color-card);
}
.resource-card:focus-visible {
  outline: 2px solid var(--color-ring);
  outline-offset: 2px;
}

.latest-link {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: var(--radius);
  border: 1px solid color-mix(in oklab, var(--border) 78%, transparent);
  background-color: color-mix(in oklab, var(--card) 65%, transparent);
  padding: 1rem;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.latest-link:hover {
  border-color: color-mix(in oklab, var(--primary) 50%, transparent);
  background-color: var(--color-card);
}
.latest-link:focus-visible {
  outline: 2px solid var(--color-ring);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------------------
 * Extensions below this line are NOT in the Lovable export. The export
 * only styled the homepage. These follow the same token system so post
 * and page templates (single.html / list.html) look consistent with the
 * homepage rather than unstyled. Flagged in the write-up as an assumption.
 * ------------------------------------------------------------------- */

.prose-content {
  max-width: 68ch;
  color: var(--color-foreground);
  line-height: 1.75;
}

.prose-content h1,
.prose-content h2,
.prose-content h3 {
  color: var(--color-foreground);
  font-weight: 600;
  margin-top: 2em;
  margin-bottom: 0.6em;
}
.prose-content p {
  margin-bottom: 1.25em;
  color: var(--color-foreground);
}
.prose-content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.prose-content img {
  border-radius: var(--radius);
  border: 1px solid color-mix(in oklab, var(--border) 78%, transparent);
}
.prose-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.prose-content th,
.prose-content td {
  border: 1px solid color-mix(in oklab, var(--border) 78%, transparent);
  padding: 0.5rem 0.75rem;
  text-align: left;
}
.prose-content blockquote {
  border-left: 2px solid var(--color-primary);
  padding-left: 1rem;
  color: var(--color-muted-foreground);
  font-style: italic;
}
.prose-content code {
  font-family: var(--font-mono);
  background-color: var(--color-card);
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-sm);
  font-size: 0.85em;
}
.prose-content pre {
  background-color: var(--color-card);
  border: 1px solid color-mix(in oklab, var(--border) 78%, transparent);
  border-radius: var(--radius);
  padding: 1rem;
  overflow-x: auto;
}
.prose-content.spreadsheet-single {
  padding: 6em 2em;
      box-sizing: border-box;
      text-align: justify;
      max-width: 800px;
      margin: 0 auto;
}
/*
  Notes single-entry body paragraphs match the exact Tailwind classes
  used per-<p> in src/routes/notes.$slug.tsx (text-[15px] leading-7
  text-muted-foreground), which differ slightly from the generic
  .prose-content color/size defaults used on posts/pages. Scoped to
  .prose-content--note so post/page prose is untouched.
*/
.prose-content--note p {
  font-size: 15px;
  line-height: 1.75rem;
  color: var(--color-muted-foreground);
}

.tag-pill {
  display: inline-block;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in oklab, var(--border) 78%, transparent);
  padding: 0.2rem 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted-foreground);
  transition: color 160ms ease, border-color 160ms ease;
}
.tag-pill:hover {
  color: var(--color-primary);
  border-color: color-mix(in oklab, var(--primary) 50%, transparent);
}


/*
button
*/

.c-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: var(--cp-card-bg);
  color: var(--cp-accent);
  border: 1px solid var(--cp-border);
  border-radius: 8px;
  font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease,
    box-shadow 0.2s ease, transform 0.15s ease;
}

.c-btn:hover {
  border-color: var(--cp-accent);
  background: var(--cp-accent-dim);
  box-shadow: 0 0 0 1px var(--cp-accent) inset, 0 0 18px -4px var(--cp-accent);
}

.c-btn:active {
  transform: translateY(1px);
}

.c-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--cp-bg), 0 0 0 4px var(--cp-accent);
}

/* Arrow icon like the "↗" used on the cards */
.c-btn__icon {
  font-size: 0.9em;
  line-height: 1;
  transform: translate(0, 0);
  transition: transform 0.2s ease;
}

.c-btn:hover .c-btn__icon {
  transform: translate(2px, -2px);
}

/* Solid/filled variant — for primary CTAs like "Quick Start" */
.c-btn--solid {
  background: var(--cp-accent);
  color: #06110d;
  border-color: var(--cp-accent);
}

.c-btn--solid:hover {
  background: #26c497;
  box-shadow: 0 0 20px -4px var(--cp-accent);
}

/* Ghost/muted variant — for secondary actions */
.c-btn--ghost {
  color: var(--cp-text-muted);
  border-color: var(--cp-border);
}

.c-btn--ghost:hover {
  color: var(--cp-text);
  border-color: var(--cp-text-muted);
  background: transparent;
  box-shadow: none;
}

/* Small variant — matches the compact card corner links */
.c-btn--sm {
  padding: 0.35rem 0.6rem;
  font-size: 0.65rem;
}


.prose-content iframe {
  max-width: 100%;
width: 100%;
height: 350px;
}
