/* Snitch preview kit. Static web renditions of components/design-system (React Native), drawn
   from tokens.css so a token edited on this page repaints every preview. Values that the app
   derives from a shape's width (stroke, shadow) use the token for the width class shown. */
body, .sn-backdrop, .sn-phone { font-family: var(--font-text); font-weight: 700; color: var(--body); }
.sn-backdrop *, .sn-phone * { box-sizing: border-box; }

.sn-page { background: var(--page); color: var(--body); font-family: var(--font-text); font-weight: 700;
  padding: var(--space-page-margin); box-sizing: border-box;
  --page-accent: var(--highlight-purple); --section-color: var(--title); display: flex; flex-direction: column; gap: var(--space-component-gap); }
.sn-page * { box-sizing: border-box; }
.sn-page[class*="sn-page--"] { --page-accent: var(--paper); --section-color: var(--paper); }
.sn-page--green { background: var(--page-green); --page-accent-dark: var(--page-green); }
.sn-page--blue { background: var(--page-blue); --page-accent-dark: var(--page-blue); }
.sn-page--purple { background: var(--page-purple); --page-accent-dark: var(--page-purple); }
.sn-page--orange { background: var(--page-orange); --page-accent-dark: var(--page-orange); }
.sn-page--pink { background: var(--page-pink); --page-accent-dark: var(--page-pink); }
.sn-page--yellow { background: var(--page-yellow); --page-accent-dark: var(--page-yellow); }
/* Jet black: every page is `page`; its light colour lives on as the title's accent line. */
[data-theme="dark"] .sn-page[class*="sn-page--"] { background: var(--page); --page-accent: var(--page-accent-dark); --section-color: var(--title); }
[data-theme="dark"] .sn-page:not([class*="sn-page--"]) { --page-accent: var(--highlight-purple); }
[data-theme="dark"] .sn-icon { filter: invert(.92); }
.sn-icon { display: block; }
.sn-row-flex { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-component-gap); }
.sn-stack { display: flex; flex-direction: column; gap: var(--space-component-gap); }
.sn-label { font-family: var(--font-text); font-weight: 700; font-size: 10px; letter-spacing: 0; color: var(--body); opacity: .8; text-transform: lowercase; }

/* Casing and colour helpers */
.sn-upper { text-transform: uppercase; }
.sn-lower { text-transform: lowercase; }
.sn-c-title { color: var(--title); }
.sn-c-body { color: var(--body); }
.sn-c-paper { color: var(--paper); }
.sn-c-accent { color: var(--page-accent); }
.sn-c-placeholder { color: var(--placeholder); }
.sn-m0 { margin: 0; }

/* The sticker: one object for every surface */
.sn-sticker { background: var(--paper); border: var(--stroke-container) solid var(--line);
  border-radius: var(--radius-container); box-shadow: var(--shadow-container); }
.sn-card { background: var(--paper); border: var(--stroke-container) solid var(--line);
  border-radius: var(--radius-container); box-shadow: var(--shadow-container);
  padding: var(--pad-standard-y) var(--pad-standard-x); color: var(--body); }
.sn-card--text { padding: var(--pad-text-top) var(--pad-text-x) var(--pad-text-bottom); }
.sn-card--list { padding: var(--pad-list); }
.sn-card--feed { padding: var(--pad-feed-card-y) var(--pad-feed-card-x); display: flex; flex-direction: column; gap: var(--space-card-section); }
.sn-card--large { padding: var(--pad-large-text-y) var(--pad-large-text-x); }
.sn-card--popup { padding: var(--pad-popup); display: flex; flex-direction: column; gap: var(--space-component-gap); }

/* Buttons: tone decides the fill, the fill decides the label */
.sn-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-inline);
  font-family: var(--font-text); font-weight: 700; font-size: 22px; line-height: 24.2px; letter-spacing: -0.08em;
  text-transform: lowercase; white-space: nowrap; padding: var(--pad-button-standard-y) var(--pad-button-standard-x);
  border: var(--stroke-pill) solid var(--line); border-radius: var(--radius-pill); box-shadow: var(--shadow-small);
  background: var(--primary); color: var(--on-primary); cursor: pointer; }
