/* Witney Map content office: the ONE set of design tokens. Every colour, size, corner and shadow on every screen
 * (the plugin's own and WordPress's) comes from here; components live in kit.css (see admin.php?page=witney-components).
 * Values follow the public map (docs/design-system.md). Text pairs meet WCAG AA (4.5:1); edges and focus 3:1. */

:root {
	--wm-font: "Lexend", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

	/* Brand: the one accent */
	--wm-green: #396A3F;        /* Town Council logo green (6.3:1 with white) */
	--wm-primary: var(--wp-admin-theme-color, #396A3F);      /* buttons, links, current item */
	--wm-primary-dark: #2C5A31; /* hover and pressed, green text on light fills */
	--wm-primary-soft: #E8F1E7; /* chosen and selected */
	--wm-navy: #24224C;
	--wm-on-primary: #FFFFFF;
	--wm-accent: #F9DE64;       /* Town Council yellow: never text, never a fill behind small text */

	/* Ink and surfaces */
	--wm-ink: #1C1B3A;          /* 15:1 */
	--wm-ink-2: #42415C;        /* 10:1 */
	--wm-muted: #5E5D75;        /* 6.4:1 on white, 5.9:1 on the page */
	--wm-faint: #A7AAAD;        /* decoration only */
	--wm-bg: #F2F4F0;           /* the page: the map's mist white */
	--wm-surface: #FFFFFF;      /* cards, fields, dialogs */
	--wm-surface-2: #F6F8F5;    /* table headers, card footers */
	--wm-sunken: #F2F4F0;
	--wm-hover: #F2F4F0;        /* hover on rows and quiet controls */
	--wm-line: #E1E5DF;         /* card edges and dividers (decoration) */
	--wm-line-2: #CCD2CA;       /* secondary button edges */
	--wm-field: #7A917D;        /* field edges: the lightest green-grey that meets WCAG 1.4.11 on white (3.4:1) and on the grey page (3.07:1) */
	--wm-field-hover: #5A715E;

	/* States: text 4.5:1 on its own soft fill */
	--wm-ok: #0F5A26;
	--wm-ok-soft: #DCF2E0;
	--wm-ok-dot: #00A32A;
	--wm-warn: #6B4600;
	--wm-warn-soft: #FBEDC2;
	--wm-warn-line: #DBA617;
	--wm-danger: #B3261E;
	--wm-danger-dark: #8A1515;
	--wm-danger-soft: #FBE0E0;
	--wm-info: #1D4F91;
	--wm-info-soft: #F0F6FC;
	--wm-neutral-soft: #E4E6EA;

	/* Focus: one ring everywhere, 2px green, 2px clear of the control */
	--wm-focus: #396A3F;

	/* Overlays */
	--wm-glass: #FFFFFF;
	--wm-glass-strong: #FFFFFF;
	--wm-scrim: rgba(28, 27, 58, .4);

	/* Depth: edges do the work; shadows only for things that float (menus, dialogs, toasts) */
	--wm-ring: 0 0 0 1px var(--wm-line);
	--wm-shadow-card: none;
	--wm-shadow: none;
	--wm-shadow-raised: 0 1px 2px rgba(20, 60, 40, .12);
	--wm-shadow-island: 0 -1px 0 var(--wm-line), 0 -4px 12px rgba(0, 0, 0, .06);
	--wm-shadow-lg: 0 0 0 1px rgba(20, 40, 30, .06), 0 12px 32px -8px rgba(20, 40, 30, .22);
	--wm-btn-primary: none;

	/* Shape */
	--wm-radius: 20px;          /* cards, tables, dialogs */
	--wm-radius-block: 16px;    /* blocks inside a card, notices */
	--wm-radius-sm: 12px;       /* fields, thumbnails, menus */
	--wm-radius-xs: 8px;        /* items inside a menu */
	--wm-radius-xl: 20px;
	--wm-pill: 999px;           /* buttons, tabs, status pills */

	/* Type and control sizes: see the block below, which the person's text size scales. */
	--wm-top: calc(56px + (var(--wm-ts) - 1) * 24px); /* the content office's top bar (theme.css), taller with a larger text size: sticky things sit below it */
	--wm-side: 160px;

	/* Motion: short, and only for state changes */
	--wm-ease: cubic-bezier(.4, 0, .2, 1);
	--wm-fast: 100ms;
	--wm-med: 200ms;
	--wm-slow: 300ms;

	/* WordPress 7.1's own design tokens, set to ours, so core screens built on them follow */
	--wpds-border-radius-sm: 8px;
	--wpds-border-radius-md: 12px;
	--wpds-border-radius-lg: 16px;
	--wpds-border-radius-xl: 20px;
	--wpds-font-family-body: var(--wm-font);
	--wpds-font-family-heading: var(--wm-font);
}
/* Type: dense app screens (docs/design-system.md): 14px body, nothing under 12px, at the Standard text size.
 * --wm-ts is the person's own text size (Text size, in the top bar: Standard 1 to Largest 1.6, set in shell.php), and
 * scales every size here, and controls grow with their text. The top bar follows it too, and grows taller with it. */
:root { --wm-ts: 1; }
:root, #wpadminbar {
	--wm-tap-base: 40px;        /* every one-line control: buttons, fields, dropdowns, tab bars; 44px on touch */
	--wm-tap-sm-base: 32px;     /* small buttons only (inside dense rows) */
}
@media (pointer: coarse), screen and (max-width: 782px) { :root, #wpadminbar { --wm-tap-base: 44px; --wm-tap-sm-base: 40px; } }
:root, #wpadminbar {
	--wm-fs-figure: calc(30px * var(--wm-ts));     /* a headline number: Home's and Insights' figures */
	--wm-fs-title: calc(21px * var(--wm-ts));      /* page title */
	--wm-fs-section: calc(17.5px * var(--wm-ts));  /* section heading */
	--wm-fs-card: calc(15px * var(--wm-ts));       /* card heading */
	--wm-fs-body: calc(14px * var(--wm-ts));       /* rows, buttons, fields, labels, tabs */
	--wm-fs-para: calc(13px * var(--wm-ts));       /* descriptions, notes */
	--wm-fs-detail: calc(12px * var(--wm-ts));     /* pills, table headers, hints: the floor */
	--wm-tap: calc(var(--wm-tap-base) + (var(--wm-ts) - 1) * 20px);
	--wm-tap-sm: calc(var(--wm-tap-sm-base) + (var(--wm-ts) - 1) * 16px);
}
@media screen and (max-width: 782px) { :root { --wm-top: 46px; } } /* WordPress's phone bar */
@media screen and (max-width: 600px) { :root { --wm-top: 0px; } }
