/* ui.css: a design system for single-file web pages, written by Claude for LFM3 (general purpose). Themes: (default: indigo on light grey). */ :root { --bg: #f6f7fb; --surface: #ffffff; --surface-2: #eff1f7; --text: #1c2030; --muted: #5c6378; --border: #e2e5ee; --primary: #4f46e5; --primary-ink: #ffffff; --accent: #f59e0b; --success: #16a34a; --warning: #d97706; --danger: #dc2626; --radius: 14px; --radius-sm: 9px; --shadow: 0 1px 2px rgba(20, 24, 40, .06), 0 8px 24px rgba(20, 24, 40, .08); --shadow-lg: 0 18px 48px rgba(20, 24, 40, .18); --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; --serif: Georgia, "Times New Roman", serif; --mono: ui-monospace, "Cascadia Code", Consolas, monospace; --max: 1120px; } body[data-theme="warm"] { --bg: #fdf8f2; --surface-2: #f7ede1; --text: #2a2019; --muted: #75645a; --border: #ead9c8; --primary: #c2410c; --accent: #d97706; } body[data-theme="forest"] { --bg: #f4f8f3; --surface-2: #e7f0e5; --border: #d6e3d3; --primary: #15803d; --accent: #ca8a04; } body[data-theme="ocean"] { --bg: #f2f8fb; --surface-2: #e3f0f7; --border: #d3e4ee; --primary: #0369a1; --accent: #06b6d4; } body[data-theme="dark"] { --bg: #0f1218; --surface: #171b24; --surface-2: #1f2431; --text: #e8ebf3; --muted: #9aa3b6; --border: #2a3142; --primary: #818cf8; --primary-ink: #0f1218; --accent: #fbbf24; --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35); } *, *::before, *::after { box-sizing: border-box; } body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; } img, svg, video { max-width: 100%; } h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 750; letter-spacing: -.015em; } h1 { font-size: clamp(2.1rem, 4.2vw, 3.3rem); } h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); } h3 { font-size: 1.25rem; } h4 { font-size: 1.05rem; } p { margin: 0 0 1em; } a { color: var(--primary); text-decoration: none; } a:hover { text-decoration: underline; } .lead { font-size: 1.2rem; color: var(--muted); } .muted { color: var(--muted); } .small { font-size: .875rem; } .center { text-align: center; } .serif { font-family: var(--serif); } .mono { font-family: var(--mono); } .eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); } /* layout */ .container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; } .narrow { max-width: 760px; } .section { padding: 72px 0; } .section-alt { background: var(--surface-2); } .section-title { text-align: center; max-width: 640px; margin: 0 auto 40px; } .stack > * + * { margin-top: var(--gap, 16px); } .row { display: flex; gap: var(--gap, 16px); align-items: center; flex-wrap: wrap; } .between { justify-content: space-between; } .end { justify-content: flex-end; } .top { align-items: flex-start; } .grow { flex: 1; } .grid { display: grid; gap: var(--gap, 24px); grid-template-columns: repeat(auto-fit, minmax(var(--min, 240px), 1fr)); } .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } @media (max-width: 800px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } } .layout-sidebar { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; } .sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: 20px 14px; } .sidebar .brand { display: block; padding: 6px 12px 18px; } .sidebar a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--muted); font-weight: 500; } .sidebar a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; } .sidebar a.active { background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); font-weight: 650; } .main { padding: 28px 32px; min-width: 0; } /* navigation */ .navbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); } .navbar .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 66px; } .brand { font-weight: 800; font-size: 1.25rem; color: var(--text); letter-spacing: -.02em; } .nav-links { display: flex; gap: 26px; align-items: center; } .nav-links a { color: var(--muted); font-weight: 550; } .nav-links a:hover, .nav-links a.active { color: var(--text); text-decoration: none; } .topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 28px; background: var(--surface); border-bottom: 1px solid var(--border); } /* hero */ .hero { padding: 104px 0 88px; text-align: center; background: radial-gradient(1100px 480px at 50% -12%, color-mix(in srgb, var(--primary) 20%, transparent), transparent), var(--bg); } .hero h1 { max-width: 18ch; margin: 0 auto 18px; } .hero .lead { max-width: 58ch; margin: 0 auto 30px; } .hero-dark { color: #fff; background: linear-gradient(135deg, #1e1b4b, var(--primary)); } .hero-dark .lead { color: rgba(255, 255, 255, .85); } /* cards */ .card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; } .card-hover { transition: transform .2s ease, box-shadow .2s ease; } .card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); } .media { aspect-ratio: 16 / 10; border-radius: calc(var(--radius) - 4px); margin-bottom: 16px; } .card.featured { border: 2px solid var(--primary); box-shadow: var(--shadow-lg); } /* gradient placeholders instead of images */ .ph { background: linear-gradient(135deg, #a5b4fc, #f0abfc); } .ph-1 { background: linear-gradient(135deg, #fcd34d, #f97316); } .ph-2 { background: linear-gradient(135deg, #6ee7b7, #0ea5e9); } .ph-3 { background: linear-gradient(135deg, #f9a8d4, #8b5cf6); } .ph-4 { background: linear-gradient(135deg, #93c5fd, #4f46e5); } .ph-5 { background: linear-gradient(135deg, #bef264, #16a34a); } .ph-6 { background: linear-gradient(135deg, #fda4af, #e11d48); } .ph-7 { background: linear-gradient(135deg, #fde68a, #a16207); } .ph-8 { background: linear-gradient(135deg, #cbd5e1, #334155); } /* buttons */ .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px; border: 1px solid transparent; font: 650 1rem/1 var(--font); cursor: pointer; background: var(--primary); color: var(--primary-ink); transition: filter .15s, transform .15s; text-decoration: none; white-space: nowrap; } .btn:hover { filter: brightness(1.08); text-decoration: none; } .btn:active { transform: translateY(1px); } .btn-outline { background: transparent; color: var(--primary); border-color: currentColor; } .btn-ghost { background: transparent; color: var(--text); } .btn-accent { background: var(--accent); color: #1f1300; } .btn-light { background: var(--surface); color: var(--text); border-color: var(--border); } .btn-danger { background: var(--danger); color: #fff; } .btn-lg { padding: 16px 30px; font-size: 1.1rem; } .btn-sm { padding: 8px 14px; font-size: .875rem; } .btn-block { width: 100%; } /* badges, tags, avatars, icons */ .badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 650; background: var(--surface-2); color: var(--muted); } .badge-primary { background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary); } .badge-success { background: #dcfce7; color: #166534; } .badge-warning { background: #fef3c7; color: #92400e; } .badge-danger { background: #fee2e2; color: #991b1b; } .tags { display: flex; flex-wrap: wrap; gap: 8px; } .tag { padding: 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: .875rem; } .avatar { width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent)); flex: none; } .avatar-lg { width: 104px; height: 104px; font-size: 2.1rem; } .avatar-sm { width: 32px; height: 32px; font-size: .8rem; } .icon { width: 48px; height: 48px; border-radius: 12px; display: inline-grid; place-items: center; font-size: 1.4rem; background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); } /* numbers, prices, ratings, check lists */ .price { font-size: 2.6rem; font-weight: 800; letter-spacing: -.02em; } .price small { font-size: 1rem; color: var(--muted); font-weight: 500; } .stars { color: #f59e0b; letter-spacing: 2px; } .list-check { list-style: none; padding: 0; margin: 0 0 1.2em; } .list-check li { padding: 6px 0 6px 28px; position: relative; } .list-check li::before { content: "\2713"; position: absolute; left: 0; color: var(--success); font-weight: 800; } .list-check li.no { color: var(--muted); } .list-check li.no::before { content: "\2715"; color: var(--danger); } .kpi { display: grid; gap: 4px; } .kpi .value { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; } .kpi .label { color: var(--muted); font-size: .9rem; } .up { color: var(--success); } .down { color: var(--danger); } .progress { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; } .progress > span { display: block; height: 100%; background: var(--primary); border-radius: inherit; } /* forms */ .field { display: grid; gap: 6px; margin-bottom: 16px; } label { font-weight: 600; font-size: .92rem; } .input, input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=date], input[type=tel], select, textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; } input:focus, select:focus, textarea:focus { outline: 3px solid color-mix(in srgb, var(--primary) 30%, transparent); border-color: var(--primary); } .error { color: var(--danger); font-size: .85rem; min-height: 1em; } .is-invalid { border-color: var(--danger) !important; } .check { display: flex; align-items: center; gap: 10px; font-weight: 500; } input[type=checkbox], input[type=radio], input[type=range] { accent-color: var(--primary); } input[type=checkbox], input[type=radio] { width: 18px; height: 18px; } input[type=range] { width: 100%; } .switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; } .switch input { opacity: 0; width: 0; height: 0; } .switch span { position: absolute; inset: 0; background: #c7ccd8; border-radius: 999px; transition: .2s; cursor: pointer; } .switch span::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); } .switch input:checked + span { background: var(--primary); } .switch input:checked + span::before { transform: translateX(20px); } /* tables */ .table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); } .table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); } .table th { background: var(--surface-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); } .table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--surface-2) 50%, transparent); } .table tbody tr:hover { background: var(--surface-2); } .table .num { text-align: right; font-variant-numeric: tabular-nums; } .table-wrap { max-height: 70vh; overflow: auto; border-radius: var(--radius); } .table-wrap thead th { position: sticky; top: 0; z-index: 1; } th[data-sort] { cursor: pointer; user-select: none; } th[data-sort]::after { content: " \2195"; opacity: .45; } th.asc::after { content: " \2191"; opacity: 1; } th.desc::after { content: " \2193"; opacity: 1; } /* tabs, accordion, modal, toast */ [data-tabs] .tab-list { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; } [data-tabs] .tab-list button { background: none; border: 0; padding: 12px 18px; font: 650 1rem var(--font); color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; } [data-tabs] .tab-list button.active { color: var(--primary); border-bottom-color: var(--primary); } [data-tabs] .tab-panel { display: none; } [data-tabs] .tab-panel.active { display: block; } details.accordion { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 18px; margin-bottom: 10px; } details.accordion summary { cursor: pointer; padding: 16px 0; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 16px; } details.accordion summary::-webkit-details-marker { display: none; } details.accordion summary::after { content: "+"; font-size: 1.35rem; line-height: 1; color: var(--primary); } details.accordion[open] summary::after { content: "\2212"; } details.accordion > :not(summary) { padding-bottom: 16px; margin: 0; color: var(--muted); } .modal { position: fixed; inset: 0; display: none; place-items: center; background: rgba(10, 12, 20, .55); z-index: 50; padding: 20px; } .modal.open { display: grid; } .modal-box { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 28px; width: min(480px, 100%); position: relative; } .close { position: absolute; top: 10px; right: 14px; border: 0; background: none; font-size: 1.6rem; cursor: pointer; color: var(--muted); line-height: 1; } .toasts { position: fixed; top: 20px; right: 20px; display: grid; gap: 10px; z-index: 60; } .toast { min-width: 260px; padding: 14px 18px; border-radius: var(--radius-sm); color: #fff; background: #334155; box-shadow: var(--shadow-lg); animation: ui-toast-in .3s ease-out; font-weight: 550; } .toast.success { background: var(--success); } .toast.warning { background: var(--warning); } .toast.error { background: var(--danger); } @keyframes ui-toast-in { from { transform: translateX(120%); opacity: 0; } to { transform: none; opacity: 1; } } /* timeline, steps, chat */ .timeline { position: relative; max-width: 920px; margin: 0 auto; } .timeline::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; background: var(--border); transform: translateX(-50%); } .timeline .item { position: relative; width: 50%; padding: 10px 40px; } .timeline .item:nth-child(odd) { left: 0; text-align: right; } .timeline .item:nth-child(even) { left: 50%; } .timeline .item::before { content: ""; position: absolute; top: 22px; width: 16px; height: 16px; border-radius: 50%; background: var(--primary); border: 3px solid var(--bg); } .timeline .item:nth-child(odd)::before { right: -8px; } .timeline .item:nth-child(even)::before { left: -8px; } .steps { display: flex; gap: 8px; counter-reset: step; } .steps .step { flex: 1; text-align: center; color: var(--muted); font-weight: 600; font-size: .9rem; } .steps .step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; margin: 0 auto 8px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--border); } .steps .step.active { color: var(--primary); } .steps .step.active::before, .steps .step.done::before { background: var(--primary); color: #fff; border-color: var(--primary); } .bubble { max-width: 70%; width: fit-content; padding: 10px 14px; border-radius: 16px; background: var(--surface-2); margin: 6px 0; } .bubble.me { margin-left: auto; background: var(--primary); color: var(--primary-ink); border-bottom-right-radius: 4px; } .bubble.them { border-bottom-left-radius: 4px; } /* article typography, footer, misc */ .prose { max-width: 70ch; } .prose p { font-size: 1.08rem; } .prose h2 { margin-top: 1.6em; } blockquote { margin: 1.5em 0; padding: 14px 22px; border-left: 4px solid var(--primary); background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-style: italic; } pre { background: #0f172a; color: #e2e8f0; padding: 16px 18px; border-radius: var(--radius-sm); overflow: auto; font: .9rem/1.55 var(--mono); } :not(pre) > code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font: .9em var(--mono); } figure { margin: 1.5em 0; } figcaption { color: var(--muted); font-size: .9rem; text-align: center; margin-top: 8px; } .footer { background: #111827; color: #cbd5e1; padding: 52px 0 28px; } .footer a { color: #e5e7eb; } .footer h4 { color: #fff; } .footer ul { list-style: none; padding: 0; margin: 0; } .footer li { margin: 6px 0; } .divider { height: 1px; background: var(--border); margin: 24px 0; }