/* Palette from the BioGRID website (thebiogrid.org: biogrid4.css, mainstyles.css). */
:root {
	--bg: #ffffff;
	--surface: #ffffff;
	--surface-2: #f5f5f5;
	--border: #eeeeee;
	--text: #333333;
	--text-muted: #666666;
	--heading: #333333;
	--maroon: #773a3a;        /* header band */
	--maroon-footer: #7b3b3b; /* footer links */
	--hero-text: #ffffff;
	--teal: #b9d7d9;          /* search box border, nav hover, buttons */
	--teal-dark: #9fc4c7;
	--teal-pale: #eeffff;     /* .btn-success background */
	--teal-hover: #668284;    /* footer link hover */
	--link: #4588c5;
	--yellow: #f4ee4e;        /* home page stat highlights */
	--danger: #a94442;
	--danger-soft: #f2dede;
	--success: #3c763d;
	--success-soft: #dff0d8;
	--focus: rgba(69, 136, 197, 0.3);
	--shadow: 5px 5px 3px #2a2829;
	--radius: 15px;
	--font: "Helvetica Neue", Helvetica, Arial, sans-serif;
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	font-family: var(--font);
	font-size: 15px;
	line-height: 1.5;
	color: var(--text);
	background: var(--bg);
}

.container {
	width: 100%;
	max-width: 1120px;
	margin: 0 auto;
	padding: 0 24px;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--maroon); }

code {
	font-family: var(--mono);
	font-size: 0.9em;
	background: var(--surface-2);
	padding: 1px 6px;
	border-radius: 4px;
}

.muted { color: var(--text-muted); }

/* ---- Top bar ---------------------------------------------------------- */
.topbar {
	background: #000000;
}
.topbar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 60px;
}
.brand {
	display: inline-flex;
	align-items: baseline;
	gap: 10px;
	font-size: 17px;
	color: #fff;
}
.brand:hover { color: var(--teal); }
/* The BioGRID wordmark: "Bio" regular, "GRID" bold. */
.brand-logo { font-size: 30px; line-height: 1; color: #fff; }
.brand-logo strong { font-weight: 700; }
.topnav a {
	font-size: 1.2em;
	color: #fff;
}
.topnav a:hover { color: var(--teal); }

/* ---- Hero ------------------------------------------------------------- */
.hero-band {
	background: var(--maroon) linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0) 40%);
	color: var(--hero-text);
}

.hero {
	display: grid;
	grid-template-columns: 1fr 440px;
	gap: 56px;
	align-items: center;
	padding: 40px 0;
}

.eyebrow {
	margin: 0 0 12px;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--yellow);
}

h1 {
	margin: 0 0 16px;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 40px;
	line-height: 1.15;
	font-weight: 700;
	color: #fff;
}

.lead {
	margin: 0 0 32px;
	font-size: 17px;
	color: var(--hero-text);
	max-width: 52ch;
}

.features {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 20px;
}
.features li {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	font-size: 17px;
	line-height: 1.5;
	color: #fff;
}
.features strong { color: #fff; font-weight: 700; }
.feature-icon {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.25);
	color: var(--teal);
	margin-top: -3px;
}

/* ---- Cards & form ----------------------------------------------------- */
.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 32px;
	color: var(--text);
}
/* Styled after the home page search box: thick teal border, hard shadow. */
.form-card { border: 5px solid var(--teal); }

.card h2 {
	margin: 0 0 4px;
	font-size: 24px;
	font-weight: 700;
	color: var(--maroon);
}
.form-card > .muted { margin: 0 0 24px; font-size: 14px; }