.sn-btn:active { opacity: .85; }
.sn-btn:focus-visible, .sn-field:focus-within, .sn-option:focus-visible { outline: 3px solid var(--secondary); outline-offset: 3px; }
.sn-btn--secondary { background: var(--secondary); color: var(--on-secondary); }
.sn-btn--destructive { background: var(--destructive); color: var(--on-destructive); }
.sn-btn--paper { background: var(--paper); color: var(--title); }
.sn-btn--orange { background: var(--page-orange); color: var(--paper); }
.sn-btn--compact { font-size: 16px; line-height: 17.6px; padding: var(--pad-button-compact-y) var(--pad-button-compact-x); }
.sn-btn--row { font-size: 16px; line-height: 17.6px; padding: var(--pad-button-row-y) var(--pad-button-row-x); }
.sn-btn--tiny { font-size: 13px; line-height: 14.3px; padding: 4.85px 5px /* tiny is worked out from its type in Button.tsx */; }
.sn-btn--round { width: 26px; height: 26px; padding: 0; font-size: 14px; letter-spacing: 0; text-transform: uppercase; border-radius: var(--radius-circle); }
.sn-btn--block { width: 100%; border-width: var(--stroke-container); box-shadow: var(--shadow-sticker); }
.sn-btn[disabled], .sn-btn.is-disabled { opacity: .5; cursor: default; }
.sn-btn.is-loading > span { visibility: hidden; }
.sn-btn.is-loading { position: relative; }
.sn-btn.is-loading::after { content: ""; position: absolute; width: 84px; height: 20px; border-radius: 6px; background: currentColor; opacity: .25; }
.sn-or { font-family: var(--font-text); font-weight: 500; font-size: 16px; line-height: 17.6px; margin: 0 var(--space-component-gap); }
.sn-button-row { display: flex; align-items: center; justify-content: center; }

/* Round icon buttons */
.sn-round { width: var(--size-icon-button-standard); height: var(--size-icon-button-standard); border-radius: 50%;
  background: var(--paper); border: var(--stroke-pill) solid var(--line); box-shadow: 2px 2px 0 0 var(--shadow);
  display: inline-flex; align-items: center; justify-content: center; color: var(--title); flex: none; }
.sn-round--green { background: var(--primary); }
.sn-round--info { width: 32px; height: 32px; font-family: var(--font-display); font-size: 16px; box-shadow: 1px 1px 0 0 var(--shadow); }
.sn-round--card { width: var(--size-icon-button-card); height: var(--size-icon-button-card); }
.sn-round svg { display: block; }

/* Pictures: stroke, never a shadow */
.sn-photo { width: var(--size-pfp-medium); height: var(--size-pfp-medium); border-radius: 50%; border: var(--stroke-photo) solid var(--line);
  background: var(--identity-blue); flex: none; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); color: var(--title); font-size: 18px; overflow: hidden; }
.sn-photo--small { width: var(--size-pfp-small); height: var(--size-pfp-small); border-width: 1.67px; font-size: 10px; }
.sn-photo--compact { width: var(--size-pfp-compact); height: var(--size-pfp-compact); border-width: 2.5px; font-size: 14px; }
.sn-photo--large { width: var(--size-pfp-large); height: var(--size-pfp-large); font-size: 24px; }
.sn-photo--hero { width: var(--size-pfp-hero); height: var(--size-pfp-hero); font-size: 44px; }

/* Lists */
.sn-list-row { display: flex; align-items: center; padding-block: var(--space-component-gap); min-height: 44px; }
.sn-list-row:first-child { padding-top: 0; }
.sn-list-row:last-child { padding-bottom: 0; }
.sn-list-row + .sn-list-row { border-top: 1px solid var(--separator); }
.sn-list-avatar { width: 56px; display: flex; justify-content: center; flex: none; }
.sn-list-text { flex: 1 1 auto; min-width: 0; margin: 0 12px 0 14px; }
.sn-list-row--plain .sn-list-text { margin-left: 0; }
.sn-list-label { font-size: 20px; line-height: 22px; letter-spacing: -0.08em; color: var(--body); text-transform: lowercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sn-list-sub { font-size: 16px; line-height: 17.6px; letter-spacing: -0.08em; color: var(--body); margin-top: var(--space-text-stack); text-transform: lowercase; }
.sn-list-value { font-size: 16px; letter-spacing: -0.08em; color: var(--body); text-transform: lowercase; white-space: nowrap; }
.sn-chev { width: 14px; height: 14px; margin-left: var(--space-component-gap); color: var(--body); flex: none; }

/* Section header */
.sn-section { display: flex; align-items: center; justify-content: space-between; gap: var(--space-component-gap);
  margin-top: var(--space-content-to-subtitle); margin-bottom: calc(var(--space-subtitle-to-content) - var(--space-component-gap)); }
.sn-section h3 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 20px; line-height: 22px; letter-spacing: -0.06em; text-transform: uppercase; color: var(--section-color); }

/* Hero title: two statements, two tones */
.sn-hero { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 36px; line-height: 39.6px; letter-spacing: -0.08em; text-transform: uppercase; }
.sn-hero span { display: block; }
.sn-hero--header { font-size: 30px; line-height: 33px; }

