vars.css

8.0 KB · raw

1@font-face {2  font-family: "Cormorant Garamond";3  font-weight: 300;4  font-style: italic;5  src: url("/fonts/CormorantGaramond-LightItalic.woff2") format("woff2");6  font-display: optional;7}89@font-face {10  font-family: "Cormorant Garamond";11  font-weight: 300;12  font-style: normal;13  src: url("/fonts/CormorantGaramond-Light.woff2") format("woff2");14  font-display: optional;15}1617@font-face {18  font-family: "Cormorant Garamond";19  font-weight: 400;20  font-style: normal;21  src: url("/fonts/CormorantGaramond-Regular.woff2") format("woff2");22  font-display: optional;23}2425@font-face {26  font-family: "Cormorant Garamond";27  font-weight: 400;28  font-style: italic;29  src: url("/fonts/CormorantGaramond-RegularItalic.woff2") format("woff2");30  font-display: optional;31}3233@font-face {34  font-family: "IBM Plex Mono";35  font-weight: 300;36  font-style: normal;37  src: url("/fonts/IBMPlexMono-Light.woff2") format("woff2");38  font-display: optional;39}4041@font-face {42  font-family: "IBM Plex Mono";43  font-weight: 300;44  font-style: italic;45  src: url("/fonts/IBMPlexMono-LightItalic.woff2") format("woff2");46  font-display: optional;47}4849@font-face {50  font-family: "IBM Plex Mono";51  font-weight: 400;52  font-style: normal;53  src: url("/fonts/IBMPlexMono-Regular.woff2") format("woff2");54  font-display: optional;55}5657@font-face {58  font-family: "Inter Variable";59  font-weight: 100 900;60  font-style: normal;61  src: url("/fonts/InterVariable.woff2") format("woff2-variations");62  font-display: optional;63}6465@font-face {66  font-family: "Inter";67  font-weight: 400;68  font-style: normal;69  src: url("/fonts/Inter-Regular.woff2") format("woff2");70  font-display: optional;71}7273@font-face {74  font-family: "PeachScript";75  font-weight: 400;76  font-style: normal;77  src: url("/fonts/PeachScript-Regular.otf") format("opentype");78  font-display: block;79}8081:root {82  --bg: #0C0A06;83  --s1: #131109;84  --s2: #1A1710;85  --s3: #221F14;86  --bg-1: var(--s1);87  --bg-2: var(--s2);88  --bg-3: var(--s3);89  --t0: #F0E8D8;90  --t1: rgba(240, 232, 216, 0.50);91  --t2: rgba(240, 232, 216, 0.20);92  --t3: rgba(240, 232, 216, 0.07);93  --t4: rgba(240, 232, 216, 0.04);94  --ac: #E8956D;95  --surface-card: rgba(240, 232, 216, 0.02);96  --surface-elevated: rgba(19, 17, 9, 0.88);97  --shell-top-solid: #000000;98  --shell-top-fade: rgba(12, 10, 6, 0.95);99  --shell-accent-a: color-mix(in srgb, var(--peach-accent) 8%, transparent);100  --shell-accent-b: color-mix(in srgb, var(--peach-accent) 6%, transparent);101  --breach: rgba(220, 80, 60, 0.7);102  --health: rgba(100, 210, 100, 0.75);103  --totp-tag: rgba(120, 175, 255, 0.75);104  --copy-shadow: 0 2px 8px rgba(0,0,0,0.55), 0 14px 48px rgba(0,0,0,0.7), 0 0 0 1px rgba(240,232,216,0.04);105  --font-display: "Cormorant Garamond", "Times New Roman", serif;106  --font-display-style: italic;107  --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;108  --font-ui: "Inter Variable", "Inter", system-ui, sans-serif;109  /* Body-text scale; multiplied into key font-size declarations so users110     can request small / default / large without breaking dense layouts.111     XL was deliberately excluded — clips Vault and Health. */112  --peach-text-scale: 1;113  --spring: cubic-bezier(0.16, 1, 0.3, 1);114  --retreat: cubic-bezier(0.4, 0, 1, 1);115  --settle: cubic-bezier(0.34, 1.56, 0.64, 1);116  --dur-enter: 500ms;117  --dur-exit: 280ms;118  --dur-micro: 150ms;119  --peach-bg: var(--bg);120  --peach-s1: var(--s1);121  --peach-s2: var(--s2);122  --peach-s3: var(--s3);123  --peach-t0: var(--t0);124  --peach-t1: var(--t1);125  --peach-t2: var(--t2);126  --peach-t3: var(--t3);127  --peach-t4: var(--t4);128  --peach-text: var(--peach-t4);129  --peach-text-dim: var(--peach-t1);130  --peach-bg-card: var(--surface-card);131  --peach-border: var(--peach-t3);132  --peach-mono: var(--font-mono);133  --peach-accent: var(--ac);134  --peach-accent-dim: color-mix(in srgb, var(--peach-accent) 25%, transparent);135  --peach-glow: #F49C702A;        /* accent bloom behind buttons/illustrations — set by applyAccent() */136  --peach-surface-tint: #F49C7009; /* accent tint on card surfaces — set by applyAccent() */137  --peach-border-accent: #F49C7024; /* accent-tinted border for active states — set by applyAccent() */138  --peach-breach: var(--breach);139  --peach-health-ok: var(--health);140  --peach-health-bad: var(--breach);141  --peach-totp-tag: var(--totp-tag);142  --peach-sync-ok: #5ebd5e;143  --peach-sync-busy: #c8a840;144  --peach-sync-off: var(--peach-t2);145  --peach-sync-err: var(--peach-breach);146  --peach-curve-arrival: var(--spring);147  --peach-curve-departure: var(--retreat);148  --peach-curve-settle: var(--settle);149  --peach-dur-80: 80ms;150  --peach-dur-150: 150ms;151  --peach-dur-280: 280ms;152  --peach-dur-380: 380ms;153  --peach-dur-500: 500ms;154  --peach-dur-600: 600ms;155  --peach-copy-clear: 1.4s;156  --peach-rune-idle: rgba(245, 240, 234, 0.16);157  --peach-ghost-opacity: 0.03;158  /* Tell the browser engine which color schemes the UI knows how to render —159     this gets us correct form-control colors and scrollbar tinting in the160     WebView when the user follows the system theme. */161  color-scheme: dark light;162}163164.light {165  /* v2: cool linen surfaces — hsl(30°, 10–12%, 84–92%)166     Lower saturation than v1; neutral enough for peach accent to read warm by contrast. */167  --bg: #E8E2D9;168  --s1: #EDE8E0;169  --s2: #F0EBE4;170  --s3: #DED8CE;171  --bg-1: var(--s1);172  --bg-2: var(--s2);173  --bg-3: var(--s3);174  --t0: #1A1208;175  --t1: #3D2E18;176  --t2: #6B5A42;177  --t3: #C8C0B4;178  --t4: rgba(26, 18, 8, 0.06);179  --surface-card: rgba(26, 18, 8, 0.03);180  --surface-elevated: rgba(237, 232, 224, 0.97);181  --shell-top-solid: rgba(232, 226, 217, 0.98);182  --shell-top-fade: rgba(237, 232, 224, 0.96);183  --shell-accent-a: color-mix(in srgb, var(--peach-accent) 6%, transparent);184  --shell-accent-b: color-mix(in srgb, var(--peach-accent) 3%, transparent);185  --copy-shadow: 0 2px 8px rgba(80, 56, 32, 0.12), 0 14px 48px rgba(80, 56, 32, 0.12), 0 0 0 1px rgba(26, 18, 8, 0.06);186  --peach-rune-idle: rgba(26, 18, 8, 0.16);187  /* lighter surfaces make the watermark more visible at the same opacity — step down slightly */188  --peach-ghost-opacity: 0.13;189}190191/* ─── Text size scaling ────────────────────────────────────────────────192   Implemented via the `zoom` property on the popup body so every existing193   px-based font-size in popup.css scales proportionally without rewriting194   any individual rule. Capped at 1.08 — large enough to noticeably help,195   small enough that the dense Vault and Health views don't clip the196   fixed-size popup surface. The CSS custom property is also exposed so197   desktop / mobile builds can use a calc() multiplier on layouts that198   don't fit `zoom` semantics. */199[data-text-size="small"]  { --peach-text-scale: 0.92; }200[data-text-size="medium"] { --peach-text-scale: 1; }201[data-text-size="large"]  { --peach-text-scale: 1.08; }202/* Large: zoom on html so Chrome auto-resizes the popup window upward.203   Small: zoom on body instead — Chrome cannot shrink the popup below its204   minimum width, so zooming html for small leaves click coordinates misaligned.205   Zooming body keeps the window fixed and coordinate scaling stays correct.206   The html background fill prevents a bare strip at the edges of the scaled body. */207html { background: var(--bg); }208html[data-text-size="large"]       { zoom: 1.08; }209html[data-text-size="small"] body  { zoom: 0.92; }210211/* ─── Reduced motion ───────────────────────────────────────────────────212   User-explicit setting OR OS-level prefers-reduced-motion both collapse213   transitions and ambient animations to instant. The user-explicit form214   takes precedence and works even when the OS hasn't been configured. */215[data-motion="reduce"] *,216[data-motion="reduce"] *::before,217[data-motion="reduce"] *::after {218  animation-duration: 0.001ms !important;219  animation-delay: 0.001ms !important;220  animation-iteration-count: 1 !important;221  transition-duration: 0.001ms !important;222  transition-delay: 0.001ms !important;223  scroll-behavior: auto !important;224}