.field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}
.field { margin-bottom: 18px; }
.field label {
	display: block;
	margin-bottom: 6px;
	font-size: 14px;
	font-weight: 700;
	color: var(--heading);
}
.field input {
	display: block;
	width: 100%;
	padding: 10px 12px;
	font: inherit;
	font-size: 15px;
	color: var(--text);
	background: var(--surface);
	border: 1px solid #cccccc;
	border-radius: 4px;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.field input::placeholder { color: #999999; }
.field input:hover { border-color: #999999; }
.field input:focus {
	outline: none;
	border-color: var(--link);
	box-shadow: 0 0 0 4px var(--focus);
}
.field input.is-invalid { border-color: var(--danger); }
.field input.is-invalid:focus { box-shadow: 0 0 0 4px var(--danger-soft); }

.alert {
	margin-bottom: 18px;
	padding: 12px 14px;
	border-radius: 4px;
	font-size: 14px;
}
.alert-error {
	color: var(--danger);
	background: var(--danger-soft);
	border: 1px solid #ebccd1;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font: inherit;
	font-weight: 700;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--focus); }
.btn:disabled { cursor: progress; opacity: 0.8; }

.btn-primary {
	width: 100%;
	padding: 12px 20px;
	font-size: 16px;
	border-radius: 10px;
	color: #000;
	background: var(--teal);
	border: 1px solid var(--teal);
}
.btn-primary:hover:not(:disabled) { background: var(--teal-dark); border-color: var(--teal-dark); }

.btn-secondary {
	padding: 8px 16px;
	font-size: 14px;
	color: #000;
	background: var(--teal-pale);
	border: 1px solid var(--teal);
}
.btn-secondary:hover { background: var(--teal); }
.btn-secondary.is-copied { color: #fff; background: var(--success); border-color: var(--success); }

.spinner {
	display: none;
	width: 16px;
	height: 16px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: spin 0.7s linear infinite;
}
.btn.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.fineprint {
	margin: 14px 0 0;
	font-size: 13px;
	color: var(--text-muted);
	text-align: center;
}

/* ---- Result ----------------------------------------------------------- */
.result { padding: 48px 0 64px; scroll-margin-top: 0; }
.result[hidden] { display: none; }
.result-card { border: 1px solid var(--border); border-top: 5px solid var(--maroon); border-radius: 10px; box-shadow: none; }

.result-header {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	margin-bottom: 20px;
}
.result-header p { margin: 4px 0 0; }
.success-icon {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--success-soft);
	color: var(--success);
}

.key-box {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 12px 12px 18px;
	margin-bottom: 24px;
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-left: 5px solid var(--teal);
	border-radius: 4px;
}
.key-value {
	flex: 1;
	min-width: 0;
	padding: 0;
	background: none;
	font-size: 18px;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--heading);
	overflow-wrap: anywhere;
	user-select: all;
}

.result-card h3 {
	margin: 28px 0 12px;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--maroon);
}

.endpoint-list {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 1px solid var(--border);
	border-radius: 4px;
	overflow: hidden;
}
.endpoint-list li {
	padding: 14px 18px;
	border-top: 1px solid var(--border);
}
.endpoint-list li:first-child { border-top: none; }
.endpoint-list li:nth-child(even) { background: #fbfcfd; }
.endpoint-desc {
	display: block;
	margin-bottom: 4px;
	font-size: 14px;
	font-weight: 700;
	color: var(--heading);
}
.endpoint-list a {
	display: block;
	font-family: var(--mono);
	font-size: 13px;
	line-height: 1.6;
	overflow-wrap: anywhere;
}

/* ---- Footer: full-width black bar right after the content ------------ */
.footer { background: #000000; }
.footer-text {
	max-width: 1120px;
	margin: 0 auto;
	padding: 12px 24px;
	font-size: 0.9em;
	font-weight: 700;
	color: #fff;
}
.footer-text a { color: var(--teal); }
.footer-text a:hover { color: var(--teal-hover); }
.footer-project { float: right; }

#footer-links {
	margin: 0;
	padding: 10px 15px 25px;
	text-align: center;
	font-size: 12px;
	line-height: 1.43;
	color: var(--text-muted);
}
#footer-links a { font-weight: 700; color: var(--maroon-footer); }
#footer-links a:hover { color: var(--teal-hover); }

/* ---- Responsive ------------------------------------------------------- */
@media (max-width: 900px) {
	.hero { grid-template-columns: 1fr; gap: 32px; padding: 32px 0; }
	h1 { font-size: 32px; }
}

@media (max-width: 520px) {
	.container { padding: 0 16px; }
	.card { padding: 22px; }
	.field-row { grid-template-columns: 1fr; gap: 0; }
	.key-box { flex-direction: column; align-items: stretch; }
	.footer-text { padding: 12px 16px; }
	.footer-project { float: none; }
	.brand { gap: 6px; font-size: 14px; white-space: nowrap; }
	.brand-logo { font-size: 24px; }
	.topnav a { font-size: 14px; }
}