/* Fields */
.sn-field { display: flex; align-items: center; gap: var(--space-component-gap); background: var(--paper);
  border: var(--stroke-pill) solid var(--line); border-radius: var(--radius-field); box-shadow: var(--shadow-small);
  padding: var(--pad-field-y) var(--pad-field-x); font-size: 16px; letter-spacing: -0.08em; color: var(--body); }
.sn-field input { all: unset; flex: 1; min-width: 0; font: inherit; letter-spacing: inherit; color: inherit; }
.sn-field input::placeholder { color: var(--placeholder); }
.sn-field--large { padding: var(--pad-field-large-y) var(--pad-field-large-x); font-size: 20px; }
.sn-field--pill { border-radius: var(--radius-pill); }
.sn-field-status { font-size: 14px; letter-spacing: -0.08em; color: var(--title); text-transform: lowercase; }
.sn-pill-input { display: flex; align-items: center; height: 54px; padding: 0 var(--space-page-margin-inset); background: var(--primary);
  border: var(--stroke-pill) solid var(--line); border-radius: var(--radius-pill); box-shadow: var(--shadow-sticker);
  font-size: 24px; letter-spacing: -0.08em; color: var(--on-primary); }
.sn-caret { width: 5px; height: 32px; border-radius: 3px; background: var(--on-primary); margin-left: 2px; }
.sn-code { display: flex; gap: var(--space-component-gap); }
.sn-code > div { flex: 1; height: 58px; display: flex; align-items: center; justify-content: center; background: var(--paper);
  border: var(--stroke-pill) solid var(--line); border-radius: var(--radius-field); box-shadow: var(--shadow-small);
  font-family: var(--font-display); font-size: 30px; color: var(--title); }
.sn-code > div.is-next { background: var(--primary); }

/* Option rows */
.sn-option { display: flex; align-items: center; gap: var(--space-component-gap); width: var(--size-option-row-width); max-width: 100%; height: 50px;
  padding: 0 18px; background: var(--paper); border: var(--stroke-pill) solid var(--line); border-radius: var(--radius-pill);
  box-shadow: var(--shadow-small); font-size: 16px; letter-spacing: -0.08em; color: var(--title); text-transform: lowercase; }
.sn-option.is-selected { background: var(--primary); color: var(--on-primary); }
.sn-option--card { height: auto; padding: 10px 18px; align-items: center; }
.sn-option-desc { font-size: 14px; display: block; }
.sn-option-icon { width: 20px; display: inline-flex; justify-content: center; }

/* Switch, checkbox */
.sn-switch { width: 62px; height: 36px; border-radius: var(--radius-pill); background: var(--paper); border: var(--stroke-pill) solid var(--line);
  box-shadow: var(--shadow-small); position: relative; flex: none; }
.sn-switch::after { content: ""; position: absolute; top: 1px; left: 1px; width: 30px; height: 30px; border-radius: 50%; background: var(--paper);
  border: 2px solid var(--line); box-sizing: border-box; box-shadow: 1.33px 1.33px 0 0 var(--shadow); }
.sn-switch.is-on { background: linear-gradient(90deg, var(--highlight-purple), var(--page-purple)); }
.sn-switch.is-on::after { left: 27px; }
.sn-check { display: flex; align-items: center; gap: var(--space-avatar-to-text); font-size: 12px; letter-spacing: -0.08em; color: var(--body); text-transform: lowercase; }
.sn-check-box { width: 24px; height: 24px; border-radius: 25% /* Checkbox.tsx */; background: var(--paper); border: var(--stroke-pill) solid var(--line);
  box-shadow: var(--shadow-small); flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--on-primary); }
.sn-check-box.is-on { background: var(--primary); }

/* Sheet (popup) */
.sn-backdrop { background: var(--backdrop); padding: var(--space-page-margin); display: flex; flex-direction: column; justify-content: flex-end; }
.sn-sheet-head { display: flex; align-items: center; gap: var(--space-avatar-to-text); }
.sn-sheet-head h4 { margin: 0; flex: 1; font-family: var(--font-display); font-weight: 400; font-size: 20px; line-height: 22px; letter-spacing: -0.08em; text-transform: uppercase; color: var(--title); }
.sn-sheet-explainer { margin: 0; font-size: 18px; line-height: 19.8px; letter-spacing: -0.08em; color: var(--body); text-transform: lowercase; }
.sn-sheet-row { display: flex; align-items: center; gap: var(--space-avatar-to-text); height: 66px; font-size: 20px; letter-spacing: -0.08em; color: var(--body); text-transform: lowercase; }
.sn-sheet-row + .sn-sheet-row { border-top: 1px solid var(--separator); }
.sn-sheet-row span { flex: 1; }
.sn-sheet-error { font-size: 16px; letter-spacing: -0.08em; color: var(--secondary); text-transform: lowercase; }
.sn-sheet-buttons { display: flex; gap: var(--space-component-gap); }
.sn-sheet-buttons .sn-btn { flex: 1; }
.sn-bottom-sheet { background: var(--paper); border: var(--stroke-container) solid var(--line); border-bottom: 0;
  border-radius: var(--radius-container) var(--radius-container) 0 0; padding: var(--space-component-gap) var(--pad-popup) var(--pad-popup);
  display: flex; flex-direction: column; gap: var(--space-component-gap); }
