/* The Winsmith brand, for the sign-in pages (the Identity module, id.winsmith.ai): navy on warm ivory, Outfit headings,
   IBM Plex Sans text, the medal logo (decision D56; drawn in brand). The BusyBooking apps use busybooking.css instead.
   The class names are the same as busybooking.css, so a page reads the same in either brand.
   Fonts are served from our own site (fonts/, SIL Open Font License), never from a CDN, to keep the strict CSP. */

@font-face { font-family: "Outfit"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/outfit-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/outfit-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }

:root {
	/* Light until the person chooses dark (D56): the layout sets data-theme on <html> from their account. Each colour is
	   light-dark(light, dark); the values are brand/winsmith/brand.css. */
	color-scheme: light;
	--page: light-dark(#F8F6F1, #0D1320);
	--surface: light-dark(#FFFFFF, #151C2B);
	--line: light-dark(#E2DED3, #283247);
	--line-strong: light-dark(#CBC5B6, #39445C);
	--text: light-dark(#131A2A, #EEF1F6);
	--text-muted: light-dark(#4A5160, #AAB2BF);
	--text-faint: light-dark(#636975, #848D9B);
	--accent: light-dark(#1B3A7A, #8FB0F0);
	--accent-hover: light-dark(#122A5C, #B4CBF7);
	--accent-soft: light-dark(#E6ECF7, #17233F);
	--on-accent: light-dark(#FFFFFF, #0A1730);
	--error: light-dark(#B42318, #FF6B78);
	--ok: light-dark(#067647, #3FCB8E);
	--font-display: "Outfit", system-ui, sans-serif;
	--font-body: "IBM Plex Sans", system-ui, sans-serif;
	--max: 1180px;
}
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	color: var(--text);
	background: var(--page);
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

h1, h2 {
	font-family: var(--font-display);
	font-weight: 700;
	text-wrap: balance;
}
h1 { font-size: clamp(32px, 6vw, 44px); line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 20px; }
h2 { font-size: 24px; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 12px; }

code { background: var(--accent-soft); color: var(--text); padding: 1px 5px; border-radius: 4px; }

/* Wordmark: lowercase Outfit Bold in ink, beside the medal (brand/winsmith/guidelines.html). */
.wordmark {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 28px;
	line-height: 1;
	letter-spacing: -0.025em;
	color: var(--text);
	text-decoration: none;
}
.wordmark:hover { color: var(--text); }

/* Header and footer */
.site-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 28px;
	padding: 20px 24px;
	background: var(--page);
	border-bottom: 1px solid var(--line);
}
.brand-lockup { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.brand-lockup img { display: block; height: 30px; width: auto; }
/* The medal file that suits the scheme: full colour on light, reversed on dark. */
.brand-lockup .when-dark, :root[data-theme="dark"] .brand-lockup .when-light { display: none; }
:root[data-theme="dark"] .brand-lockup .when-dark { display: block; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 24px; font-size: 15px; }
.site-header nav a { color: var(--text-muted); text-decoration: none; }
.site-header nav a:hover { color: var(--text); }
.account-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-left: auto; font-size: 15px; }
/* A long email address breaks rather than pushing the page wider than a phone. */
.account-nav, .card { overflow-wrap: anywhere; }
.account-nav a { color: var(--text-muted); }
.account-nav a:hover { color: var(--text); }

.site-footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px;
	padding: 28px 24px 36px;
	margin-top: 48px;
	border-top: 1px solid var(--line);
	font-size: 14px;
	color: var(--text-faint);
}

.container { max-width: var(--max); margin: 0 auto; padding: 48px 24px; }
.container-narrow { max-width: 520px; }
.muted { color: var(--text-faint); }

/* The logo of the app that sent the person here (a brand's own stylesheet styles it), above the page's content. */
.app-brand { display: flex; margin-bottom: 28px; }

/* Panels */
.card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 16px;
	padding: 28px;
	margin-bottom: 24px;
}
.card h2 { font-size: 21px; }

/* Forms */
label { display: block; font-size: 14px; font-weight: 500; color: var(--text-muted); margin-bottom: 6px; }
.field { margin-bottom: 16px; }
input[type="email"],
input[type="password"],
input[type="text"],
input[type="search"] {
	width: 100%;
	max-width: 420px;
	padding: 12px;
	font: inherit;
	font-size: 16px;
	color: var(--text);
	background: var(--page);
	border: 1px solid var(--line-strong);
	border-radius: 10px;
}
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.checkbox { display: flex; align-items: center; gap: 10px; }
.checkbox input { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--accent); }
.checkbox label { display: inline; margin: 0; font-weight: 400; color: var(--text-muted); }
.choices { display: flex; flex-direction: column; gap: 10px; margin: 0 0 16px; padding: 0; border: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Buttons: rounded rectangles (never pills), white on navy. A link that goes somewhere else looks the same (.button). */
button, .button {
	margin-top: 6px;
	padding: 12px 22px;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	color: var(--on-accent);
	background: var(--accent);
	border: 0;
	border-radius: 12px;
	cursor: pointer;
}
button:hover, .button:hover { color: var(--on-accent); background: var(--accent-hover); }
.button { display: inline-block; text-align: center; text-decoration: none; }
.button-outline { background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); }
.button-outline:hover { background: var(--surface); border-color: var(--text-faint); }
.inline-form { display: inline; margin: 0; }
.link-button {
	margin: 0;
	padding: 0;
	font-weight: 400;
	color: var(--text-muted);
	background: none;
	border: 0;
	border-radius: 0;
	text-decoration: underline;
	cursor: pointer;
}
.link-button:hover { color: var(--text); background: none; }

/* A list of apps (the account page's "Your apps"): each app's logo and name, together the link that opens it. */
.app-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 16px; }
.app-list .app-link {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	padding: 12px;
	color: var(--text);
	text-decoration: none;
	border: 1px solid var(--line);
	border-radius: 12px;
}
.app-list .app-link:hover { border-color: var(--line-strong); background: var(--page); }
.app-list .app-link:hover .app-name { text-decoration: underline; }
.app-list .app-name { font-weight: 600; }

/* Messages */
.field-error { display: block; color: var(--error); font-size: 14px; margin-top: 4px; }
.field-error ul { margin: 0 0 12px; padding-left: 18px; }
.success { color: var(--ok); }
.result { margin-top: 8px; padding: 10px 12px; background: var(--page); border: 1px solid var(--line); border-radius: 10px; }

@media (max-width: 640px) {
	.site-header { padding: 16px; }
	.account-nav { margin-left: 0; width: 100%; }
	.container { padding: 32px 16px; }
	.card { padding: 22px; }
	button, .button { width: 100%; }
	.link-button { width: auto; }
}
