/* /roadmap — the public roadmap. Builds on styles.css tokens. Compact on
   purpose: a visitor scans titles and votes, so a card is two lines. */

/* Every block here sets a display, which would otherwise beat the attribute. */
[hidden] {
	display: none !important;
}

.rm-main {
	padding-block: clamp(24px, 4vw, 44px) clamp(48px, 7vw, 80px);
	max-width: 960px;
}
.rm-main.board {
	max-width: var(--maxw-wide);
}

/* ── Hero ── */

.rm-hero {
	margin-bottom: 18px;
}
.rm-hero h1 {
	margin: 0 0 6px;
	font-size: clamp(28px, 3.2vw, 36px);
	letter-spacing: -0.035em;
	line-height: 1.05;
}
.rm-lede {
	margin: 0;
	max-width: 70ch;
	font-size: 15.5px;
	line-height: 1.5;
	color: var(--text-muted);
}
.rm-lede strong {
	color: var(--text);
	font-weight: 600;
}
.rm-account {
	margin: 8px 0 0;
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--text-dim);
}
.rm-account:empty {
	display: none;
}

.rm-link {
	background: none;
	border: 0;
	padding: 0;
	color: var(--amber);
	font: inherit;
	text-decoration: underline;
	text-decoration-color: var(--amber-border);
	text-underline-offset: 3px;
	cursor: pointer;
}

/* ── Filter bar ── */

.rm-bar {
	position: sticky;
	top: 72px;
	z-index: 5;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
	padding: 10px 0;
	margin-bottom: 14px;
	background: color-mix(in oklch, var(--bg) 92%, transparent);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--border);
}
.rm-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin-left: auto;
}
.rm-seg,
.rm-show {
	display: inline-flex;
	padding: 2px;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-md);
}
.rm-show {
	border-style: dashed;
}
.rm-seg button,
.rm-show button {
	padding: 4px 10px;
	border: 0;
	border-radius: var(--radius-sm);
	background: none;
	color: var(--text-muted);
	font-family: var(--font-display);
	font-size: 13px;
	cursor: pointer;
	transition:
		background 0.15s var(--ease),
		color 0.15s var(--ease);
}
.rm-seg button:hover,
.rm-show button:hover {
	color: var(--text-strong);
}
.rm-seg button[aria-pressed='true'],
.rm-show button[aria-pressed='true'] {
	background: var(--surface-raised);
	color: var(--text-strong);
}
.rm-n {
	font-family: var(--font-mono);
	font-size: 11px;
	color: var(--text-dim);
}
.rm-filters select,
.rm-filters input,
.rm-field input,
.rm-field textarea {
	padding: 5px 10px;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-md);
	background: var(--surface);
	color: var(--text);
	font: inherit;
	font-size: 14px;
}
.rm-filters select {
	appearance: base-select;
}
.rm-filters input {
	width: 170px;
}

/* ── Cards (both layouts) ── */

.rm-loading {
	color: var(--text-muted);
	padding: 24px 0;
}
.rm-loading a {
	color: var(--amber);
}

.rm-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.rm-card {
	display: grid;
	grid-template-columns: 38px minmax(0, 1fr);
	gap: 12px;
	align-items: start;
	padding: 10px 0;
	border-bottom: 1px solid var(--border);
}
.rm-card:last-child {
	border-bottom: 0;
}
.rm-card[data-status='rejected'] .rm-title {
	color: var(--text-muted);
}
.rm-title {
	color: var(--text-strong);
	font-family: var(--font-display);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: -0.01em;
	text-decoration: none;
}
.rm-title:hover {
	color: var(--amber);
}
.rm-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px 7px;
	margin: 4px 0 0;
	font-size: 12.5px;
	color: var(--text-muted);
}
.rm-meta a {
	color: var(--amber);
}
.rm-dot {
	color: var(--text-dim);
}
.rm-tagwords {
	color: var(--text-dim);
}
.rm-tagwords::before {
	content: '·';
	margin-right: 7px;
}
.rm-kind {
	padding: 0 6px;
	border-radius: var(--radius-sm);
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	background: var(--amber-subtle);
	color: var(--amber);
}
.rm-kind.bug {
	background: rgba(224, 82, 82, 0.12);
	color: #f08a8a;
}
.rm-urgent {
	color: #f08a8a;
}
.rm-reason {
	margin: 5px 0 0;
	color: var(--text-muted);
	font-size: 13px;
	line-height: 1.45;
}
.rm-reason.big {
	padding: 10px 14px;
	border-left: 2px solid var(--border-strong);
	background: var(--surface);
	font-size: 14px;
}
.rm-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 10px 0 0;
}
.rm-tag {
	padding: 1px 8px;
	border: 1px solid var(--border-strong);
	border-radius: 999px;
	font-size: 12px;
	color: var(--text-muted);
}
.rm-more {
	margin-top: 10px;
}

