@import "tailwindcss"; @import "./tokens.css"; @plugin "tailwindcss-animate"; @plugin "@tailwindcss/typography"; @custom-variant dark (&:is(.dark *)); @custom-variant motion-safe (@media (prefers-reduced-motion: no-preference)); @custom-variant motion-reduce (@media (prefers-reduced-motion: reduce)); /* Shadcn/UI Theme Variables */ :root { --background: var(--bg-primary); --foreground: var(--text-primary); --card: var(--bg-card); --card-foreground: var(--text-primary); --popover: var(--bg-card); --popover-foreground: var(--text-primary); --primary: var(--accent-default); --primary-foreground: var(--text-inverse); --secondary: var(--bg-secondary); --secondary-foreground: var(--text-primary); --muted: var(--bg-secondary); --muted-foreground: var(--text-muted); --accent: var(--accent-default); --accent-foreground: var(--text-inverse); --destructive: var(--status-error); --destructive-foreground: var(--text-inverse); --border: var(--border-default); --input: var(--border-default); --ring: var(--ring-color); --radius: 0; } @theme inline { --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); --radius-sm: 0; --radius-md: 0; --radius-lg: 0; --radius-xl: 0; --font-mono: var(--font-mono); --font-display: var(--font-display); } @layer base { * { @apply border-border outline-ring/50; } html { font-family: var(--font-mono); } body { @apply bg-background text-foreground; font-family: var(--font-mono); font-size: var(--text-sm); line-height: var(--leading-normal); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } code { font-family: var(--font-mono); background: var(--bg-secondary); padding: var(--space-0-5) var(--space-1-5); border-radius: 0; font-size: 0.9em; } h1, h2 { font-family: var(--font-display); font-weight: 600; line-height: var(--leading-tight); } h3, h4, h5, h6 { font-family: var(--font-mono); font-weight: 600; line-height: var(--leading-tight); } h1 { /* font-size is intentionally omitted; pages define their own hero sizes */ } h2 { font-size: var(--text-xl); } h3 { font-size: var(--text-lg); } a { color: var(--text-primary); text-decoration: none; } a:hover { color: var(--accent-hover); } } @layer components { .chapter-select { display: block; } .chapter-select__control { height: 2rem; max-width: min(42vw, 18rem); border: 1px solid var(--border-default); background: var(--bg-card); color: var(--text-primary); padding: 0 var(--space-8) 0 var(--space-3); font-family: var(--font-mono); font-size: var(--text-xs); line-height: 1; } .chapter-select__control:hover { border-color: var(--accent-default); } .chapter-select__control:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ring-color); } .chapter-pager { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: var(--space-3); margin-top: var(--space-8); border-top: 1px solid var(--border-default); padding-top: var(--space-6); } .chapter-pager__link, .chapter-pager__contents { border: 1px solid var(--border-default); background: var(--bg-secondary); padding: var(--space-3) var(--space-4); transition: border-color var(--duration-fast) var(--easing-default), background-color var(--duration-fast) var(--easing-default), color var(--duration-fast) var(--easing-default); } .chapter-pager__link { display: grid; gap: var(--space-1); min-width: 0; } .chapter-pager__contents { display: inline-flex; align-items: center; justify-content: center; color: var(--text-secondary); font-family: var(--font-mono); font-size: var(--text-xs); text-transform: uppercase; } .chapter-pager__link:hover, .chapter-pager__contents:hover { border-color: var(--accent-default); background: var(--accent-subtle); color: var(--text-primary); } .chapter-pager__link--disabled { opacity: 0.55; } .chapter-pager__kicker { color: var(--text-muted); font-family: var(--font-mono); font-size: var(--text-xs); text-transform: uppercase; } .chapter-pager__title { overflow: hidden; color: var(--text-primary); font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; } .toc-status { border: 1px solid var(--border-default); background: var(--bg-card); padding: var(--space-5); } .toc-group { display: grid; gap: var(--space-5); } .toc-group__heading { display: grid; gap: var(--space-2); max-width: 42rem; } .toc-group__title { color: var(--text-primary); font-size: var(--text-base); text-transform: uppercase; } .toc-group__description { color: var(--text-muted); font-size: var(--text-sm); line-height: var(--leading-normal); } .toc-list { display: grid; border-top: 1px solid var(--border-default); } .toc-link { display: grid; grid-template-columns: 4rem minmax(0, 1fr) auto; gap: var(--space-4); align-items: start; border-bottom: 1px solid var(--border-default); padding: var(--space-4) var(--space-2); transition: background-color var(--duration-fast) var(--easing-default), color var(--duration-fast) var(--easing-default); } .toc-link:hover { background: var(--accent-subtle); } .toc-link__number { color: var(--accent-default); font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 600; } .toc-link__body { display: grid; gap: var(--space-2); min-width: 0; } .toc-link__title { color: var(--text-primary); font-family: var(--font-display); font-size: var(--text-xl); font-weight: 600; line-height: var(--leading-tight); } .toc-link__summary { max-width: 64ch; color: var(--text-secondary); font-size: var(--text-sm); line-height: var(--leading-normal); } .toc-link__tags { display: flex; flex-wrap: wrap; gap: var(--space-2); } .toc-link__tag { border: 1px solid var(--border-default); background: var(--bg-secondary); color: var(--text-muted); padding: var(--space-1) var(--space-2); font-family: var(--font-mono); font-size: var(--text-xs); line-height: 1; } .toc-link__open { color: var(--text-muted); font-family: var(--font-mono); font-size: var(--text-sm); transition: color var(--duration-fast) var(--easing-default); } .toc-link:hover .toc-link__open { color: var(--accent-default); } /* Navigation link - terminal style */ .nav-link { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-4); font-size: var(--text-sm); color: var(--text-secondary); transition: color var(--duration-fast) var(--easing-default), background-color var(--duration-fast) var(--easing-default); position: relative; white-space: nowrap; } .nav-link::before { content: ""; width: 0.75rem; text-align: right; color: var(--text-muted); font-weight: 400; } .nav-link:hover { color: var(--accent-default); background: var(--accent-subtle); } .nav-link:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--ring-color); } .nav-link-active { color: var(--text-primary); font-weight: 500; } .nav-link-active::before { content: ">"; color: var(--accent-default); } /* Example card for landing page */ .example-card { background: var(--bg-card); border: 1px solid var(--border-default); padding: var(--space-5); transition: border-color var(--duration-fast) var(--easing-default), box-shadow var(--duration-fast) var(--easing-default); position: relative; } .example-card:hover, .example-card:focus-visible { border-color: var(--accent-default); } .example-card:active { border-color: var(--accent-hover); } .example-card__number { font-size: var(--text-xs); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: var(--space-2); } .example-card__title { font-size: var(--text-base); font-weight: 600; color: var(--text-primary); margin-bottom: var(--space-2); } .example-card__description { font-size: var(--text-sm); color: var(--text-muted); line-height: var(--leading-normal); } .example-card--recommended { background: var(--accent-surface); border-color: var(--border-accent); } .example-card--recommended .example-card__number { color: var(--accent-default); font-weight: 600; } .example-card__badge { position: absolute; top: var(--space-5); right: var(--space-5); font-size: var(--text-xs); font-weight: 600; color: var(--text-inverse); text-transform: uppercase; letter-spacing: 0.05em; padding: var(--space-1) var(--space-2); background: var(--accent-default); border: 1px solid var(--accent-default); line-height: 1; } } @media (max-width: 44rem) { @layer components { .chapter-pager { grid-template-columns: 1fr; } .chapter-pager__link, .chapter-pager__contents { text-align: left; } .toc-link { grid-template-columns: 2.5rem minmax(0, 1fr); gap: var(--space-3); padding: var(--space-4) 0; } .toc-link__open { display: none; } .toc-link__title { font-size: var(--text-lg); } } } @layer utilities { .font-mono { font-family: var(--font-mono); } .scrollbar-hidden { -ms-overflow-style: none; scrollbar-width: none; } .scrollbar-hidden::-webkit-scrollbar { display: none; } .scrollbar-thin { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; } .scrollbar-thin::-webkit-scrollbar { height: 4px; } .scrollbar-thin::-webkit-scrollbar-track { background: transparent; } .scrollbar-thin::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 0; } } /* Animations */ @keyframes pulse-dot { 0%, 100% { opacity: 1; box-shadow: 0 0 0 2px var(--status-fetching-glow); } 50% { opacity: 0.6; box-shadow: 0 0 0 4px var(--status-fetching-glow-subtle); } } .animate-pulse-dot { animation: pulse-dot 1.5s ease-in-out infinite; } @media (prefers-reduced-motion: reduce) { .animate-pulse-dot { animation: none; opacity: 1; box-shadow: none; } }