/* Palette taken from the parent site, orcs.thebiogrid.org. */
:root {
	--bg: #f8faf9;
	--surface: #ffffff;
	--surface-2: #f2f6fa;
	--border: #dde4eb;
	--text: #333333;
	--text-muted: #555555;
	--heading: #031634;
	--navbar: #000000;
	--navbar-edge: #327cb7;
	--navy: #033c73;
	--navy-text: #eeeeee;
	--primary: #3a89c9;
	--primary-hover: #327cb7;
	--primary-soft: #e8f1f9;
	--light-blue: #9cc4e4;
	--gold: #f2c74f;
	--danger: #b90504;
	--danger-soft: #fcebea;
	--success: #2f7d3c;
	--success-soft: #e6f4e8;
	--focus: rgba(58, 137, 201, 0.3);
	--shadow: 0 2px 4px rgba(3, 22, 52, 0.08), 0 16px 40px rgba(3, 22, 52, 0.18);
	--radius: 6px;
	--font: Lato, "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;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.55;
	color: var(--text);
	background: var(--bg);
}

/* main fills the space above the footer; the navy band takes whatever is
   left so no page background shows between it and the footer. */
main { flex: 1; display: flex; flex-direction: column; }

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

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); text-decoration: underline; }

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: var(--navbar);
	border-bottom: 3px solid var(--navbar-edge);
}
.topbar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 56px;
}
.brand {
	font-weight: 700;
	font-size: 18px;
	color: #fff;
}
.brand:hover { color: #fff; text-decoration: none; }
.topnav a {
	font-size: 15px;
	color: #fff;
}
.topnav a:hover { color: var(--light-blue); text-decoration: none; }

/* ---- Hero ------------------------------------------------------------- */
.hero-band {
	background: var(--navy) url("https://orcs.thebiogrid.org/img/home-bg.png") center / cover no-repeat;
	color: var(--navy-text);
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

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

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

h1 {
	margin: 0 0 16px;
	font-size: 40px;
	line-height: 1.15;
	font-weight: 900;
	color: #fff;
}

.lead {
	margin: 0 0 32px;
	font-size: 18px;
	color: var(--navy-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: 18px;
	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(156, 196, 228, 0.18);
	color: var(--light-blue);
	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);
}
.form-card { border-top: 4px solid var(--primary); }

.card h2 {
	margin: 0 0 4px;
	font-size: 22px;
	font-weight: 700;
	color: var(--heading);
}
.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(--primary);
	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 rgba(185, 5, 4, 0.25);
}

.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;
	color: #fff;
	background: var(--primary);
	border: 1px solid var(--primary);
}
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); border-color: var(--primary-hover); }

.btn-secondary {
	padding: 8px 16px;
	font-size: 14px;
	color: #fff;
	background: var(--primary);
	border: 1px solid var(--primary);
}
.btn-secondary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-secondary.is-copied { 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 { box-shadow: 0 1px 3px rgba(3, 22, 52, 0.08); border-top: 4px solid var(--navy); }

.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: 4px solid var(--gold);
	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(--navy);
}

.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 (matches orcs.thebiogrid.org) ---------------------------- */
.footer {
	background: var(--navy);
	padding: 0 15px;
}
.footer-text {
	max-width: 1170px;
	margin: 0 auto;
	padding: 10px;
	font-weight: 700;
	color: var(--navy-text);
}
.footer-text a { color: #f26c4f; }
.footer-project { float: right; }

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

/* ---- Responsive ------------------------------------------------------- */
@media (max-width: 900px) {
	.hero { grid-template-columns: 1fr; gap: 40px; padding: 40px 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-project { float: none; }
}