/* ── The vote box ── */

.rm-vote {
	display: grid;
	justify-items: center;
	padding: 1px 0;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-md);
	background: var(--surface);
}
.rm-vote button {
	width: 100%;
	padding: 2px 0;
	border: 0;
	background: none;
	color: var(--text-dim);
	font-size: 10px;
	line-height: 1.1;
	cursor: pointer;
	transition:
		color 0.15s var(--ease),
		transform 0.12s var(--ease);
}
.rm-vote button:hover {
	color: var(--text-strong);
}
.rm-vote button:active {
	transform: scale(0.85);
}
.rm-vote .rm-up[aria-pressed='true'] {
	color: var(--amber);
}
.rm-vote .rm-down[aria-pressed='true'] {
	color: #9ab8ff;
}
.rm-score {
	font-family: var(--font-mono);
	font-size: 13px;
	font-weight: 600;
	color: var(--text-strong);
}
.rm-score.bump {
	animation: rm-bump 0.3s var(--ease);
}
@keyframes rm-bump {
	40% {
		transform: scale(1.25);
		color: var(--amber);
	}
}
.rm-vote.closed {
	padding: 5px 0;
	border-style: dashed;
}
.rm-score-label {
	font-size: 9px;
	color: var(--text-dim);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}
.rm-vote.big {
	width: 56px;
	padding: 4px 0;
}
.rm-vote.big .rm-score {
	font-size: 18px;
}
.rm-vote.big button {
	font-size: 14px;
	padding: 4px 0;
}

/* ── List ── */

.rm-group + .rm-group {
	margin-top: 26px;
}
.rm-group h2 {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 10px;
	margin: 0;
	padding-bottom: 6px;
	border-bottom: 1px solid var(--border-strong);
	font-size: 19px;
	letter-spacing: -0.02em;
}
.rm-count {
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--text-dim);
	letter-spacing: 0;
}
.rm-blurb {
	font-family: var(--font-body);
	font-size: 13px;
	color: var(--text-muted);
	letter-spacing: 0;
}

/* ── Board ── */

/* Columns keep a readable width however many are shown, so five or six run
   past the content: the board bleeds to the window's edges and scrolls sideways
   on its own, never the page. The padding puts the first column on the
   content's left edge at rest and the last on its right edge at the end (a
   classic scrollbar's width cancels out between the two vw terms). */
.rm-board {
	display: grid;
	grid-template-columns: repeat(var(--cols, 3), minmax(320px, 1fr));
	gap: 14px;
	align-items: start;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	margin-inline: calc(50% - 50vw);
	padding: 0 calc(50vw - 50%) 4px;
}
.rm-col {
	padding: 12px 14px 6px;
	border: 1px solid var(--border);
	border-radius: 8px;
	background: var(--surface);
}
.rm-col header {
	padding-bottom: 8px;
	border-bottom: 1px solid var(--border-strong);
}
.rm-col h2 {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin: 0;
	font-size: 18px;
	letter-spacing: -0.02em;
}
.rm-col .rm-blurb {
	display: block;
	margin: 2px 0 0;
	font-size: 12px;
}
.rm-col .rm-card {
	grid-template-columns: 34px minmax(0, 1fr);
	gap: 10px;
}
.rm-col .rm-title {
	font-size: 14px;
}
/* A column is narrow: the tags live on the list and the item page. */
.rm-col .rm-tagwords {
	display: none;
}
.rm-empty {
	margin: 0;
	padding: 14px 0;
	font-size: 13px;
	color: var(--text-dim);
}

/* ── One item ── */

