/* =========================================== boringSQL - Pico CSS Customizations Based on Pico CSS with One Light/Dark Pro colors =========================================== */ /* --------------------------------------------- CSS Custom Properties (Design Tokens) --------------------------------------------- */ :root { /* Light mode colors - Warm cream palette */ --color-theme: #fdfbf9; --color-entry: #f8f3ed; --color-primary: #1a1a1a; --color-secondary: #666666; --color-tertiary: #ede7de; --color-border: rgba(0, 0, 0, 0.1); --color-code-bg: #f3ece3; /* Accent color - Swift orange */ --color-accent: #F05138; --color-accent-hover: #d63d25; /* Visualizer colors - light mode */ --viz-clean: #16a34a; --viz-dirty: #ea580c; --viz-pinned: #9333ea; /* Page visualizer colors - light mode */ --viz-page-header: #7c3aed; --viz-page-lp: #0891b2; --viz-page-tuple: #16a34a; --viz-page-special: #6b7280; /* Code - Gruvbox dark */ --color-hljs-bg: #282828; --color-code-text: #fbf1c7; /* Layout */ --gap: 24px; --content-gap: 20px; --nav-width: 1024px; --main-width: 720px; --header-height: 60px; --footer-height: 60px; --radius: 8px; /* Fonts */ --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --font-size-base: 18px; /* Pico CSS overrides */ --pico-font-family: var(--font-sans); --pico-font-size: var(--font-size-base); --pico-line-height: 1.6; --pico-background-color: var(--color-theme); --pico-color: var(--color-primary); --pico-muted-color: var(--color-secondary); --pico-primary: var(--color-accent); --pico-primary-hover: var(--color-accent-hover); --pico-secondary: var(--color-secondary); --pico-card-background-color: var(--color-entry); --pico-card-border-color: var(--color-border); --pico-border-radius: var(--radius); --pico-code-background-color: var(--color-code-bg); --pico-code-color: var(--color-primary); --pico-block-spacing-vertical: 1.5rem; --pico-typography-spacing-vertical: 1.5rem; } /* Dark mode colors - navy from logo */ [data-theme="dark"], .dark { --color-theme: #252d3a; --color-entry: #2d3748; --color-primary: #f5f5f5; --color-secondary: #9ca3af; --color-tertiary: #3d4654; --color-border: rgba(255, 255, 255, 0.1); --color-code-bg: #1e2433; --pico-background-color: var(--color-theme); --pico-color: var(--color-primary); --pico-muted-color: var(--color-secondary); --pico-card-background-color: var(--color-entry); --pico-card-border-color: var(--color-border); --pico-code-background-color: var(--color-code-bg); --pico-code-color: var(--color-primary); /* Visualizer colors - dark mode (darker bg for white text contrast) */ --viz-clean: #059669; --viz-dirty: #c2410c; --viz-pinned: #7c3aed; /* Page visualizer colors - dark mode */ --viz-page-header: #a78bfa; --viz-page-lp: #22d3ee; --viz-page-tuple: #4ade80; --viz-page-special: #9ca3af; } @media screen and (max-width: 768px) { :root { --gap: 14px; } .main { overflow-x: clip; } } /* --------------------------------------------- Base Styles & Pico Overrides --------------------------------------------- */ html { -webkit-tap-highlight-color: transparent; overflow-y: scroll; } body { font-family: var(--font-sans); font-size: var(--font-size-base); line-height: 1.6; word-break: break-word; background-color: var(--color-theme); color: var(--color-primary); margin: 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } a { color: var(--color-primary); text-decoration: none; } a:hover { color: var(--color-accent); } h1, h2, h3, h4, h5, h6 { color: var(--color-primary); line-height: 1.2; margin: 0 0 0.5em; font-weight: 700; } h1, h2 { font-weight: 800; letter-spacing: -0.02em; } ul, ol { padding-left: 1.5em; } img { display: block; max-width: 100%; height: auto; } code { direction: ltr; } table { width: 100%; border-collapse: collapse; border-spacing: 0; overflow-x: auto; word-break: keep-all; } /* --------------------------------------------- Layout --------------------------------------------- */ .main { position: relative; min-height: calc(100vh - var(--header-height) - var(--footer-height)); max-width: 960px; margin: 0 auto; padding: var(--gap); } /* --------------------------------------------- Article Layout (two-column with sidebar) --------------------------------------------- */ .article-layout { display: flex; gap: 3rem; align-items: flex-start; margin-top: 2rem; } .article-main { flex: 1; min-width: 0; max-width: 680px; } .article-sidebar { width: 220px; flex-shrink: 0; font-size: 0.85rem; } .article-sidebar .events-section { background: transparent; border: none; padding: 0; margin: 0; } .article-sidebar .events-header h3 { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-secondary); } .article-sidebar .events-header p { display: none; } .article-sidebar .event-item { flex-direction: column; padding: 0.5rem 0; } .article-sidebar .event-date { font-size: 0.75rem; min-width: auto; margin: 0 0 0.2rem 0; } .article-sidebar .event-name { font-size: 0.8rem; } .article-sidebar .event-location { font-size: 0.7rem; } .article-sidebar .event-tag { display: none; } @media screen and (max-width: 900px) { .article-layout { flex-direction: column; } .article-main { max-width: 100%; width: 100%; overflow-x: clip; } .article-sidebar { width: 100%; margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--color-border); } } /* --------------------------------------------- Hero Section --------------------------------------------- */ .hero { padding-top: 1.5rem; padding-bottom: 1.5rem; } /* --------------------------------------------- Pitch Layout (Two-column with sidebar) --------------------------------------------- */ .pitch { display: flex; gap: 3rem; align-items: flex-start; padding-top: 1.5rem; border-top: 2px solid var(--color-primary); } .pitch-main { flex: 1; min-width: 0; } .pitch-aside { width: 300px; flex-shrink: 0; } /* Sidebar events styling */ .sidebar-events.events-section { font-size: 0.9rem; background: transparent; border: none; padding: 0; border-radius: 0; } .sidebar-events .event-item { flex-direction: column; position: relative; padding: 0.75rem 4rem 0.75rem 0; } .sidebar-events .event-item:first-child { padding-top: 0; } .sidebar-events .event-date { font-size: 0.75rem; min-width: auto; margin-right: 0; margin-bottom: 0.25rem; } .sidebar-events .event-name { font-size: 0.85rem; } .sidebar-events .event-tag { position: absolute; top: 0; right: 0; margin: 0; font-size: 0.65rem; } .sidebar-events .event-location { font-size: 0.75rem; } /* --------------------------------------------- Header & Navigation --------------------------------------------- */ .header { display: flex; justify-content: space-between; align-items: center; max-width: 960px; margin: 0 auto; padding: 1.5rem var(--gap); background-color: var(--color-theme); } .header-left { display: flex; align-items: center; gap: 1rem; } .header .logo { display: flex; align-items: center; } .header .logo-img { width: 166px; height: 40px; background-image: url('/boringSQL-logo-light.png'); background-size: contain; background-position: center left; background-repeat: no-repeat; } .dark .header .logo-img { background-image: url('/boringSQL-logo-dark.png'); } /* Navigation */ .header .nav { display: flex; align-items: center; gap: 2rem; } .header .nav a { font-size: 0.9rem; font-weight: 500; color: var(--color-secondary); text-decoration: none; } .header .nav a:hover { color: var(--color-primary); } .header .nav a.active { color: var(--color-primary); font-weight: 600; } /* Theme toggle */ #theme-toggle { background: none; border: none; cursor: pointer; color: var(--color-secondary); padding: 0; display: flex; align-items: center; } #theme-toggle:hover { color: var(--color-primary); } .dark #moon { display: none; } body:not(.dark) #sun { display: none; } /* Hamburger menu toggle */ .menu-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--color-secondary); padding: 0; align-items: center; } .menu-toggle:hover { color: var(--color-primary); } .menu-toggle .close-icon { display: none; } .menu-toggle.open .menu-icon { display: none; } .menu-toggle.open .close-icon { display: block; } .header-left-actions { display: flex; align-items: center; gap: 1rem; } /* Mobile header */ @media screen and (max-width: 768px) { .header { flex-wrap: wrap; padding: 1rem var(--gap); gap: 0; } .header-left { width: 100%; justify-content: space-between; } .menu-toggle { display: flex; } .header .nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; gap: 0; padding-top: 0.75rem; } .header .nav.open { display: flex; } .header .nav a, .header .nav .nav-dropdown-toggle { padding: 0.6rem 0; white-space: nowrap; } .header .nav .nav-dropdown { position: static; } } /* --------------------------------------------- Navigation Dropdown --------------------------------------------- */ .nav-dropdown { position: relative; } .nav-dropdown-toggle { display: flex; align-items: center; gap: 0.25rem; background: none; border: none; padding: 0; font-size: 0.9rem; font-weight: 500; font-family: inherit; color: var(--color-secondary); cursor: pointer; transition: color 0.2s; } .nav-dropdown-toggle:hover { color: var(--color-primary); } .nav-chevron { transition: transform 0.2s; } .nav-dropdown.open .nav-chevron { transform: rotate(180deg); } .nav-dropdown-menu { position: absolute; top: calc(100% + 0.5rem); left: 50%; transform: translateX(-50%); min-width: 180px; background: var(--color-entry); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0.2s; z-index: 100; } .nav-dropdown.open .nav-dropdown-menu { opacity: 1; visibility: visible; } .nav-dropdown-menu a { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1rem; font-size: 0.875rem; color: var(--color-primary); text-decoration: none; transition: background 0.15s; } .nav-dropdown-menu a:first-child { border-radius: var(--radius) var(--radius) 0 0; } .nav-dropdown-menu a:last-child { border-radius: 0 0 var(--radius) var(--radius); } .nav-dropdown-menu a:hover { background: var(--color-tertiary); } .nav-tag { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.15rem 0.4rem; background: var(--color-accent); color: white; border-radius: 3px; } .nav-external-icon { margin-left: auto; opacity: 0.5; } /* Mobile dropdown */ @media screen and (max-width: 768px) { .nav-dropdown-menu { position: static; transform: none; min-width: 0; border: none; box-shadow: none; background: transparent; padding-left: 1rem; opacity: 1; visibility: visible; display: none; } .nav-dropdown.open .nav-dropdown-menu { display: block; } .nav-dropdown-menu a { white-space: nowrap; padding: 0.4rem 0; } .nav-dropdown-menu a:hover { background: transparent; color: var(--color-accent); } .nav-tag { font-size: 0.6rem; padding: 0.1rem 0.3rem; white-space: nowrap; } } /* --------------------------------------------- Footer --------------------------------------------- */ .footer { max-width: 48rem; margin: 0 auto; padding: 1rem var(--gap); text-align: center; font-size: 0.75rem; line-height: 1.5; color: var(--color-secondary); } .footer a { color: var(--color-secondary); border-bottom: 1px solid currentColor; } .footer a:hover { color: var(--color-primary); } /* Scroll to top button */ #top-link { position: fixed; z-index: 50; bottom: 3.5rem; right: 2rem; width: 2.75rem; height: 2.75rem; padding: 0.75rem; border-radius: 50%; background-color: var(--color-tertiary); color: var(--color-secondary); font-size: 0.75rem; visibility: hidden; opacity: 0; transition: all 0.5s; text-decoration: none; display: flex; align-items: center; justify-content: center; } #top-link:hover { color: var(--color-primary); } /* --------------------------------------------- Page Headers & Breadcrumbs --------------------------------------------- */ .page-header, .post-header { margin: 24px auto var(--content-gap); } .post-title { margin-bottom: 2px; font-size: 2.625rem; font-weight: 800; letter-spacing: -0.035em; } .post-meta, .breadcrumbs { font-size: 0.875rem; display: flex; flex-wrap: wrap; color: var(--color-secondary); } .breadcrumbs a { font-size: 1rem; color: var(--color-secondary); } .breadcrumbs a:hover { color: var(--color-accent); } /* --------------------------------------------- Article Cards (Home & Section pages) --------------------------------------------- */ .posts-container .post-entry { margin: 0 -1.25rem; padding: 1.25rem; border-radius: 0; border: none; background: transparent; } .posts-container .post-entry:nth-child(even) { background: rgba(0, 0, 0, 0.04); } .dark .posts-container .post-entry:nth-child(even) { background: rgba(255, 255, 255, 0.05); } .post-entry { position: relative; margin-bottom: 1rem; padding: 1.25rem; border-radius: 10px; background-color: var(--color-entry); border: 1px solid var(--color-border); transition: transform 0.2s, border-color 0.2s; } .post-entry:hover { border-color: var(--color-primary); } .post-entry:active { transform: scale(0.96); } .post-entry .entry-header h2 { font-size: 1.5rem; line-height: 1.25; font-weight: 700; margin: 0 0 0.5rem; } .post-entry .entry-content { margin: 0.5rem 0; font-size: 0.875rem; line-height: 1.625; color: var(--color-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .post-entry .entry-content p { margin: 0; } .post-entry .entry-footer { font-size: 0.8125rem; color: var(--color-secondary); } .post-entry .entry-link { position: absolute; inset: 0; } /* --------------------------------------------- Home Info Section (Hero style from Design Guide) --------------------------------------------- */ .first-entry { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: auto; margin: 0; } .first-entry .entry-header { overflow: visible; display: block; } .first-entry .entry-header h1 { font-size: 2.5rem; line-height: 1.1; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 0.75rem; } .first-entry .entry-header h1 em { font-style: normal; color: var(--color-primary); position: relative; white-space: nowrap; } .first-entry .entry-header h1 em::before { content: ''; position: absolute; left: -0.15em; right: -0.15em; bottom: 0.15em; height: 0.4em; background: #FDD100; border-radius: 2px 12px 4px 8px; transform: skewX(-8deg) rotate(-1deg); z-index: -1; } .dark .first-entry .entry-header h1 em::before { background: #F05138; } .first-entry .entry-content { margin: 0; font-size: 1.2rem; font-weight: 400; color: var(--color-secondary); line-height: 1.5; } .first-entry .entry-content p { margin: 0 0 1rem; } .first-entry .entry-content p:last-child { margin-bottom: 0; } .first-entry .entry-footer { margin: 1.25rem 0; } .home-info .entry-content { -webkit-line-clamp: unset; } /* Section intro text */ .section-intro { margin-bottom: 2rem; } /* Social icons */ .social-icons { display: flex; align-items: center; gap: 0.75rem; padding: 0; } .social-icons a { display: inline-flex; color: var(--color-secondary); transition: all 0.2s; } .social-icons a:hover { color: var(--color-accent); transform: translateY(-2px); } .social-icons svg { width: 1.5rem; height: 1.5rem; } /* Section headers (Recent Posts, etc.) */ .section-header { margin: 0 0 1.25rem; } .section-header h2 { margin: 0; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-secondary); } /* View all button */ .pitch-main .pagination { margin-top: 1.5rem; } .view-all-btn { display: inline-block; padding: 0 1rem; font-size: 0.875rem; line-height: 2.25rem; border-radius: 9999px; background-color: var(--color-primary); color: var(--color-theme) !important; text-decoration: none; } .view-all-btn:hover { opacity: 0.9; color: var(--color-theme) !important; } /* --------------------------------------------- Tags --------------------------------------------- */ .post-tags { list-style: none; padding: 0; margin: 0; } .post-tags li { display: inline-block; margin-inline-end: 3px; margin-bottom: 5px; } .post-tags a { display: block; padding: 0 14px; font-size: 0.875rem; line-height: 2.125rem; border-radius: var(--radius); background-color: var(--color-code-bg); color: var(--color-secondary); border: 1px solid var(--color-border); } .post-tags a:hover { background-color: var(--color-border); color: var(--color-primary); } /* Terms/Tags page */ .terms-tags { list-style: none; padding: 0; } .terms-tags li { display: inline-block; margin: 10px; font-weight: 500; } .terms-tags a { display: block; padding: 3px 10px; border-radius: 6px; background-color: var(--color-tertiary); transition: transform 0.1s; } .terms-tags a:active { transform: scale(0.96); } /* --------------------------------------------- Table of Contents --------------------------------------------- */ .toc { margin: 0 0 2rem; padding: 1rem; background: rgba(0, 0, 0, 0.04); border-radius: 8px; } .dark .toc { background: rgba(255, 255, 255, 0.05); } .toc details summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 0.4em; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-secondary); } .toc details summary::-webkit-details-marker { display: none; } .toc details summary::before { content: ""; width: 0; height: 0; border-left: 5px solid var(--color-secondary); border-top: 4px solid transparent; border-bottom: 4px solid transparent; transition: transform 0.2s ease; } .toc details[open] summary::before { transform: rotate(90deg); } .toc .details { font-weight: 700; } .toc .inner { margin-top: 0.5rem; padding: 0; } .toc .inner > ul { margin: 0; padding-left: 0; list-style: none; } .toc .inner > ul > li { padding: 0.25em 0; } .toc .inner > ul > li > a { color: var(--color-secondary); font-size: 0.85rem; } .toc .inner > ul > li > a:hover { color: var(--color-primary); } .toc li ul { margin-top: 0.25em; margin-left: 0.5rem; padding-left: 0.75rem; border-left: 1px solid var(--color-border); list-style: none; } .toc li ul li { padding: 0.2em 0; } .toc li ul li a { font-size: 0.85rem; color: var(--color-secondary); opacity: 0.8; } .toc li ul li a:hover { opacity: 1; } .toc a { color: var(--color-secondary); text-decoration: none; transition: color 0.2s ease; } .toc a:hover { color: var(--color-primary); } .toc summary:focus { outline: none; } /* --------------------------------------------- Sidenotes (margin notes within content) --------------------------------------------- */ .sidenote { font-size: 0.8rem; line-height: 1.4; color: var(--color-secondary); } /* Desktop: float into right margin */ @media screen and (min-width: 1100px) { .sidenote { float: right; clear: right; width: 200px; margin-right: -240px; margin-top: 0.3em; margin-bottom: 0.5rem; padding-left: 1rem; border-left: 2px solid var(--color-border); } } /* Tablet/narrower screens: inline with subtle styling */ @media screen and (max-width: 1099px) { .sidenote { display: block; background: var(--color-entry); border-left: 3px solid var(--color-border); padding: 0.75rem 1rem; margin: 1rem 0; border-radius: 0 var(--radius) var(--radius) 0; } .sidenote::before { content: "Note: "; font-weight: 600; color: var(--color-primary); } } /* --------------------------------------------- Prose Content Styling --------------------------------------------- */ .post-content { line-height: 1.75; max-width: 100%; overflow-wrap: break-word; } .post-content h1, .post-content h2, .post-content h3, .post-content h4 { margin-top: 2em; margin-bottom: 0.5em; font-weight: 800; } .post-content h1 { font-size: 2.25em; } .post-content h2 { font-size: 1.5em; } .post-content h3 { font-size: 1.25em; } .post-content h4 { font-size: 1em; } .post-content p { margin: 1.25em 0; } .post-content a { color: var(--color-accent); text-decoration: underline; } .post-content a:hover { color: var(--color-accent-hover); } .post-content strong { font-weight: 600; } .post-content blockquote { border-left: 0.25rem solid var(--color-border); padding-left: 1em; margin: 1.6em 0; color: var(--color-secondary); font-style: italic; } .post-content ul, .post-content ol { margin: 1.25em 0; padding-left: 1.625em; } .post-content li { margin: 0.5em 0; } .post-content hr { border: none; height: 2px; background-color: var(--color-border); margin: 3em 0; } .post-content img { margin: 2em 0; border-radius: var(--radius); } .post-content figure { margin: 2em 0; } .post-content figcaption { color: var(--color-secondary); font-size: 0.875em; margin-top: 0.5em; text-align: center; } /* Tables in content */ .post-content table { width: 100%; margin: 2em 0; font-size: 0.875em; border-collapse: collapse; } .post-content thead { border-bottom: 1px solid var(--color-border); } .post-content th { padding: 0.5em; text-align: left; font-weight: 600; } .post-content td { padding: 0.5em; border-bottom: 1px solid var(--color-border); } .post-content tbody tr:last-child td { border-bottom: none; } /* Inline code */ .post-content code { font-family: var(--font-mono); background-color: var(--color-code-bg); color: var(--color-primary); border: 1px solid var(--color-border); border-radius: 4px; padding: 2px 6px; font-size: 0.8em; } /* Code blocks */ .post-content pre { background-color: var(--color-hljs-bg) !important; border-radius: var(--radius); padding: 0; margin: 1.5em 0; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); overflow-x: auto; max-width: 100%; } .post-content pre code { font-family: var(--font-mono); display: block; margin: 0; padding: 16px 20px; word-break: normal; border-radius: var(--radius); font-size: 0.875rem; line-height: 1.6; color: #ebdbb2; background-color: var(--color-hljs-bg) !important; border: none; white-space: pre; } .dark .post-content pre code { color: #c8cdd6; } .post-content .highlight { margin: 1.5em 0; border-radius: var(--radius); direction: ltr; background-color: var(--color-hljs-bg) !important; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); overflow-x: auto; max-width: 100%; } .post-content .highlight pre { margin: 0; box-shadow: none; } /* Code block with line numbers */ .post-content pre code > table { display: table; margin: 10px auto; border-radius: var(--radius); border-spacing: 0; border-collapse: collapse; table-layout: fixed; width: 100%; } .post-content pre code > table td { vertical-align: top; padding: 0; margin: 0; border: 0; } .post-content pre code > table td:first-child { white-space: pre; user-select: none; margin: 0; padding: 0 1em 0 0; color: #7f7f7f; text-align: right; display: table-cell; max-width: 10%; } .dark .post-content pre code > table td:first-child { color: #636d83; } .post-content pre code > table td:nth-child(2) { width: 92%; } /* Heading anchor links */ .post-content .zola-anchor { opacity: 0; text-decoration: none; margin-left: 0.3em; transition: opacity 0.2s; } .post-content .zola-anchor::after { content: "#"; font-size: 0.75em; color: var(--color-secondary); } .post-content h1:hover .zola-anchor, .post-content h2:hover .zola-anchor, .post-content h3:hover .zola-anchor, .post-content h4:hover .zola-anchor, .post-content h5:hover .zola-anchor, .post-content h6:hover .zola-anchor { opacity: 1; } .post-content .zola-anchor:hover::after { color: var(--color-accent); } /* Guide article entries - card style */ .guide-content p:has(> strong:first-child) { margin-top: 2em !important; margin-bottom: 0 !important; padding: 1.25em 1.5em 0.5em; background-color: var(--color-entry); border-radius: var(--radius) var(--radius) 0 0; } .guide-content p:has(> strong:first-child) + p { padding: 0.5em 1.5em 1.25em; margin-top: 0 !important; margin-bottom: 2em !important; background-color: var(--color-entry); border-radius: 0 0 var(--radius) var(--radius); } .post-content p strong a { color: var(--color-primary); font-size: 1.1em; } .post-content p strong a:hover { color: var(--color-accent); } /* --------------------------------------------- Callout Boxes --------------------------------------------- */ .post-content .callout { background: #f0e8dd; border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 4px; padding: 20px 24px; margin: 1.5em 0; font-size: 0.95em; } .post-content .callout p:first-child { margin-top: 0; } .post-content .callout p:last-child { margin-bottom: 0; } .dark .post-content .callout { background: #2d3748; border-color: rgba(255, 255, 255, 0.1); } /* --------------------------------------------- SQL Lab Widget --------------------------------------------- */ .sql-lab-widget { padding: 24px; margin: 32px 0; border-radius: var(--radius); background-color: var(--color-entry); border: 1px solid var(--color-border); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); } .sql-lab-header h3 { margin: 0 0 8px 0; font-size: 1.2em; color: var(--color-primary); } .sql-lab-header p { margin: 0 0 16px 0; font-size: 0.9em; line-height: 1.5; color: var(--color-secondary); } .sql-lab-button { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: var(--radius); font-weight: 600; font-size: 0.95em; color: #2B3444 !important; text-decoration: none !important; transition: all 0.2s ease; border: none; cursor: pointer; background: #FDD100; } .sql-lab-button:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(253, 209, 0, 0.4); color: #2B3444 !important; } .sql-lab-button svg { transition: transform 0.2s ease; } .sql-lab-button:hover svg { transform: translate(2px, -2px); } .sql-lab-description { margin: 16px 0 0 0; font-size: 0.85em; font-style: italic; color: var(--color-secondary); } /* --------------------------------------------- Newsletter Widget --------------------------------------------- */ .newsletter-widget { padding: 24px; margin: 32px 0; border-radius: var(--radius); background-color: var(--color-entry); border: 1px solid var(--color-border); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); } .newsletter-widget h3 { margin: 0 0 8px 0; font-size: 1.2em; color: var(--color-primary); } .newsletter-widget p { margin: 0 0 16px 0; font-size: 0.9em; line-height: 1.5; color: var(--color-secondary); } .newsletter-form { display: flex; gap: 8px; } .newsletter-form input[type="email"] { flex: 1; padding: 10px 14px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-theme); color: var(--color-primary); font-family: inherit; font-size: 0.95em; } .newsletter-form input[type="email"]::placeholder { color: var(--color-secondary); opacity: 0.6; } .newsletter-form input[type="email"]:focus { outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 2px rgba(240, 81, 56, 0.15); } .newsletter-form button { padding: 10px 24px; border: none; border-radius: var(--radius); background: var(--color-accent); color: #fff; font-family: inherit; font-weight: 600; font-size: 0.95em; cursor: pointer; transition: all 0.2s ease; white-space: nowrap; } .newsletter-form button:hover { background: var(--color-accent-hover); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(240, 81, 56, 0.3); } .newsletter-form-hero { margin-bottom: 16px; justify-content: center; max-width: 400px; } @media (max-width: 768px) { .newsletter-form { flex-direction: column; } .newsletter-form button { width: 100%; } } /* --------------------------------------------- Events Section --------------------------------------------- */ .events-section { background-color: var(--color-entry); border-radius: 10px; border: 1px solid var(--color-border); padding: 1.25rem; margin: 0; } .events-header h3 { margin: 0 0 8px 0; font-size: 1.1em; font-weight: 600; color: var(--color-primary); } .events-header p { margin: 0 0 16px 0; font-size: 0.9em; line-height: 1.5; color: var(--color-secondary); } .events-list { list-style: none; padding: 0; margin: 0; } .event-item { display: flex; padding: 12px 0; } .event-item:last-child { border-bottom: none; padding-bottom: 0; } .event-item:first-child { padding-top: 0; } .event-date { flex-shrink: 0; font-size: 0.9em; font-weight: 500; min-width: 90px; margin-right: 16px; color: var(--color-secondary); } .event-link { display: flex; flex-direction: column; text-decoration: none; transition: color 0.2s ease; flex: 1; color: var(--color-primary); } .event-link:hover { color: var(--color-accent); } .event-name { font-weight: 500; margin-bottom: 4px; } .event-tag { font-size: 0.75em; padding: 2px 8px; border-radius: 3px; margin-left: 8px; font-weight: 400; opacity: 0.7; color: var(--color-secondary); background-color: var(--color-code-bg); } .event-location { font-size: 0.85em; color: var(--color-secondary); } .events-footer { margin-top: 4px; padding-top: 4px; } .talks-archive-link { font-size: 0.85em; text-decoration: none; transition: color 0.2s ease; color: var(--color-secondary); } .talks-archive-link:hover { color: var(--color-accent); } /* Talks page - Featured upcoming events */ .upcoming-events-featured { background: #1a1a1a; border-radius: 10px; padding: 1.5rem; margin-bottom: 2.5rem; } .dark .upcoming-events-featured { background: #1e2433; } .featured-event { display: block; color: white; text-decoration: none; padding: 1rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.15); transition: opacity 0.15s; } .featured-event:first-child { padding-top: 0; } .featured-event:last-child { padding-bottom: 0; border-bottom: none; } .featured-event:hover { opacity: 0.85; color: white; } .featured-event__date { display: block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #FDD100; margin-bottom: 0.5rem; } .featured-event__title-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.25rem; } .featured-event__tag { display: inline-block; width: 5.5rem; text-align: center; flex-shrink: 0; padding: 0.25rem 0; background: rgba(253, 209, 0, 0.3); color: white; border-radius: 4px; font-size: 0.75rem; font-weight: 600; text-transform: capitalize; } .featured-event__name { font-size: 1.25rem; font-weight: 700; } /* Talks page - Past talks */ .past-talks-section .section-description { color: var(--color-secondary); margin-bottom: 1rem; font-size: 0.95rem; } .talks-list .talk-entry { padding: 1rem 0; border-bottom: 1px solid var(--color-border); } .talks-list .talk-entry:first-child { padding-top: 0; } .talks-list .talk-entry:last-child { border-bottom: none; } .talk-title { font-size: 1rem; font-weight: 600; margin: 0 0 0.25rem; } .talk-meta { font-size: 0.85rem; color: var(--color-secondary); } .talk-meta a { color: var(--color-accent); } /* Year separators for talks */ .talks-year-header { display: flex; align-items: center; gap: 0.5rem; margin-top: 2rem; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--color-primary); } .talks-year-header:first-child { margin-top: 0; } .talks-year { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; color: var(--color-primary); } .talks-year-count { font-size: 0.875rem; color: var(--color-secondary); } /* --------------------------------------------- Pagination (Prev/Next Post Navigation) --------------------------------------------- */ .paginav { margin: 40px 0 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; } .paginav a { display: flex; flex-direction: column; padding: 1.25rem 1.5rem; border-radius: var(--radius); background-color: var(--color-entry); text-decoration: none; transition: transform 0.2s ease, box-shadow 0.2s ease; } .paginav a:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); } .paginav .title { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-secondary); margin-bottom: 0.5rem; } .paginav a > span:last-child { font-size: 1rem; font-weight: 500; color: var(--color-primary); line-height: 1.4; } .paginav .prev { grid-column: 1; } .paginav .next { grid-column: 2; text-align: right; } .paginav .next:only-child { grid-column: 2; } .paginav .prev:only-child { grid-column: 1; } @media screen and (max-width: 600px) { .paginav { grid-template-columns: 1fr; } .paginav .prev, .paginav .next, .paginav .next:only-child, .paginav .prev:only-child { grid-column: 1; text-align: left; } } /* Pagination (page lists) */ .pagination { display: flex; } .pagination a { font-size: 0.8125rem; line-height: 2.25rem; padding: 0 16px; border-radius: 18px; color: var(--color-theme); background-color: var(--color-primary); } .pagination .next { margin-inline-start: auto; } /* --------------------------------------------- Archive Page --------------------------------------------- */ .archive-posts { width: 100%; font-size: 1rem; } .archive-year { margin-top: 40px; } .archive-year:not(:last-of-type) { border-bottom: 2px solid var(--color-border); } .archive-year-header { display: flex; align-items: center; gap: 0.5rem; } .archive-month { display: flex; align-items: flex-start; padding: 10px 0; } .archive-month-header { margin: 25px 0; width: 200px; } .archive-month:not(:last-of-type) { border-bottom: 1px solid var(--color-border); } .archive-entry { position: relative; padding: 5px; margin: 10px 0; } .archive-entry .entry-link { position: absolute; inset: 0; } .archive-entry-title { margin: 5px 0; font-weight: 400; } .archive-count, .archive-meta { font-size: 0.875rem; color: var(--color-secondary); } .archive-meta a { color: var(--color-secondary); } .archive-meta a:hover { color: var(--color-accent); } /* --------------------------------------------- Code Copy Button --------------------------------------------- */ .copy-code { display: none; position: absolute; top: 4px; right: 4px; padding: 0 5px; font-size: 0.875rem; border-radius: var(--radius); user-select: none; color: rgba(255, 255, 255, 0.8); background-color: rgba(78, 78, 78, 0.8); cursor: pointer; border: none; } div.highlight:hover .copy-code, pre:hover .copy-code { display: block; } /* --------------------------------------------- Post Footer --------------------------------------------- */ .post-footer { margin-top: 56px; } /* --------------------------------------------- Responsive Adjustments --------------------------------------------- */ @media screen and (max-width: 900px) { .pitch { flex-direction: column; gap: 2rem; } .pitch-aside { width: 100%; order: -1; position: static; } .pitch-aside .events-section { margin-bottom: 0; } } @media screen and (max-width: 768px) { .first-entry .entry-header h1 { font-size: 2.25rem; } .first-entry .entry-content { font-size: 1rem; } .archive-month { flex-direction: column; } .archive-year { margin-top: 20px; } .footer { padding: calc((var(--footer-height) - var(--gap) - 10px) / 2) var(--gap); } .event-item { flex-direction: column; } .event-date { min-width: auto; margin-right: 0; margin-bottom: 4px; } .event-item:nth-child(n+3) { display: none; } .post-title { font-size: 2rem; } } @media screen and (max-width: 900px) { .list .top-link { transform: translateY(-5rem); } } @media (prefers-reduced-motion) { .terms-tags a:active, .post-entry:active, .top-link { transform: none; } } /* --------------------------------------------- Scrollbar Styling --------------------------------------------- */ ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background-color: var(--color-tertiary); border: 5px solid var(--color-theme); border-radius: var(--radius); } ::-webkit-scrollbar-thumb:hover { background-color: var(--color-secondary); } @media screen and (min-width: 768px) { ::-webkit-scrollbar { width: 19px; height: 11px; } } .post-content ::-webkit-scrollbar-thumb { border: 2px solid var(--color-hljs-bg); background-color: #665c54; } .post-content ::-webkit-scrollbar-thumb:hover { background-color: #928374; } .dark .post-content ::-webkit-scrollbar-thumb { background-color: #3d4654; } .dark .post-content ::-webkit-scrollbar-thumb:hover { background-color: #636d83; } /* --------------------------------------------- Product Page Styles --------------------------------------------- */ .product-hero { padding: 2rem 0 3rem; text-align: center; } .product-hero__title { font-size: 3rem; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 0.5rem; } .product-hero__subtitle { font-size: 1.5rem; font-weight: 600; color: var(--color-secondary); margin: 0 0 1rem; } .product-hero__description { font-size: 1.1rem; color: var(--color-secondary); max-width: 600px; margin: 0 auto 1rem; line-height: 1.6; } .product-hero__teaser { font-size: 0.9rem; font-weight: 600; color: var(--color-accent); margin: 0 auto 2rem; padding: 0.4rem 1rem; background: color-mix(in srgb, var(--color-accent) 10%, transparent); border-radius: 2rem; display: inline-block; } .product-hero__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; } .product-btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.875rem 1.5rem; font-size: 1rem; font-weight: 600; font-family: inherit; border-radius: var(--radius); text-decoration: none; transition: transform 0.15s, box-shadow 0.15s; cursor: pointer; } .product-btn:hover { transform: translateY(-2px); } .product-btn--primary { background: var(--color-primary); color: var(--color-theme); border: none; } .product-btn--primary:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); color: var(--color-theme); } .product-btn--secondary { background: transparent; color: var(--color-primary); border: 2px solid var(--color-border); } .product-btn--secondary:hover { border-color: var(--color-primary); color: var(--color-primary); } .product-btn svg { width: 16px; height: 16px; flex-shrink: 0; } /* Product Section */ .product-section { padding: 3rem 0; border-top: 1px solid var(--color-border); } .product-section__title { font-size: 1.75rem; font-weight: 700; margin: 0 0 1.5rem; } /* Terminal-style code block */ .terminal-block { background: var(--color-hljs-bg); border-radius: var(--radius); padding: 1.5rem; margin: 1.5rem 0; overflow-x: auto; } .terminal-block pre { margin: 0; background: transparent !important; box-shadow: none; } .terminal-block code { font-family: var(--font-mono); font-size: 0.9rem; line-height: 1.8; color: #ebdbb2; background: transparent !important; border: none; padding: 0; } .dark .terminal-block code { color: #c8cdd6; } /* Features Grid */ .features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 1.5rem; } @media screen and (max-width: 900px) { .features-grid { grid-template-columns: repeat(2, 1fr); } } @media screen and (max-width: 600px) { .features-grid { grid-template-columns: 1fr; } } .feature-card { background: var(--color-entry); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.5rem; transition: border-color 0.2s; } .feature-card:hover { border-color: var(--color-primary); } .feature-card__title { font-size: 1.1rem; font-weight: 700; margin: 0 0 0.5rem; } .feature-card__description { font-size: 0.9rem; color: var(--color-secondary); margin: 0; line-height: 1.5; } /* Installation Section */ .install-methods { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; } .install-method { background: var(--color-entry); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1rem 1.25rem; } .install-method__label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-secondary); margin: 0 0 0.5rem; } .install-method__command { font-family: var(--font-mono); font-size: 0.9rem; color: var(--color-primary); background: var(--color-code-bg); padding: 0.5rem 0.75rem; border-radius: 4px; overflow-x: auto; margin: 0; } /* Mobile product page */ @media screen and (max-width: 768px) { .product-hero { padding: 1.5rem 0 2rem; } .product-hero__title { font-size: 2.25rem; } .product-hero__subtitle { font-size: 1.1rem; } .product-hero__description { font-size: 1rem; } .product-hero__teaser { font-size: 0.85rem; } .product-hero__actions { flex-direction: column; align-items: stretch; } .product-btn { justify-content: center; padding: 0.75rem 1.25rem; } .product-section { padding: 2rem 0; } .product-section__title { font-size: 1.5rem; } .terminal-block { padding: 1rem; } .terminal-block code { font-size: 0.8rem; } .install-method__command { font-size: 0.8rem; } } /* --------------------------------------------- Visualizer Page --------------------------------------------- */ .visualizer-page { max-width: 100%; } .visualizer-header { margin-bottom: 1.5rem; } .visualizer-title { font-size: 2rem; margin-bottom: 0.5rem; } .visualizer-subtitle { color: var(--color-secondary); margin: 0; } .visualizer-intro { margin-bottom: 2rem; } .visualizer-container { margin-bottom: 2rem; } /* Stats Grid */ .viz-stats { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem; } .viz-stat-card { flex: 1; min-width: 0; background: var(--color-entry); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1rem; } .viz-stat-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-secondary); margin-bottom: 0.25rem; } .viz-stat-value { font-size: 1.5rem; font-weight: 700; color: var(--color-primary); } .viz-stat-detail { font-size: 0.85rem; font-weight: 500; color: var(--color-secondary); } /* Buffer Grid */ .viz-buffer-grid { display: flex; flex-wrap: wrap; gap: 3px; padding: 1rem; background: var(--color-entry); border: 1px solid var(--color-border); border-radius: var(--radius); } .viz-buffer-slot { width: 20px; height: 20px; border-radius: 3px; cursor: pointer; transition: transform 0.1s; box-sizing: border-box; flex-shrink: 0; } .viz-buffer-slot:hover { transform: scale(1.2); z-index: 10; } .viz-buffer-slot.selected { outline: 2px solid var(--color-accent); outline-offset: 1px; } /* Buffer states */ .viz-buffer-slot.empty { background: var(--color-tertiary); border: 1px dashed var(--color-border); } .viz-buffer-slot.clean { background: var(--viz-clean); } .viz-buffer-slot.dirty { background: var(--viz-dirty); } .viz-buffer-slot.pinned { background: var(--viz-pinned); } /* Controls row */ .viz-controls { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1rem; padding: 0.75rem 0; } /* Legend */ .viz-legend { display: flex; flex-wrap: wrap; gap: 1.5rem; } .viz-legend-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--color-secondary); } .viz-legend-color { width: 16px; height: 16px; border-radius: 3px; } .viz-legend-color.empty { background: var(--color-tertiary); border: 1px dashed var(--color-border); } .viz-legend-color.clean { background: var(--viz-clean); } .viz-legend-color.dirty { background: var(--viz-dirty); } .viz-legend-color.pinned { background: var(--viz-pinned); } /* Detail panel */ .viz-detail-panel { margin-top: 1.5rem; padding: 1rem; background: var(--color-entry); border: 1px solid var(--color-border); border-radius: var(--radius); } .viz-detail-title { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-secondary); margin-bottom: 0.75rem; } .viz-detail-content { font-size: 0.9rem; color: var(--color-primary); } .viz-detail-row { padding: 0.25rem 0; } .viz-detail-key { font-weight: 600; color: var(--color-secondary); } /* Viz Section */ .viz-section { margin-top: 2rem; } .viz-section-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; } .viz-section-desc { font-size: 0.85rem; color: var(--color-secondary); margin: 0 0 1rem; } .viz-section-desc code { font-size: 0.8em; padding: 0.15em 0.4em; } /* Bucket View */ .viz-buckets { display: flex; flex-direction: column; gap: 0.5rem; } .viz-bucket { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0.75rem; background: var(--color-entry); border: 1px solid var(--color-border); border-radius: var(--radius); } .viz-bucket-label { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600; color: var(--color-secondary); min-width: 2rem; } .viz-bucket-chain { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; } .viz-bucket-empty { font-size: 0.75rem; font-style: italic; color: var(--color-secondary); opacity: 0.6; } .viz-bucket-tag { font-family: var(--font-mono); font-size: 0.7rem; padding: 0.2rem 0.5rem; border-radius: 3px; cursor: pointer; transition: transform 0.1s, opacity 0.1s; color: white; } .viz-bucket-tag:hover { transform: scale(1.05); } .viz-bucket-tag.selected { outline: 2px solid var(--color-accent); outline-offset: 1px; } .viz-bucket-tag.clean { background: var(--viz-clean); } .viz-bucket-tag.dirty { background: var(--viz-dirty); } .viz-bucket-tag.pinned { background: var(--viz-pinned); } .viz-bucket-arrow { font-size: 0.7rem; color: var(--color-secondary); opacity: 0.5; } /* Clock Sweep */ .viz-clock-controls { display: flex; align-items: center; gap: 0.5rem; } .viz-btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 1rem; font-family: inherit; font-size: 0.8rem; font-weight: 600; color: var(--color-primary); background: var(--color-entry); border: 1px solid var(--color-border); border-radius: var(--radius); cursor: pointer; transition: border-color 0.15s, background 0.15s; } .viz-btn:hover { border-color: var(--color-primary); background: var(--color-tertiary); } /* Clock hand indicator */ .viz-buffer-slot.clock-hand { outline: 3px solid var(--color-accent); outline-offset: 1px; z-index: 20; animation: clock-pulse 0.3s ease-out; } /* Usage decrement tick */ .viz-buffer-slot.clock-tick { animation: clock-tick 0.2s ease-out; } @keyframes clock-pulse { 0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } } @keyframes clock-tick { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } } /* Eviction animation */ .viz-buffer-slot.evicted { animation: evict-flash 0.4s ease-out; } @keyframes evict-flash { 0% { background: var(--color-accent); transform: scale(1.2); } 100% { background: var(--color-tertiary); transform: scale(1); } } /* Activity animations */ .viz-buffer-slot.loaded { animation: load-flash 0.3s ease-out; } .viz-buffer-slot.dirtied { animation: dirty-flash 0.3s ease-out; } @keyframes load-flash { 0% { transform: scale(0.5); opacity: 0.5; } 100% { transform: scale(1); opacity: 1; } } @keyframes dirty-flash { 0% { box-shadow: 0 0 8px var(--viz-dirty); } 100% { box-shadow: none; } } /* Learn More section */ .visualizer-related { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--color-border); } .visualizer-related h2 { font-size: 1.25rem; margin-bottom: 1rem; } .related-links { display: flex; flex-direction: column; gap: 0.75rem; } .related-link-card { display: flex; flex-direction: column; gap: 0.25rem; padding: 1rem; background: var(--color-entry); border: 1px solid var(--color-border); border-radius: var(--radius); transition: border-color 0.15s; text-decoration: none; } .related-link-card:hover { border-color: var(--color-primary); } .related-link-card strong { font-size: 1rem; color: var(--color-primary); } .related-link-card span { font-size: 0.85rem; color: var(--color-secondary); } /* Visualizer Banner (for articles) */ .visualizer-banner { display: flex; align-items: center; gap: 1.5rem; padding: 1.25rem; margin: 2.5rem 0; background: var(--color-entry); border: 1px solid var(--color-border); border-radius: var(--radius); } .visualizer-banner__preview { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; padding: 0.6rem; background: var(--color-theme); border-radius: 6px; flex-shrink: 0; } .mini-buffer { width: 10px; height: 10px; border-radius: 2px; } .mini-buffer.empty { background: var(--color-tertiary); border: 1px dashed var(--color-border); box-sizing: border-box; } .mini-buffer.clean { background: var(--viz-clean); } .mini-buffer.dirty { background: var(--viz-dirty); } .mini-buffer.pinned { background: var(--viz-pinned); } .visualizer-banner__content { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; flex: 1; } .visualizer-banner__content strong { font-size: 1rem; font-weight: 700; } .visualizer-banner__content p { font-size: 0.85rem; color: var(--color-secondary); line-height: 1.5; margin: 0; } .visualizer-banner__button { display: inline-block; margin-top: 0.25rem; padding: 0.4rem 0.9rem; background: var(--color-primary); color: var(--color-theme) !important; font-size: 0.8rem; font-weight: 600; border-radius: var(--radius); text-decoration: none; transition: opacity 0.15s; } .visualizer-banner__button:hover { opacity: 0.85; color: var(--color-theme) !important; } @media (max-width: 600px) { .visualizer-banner { gap: 1rem; padding: 1rem; } .visualizer-banner__preview { grid-template-columns: repeat(4, 1fr); padding: 0.5rem; } .mini-buffer { width: 8px; height: 8px; } .visualizer-banner__content strong { font-size: 0.9rem; } .visualizer-banner__content p { font-size: 0.8rem; } } /* Visualizer mobile */ @media (max-width: 600px) { .viz-buffer-slot { width: 16px; height: 16px; } .viz-stats { gap: 0.5rem; } .viz-stat-card { padding: 0.6rem; } .viz-stat-label { font-size: 0.6rem; letter-spacing: 0.02em; } .viz-stat-value { font-size: 1rem; } .viz-stat-detail { font-size: 0.65rem; } } /* --------------------------------------------- 8KB Page Visualizer --------------------------------------------- */ /* ── Horizontal page map ── */ .pv-page-map-wrapper { margin-bottom: 0; } .pv-page-map { display: flex; height: 48px; border: 2px solid var(--color-border); border-radius: var(--radius); overflow: hidden; } .pv-map-region { display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; transition: flex-basis 0.4s ease; min-width: 0; } .pv-map-region:hover { filter: brightness(1.15); } .pv-map-region.selected { outline: 2px solid var(--color-accent); outline-offset: -2px; z-index: 5; } .pv-map-label { font-size: 0.7rem; font-weight: 600; color: white; text-shadow: 0 1px 2px rgba(0,0,0,0.3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; pointer-events: none; } .pv-map-bytes { font-size: 0.6rem; font-family: var(--font-mono); color: rgba(255,255,255,0.75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; pointer-events: none; } /* Region colors */ .pv-map-header { background: var(--viz-page-header); flex-basis: 12.5%; } .pv-map-lineptrs { background: var(--viz-page-lp); flex-basis: 0%; } .pv-map-freespace { background: var(--color-entry); background-image: repeating-linear-gradient( 45deg, transparent, transparent 4px, var(--color-border) 4px, var(--color-border) 5px ); flex-basis: 87.5%; } .pv-map-freespace .pv-map-label, .pv-map-freespace .pv-map-bytes { color: var(--color-secondary); text-shadow: none; } .pv-map-tuples { background: var(--viz-page-tuple); flex-basis: 0%; } /* Thin actual-proportions bar */ .pv-actual-bar { display: flex; height: 4px; margin-top: 3px; border-radius: 2px; overflow: hidden; opacity: 0.55; } .pv-ab { transition: flex-basis 0.4s ease; } .pv-ab-header { background: var(--viz-page-header); } .pv-ab-lp { background: var(--viz-page-lp); } .pv-ab-free { background: var(--color-border); } .pv-ab-tuples { background: var(--viz-page-tuple); } .pv-scale-note { margin-left: auto; font-size: 0.65rem; color: var(--color-secondary); opacity: 0.5; } /* Scale below the map */ .pv-page-map-scale { position: relative; height: 1.2rem; margin-top: 2px; font-family: var(--font-mono); font-size: 0.6rem; color: var(--color-secondary); } .pv-page-map-scale > span { position: absolute; transform: translateX(-50%); white-space: nowrap; } .pv-page-map-scale > span:first-child { left: 0; transform: none; } .pv-page-map-scale > span:last-child { right: 0; left: auto; transform: none; } /* ── SQL statement display ── */ .pv-sql-display { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.85rem; margin-bottom: 1rem; background: var(--color-hljs-bg); border-radius: var(--radius); overflow-x: auto; transition: box-shadow 0.3s ease; } .pv-sql-display.pv-sql-executed { box-shadow: 0 0 0 2px var(--viz-page-tuple); } .pv-sql-prompt { font-family: var(--font-mono); font-size: 0.8rem; color: #928374; flex-shrink: 0; user-select: none; } .pv-sql-code { font-family: var(--font-mono); font-size: 0.8rem; color: #ebdbb2; background: none !important; border: none !important; padding: 0 !important; white-space: nowrap; } .dark .pv-sql-code { color: #c8cdd6; } /* ── Tuple Inspector ── */ .pv-tuple-inspector { display: flex; flex-direction: column; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-entry); overflow: hidden; max-height: 520px; margin-bottom: 1rem; } .pv-inspector-header { display: flex; align-items: baseline; gap: 0.75rem; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--color-border); flex-shrink: 0; } .pv-inspector-title { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-secondary); } .pv-inspector-schema { font-size: 0.75rem; color: var(--color-secondary); opacity: 0.7; } .pv-inspector-schema code { font-size: 0.7rem; padding: 1px 4px; } .pv-inspector-scroll { flex: 1; overflow-y: auto; padding: 0.5rem; display: flex; flex-direction: column; gap: 0.4rem; } .pv-inspector-empty { display: flex; align-items: center; justify-content: center; text-align: center; color: var(--color-secondary); font-size: 0.85rem; padding: 2rem 1rem; line-height: 1.6; } /* ── Tuple card ── */ .pv-tuple-card { padding: 0.5rem 0.6rem; border: 1px solid var(--color-border); border-radius: 6px; background: var(--color-theme); cursor: pointer; transition: border-color 0.15s; } .pv-tuple-card:hover { border-color: var(--color-primary); } .pv-tuple-card.expanded { border-color: var(--color-accent); box-shadow: 0 0 0 1px var(--color-accent); } .pv-tuple-card.dead { opacity: 0.55; border-style: dashed; border-color: #dc2626; } .pv-tuple-card.dead .pv-tuple-card-cols { text-decoration: line-through; text-decoration-color: var(--color-secondary); } .pv-tuple-card-title { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.35rem; font-size: 0.75rem; flex-wrap: wrap; } .pv-tuple-card-lp { font-weight: 700; font-family: var(--font-mono); color: var(--viz-page-lp); } .pv-tuple-card-ctid { font-family: var(--font-mono); color: var(--color-secondary); font-size: 0.7rem; } .pv-tuple-card-xid { font-family: var(--font-mono); color: var(--color-secondary); font-size: 0.7rem; } .pv-tuple-card-del { flex-shrink: 0; width: 20px; height: 20px; padding: 0; border: 1px solid transparent; border-radius: 3px; background: none; color: var(--color-secondary); font-size: 0.85rem; line-height: 1; cursor: pointer; opacity: 0; transition: opacity 0.15s, color 0.15s, border-color 0.15s; } .pv-tuple-card:hover .pv-tuple-card-del { opacity: 0.6; } .pv-tuple-card-del:hover { opacity: 1 !important; color: #dc2626; border-color: #dc2626; } .pv-tuple-card-size { margin-left: auto; font-family: var(--font-mono); color: var(--color-secondary); font-size: 0.7rem; } /* ── Byte bar ── */ .pv-byte-bar { display: flex; height: 24px; border-radius: 3px; overflow: hidden; margin-bottom: 0.3rem; border: 1px solid var(--color-border); } .pv-byte-segment { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; overflow: hidden; border-right: 1px solid rgba(255,255,255,0.2); } .pv-byte-segment:last-child { border-right: none; } .pv-seg-label { font-size: 0.6rem; font-weight: 600; color: white; text-shadow: 0 1px 1px rgba(0,0,0,0.3); line-height: 1; } .pv-seg-bytes { font-size: 0.5rem; color: rgba(255,255,255,0.7); line-height: 1; } .pv-seg-header { background: var(--viz-page-header); } .pv-seg-pad { background: var(--viz-page-special); } .pv-seg-col0 { background: #2563eb; } .pv-seg-col1 { background: #d97706; } .pv-seg-col2 { background: #8b5cf6; } .pv-seg-col3 { background: #059669; } .dark .pv-seg-col0 { background: #60a5fa; } .dark .pv-seg-col1 { background: #fbbf24; } .dark .pv-seg-col2 { background: #a78bfa; } .dark .pv-seg-col3 { background: #34d399; } .dark .pv-seg-label, .dark .pv-seg-bytes { color: #1a1a1a; text-shadow: none; } /* ── Column values row ── */ .pv-tuple-card-cols { display: flex; gap: 0.75rem; flex-wrap: wrap; font-size: 0.75rem; font-family: var(--font-mono); } .pv-col { color: var(--color-primary); } .pv-col-name { color: var(--color-secondary); font-weight: 500; } /* ── Detail panel section titles ── */ .pv-detail-section-title { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-secondary); margin-bottom: 0.35rem; padding-top: 0.25rem; border-top: 1px solid var(--color-border); } /* ── Inline expandable card detail ── */ .pv-card-detail { display: none; margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid var(--color-border); font-size: 0.75rem; } .pv-tuple-card.expanded .pv-card-detail { display: block; } .pv-detail-dead-note { margin-top: 0.5rem; padding: 0.4rem 0.6rem; background: rgba(220, 38, 38, 0.08); border-left: 3px solid #dc2626; border-radius: 0 4px 4px 0; font-size: 0.75rem; color: #dc2626; } /* ── Page Inspector (wraps stats + map + region detail) ── */ .pv-region-inspector { border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-entry); overflow: hidden; margin-bottom: 1rem; } .pv-region-inspector > .pv-inspector-header { border-bottom: 1px solid var(--color-border); } .pv-inspector-hint { font-size: 0.75rem; color: var(--color-secondary); opacity: 0.6; } .pv-page-inspector-body { padding: 0.6rem 0.75rem; } .pv-region-detail { display: none; padding-top: 0.75rem; margin-top: 0.75rem; border-top: 1px solid var(--color-border); font-size: 0.75rem; } .pv-region-detail.open { display: block; } .pv-region-card-title { font-size: 0.8rem; font-weight: 700; margin-bottom: 0.35rem; padding-top: 0.3rem; } .pv-region-card-fields { margin-top: 0.4rem; line-height: 1.6; font-size: 0.7rem; } .pv-region-card-fields code { font-size: 0.7rem; padding: 0 3px; } .pv-region-card-dim { opacity: 0.5; font-size: 0.65rem; } /* ── Compact controls row ── */ .pv-controls-compact { justify-content: flex-end; } /* Dead count in stats */ .pv-dead-count { font-size: 0.7em; color: #dc2626; } /* SQL display for DELETE */ .pv-sql-display.pv-sql-deleted.pv-sql-executed { box-shadow: 0 0 0 2px #dc2626; } /* Animations */ @keyframes pv-slide-in-right { 0% { opacity: 0; transform: translateY(-6px); } 100% { opacity: 1; transform: translateY(0); } } .pv-anim-in-right { animation: pv-slide-in-right 0.25s ease-out; } /* ── Page visualizer responsive ── */ /* ── 8KB page visualizer – tablet ── */ @media (max-width: 768px) { .pv-tuple-card-ctid { display: none; } .pv-tuple-card-cols { gap: 0.4rem; font-size: 0.7rem; } .pv-inspector-schema code { font-size: 0.6rem; } .pv-region-card-fields { font-size: 0.65rem; } } /* ── 8KB page visualizer – mobile ── */ @media (max-width: 600px) { /* Page map */ .pv-page-map { height: 36px; } .pv-map-label { font-size: 0.6rem; } .pv-map-bytes { font-size: 0.5rem; } /* Page Inspector */ .pv-inspector-header { padding: 0.4rem 0.5rem; gap: 0.5rem; } .pv-inspector-title { font-size: 0.65rem; } .pv-inspector-hint { font-size: 0.65rem; } .pv-inspector-schema { display: none; } .pv-page-inspector-body { padding: 0.4rem 0.5rem; } .pv-region-detail { font-size: 0.7rem; padding-top: 0.5rem; margin-top: 0.5rem; } .pv-region-card-fields { font-size: 0.6rem; } /* Scale */ .pv-page-map-scale { font-size: 0.55rem; } .pv-scale-note { display: none; } .pv-actual-bar { display: none; } /* SQL display */ .pv-sql-display { padding: 0.5rem 0.6rem; } .pv-sql-prompt, .pv-sql-code { font-size: 0.65rem; } /* Controls */ .pv-controls-compact { gap: 0.5rem; } .pv-controls-compact .viz-btn { padding: 0.4rem 0.8rem; font-size: 0.75rem; } /* Tuple Inspector */ .pv-tuple-inspector { max-height: 400px; } .pv-inspector-scroll { padding: 0.35rem; gap: 0.3rem; } /* Tuple cards */ .pv-tuple-card { padding: 0.4rem 0.5rem; } .pv-tuple-card-title { gap: 0.3rem; font-size: 0.65rem; } .pv-tuple-card-size { display: none; } .pv-tuple-card-ctid, .pv-tuple-card-xid { display: none; } .pv-tuple-card-del { opacity: 0.5; } .pv-byte-bar { height: 18px; } .pv-seg-bytes { display: none; } .pv-seg-label { font-size: 0.5rem; } .pv-tuple-card-cols { gap: 0.3rem; font-size: 0.65rem; } /* Hide the 'title' col value on very small screens — it's the longest */ .pv-tuple-card-cols .pv-col:nth-child(2) { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; } /* Expanded detail */ .pv-card-detail { font-size: 0.65rem; } .pv-detail-section-title { font-size: 0.65rem; } .pv-detail-dead-note { font-size: 0.65rem; } } /* Product sub-nav */ .product-nav { display: flex; align-items: baseline; justify-content: space-between; padding: 0.6rem 0; margin-bottom: 0.5rem; border-bottom: 1px solid var(--color-border); font-size: 0.9rem; } .product-nav__home { color: var(--color-accent); font-weight: 600; } .product-nav__home:hover { color: var(--color-accent-hover); } .product-nav__tabs { display: flex; gap: 1.5rem; } .product-nav__tabs a { color: var(--color-secondary); font-weight: 500; } .product-nav__tabs a:hover { color: var(--color-primary); } .product-nav__tabs a.active { color: var(--color-primary); font-weight: 600; } .only-dark { display: none; } [data-theme="dark"] .only-light, .dark .only-light { display: none; } [data-theme="dark"] .only-dark, .dark .only-dark { display: block; }