/* nicehand.net site chrome: header, footer, front page, prose, forms. The replayer's own
   look is in nhr.css, so a shared hand renders the same on any page. */

/**
 * The theme owns chrome and typography. It does not style the replayer: every
 * .nhr- class belongs to the plugin, which carries its own look so that a
 * shared hand renders the same whatever theme is around it.
 *
 * There is one accent and no decoration. This is a tool - somebody arrives
 * with a hand history in the clipboard and wants it on screen, and anything
 * that delays that is in the way.
 */

:root {
	--nh-ground: #ffffff;
	--nh-ground-2: #f6f8f7;
	--nh-ink: #0b130f;
	--nh-ink-dim: #3c4a43;
	--nh-muted: #6c7e75;
	--nh-rule: #e4ebe8;
	--nh-accent: #072f1f;
	--nh-lime: #b4f105;
	--nh-font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

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

body {
	margin: 0;
	background: var(--nh-ground);
	color: var(--nh-ink);
	font-family: var(--nh-font);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

a { color: var(--nh-accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--nh-accent); outline-offset: 2px; border-radius: 3px; }

/* One width for the whole site, so the header rule, the table and the hand
   list all line up down the page. */
.nh-wrap {
	width: 100%;
	max-width: 1140px;
	margin-inline: auto;
	padding-inline: 20px;
}

/* Skip link, visible only once it has focus. */
.nh-skip {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 10;
	padding: 10px 16px;
	background: var(--nh-accent);
	color: #fff;
	text-decoration: none;
}

.nh-skip:focus { left: 0; }

/* ---------------------------------------------------------------- header --- */

.nh-header {
	border-bottom: 1px solid var(--nh-rule);
	background: var(--nh-ground);
}

.nh-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	min-height: 60px;
	flex-wrap: wrap;
}

.nh-brand {
	display: inline-flex;
	align-items: center;
	padding-block: 10px;
	text-decoration: none;
}

/* Sized by height: the header is 60px and the mark has to sit inside it at any
   width. The PNG is trimmed to the ink, so no padding in the file skews this. */
.nh-brand img { display: block; height: 36px; width: auto; }

.nh-nav {
	display: flex;
	align-items: center;
	gap: 4px;
	flex-wrap: wrap;
}

.nh-nav a {
	padding: 6px 10px;
	border-radius: 7px;
	font-size: 14px;
	font-weight: 600;
	color: var(--nh-ink-dim);
	text-decoration: none;
}

.nh-nav a:hover { background: var(--nh-ground-2); color: var(--nh-ink); }
.nh-nav a[aria-current="page"] { color: var(--nh-ink); background: var(--nh-ground-2); }

/* ------------------------------------------------------------------ main --- */

.nh-main { padding-block: 28px 56px; }

.nh-title {
	margin: 0 0 6px;
	font-size: clamp(22px, 3.2vw, 30px);
	font-weight: 800;
	letter-spacing: -.025em;
	line-height: 1.15;
}

.nh-lede {
	margin: 0 0 22px;
	max-width: 62ch;
	font-size: 15px;
	color: var(--nh-muted);
}

/**
 * The three steps. Plain numbered text on one line, not three cards with
 * icons: it is a caption telling somebody what to expect, and it should cost a
 * glance, not a scroll.
 */
.nh-steps {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 26px;
	margin: 0 0 18px;
	padding: 0;
	list-style: none;
	font-size: 14px;
	color: var(--nh-ink-dim);
}

.nh-steps li {
	display: flex;
	align-items: baseline;
	gap: 8px;
}

.nh-steps b {
	flex: none;
	width: 19px;
	height: 19px;
	border-radius: 50%;
	background: var(--nh-accent);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 19px;
	text-align: center;
	transform: translateY(2px);
}

/* --------------------------------------------------------------- section --- */

.nh-section { margin-top: 44px; }

.nh-section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	padding-bottom: 8px;
	margin-bottom: 16px;
	border-bottom: 1px solid var(--nh-rule);
}

.nh-section-head h2 {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .02em;
}

.nh-section-head a { font-size: 13px; font-weight: 600; }

.nh-empty {
	padding: 22px;
	border: 1px dashed var(--nh-rule);
	border-radius: 12px;
	color: var(--nh-muted);
	font-size: 14px;
	text-align: center;
}

/* ------------------------------------------------------------------ prose --- */

.nh-prose { max-width: 68ch; }
.nh-prose h2 { margin: 30px 0 8px; font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.nh-prose h3 { margin: 22px 0 6px; font-size: 16px; font-weight: 700; }
.nh-prose p, .nh-prose ul, .nh-prose ol { margin: 0 0 14px; }
.nh-prose code {
	padding: 1px 5px;
	border-radius: 4px;
	background: var(--nh-ground-2);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: .9em;
}

/* ---------------------------------------------------------------- footer --- */

.nh-footer {
	border-top: 1px solid var(--nh-rule);
	padding-block: 20px 40px;
	font-size: 13px;
	color: var(--nh-muted);
}

.nh-footer-inner {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px 20px;
	flex-wrap: wrap;
}

.nh-footer a { color: var(--nh-ink-dim); text-decoration: none; }
.nh-footer a:hover { text-decoration: underline; }
.nh-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ form --- */

.nh-form {
	display: grid;
	gap: 16px;
	margin-top: 22px;
	padding: 22px;
	border: 1px solid var(--nh-rule);
	border-radius: 14px;
	background: var(--nh-ground-2);
}

.nh-form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

@media (max-width: 560px) {
	.nh-form { padding: 16px; }
	.nh-form-row { grid-template-columns: 1fr; }
}

.nh-field { display: grid; gap: 6px; min-width: 0; }

.nh-field label {
	font-size: 13px;
	font-weight: 700;
	color: var(--nh-ink-dim);
}

.nh-field input,
.nh-field select,
.nh-field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #cfdad5;
	border-radius: 9px;
	background: var(--nh-ground);
	color: var(--nh-ink);
	font: inherit;
	font-size: 15px;
}

.nh-field textarea { resize: vertical; min-height: 150px; line-height: 1.5; }

.nh-field input:focus,
.nh-field select:focus,
.nh-field textarea:focus {
	outline: none;
	border-color: var(--nh-accent);
	box-shadow: 0 0 0 3px rgba(7, 47, 31, .12);
}

.nh-hint { margin: 0; font-size: 13px; color: var(--nh-muted); }

.nh-form-foot {
	display: flex;
	align-items: center;
	gap: 10px 18px;
	flex-wrap: wrap;
}

.nh-button {
	padding: 11px 20px;
	border: 0;
	border-radius: 9px;
	background: var(--nh-accent);
	color: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
}

.nh-button:hover { background: #0d4a32; }
.nh-button:disabled { opacity: .55; cursor: default; }

.nh-form-status { margin: 0; font-size: 14px; font-weight: 600; }
.nh-form-status:empty { display: none; }
.nh-form-status.is-ok { color: #15803d; }
.nh-form-status.is-error { color: #b91c1c; }

/* The honeypot: off-screen, not display:none, which some bots know to skip. */
.nh-hp {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ------------------------------------------------------------------- 404 --- */

.nh-notice {
	max-width: 56ch;
	margin-block: 40px 60px;
}

.nh-notice p { color: var(--nh-muted); }