.rm-back {
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--text-muted);
	text-decoration: none;
}
.rm-back:hover {
	color: var(--amber);
}
.rm-detail-head {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 16px;
	align-items: start;
	margin: 16px 0 14px;
}
.rm-detail h1 {
	margin: 4px 0 2px;
	font-size: clamp(24px, 2.8vw, 31px);
	letter-spacing: -0.03em;
	line-height: 1.12;
}
.rm-detail h2 {
	margin: 26px 0 10px;
	font-family: var(--font-display);
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--text-muted);
}
.rm-status-line {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
	margin: 0;
	font-size: 12.5px;
	color: var(--text-muted);
}
.rm-status {
	padding: 1px 9px;
	border: 1px solid var(--amber-border);
	border-radius: 999px;
	color: var(--amber);
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.04em;
}
.rm-status.rejected {
	border-color: var(--border-strong);
	color: var(--text-muted);
}
.rm-status.released,
.rm-status.ready {
	border-color: rgba(78, 205, 196, 0.4);
	color: var(--ok);
}
.rm-body {
	max-width: 68ch;
	font-size: 16px;
	line-height: 1.6;
	color: var(--text);
}
.rm-body p {
	margin: 0 0 10px;
}
.rm-body a,
.rm-comment-text a,
.rm-shipped a,
.rm-small a {
	color: var(--amber);
}
.rm-shipped {
	padding: 10px 14px;
	border-left: 2px solid var(--ok);
	background: var(--surface);
}
.rm-small {
	margin: 2px 0 0;
	font-size: 12.5px;
	color: var(--text-dim);
}
.rm-history {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.rm-history li {
	display: grid;
	gap: 1px;
	padding: 6px 10px;
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	background: var(--surface);
	font-size: 12.5px;
}
.rm-history time {
	font-family: var(--font-mono);
	font-size: 11px;
	color: var(--text-dim);
}
.rm-comments {
	list-style: none;
	margin: 0;
	padding: 0;
}
.rm-comments li {
	padding: 10px 0;
	border-bottom: 1px solid var(--border);
}
.rm-comment-meta {
	margin: 0 0 4px;
	font-size: 12.5px;
	color: var(--text-muted);
}
.rm-comment-meta b {
	color: var(--text);
}
.rm-comment-text p {
	margin: 0;
}
.rm-comment-form {
	display: grid;
	gap: 10px;
	max-width: 620px;
	margin-top: 16px;
}
.rm-comment-form button {
	justify-self: start;
}
.rm-field {
	display: grid;
	gap: 5px;
	font-size: 13px;
	color: var(--text-muted);
}
.rm-field textarea {
	resize: vertical;
	line-height: 1.5;
}

/* ── Sign-in dialog and toast ── */

.rm-dialog {
	width: min(440px, 92vw);
	padding: 0;
	border: 1px solid var(--border-strong);
	border-radius: 10px;
	background: var(--surface);
	color: var(--text);
	box-shadow: var(--shadow-elevated);
}
.rm-dialog::backdrop {
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(3px);
}
.rm-dialog[open] {
	animation: rm-in 0.22s var(--ease);
}
@keyframes rm-in {
	from {
		opacity: 0;
		transform: translateY(8px) scale(0.98);
	}
}
.rm-dialog-body {
	display: grid;
	gap: 12px;
	padding: 22px;
}
.rm-dialog-body h2 {
	margin: 0;
	font-size: 21px;
	letter-spacing: -0.02em;
}
.rm-dialog-body p {
	margin: 0;
	color: var(--text-muted);
	line-height: 1.5;
	font-size: 14.5px;
}
.rm-dialog-body footer {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
}
.rm-error {
	color: #f08a8a !important;
}

.rm-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	z-index: 200;
	translate: -50% 0;
	max-width: min(520px, 90vw);
	padding: 10px 16px;
	border: 1px solid var(--amber-border);
	border-radius: var(--radius-md);
	background: var(--surface-raised);
	color: var(--text-strong);
	box-shadow: var(--shadow-elevated);
	animation: rm-in 0.22s var(--ease);
}
.rm-toast.error {
	border-color: rgba(224, 82, 82, 0.5);
}

/* ── Phones and touch ── */

/* A finger needs a bigger target than a cursor. */
@media (pointer: coarse) {
	.rm-card {
		grid-template-columns: 44px minmax(0, 1fr);
	}
	.rm-vote button {
		padding: 9px 0;
		font-size: 12px;
	}
}

@media (max-width: 720px) {
	.rm-bar {
		position: static;
		gap: 8px;
	}
	.rm-filters {
		margin-left: 0;
		width: 100%;
	}
	.rm-filters input {
		flex: 1 1 100%;
		width: auto;
		min-width: 0;
	}
	/* 16px keeps iOS from zooming into a focused field. */
	.rm-filters select,
	.rm-filters input,
	.rm-field input,
	.rm-field textarea {
		font-size: 16px;
	}
	/* A column at a time. */
	.rm-board {
		grid-template-columns: repeat(var(--cols, 3), 84vw);
		scroll-snap-type: x mandatory;
		scroll-padding-inline: clamp(20px, 4.5vw, 48px);
	}
	.rm-col {
		scroll-snap-align: start;
	}
	.rm-detail-head {
		grid-template-columns: 1fr;
		gap: 10px;
	}
	.rm-vote.big {
		grid-auto-flow: column;
		align-items: center;
		width: auto;
		justify-self: start;
		gap: 10px;
		padding: 2px 10px;
	}
	.rm-body {
		font-size: 16px;
	}
}