.sn-handle { width: 40px; height: 5px; border-radius: 3px; background: var(--separator); align-self: center; }

/* Toast */
.sn-toast { display: flex; align-items: center; gap: var(--space-component-gap); }
.sn-marker { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.sn-toast-title { font-size: 20px; line-height: 22px; letter-spacing: -0.08em; color: var(--title); text-transform: lowercase; }
.sn-toast-desc { font-size: 16px; line-height: 17.6px; letter-spacing: -0.08em; color: var(--body); margin-top: var(--space-text-stack); text-transform: lowercase; }

/* Tooltip */
.sn-tooltip { position: relative; display: inline-block; padding: 10px 16px; min-height: 34px; background: var(--paper);
  border: 3px solid var(--line); border-radius: var(--radius-pill); box-shadow: 2px 2px 0 0 var(--shadow);
  font-size: 16px; letter-spacing: -0.08em; color: var(--body); text-transform: lowercase; }
.sn-tooltip::after { content: ""; position: absolute; left: 50%; bottom: -12px; width: 16px; height: 16px; background: var(--paper);
  border-right: 3px solid var(--line); border-bottom: 3px solid var(--line); transform: translateX(-50%) rotate(45deg); border-radius: 0 0 4px 0; }
.sn-tooltip--purple { background: var(--highlight-purple); color: var(--title); }
.sn-tooltip--purple::after { background: var(--highlight-purple); }

/* Tab bar */
.sn-tabbar { display: flex; align-items: center; justify-content: space-between; padding: 0 var(--space-page-margin); }
.sn-tab { width: 64px; height: 44px; border-radius: var(--radius-pill); background: var(--paper); border: var(--stroke-pill) solid var(--line);
  box-shadow: var(--shadow-small); display: flex; align-items: center; justify-content: center; color: var(--title); }
.sn-tab--centre { height: 64px; border-radius: 50%; }
.sn-tab.is-selected { background: var(--primary); color: var(--on-primary); }
.sn-tab { position: relative; }
.sn-tab .sn-badge { position: absolute; top: -6px; right: -6px; }
[data-theme="dark"] .sn-tab.is-selected .sn-icon { filter: none; }

/* Feedback */
.sn-skeleton { background: var(--title); opacity: .15; border-radius: 999px; }
.sn-progress { height: 24px; border-radius: var(--radius-pill); background: var(--paper); border: var(--stroke-pill) solid var(--line);
  box-shadow: var(--shadow-small); overflow: hidden; }
.sn-progress > i { display: block; height: 100%; background: var(--primary); border-right: var(--stroke-pill) solid var(--line); }
.sn-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--secondary); border: var(--stroke-pill) solid var(--line); box-shadow: var(--shadow-small); }
.sn-badge { min-width: 20px; height: 20px; padding: 0 4px; border-radius: var(--radius-pill); background: var(--secondary); border: var(--stroke-pill) solid var(--line); box-shadow: var(--shadow-small); color: var(--paper); font-size: 10px; letter-spacing: -0.08em; display: inline-flex; align-items: center; justify-content: center; }
.sn-pager { display: flex; gap: 6px; justify-content: center; margin-top: var(--space-component-gap); }
.sn-pager i { width: 6px; height: 6px; border-radius: 50%; background: var(--pager-dot-inactive); }
.sn-pager i.is-on { background: var(--title); }

/* Choice controls */
.sn-pills { display: flex; gap: var(--space-component-gap); overflow-x: auto; padding-bottom: 6px; }
.sn-pills .sn-btn:not(.is-selected) { background: var(--paper); color: var(--title); }

/* A phone-width frame for layout cards */
.sn-phone { width: 390px; max-width: 100%; margin: 0 auto; border-radius: 28px; overflow: hidden; }
.sn-statusbar { height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 var(--space-page-margin-inset);
  font-family: var(--font-text); font-weight: 700; font-size: 15px; letter-spacing: 0; color: var(--title); }
.sn-page--green .sn-statusbar, .sn-page--blue .sn-statusbar, .sn-page--purple .sn-statusbar, .sn-page--orange .sn-statusbar, .sn-page--pink .sn-statusbar { color: var(--paper); }
[data-theme="dark"] .sn-statusbar { color: var(--title); }
