/* The pages outside the app: log in, forgot password, new password, one-time
   code, logged out and the survey's invitation code.
   Colours and type follow the GRI Brand & Styling Spec (v2.1). */

:root {
	--red:       #B51D00;
	--red-700:   #8A1600;
	--red-50:    #FBEFEC;
	--n-50:      #F7F6F4;
	--n-100:     #E6E5E3;
	--n-600:     #6B6B6B;
	--charcoal:  #333333;
	--n-900:     #1C1B1A;
	--font:      'Open Sans', -apple-system, system-ui, "Segoe UI", Roboto, Arial, sans-serif;
	--font-head: 'Source Serif 4', Georgia, 'Times New Roman', serif;
	color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

body.entry {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--n-50);
	color: #000;
	font: 400 17px/28px var(--font);
	-webkit-text-size-adjust: 100%;
}

.entry a { color: var(--red); }
.entry a:hover { color: var(--red-700); }
.entry :focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ------------------------------------------------------------ the top --- */
.entry-top {
	flex-shrink: 0;
	min-height: 72px;
	padding: 8px 48px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #fff;
	border-bottom: 1px solid var(--n-100);
}
.entry-logo { display: block; height: 48px; width: auto; }

.entry-lang { position: relative; font-size: 14px; line-height: 20px; }
/* A globe, as in the public website's header (40px square, line icon). */
.entry-lang summary {
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--charcoal);
	cursor: pointer;
	list-style: none;
	border-radius: 2px;
}
.entry-lang summary::-webkit-details-marker { display: none; }
.entry-lang summary:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.entry-lang ul {
	position: absolute;
	right: 0;
	z-index: 10;
	margin: 0;
	padding: 4px 0;
	min-width: 160px;
	max-height: 360px;
	overflow-y: auto;
	list-style: none;
	background: #fff;
	border: 1px solid var(--n-100);
	border-radius: 4px;
}
.entry .entry-lang a { display: block; padding: 8px 16px; color: #000; text-decoration: none; }
.entry .entry-lang a:hover { background: var(--n-50); }

/* --------------------------------------------------------- the middle --- */
.entry-main { flex-grow: 1; display: flex; align-items: center; justify-content: center; }
.entry-main.has-panel { max-width: 1280px; width: 100%; margin: 0 auto; }

.entry-panel {
	position: relative;
	flex: 0 1 50%;
	max-width: 640px;
	aspect-ratio: 640 / 680;
	overflow: hidden;
}
.entry-panel-text { position: absolute; left: 7.5%; top: 5.9%; width: 73.4%; }
.entry-org {
	margin-bottom: 12px;
	font-size: 12px;
	line-height: 16px;
	font-weight: 600;
	letter-spacing: 0.06em;
	color: var(--n-600);
}
.entry-promise {
	font: 600 36px/44px var(--font-head);
	letter-spacing: -0.01em;
	color: var(--red);
}

/* The logo's tilted squares; the photo stays upright inside. */
.entry-sq {
	position: absolute;
	display: block;
	aspect-ratio: 1;
	background-position: center;
	background-size: 102%;
	clip-path: polygon(21.13% 0, 100% 21.13%, 78.87% 100%, 0 78.87%);
}

.entry-side { flex: 1 1 50%; display: flex; justify-content: center; padding: 24px; min-width: 0; }

.entry-card {
	width: 100%;
	max-width: 448px;
	padding: 40px;
	display: flex;
	flex-direction: column;
	gap: 20px;
	background: #fff;
	border: 1px solid var(--n-100);
	border-radius: 4px;
}
.entry-card.is-wide { max-width: 640px; padding: 48px; gap: 24px; }

.entry-h1 {
	margin: 0;
	font: 600 36px/44px var(--font-head);
	letter-spacing: -0.01em;
	color: var(--red);
}
.entry-lead { margin: 8px 0 0; font-size: 14px; line-height: 20px; color: var(--n-600); }
.entry-text { margin: 0; }
.entry-text p { margin: 0 0 12px; }
.entry-text p:last-child { margin-bottom: 0; }
.entry-small { margin: 0; font-size: 14px; line-height: 20px; color: var(--n-600); }

.entry-form { display: flex; flex-direction: column; gap: 20px; margin: 0; }
.entry-field { display: flex; flex-direction: column; gap: 6px; }
.entry-field label { font-size: 14px; line-height: 20px; font-weight: 600; }
.entry-input {
	width: 100%;
	height: 48px;
	padding: 0 12px;
	background: #fff;
	color: #000;
	border: 1px solid var(--n-600);
	border-radius: 2px;
	font: 400 16px var(--font);
}
.entry-input:focus { outline: 2px solid var(--red); outline-offset: 0; border-color: var(--red); }
.entry-input.is-code { height: 56px; font-size: 22px; font-weight: 600; letter-spacing: 0.08em; }

/* a password field with its eye: the button sits inside the field, on the
   right, and the text stops before it */
.entry-pw { position: relative; display: block; }
.entry-pw .entry-input { padding-right: 52px; }
.entry-pw .entry-input::-ms-reveal { display: none; }
.entry-pw-btn {
	position: absolute;
	top: 0;
	right: 0;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 2px;
	color: var(--n-600);
	cursor: pointer;
}
.entry-pw-btn:hover, .entry-pw-btn[aria-pressed="true"] { color: var(--charcoal); }
.entry-pw-btn svg { width: 22px; height: 22px; }
.entry-pw-btn .is-off, .entry-pw-btn[aria-pressed="true"] .is-on { display: none; }
.entry-pw-btn[aria-pressed="true"] .is-off { display: block; }
.entry-link { align-self: flex-start; font-size: 14px; line-height: 20px; }
.entry-link.is-center { align-self: center; }

.entry-btn {
	min-height: 48px;
	padding: 10px 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--red);
	color: #fff;
	border: 1px solid var(--red);
	border-radius: 4px;
	font: 600 16px/24px var(--font);
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}
.entry-btn:hover { background: var(--red-700); border-color: var(--red-700); }
.entry-btn[disabled] { opacity: .55; cursor: default; }
.entry .entry-btn, .entry .entry-btn:hover { color: #fff; }
.entry-btn.is-quiet { background: #fff; border-color: var(--n-600); }
.entry .entry-btn.is-quiet, .entry .entry-btn.is-quiet:hover { color: var(--charcoal); }
.entry-btn.is-quiet:hover { background: var(--n-50); border-color: var(--n-600); }

.entry-inline { display: flex; gap: 8px; }
.entry-inline .entry-input { flex: 1 1 auto; min-width: 0; }
.entry-inline .entry-btn { flex-shrink: 0; }

/* Messages: done in N 900 with white text, an error in red until closed. */
.entry-msg {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 16px;
	border-radius: 4px;
	font-size: 14px;
	line-height: 20px;
}
.entry-msg.is-done { background: var(--n-900); color: #fff; font-weight: 600; }
.entry-msg.is-error { background: var(--red-50); color: var(--red-700); border: 1px solid rgba(138, 22, 0, .25); }
.entry .entry-msg a { color: inherit; text-decoration: underline; }
.entry-msg-close {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	padding: 0;
	background: none;
	border: 0;
	color: inherit;
	font-size: 18px;
	line-height: 20px;
	cursor: pointer;
}

/* The rules of a new password, ticked as they are met. */
.entry-rules {
	margin: 0;
	padding: 12px 16px;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 4px;
	background: var(--n-50);
	font-size: 14px;
	line-height: 20px;
	color: var(--charcoal);
}
.entry-rules li { display: flex; gap: 8px; }
.entry-rules li::before { content: "\25CB"; flex: 0 0 16px; }
.entry-rules li.is-met::before { content: "\2713"; font-weight: 700; }
.entry-error { min-height: 20px; margin: 0; font-size: 14px; line-height: 20px; color: var(--red-700); }

/* ---------------------------------------------------------- the bottom --- */
.entry-foot {
	flex-shrink: 0;
	min-height: 48px;
	padding: 8px 48px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 4px 20px;
	font-size: 12px;
	line-height: 20px;
	color: var(--n-600);
	border-top: 1px solid var(--n-100);
}
.entry-foot-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.entry .entry-foot a { color: var(--n-600); }
.entry .entry-foot a:hover { color: #000; }

/* ------------------------------------------------- the phone's strip --- */
.entry-strip { display: none; position: relative; flex-shrink: 0; height: 96px; overflow: hidden; }

@media (max-width: 1100px) {
	.entry-promise { font-size: 28px; line-height: 36px; }
}

@media (max-width: 860px) {
	.entry-top { min-height: 64px; padding: 8px 16px; }
	.entry-logo { height: 40px; }
	.entry-main, .entry-main.has-panel { display: block; }
	.entry-panel { display: none; }
	.entry-strip { display: block; }
	.entry-side { padding: 8px 16px 20px; }
	.entry-card, .entry-card.is-wide { max-width: none; padding: 24px; gap: 20px; }
	.entry-foot { padding: 12px 16px; }
	.entry-inline { flex-wrap: wrap; }
	.entry-inline .entry-btn { width: 100%; }
}

@media (min-width: 861px) {
	.entry-main:not(.has-panel) .entry-side { flex-basis: 100%; }
}

/* ---------------------------------------------------- registration --- */
/* GRI Platform Registration, two pages. Where the person is: a two-step
   tracker with each step's name, the done one ticked (the stepper of
   Material and Atlassian), in place of "Page 1/2". */
.reg-steps { display: flex; align-items: center; gap: 12px; margin: 0; padding: 0; list-style: none; font-size: 14px; line-height: 20px; color: var(--n-600); }
.reg-steps li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.reg-steps li + li::before { content: ""; flex: 0 0 40px; height: 1px; background: var(--n-100); margin-inline-end: 4px; }
.reg-steps li.is-done + li::before { background: var(--charcoal); }
.reg-step-n {
	flex: 0 0 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
	border: 1px solid var(--n-600); border-radius: 50%; font-weight: 600; font-size: 13px; color: var(--n-600); background: #fff;
}
.reg-steps li.is-on { color: #000; font-weight: 600; }
.reg-steps li.is-on .reg-step-n { background: var(--red); border-color: var(--red); color: #fff; }
.reg-steps li.is-done { color: var(--charcoal); }
.reg-steps li.is-done .reg-step-n { background: var(--charcoal); border-color: var(--charcoal); color: #fff; }

.reg-page { display: flex; flex-direction: column; gap: 20px; }
.reg-page[hidden], .entry-msg[hidden] { display: none; }
.reg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
select.entry-input { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23333' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 14px center; }
.entry-input[aria-invalid="true"] { border-color: var(--red); }
.entry-input:disabled { background: var(--n-50); color: var(--n-600); }

.reg-check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 20px; cursor: pointer; }
.reg-check input { flex: 0 0 18px; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--red); }
.reg-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 4px; }

.reg-h2 { margin: 0; font: 600 20px/28px var(--font); }
.reg-picture { display: flex; align-items: center; gap: 20px; }
.reg-picture img { width: 96px; height: 96px; object-fit: cover; border-radius: 4px; border: 1px solid var(--n-100); cursor: pointer; background: var(--n-50); }
.reg-step-rest { white-space: nowrap; }
.reg-emails { display: flex; flex-direction: column; gap: 12px; }
.reg-emails-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.reg-small-btn { min-height: 36px; padding: 6px 16px; font-size: 14px; }
.reg-email-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--n-100); border-radius: 4px; }
.reg-email-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; font-size: 15px; line-height: 22px; }
.reg-email-list li + li { border-top: 1px solid var(--n-100); }
.reg-email-default { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; cursor: pointer; }
.reg-email-default input { accent-color: var(--red); }
.reg-email-addr { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.reg-badge { flex-shrink: 0; padding: 2px 8px; border-radius: 10px; font-size: 12px; line-height: 16px; font-weight: 600; }
.reg-badge.is-valid { background: #eaf3ec; color: #1f5a33; }
.reg-badge.is-pending { background: #fbf3e2; color: #7a5207; }
.reg-badge.is-error { background: var(--red-50); color: var(--red-700); }
.reg-email-more { flex-shrink: 0; width: 32px; height: 32px; border: 1px solid var(--n-100); border-radius: 4px; background: #fff; cursor: pointer; font-size: 16px; line-height: 1; }

/* the privacy policy and the terms, opened from the agreement line */
.reg-dialog { width: min(800px, calc(100vw - 32px)); max-height: 80vh; padding: 0; border: 0; border-radius: 4px; box-shadow: 0 8px 32px rgba(0,0,0,.2); }
.reg-dialog::backdrop { background: rgba(28,27,26,.5); }
.reg-dialog-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px; background: #fff; border-bottom: 1px solid var(--n-100); }
.reg-dialog-body { padding: 16px 24px 24px; font-size: 15px; line-height: 24px; }

/* the picture and email dialogs of page 2 (jQuery UI, their markup from the
   old pages): the frame and the few classes they use, in this design */
.entry .ui-widget-overlay { position: fixed; inset: 0; background: rgba(28,27,26,.5); z-index: 100; }
.entry .ui-dialog { position: absolute; z-index: 101; background: #fff; border-radius: 4px; box-shadow: 0 8px 32px rgba(0,0,0,.2); padding: 0; max-width: calc(100vw - 32px); font-size: 15px; line-height: 22px; }
.entry .ui-dialog-titlebar { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--n-100); font-weight: 600; }
.entry .ui-dialog-titlebar-close { width: 28px; height: 28px; border: 0; background: none; cursor: pointer; position: relative; font-size: 0; }
.entry .ui-dialog-titlebar-close::after { content: "\00D7"; font-size: 20px; line-height: 28px; color: var(--charcoal); }
.entry .ui-dialog-titlebar-close .ui-icon, .entry .ui-dialog-titlebar-close .ui-button-text { display: none; }
.entry .ui-dialog-content { padding: 16px 20px 20px; }
.entry .ui-helper-hidden-accessible { position: absolute; left: -9999px; }
.entry .ui-dialog .h { display: none; }
.entry .ui-dialog .ce { text-align: center; }
.entry .ui-dialog .mt { margin-top: 12px; }
.entry .ui-dialog .mb { margin-bottom: 12px; }
.entry .ui-dialog .pt { padding-top: 8px; }
.entry .ui-dialog .fl { float: left; }
.entry .ui-dialog .fr { float: right; }
.entry .ui-dialog .clear { clear: both; }
.entry .ui-dialog input[type=email], .entry .ui-dialog input[type=text], .entry .ui-dialog input[type=file] { width: 100%; height: 40px; padding: 0 10px; border: 1px solid var(--n-600); border-radius: 2px; font: 400 15px var(--font); }
.entry .ui-dialog input[type=file] { height: auto; padding: 8px; }
.entry .ui-dialog label { display: block; margin: 0 0 4px; font-size: 14px; font-weight: 600; }
.entry .ui-dialog .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 20px; margin: 4px; border: 1px solid var(--n-600); border-radius: 4px; background: #fff; color: var(--charcoal); font: 600 15px var(--font); cursor: pointer; }
.entry .ui-dialog .btn-info { background: var(--red); border-color: var(--red); color: #fff; }
.entry .ui-dialog .btn-info:hover { background: var(--red-700); }
.entry .ui-dialog .btn-danger { color: var(--red); border-color: var(--red); }
.entry .ui-dialog .alert { padding: 10px 14px; border-radius: 4px; background: var(--n-50); font-size: 14px; }
.entry .ui-dialog img { max-width: 100%; }
.entry .gri-dlg-wait { display: flex; justify-content: center; padding: 24px; }
.entry .gri-spinner { width: 24px; height: 24px; border: 3px solid var(--n-100); border-top-color: var(--red); border-radius: 50%; animation: reg-spin .8s linear infinite; }
@keyframes reg-spin { to { transform: rotate(360deg); } }

@media (max-width: 860px) {
	.reg-row { grid-template-columns: 1fr; }
	.reg-steps li + li::before { flex-basis: 20px; }
	.reg-actions { flex-direction: column-reverse; }
	.reg-actions .entry-btn { width: 100%; }
	.reg-picture img { width: 80px; height: 80px; }
}

/* a dialog whose content could not come (_dialog): the message in place of
   the spinner */
.gri-dlg-error { margin: 12px 0; color: var(--red-700); text-align: center; }
