/* ============================================================
   ideapop — pop an idea, anywhere on the web
   Type: Bagel Fat One (pop wordmark) + Lilita One (display) +
         Schibsted Grotesk (body) + JetBrains Mono (meta)
   Vibe: late-90s MTV Pop-Up Video → sticker bubbles, hard pop
         colors, ink-outlined chunky cards with offset shadows
   ============================================================ */

:root {
	/* Paper & ink */
	--paper:        #fff6e3;     /* warm cream, the "broadcast" backdrop */
	--paper-2:      #fbe9c2;     /* warmer panel */
	--paper-3:      #f3dca0;     /* warmest, used sparingly */
	--ink:          #0e0f12;     /* near-black, all rules + outlines */
	--ink-2:        #2a2c33;
	--ink-muted:    #5b5e68;
	--ink-faint:    #8e8f96;
	--rule:         #0e0f12;     /* thick outlines = the new "rule" */
	--rule-strong:  #0e0f12;
	--dot:          #efd793;     /* dot-grid spec on cream */

	/* Pop palette — the four signature colors */
	--pop-pink:     #ff3d7f;
	--pop-cyan:     #2bc4d6;
	--pop-yellow:   #ffd400;
	--pop-orange:   #ff7a1f;
	--pop-grass:    #5dd18a;

	/* Legacy semantic aliases (kept for inherited CSS): */
	--red:       var(--pop-pink);
	--red-deep:  #c41e5b;
	--red-wash:  #ffe1ec;
	--blue:      var(--pop-cyan);
	--blue-deep: #1d8d9b;
	--blue-wash: #d8f3f7;
	--hi:        var(--pop-yellow);
	--hi-line:   #d6b000;
	--green:     var(--pop-grass);
	--amber:     var(--pop-orange);

	--bg:     var(--paper);
	--fg:     var(--ink);
	--muted:  var(--ink-muted);
	--accent: var(--pop-pink);
	--border: var(--ink);

	/* Fonts */
	--pop:     "Bagel Fat One", system-ui, sans-serif;
	--display: "Lilita One", system-ui, sans-serif;
	--sans:    "Schibsted Grotesk", -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
	--mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

	/* Rhythm */
	--touch-min: 44px;
	--column:    68ch;
	--wide:      76rem;
	--gutter:    clamp(1rem, 2.5vw, 2rem);

	/* Grid metrics for the dot-grid paper */
	--grid:       22px;
	--grid-dot:   1.2px;

	/* Sticker shadows — the signature offset-shadow with no blur */
	--shadow-sticker: 3px 3px 0 var(--ink);
	--shadow-pop:     6px 6px 0 var(--ink);
}

/* ============================================================
   1. Reset & foundation
   ============================================================ */

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

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

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	font-family: var(--sans);
	font-feature-settings: "kern" 1, "liga" 1, "tnum" 1;
	color: var(--ink);
	background: var(--paper);
	line-height: 1.55;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	position: relative;

	/* Cream paper + soft pop-color washes (no dot-grid; the CRT grain
	   layer below carries all the texture). Three corner gradients
	   give the broadcast-stage feel without competing with reading. */
	background-image:
		radial-gradient(900px 500px at 92% -10%, rgba(255, 122, 31, 0.14), transparent 60%),
		radial-gradient(700px 500px at -10% 35%, rgba(43, 196, 214, 0.12), transparent 60%),
		radial-gradient(900px 600px at 50% 110%, rgba(255, 61, 127, 0.10), transparent 60%);
}

/* CRT grain — broadcast-television noise, dialed way down so it
   adds atmosphere without competing with reading text. */
body::before {
	content: "";
	position: fixed; inset: 0;
	pointer-events: none;
	z-index: 100;
	opacity: 0.05;
	mix-blend-mode: multiply;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
body::after {
	content: "";
	position: fixed; inset: 0;
	pointer-events: none;
	z-index: 99;
	opacity: 0.035;
	background: repeating-linear-gradient(
		to bottom,
		rgba(0,0,0,0.6) 0px,
		rgba(0,0,0,0.6) 1px,
		transparent 1px,
		transparent 3px
	);
}

::selection { background: var(--hi); color: var(--ink); }
::-moz-selection { background: var(--hi); color: var(--ink); }

a {
	color: var(--red-deep);
	text-decoration: underline;
	text-decoration-color: var(--red-wash);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
	transition: text-decoration-color 0.15s ease, color 0.15s ease;
}
a:hover { color: var(--red); text-decoration-color: var(--red); }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--display);
	font-weight: 400;
	color: var(--ink);
	margin: 0 0 0.5em;
	line-height: 1.05;
	letter-spacing: 0.005em;
	text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.5vw + 1.6rem, 3rem); }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

hr {
	border: 0;
	border-top: 1px solid var(--rule);
	margin: 1.5rem 0;
}

strong { font-weight: 600; }
code, kbd, samp { font-family: var(--mono); font-size: 0.9em; background: var(--paper-2); padding: 0.08em 0.35em; border-radius: 4px; border: 1.5px solid var(--ink); }

/* ============================================================
   Animation primitives — Pop-Up Video kinetic vocabulary
   ----------------------------------------------------------------
   pop-in:      springy scale + rotate, fires once on first paint.
                Stagger via inline `--d` (delay) or :nth-child rules.
   wobble:      gentle continuous tilt + lift, idle motion for
                stickered icons (brand mark, mascot bulb).
   letter-drop: each letter falls in from above with overshoot;
                used on the brand wordmark and hero headline em.
   bulb-glow:   yellow drop-shadow pulse for the bulb mascot.
   rec-pulse:   "REC" dot ripple for the on-air channel bug.
   ---------------------------------------------------------------- */
@keyframes pop-in {
	0%   { opacity: 0; transform: scale(0.5) rotate(var(--r0, -4deg)) translateY(8px); }
	60%  { opacity: 1; transform: scale(1.06) rotate(var(--r1, 1deg)) translateY(0); }
	100% { opacity: 1; transform: scale(1)    rotate(var(--r1, 0deg)) translateY(0); }
}
@keyframes wobble {
	0%, 100% { transform: rotate(-2deg) translateY(0); }
	50%      { transform: rotate(2deg)  translateY(-2px); }
}
@keyframes letter-drop {
	0%   { opacity: 0; transform: translateY(-32px) rotate(-12deg) scale(0.7); }
	100% { opacity: 1; transform: translateY(0)     rotate(var(--r, 0deg)) scale(1); }
}
@keyframes bulb-glow {
	0%, 100% { filter: drop-shadow(2px 2px 0 var(--ink)) drop-shadow(0 6px 14px rgba(255, 212, 0, 0.35)); }
	50%      { filter: drop-shadow(2px 2px 0 var(--ink)) drop-shadow(0 10px 22px rgba(255, 212, 0, 0.65)); }
}
@keyframes rec-pulse {
	0%   { box-shadow: 0 0 0 0    rgba(255, 61, 127, 0.65); }
	100% { box-shadow: 0 0 0 10px rgba(255, 61, 127, 0);    }
}

/* ============================================================
   2. Topbar — notebook binder
   ============================================================ */

.topbar {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 2rem;
	padding: 0.85rem var(--gutter);
	background: var(--paper-2);
	border-bottom: 3px solid var(--ink);
	position: sticky;
	top: 0;
	z-index: 50;
}
.topbar::before { content: none; }

.brand {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	text-decoration: none;
	color: var(--ink);
	min-height: var(--touch-min);
	line-height: 1;
}
.brand:hover { color: var(--ink); transform: rotate(-1deg); transition: transform 0.15s ease; }
.brand-img {
	width: 38px; height: 38px;
	filter: drop-shadow(2px 2px 0 var(--ink));
	user-select: none;
	animation:
		pop-in 0.55s cubic-bezier(.34,1.56,.64,1) backwards,
		bulb-glow 4.2s ease-in-out 0.55s infinite;
	animation-delay: 0.05s, 0.6s;
}
.brand:hover .brand-img {
	animation: wobble 0.6s ease-in-out 1;
}
.brand-mark {
	/* Legacy fallback used by templates without a logo image. Now a
	   chunky pop pill with the bulb glyph stand-in. */
	display: inline-grid;
	place-items: center;
	width: 38px; height: 38px;
	font-family: var(--pop);
	font-weight: 400;
	font-size: 1.4rem;
	color: var(--ink);
	background: var(--pop-yellow);
	border: 2.5px solid var(--ink);
	border-radius: 999px;
	box-shadow: var(--shadow-sticker);
	letter-spacing: 0;
	line-height: 1;
}
.brand-name {
	font-family: var(--pop);
	font-weight: 400;
	font-size: 1.65rem;
	color: var(--ink);
	letter-spacing: 0.5px;
	line-height: 1;
	display: inline-flex;
	gap: 0.01em;
}
/* Per-letter spans inside .brand-name get a staggered drop-in on
   first paint. Templates render the wordmark as <span>i</span>… so
   the rule below picks up exactly seven children. */
.brand-name > span {
	display: inline-block;
	animation: letter-drop 0.55s cubic-bezier(.2, 1.2, .3, 1) backwards;
	transform-origin: 50% 100%;
}
.brand-name > span:nth-child(1) { animation-delay: 0.05s; }
.brand-name > span:nth-child(2) { animation-delay: 0.10s; --r: -3deg; }
.brand-name > span:nth-child(3) { animation-delay: 0.15s; color: var(--pop-pink); }
.brand-name > span:nth-child(4) { animation-delay: 0.20s; color: var(--pop-pink); --r: 2deg; }
.brand-name > span:nth-child(5) { animation-delay: 0.25s; color: var(--pop-cyan); }
.brand-name > span:nth-child(6) { animation-delay: 0.30s; color: var(--pop-cyan); --r: -2deg; }
.brand-name > span:nth-child(7) { animation-delay: 0.35s; color: var(--pop-orange); }

.brand-sub {
	font-family: var(--display);
	font-size: 0.72rem;
	color: var(--ink);
	margin-left: 0.5rem;
	padding: 2px 8px 2px 22px;
	background: var(--pop-cyan);
	border: 2px solid var(--ink);
	border-radius: 999px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	position: relative;
	box-shadow: 2px 2px 0 var(--ink);
}
/* "On air" REC dot — tiny pink circle with a ripple. */
.brand-sub::before {
	content: "";
	position: absolute;
	left: 7px; top: 50%;
	width: 8px; height: 8px;
	margin-top: -4px;
	border-radius: 50%;
	background: var(--pop-pink);
	box-shadow: 0 0 0 0 rgba(255, 61, 127, 0.7);
	animation: rec-pulse 1.6s ease-out infinite;
}

.tabs {
	display: flex;
	gap: 0.45rem;
	justify-content: center;
	flex-wrap: wrap;
	align-self: center;
	margin-bottom: 0;
}
.tabs a {
	font-family: var(--display);
	font-size: 0.85rem;
	font-weight: 400;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ink);
	text-decoration: none;
	padding: 0.5rem 0.95rem;
	border: 2px solid var(--ink);
	border-radius: 999px;
	min-height: var(--touch-min);
	display: inline-flex;
	align-items: center;
	background: #fff;
	box-shadow: 2px 2px 0 var(--ink);
	transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.tabs a:hover {
	color: var(--ink);
	background: var(--pop-yellow);
	transform: translate(-1px, -1px);
	box-shadow: 3px 3px 0 var(--ink);
}
.tabs a[aria-current="page"],
.tabs a.active {
	color: var(--ink);
	background: var(--pop-cyan);
	border-color: var(--ink);
	box-shadow: var(--shadow-sticker);
}

.topbar-actions {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
}

.feedback-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	background: var(--pop-yellow);
	border: 2.5px solid var(--ink);
	border-radius: 50%;
	color: var(--ink);
	cursor: pointer;
	box-shadow: var(--shadow-sticker);
	transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.feedback-trigger svg { width: 22px; height: 22px; display: block; }
.feedback-trigger:hover {
	background: var(--pop-pink);
	color: #fff;
	transform: translate(-1px, -1px) rotate(-3deg);
	box-shadow: 4px 4px 0 var(--ink);
}
.feedback-trigger:focus-visible { outline: 3px solid var(--pop-cyan); outline-offset: 2px; }

.user-badge {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--display);
	font-size: 0.85rem;
	color: var(--ink);
}
.user-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--pop-grass);
	border: 1.5px solid var(--ink);
	flex-shrink: 0;
}
.user-name { color: var(--ink); font-weight: 400; letter-spacing: 0.02em; }
.user-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font: inherit;
	color: var(--ink);
	background: #fff;
	border: 2.5px solid var(--ink);
	border-radius: 999px;
	padding: 0.4rem 0.85rem 0.4rem 0.6rem;
	cursor: pointer;
	min-height: var(--touch-min);
	box-shadow: 2px 2px 0 var(--ink);
	transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.user-link:hover {
	background: var(--pop-yellow);
	transform: translate(-1px, -1px);
	box-shadow: 3px 3px 0 var(--ink);
}
.user-link:focus-visible { outline: 3px solid var(--pop-cyan); outline-offset: 2px; }
.user-caret { font-size: 0.7rem; color: var(--ink); margin-left: 0.1rem; transition: transform 0.15s ease; }
.user-link[aria-expanded="true"] {
	background: var(--pop-yellow);
	box-shadow: 2px 2px 0 var(--ink);
}
.user-link[aria-expanded="true"] .user-caret { transform: rotate(180deg); }

.user-menu {
	position: absolute;
	top: calc(100% + 0.5rem);
	right: 0;
	min-width: 12rem;
	background: #fff;
	border: 2.5px solid var(--ink);
	border-radius: 14px;
	box-shadow: var(--shadow-pop);
	z-index: 60;
	padding: 0.4rem 0;
	font-family: var(--sans);
	font-size: 0.9rem;
	overflow: hidden;
	animation: pop-in 0.25s cubic-bezier(.34,1.56,.64,1) backwards;
	--r0: -2deg;
	--r1: 0deg;
}
.user-menu a,
.user-menu .user-menu-signout {
	display: block;
	width: 100%;
	text-align: left;
	padding: 0.55rem 0.95rem;
	color: var(--ink);
	text-decoration: none;
	background: transparent;
	border: 0;
	font: inherit;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.1s ease;
}
.user-menu a:hover,
.user-menu .user-menu-signout:hover { background: var(--pop-yellow); color: var(--ink); }
.user-menu form { margin: 0; }
.user-menu-signout {
	color: var(--ink);
	border-top: 2px dotted var(--ink);
	margin-top: 0.25rem;
	padding-top: 0.65rem;
}
.user-menu-signout:hover { background: var(--pop-pink) !important; color: #fff !important; }

.user-signin {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: var(--ink);
	text-decoration: none;
	font-family: var(--display);
	font-size: 0.85rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 0.5rem 1rem;
	border: 2.5px solid var(--ink);
	border-radius: 999px;
	background: var(--pop-pink);
	color: #fff;
	box-shadow: 2px 2px 0 var(--ink);
	transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease, color 0.12s ease;
}
.user-signin:hover {
	background: var(--pop-cyan);
	color: var(--ink);
	transform: translate(-1px, -1px);
	box-shadow: 4px 4px 0 var(--ink);
}

/* Hamburger — visible only on narrow viewports. */
.nav-toggle {
	display: none;
	width: 40px;
	height: 40px;
	padding: 0;
	background: transparent;
	border: 1px solid var(--rule);
	border-radius: 4px;
	cursor: pointer;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
}
.nav-toggle-bar {
	display: block;
	width: 18px;
	height: 2px;
	background: var(--ink);
	border-radius: 1px;
	transition: transform 0.18s ease, opacity 0.18s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-toggle:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ============================================================
   3. Main canvas — the ruled page
   ============================================================ */

.site-main {
	flex: 1;
	width: 100%;
	max-width: var(--wide);
	margin: 0 auto;
	padding: clamp(1.75rem, 3vw + 1rem, 3rem) var(--gutter) clamp(3rem, 5vw, 4rem);
	position: relative;
}
/* Notebook margin rule retired — Pop-Up Video aesthetic relies on
   sticker-card frames per element rather than a page-level rule. */
.site-main::before { content: none; }

/* ============================================================
   4. Hero / Landing
   ============================================================ */

.hero {
	padding: 1.5rem 0 2.25rem;
	margin-bottom: 2.5rem;
	max-width: var(--column);
}
.hero .mark {
	display: inline-grid;
	place-items: center;
	width: 64px; height: 64px;
	font-family: var(--pop);
	font-weight: 400;
	font-size: 2rem;
	color: var(--ink);
	background: var(--pop-yellow);
	border: 3px solid var(--ink);
	border-radius: 999px;
	box-shadow: var(--shadow-sticker);
	line-height: 1;
	margin: 0 0 1.25rem;
	--r0: -22deg;
	--r1: -6deg;
	animation: pop-in 0.6s cubic-bezier(.34,1.56,.64,1) backwards;
	animation-delay: 0.10s;
	transform-origin: center;
	transform: rotate(-6deg);
}
.hero h1 {
	font-family: var(--display);
	font-weight: 400;
	font-size: clamp(2.25rem, 2vw + 1.85rem, 3.4rem);
	letter-spacing: 0;
	margin: 0 0 1rem;
	line-height: 1.05;
	animation: pop-in 0.55s cubic-bezier(.34,1.56,.64,1) backwards;
	animation-delay: 0.20s;
}
.hero .lede {
	animation: pop-in 0.55s cubic-bezier(.34,1.56,.64,1) backwards;
	animation-delay: 0.30s;
}
.hero .cta-row {
	animation: pop-in 0.55s cubic-bezier(.34,1.56,.64,1) backwards;
	animation-delay: 0.40s;
}
.hero h1 em {
	font-style: normal;
	background: var(--pop-pink);
	color: #fff;
	padding: 0 8px;
	border-radius: 8px;
	box-shadow: 3px 3px 0 var(--ink);
	display: inline-block;
}
.hero .lede {
	font-family: var(--sans);
	font-size: 1.15rem;
	color: var(--ink-2);
	max-width: 40rem;
	margin: 0 0 1.75rem;
	line-height: 1.55;
	text-wrap: pretty;
}
.cta-row {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin: 0;
}

/* ============================================================
   5. Buttons — drafting stamps
   ============================================================ */

.button,
button.button,
.auth button,
.admin-controls button,
.idea-form button,
form button:not(.danger):not(.vote-button):not(.disclosure):not(.button-tiny),
button[type="submit"]:not(.danger):not(.vote-button):not(.button-tiny) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	min-height: var(--touch-min);
	padding: 0.6rem 1.1rem;
	font-family: var(--display);
	font-weight: 400;
	font-size: 0.9rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	background: #fff;
	color: var(--ink);
	border: 2.5px solid var(--ink);
	border-radius: 999px;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, color 0.12s ease;
	box-shadow: var(--shadow-sticker);
}
.button:hover,
button.button:hover,
form button:not(.danger):not(.vote-button):not(.disclosure):not(.button-tiny):hover,
button[type="submit"]:not(.danger):not(.vote-button):not(.button-tiny):hover {
	background: var(--pop-yellow);
	color: var(--ink);
	box-shadow: 5px 5px 0 var(--ink);
	transform: translate(-1px, -1px);
}
.button:active,
button.button:active {
	transform: translate(2px, 2px);
	box-shadow: 1px 1px 0 var(--ink);
}

.button.primary {
	background: var(--pop-pink);
	color: #fff;
	border-color: var(--ink);
	box-shadow: var(--shadow-sticker);
}
.button.primary:hover {
	background: var(--pop-cyan);
	color: var(--ink);
	box-shadow: 5px 5px 0 var(--ink);
}

.button.ghost {
	background: transparent;
	border-color: var(--ink);
	box-shadow: 2px 2px 0 var(--ink);
}
.button.ghost:hover {
	background: var(--paper-2);
	color: var(--ink);
	border-color: var(--ink);
	box-shadow: 4px 4px 0 var(--ink);
}

/* Tiny inline buttons (revoke, etc.) */
.button-tiny {
	display: inline-flex;
	align-items: center;
	padding: 0.2rem 0.55rem;
	font-family: var(--mono);
	font-size: 0.7rem;
	font-weight: 500;
	background: transparent;
	color: var(--ink-muted);
	border: 1px solid var(--rule-strong);
	border-radius: 2px;
	cursor: pointer;
	min-height: auto;
}
.button-tiny:hover { color: var(--red); border-color: var(--red); background: var(--red-wash); }
.button-tiny.danger:hover { color: var(--red-deep); border-color: var(--red-deep); background: var(--red-wash); }

button.danger {
	display: inline-flex;
	align-items: center;
	min-height: var(--touch-min);
	padding: 0.5rem 0.95rem;
	background: transparent;
	color: var(--red-deep);
	border: 1.5px solid var(--red);
	border-radius: 3px;
	font-family: var(--sans);
	font-size: 0.85rem;
	font-weight: 500;
	cursor: pointer;
}
button.danger:hover { background: var(--red); color: var(--paper); }

/* ============================================================
   6. Landing: features + how-it-works
   ============================================================ */

.features {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
	gap: 1.4rem;
	margin: 2.5rem 0 3rem;
}
.feature-card {
	background: #fff;
	border: 3px solid var(--ink);
	border-radius: 22px;
	padding: 1.4rem 1.4rem 1.5rem;
	position: relative;
	box-shadow: var(--shadow-pop);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	animation: pop-in 0.55s cubic-bezier(.34,1.56,.64,1) backwards;
}
.feature-card:nth-child(1) { animation-delay: 0.45s; --r0: -8deg; --r1: -1deg; }
.feature-card:nth-child(2) { animation-delay: 0.55s; --r0:  6deg; --r1:  0.6deg; }
.feature-card:nth-child(3) { animation-delay: 0.65s; --r0: -4deg; --r1: -0.4deg; }
.feature-card:nth-child(4) { animation-delay: 0.75s; --r0:  4deg; --r1:  0.4deg; }
.feature-card:hover {
	transform: translate(-2px, -2px) rotate(-0.4deg);
	box-shadow: 8px 8px 0 var(--ink);
}
.feature-card h2 {
	margin: 0 0 0.5rem;
	font-family: var(--display);
	font-size: 1.3rem;
	font-weight: 400;
	color: var(--ink);
	line-height: 1.1;
}
.feature-card p { margin: 0; color: var(--ink-muted); font-size: 0.98rem; line-height: 1.5; }

.how-it-works {
	margin: 3rem 0 1rem;
	max-width: var(--column);
}
.how-it-works h2 {
	font-family: var(--display);
	font-size: 1.7rem;
	font-weight: 400;
	margin: 0 0 1.5rem;
	padding: 0;
	border-bottom: none;
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
}
.how-it-works h2::before {
	content: "How it works";
	display: none; /* heading text now provided by template */
}
.how-it-works h2::after {
	content: "";
	display: inline-block;
	width: 36px; height: 6px;
	background: var(--pop-pink);
	border: 2px solid var(--ink);
	border-radius: 999px;
	transform: rotate(-4deg);
}

.steps {
	list-style: none;
	padding: 0;
	margin: 1.25rem 0 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
	gap: 1rem;
	counter-reset: step;
}
.steps li {
	position: relative;
	padding: 1.5rem 1.25rem 1.25rem 1.25rem;
	background: #fff;
	border: 3px solid var(--ink);
	border-radius: 22px;
	counter-increment: step;
	box-shadow: var(--shadow-pop);
	margin-top: 1.25rem;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	animation: pop-in 0.55s cubic-bezier(.34,1.56,.64,1) backwards;
}
.steps li:nth-child(1) { animation-delay: 0.55s; --r0: -10deg; --r1: -0.8deg; }
.steps li:nth-child(2) { animation-delay: 0.70s; --r0:  10deg; --r1:  0.6deg; }
.steps li:nth-child(3) { animation-delay: 0.85s; --r0: -6deg;  --r1: -0.4deg; }
.steps li:hover {
	transform: translate(-2px, -2px) rotate(-0.4deg);
	box-shadow: 8px 8px 0 var(--ink);
}
.steps li::before {
	content: counter(step);
	position: absolute;
	top: -1.25rem;
	left: 1rem;
	width: 2.6rem;
	height: 2.6rem;
	display: grid;
	place-items: center;
	font-family: var(--pop);
	font-weight: 400;
	font-size: 1.2rem;
	color: var(--ink);
	background: var(--pop-yellow);
	border: 3px solid var(--ink);
	border-radius: 999px;
	box-shadow: 3px 3px 0 var(--ink);
}
.steps li:nth-child(2)::before { background: var(--pop-cyan); }
.steps li:nth-child(3)::before { background: var(--pop-pink); color: #fff; }
.steps li:nth-child(4)::before { background: var(--pop-orange); }
.steps .step-number { display: none; }
.steps h3 { margin: 0.4rem 0 0.4rem; font-family: var(--display); font-size: 1.2rem; font-weight: 400; line-height: 1.1; }
.steps p { margin: 0; color: var(--ink-muted); font-size: 0.95rem; line-height: 1.5; }

/* ============================================================
   7. Auth (login/signup/setup)
   ============================================================ */

.auth {
	max-width: 28rem;
	margin: 2.5rem auto;
	padding: 2rem 1.85rem 2.1rem;
	background: #fff;
	border: 3px solid var(--ink);
	border-radius: 24px;
	box-shadow: var(--shadow-pop);
	position: relative;
	animation: pop-in 0.55s cubic-bezier(.34,1.56,.64,1) backwards;
	animation-delay: 0.10s;
	--r0: -6deg;
	--r1: 0deg;
}
.auth::before {
	content: "";
	position: absolute;
	top: -14px; left: 1.5rem;
	width: 56px; height: 26px;
	background: var(--pop-yellow);
	border: 2.5px solid var(--ink);
	border-radius: 999px;
	box-shadow: 2px 2px 0 var(--ink);
	transform: rotate(-4deg);
}
.auth h1 {
	margin: 0 0 1.25rem;
	font-family: var(--display);
	font-size: 1.85rem;
	font-weight: 400;
}
.auth form { display: flex; flex-direction: column; gap: 0.9rem; }
.auth label {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	font-family: var(--display);
	font-size: 0.72rem;
	color: var(--ink);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}
.auth input {
	padding: 0.7rem 0.85rem;
	border: 2.5px solid var(--ink);
	border-radius: 12px;
	background: #fff;
	font-family: var(--sans);
	font-size: 1rem;
	color: var(--ink);
	transition: box-shadow 0.12s ease;
}
.auth input:focus {
	outline: none;
	border-color: var(--ink);
	box-shadow: 3px 3px 0 var(--pop-pink);
}
.auth button {
	margin-top: 0.6rem;
	background: var(--pop-pink);
	color: #fff;
	border-color: var(--ink);
	box-shadow: var(--shadow-sticker);
}

.error {
	color: var(--ink);
	font-weight: 500;
	padding: 0.6rem 0.85rem;
	border: 2px solid var(--ink);
	background: var(--pop-pink);
	color: #fff;
	border-radius: 12px;
	box-shadow: var(--shadow-sticker);
}

/* SSO sign-in button — sticker pill leading the auth form, paired
   with a "or use a password" divider below. The mark is the bulb
   image; the divider uses a thin double-rule to clearly separate
   the two auth paths. */
.sso-button {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	width: 100%;
	min-height: var(--touch-min);
	padding: 0.6rem 1rem;
	margin-bottom: 0.5rem;
	background: var(--pop-yellow);
	color: var(--ink);
	border: 2.5px solid var(--ink);
	border-radius: 999px;
	font-family: var(--display);
	font-size: 0.95rem;
	letter-spacing: 0.02em;
	text-decoration: none;
	box-shadow: var(--shadow-sticker);
	transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.sso-button:hover {
	background: #fff;
	color: var(--ink);
	transform: translate(-2px, -2px);
	box-shadow: 5px 5px 0 var(--ink);
}
.sso-mark {
	width: 28px; height: 28px;
	flex: 0 0 auto;
	filter: drop-shadow(1.5px 1.5px 0 var(--ink));
}
.sso-divider {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin: 0.85rem 0 0.6rem;
	font-family: var(--mono);
	font-size: 0.72rem;
	color: var(--ink-muted);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}
.sso-divider::before,
.sso-divider::after {
	content: "";
	flex: 1;
	height: 2px;
	background:
		linear-gradient(to right, var(--ink) 0 6px, transparent 6px 100%) 0 0/12px 2px repeat-x;
}

/* ============================================================
   Error pages — 404 / 500 / arbitrary status. The bulb mascot
   gets the spotlight so the dead-end feels playful.
   ============================================================ */
.error-page {
	max-width: 36rem;
	margin: 3rem auto 4rem;
	padding: 2rem 1.5rem 2.5rem;
	text-align: center;
}
.error-page .error-bulb {
	width: clamp(120px, 20vw, 180px);
	height: auto;
	filter: drop-shadow(3px 3px 0 var(--ink)) drop-shadow(0 16px 32px rgba(255, 212, 0, 0.45));
	animation: bulb-glow 4.2s ease-in-out infinite, pop-in 0.6s cubic-bezier(.34,1.56,.64,1) backwards;
	--r0: -18deg;
	--r1: -4deg;
	margin-bottom: 0.5rem;
}
.error-page .error-code {
	font-family: var(--pop);
	font-size: clamp(72px, 14vw, 128px);
	line-height: 0.9;
	margin: 0.5rem 0 0;
	letter-spacing: 1px;
	color: var(--pop-pink);
	text-shadow: 4px 4px 0 var(--ink);
	animation: pop-in 0.55s cubic-bezier(.34,1.56,.64,1) backwards;
	animation-delay: 0.1s;
	--r0: 6deg;
	--r1: -2deg;
}
.error-page h1 {
	margin: 0 0 0.6rem;
	font-size: clamp(1.5rem, 3vw, 2rem);
	color: var(--ink);
}
.error-page .error-detail {
	font-family: var(--mono);
	color: var(--ink-muted);
	margin: 0 0 1.4rem;
	font-size: 0.95rem;
}
.error-page .cta-row { justify-content: center; }

/* ============================================================
   8. Page head, meta, tags, status badges
   ============================================================ */

.page-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	padding-bottom: 0;
	border-bottom: none;
	margin-bottom: 1.5rem;
	position: relative;
}
.page-head::after {
	content: "";
	position: absolute;
	left: 0; right: 0;
	bottom: -10px;
	height: 4px;
	background:
		linear-gradient(to right, var(--ink) 0 14px, transparent 14px 100%) 0 0/22px 4px repeat-x;
}
.page-head h1 { margin: 0; flex: 1; min-width: 0; font-family: var(--display); font-weight: 400; font-size: clamp(1.6rem, 2.4vw, 2.4rem); }

.meta {
	font-family: var(--mono);
	font-size: 0.78rem;
	color: var(--ink-muted);
	font-variant-numeric: tabular-nums;
}
.meta .author { color: var(--ink); font-weight: 500; }

/* Tag pills — small sticker stamps */
.tag {
	display: inline-flex;
	align-items: center;
	background: #fff;
	color: var(--ink);
	padding: 0.2rem 0.7rem;
	border: 2px solid var(--ink);
	border-radius: 999px;
	font-family: var(--mono);
	font-size: 0.72rem;
	font-weight: 600;
	margin: 0 0.3rem 0.3rem 0;
	text-decoration: none;
	box-shadow: 2px 2px 0 var(--ink);
	transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.tag::before { content: "#"; color: var(--pop-pink); margin-right: 0.15rem; font-weight: 700; }
.tag:hover {
	background: var(--pop-yellow);
	color: var(--ink);
	transform: translate(-1px, -1px);
	box-shadow: 3px 3px 0 var(--ink);
}
.tag:hover::before { color: var(--ink); }

/* Status badges — colored chip + mono text */
.status-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.2rem 0.65rem 0.2rem 0.5rem;
	border: 2px solid var(--ink);
	border-radius: 999px;
	font-family: var(--mono);
	font-size: 0.7rem;
	font-weight: 700;
	background: #fff;
	color: var(--ink);
	text-transform: lowercase;
	letter-spacing: 0.02em;
	box-shadow: 2px 2px 0 var(--ink);
}
.status-badge::before {
	content: "";
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--ink-faint);
	border: 1.5px solid var(--ink);
	flex-shrink: 0;
}
.status-draft::before        { background: var(--paper-2); }
.status-published::before    { background: var(--pop-cyan); }
.status-under_review::before { background: var(--pop-orange); }
.status-accepted::before     { background: var(--pop-cyan); }
.status-in_progress::before  { background: var(--pop-pink); }
.status-shipped::before      { background: var(--pop-grass); }
.status-declined::before     { background: var(--ink-faint); }
.status-archived::before     { background: var(--ink-faint); }
.status-shipped     { background: #e3f7ec; }
.status-in_progress { background: #ffe1ec; }
.status-accepted    { background: #d8f3f7; }
.status-under_review { background: #ffe9d2; }
.status-declined { color: var(--ink-muted); text-decoration: line-through; }

/* ============================================================
   9. Idea cards — index cards on a corkboard
   ============================================================ */

.idea-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
	gap: 1rem;
	margin: 1rem 0;
}

.idea-card {
	background: #fff;
	border: 2.5px solid var(--ink);
	border-radius: 18px;
	padding: 1rem 1.1rem 0.95rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	box-shadow: 4px 4px 0 var(--ink);
	position: relative;
}
.idea-card:hover {
	transform: translate(-2px, -2px) rotate(-0.3deg);
	box-shadow: 6px 6px 0 var(--ink);
}
.idea-card header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 0.6rem;
}
.idea-card .idea-title {
	font-family: var(--display);
	font-weight: 400;
	font-size: 1.15rem;
	line-height: 1.15;
	color: var(--ink);
	text-decoration: none;
	flex: 1;
	min-width: 0;
	letter-spacing: 0;
}
.idea-card .idea-title:hover { color: var(--pop-pink); text-decoration: none; }
.idea-card .excerpt {
	color: var(--ink-muted);
	font-size: 0.92rem;
	line-height: 1.5;
	margin: 0;
	white-space: pre-line;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.idea-card footer.meta {
	margin-top: auto;
	padding-top: 0.55rem;
	border-top: 2px dotted var(--ink);
	font-family: var(--mono);
	font-size: 0.72rem;
	color: var(--ink-muted);
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0.6rem;
	align-items: baseline;
	line-height: 1.4;
}
.idea-card footer.meta .author { color: var(--ink); font-weight: 500; }
.idea-card .tags { margin-top: 0.3rem; }

.load-more {
	grid-column: 1 / -1;
	text-align: center;
	padding: 1rem 0;
}

/* ============================================================
   10. Idea list rows + filters
   ============================================================ */

.filters {
	display: flex;
	gap: 0.9rem;
	align-items: flex-end;
	flex-wrap: wrap;
	margin: 1rem 0 1.5rem;
	padding: 1rem 1.1rem;
	background: #fff;
	border: 2.5px solid var(--ink);
	border-radius: 18px;
	box-shadow: 3px 3px 0 var(--ink);
}
.filters label {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	font-family: var(--display);
	font-size: 0.72rem;
	color: var(--ink);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}
.filters input,
.filters select,
.idea-form input,
.idea-form select,
.idea-form textarea,
.admin-controls input,
.admin-controls select,
.invite-form input,
.invite-form select {
	padding: 0.55rem 0.75rem;
	border: 2px solid var(--ink);
	border-radius: 10px;
	background: #fff;
	font-family: var(--sans);
	font-size: 0.95rem;
	color: var(--ink);
	transition: box-shadow 0.12s ease;
}
.filters input:focus,
.filters select:focus,
.idea-form input:focus,
.idea-form textarea:focus,
.idea-form select:focus,
.admin-controls input:focus,
.admin-controls select:focus,
.invite-form input:focus,
.invite-form select:focus {
	outline: none;
	border-color: var(--ink);
	box-shadow: 3px 3px 0 var(--pop-pink);
}

.idea-list { list-style: none; padding: 0; margin: 1rem 0; display: flex; flex-direction: column; gap: 0.55rem; }
.idea-list.nested {
	margin: 0.6rem 0 0.6rem 1rem;
	padding-left: 1rem;
	border-left: 3px dotted var(--ink);
}
.idea-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.75rem;
	padding: 0.7rem 0.95rem;
	background: #fff;
	border: 2px solid var(--ink);
	border-radius: 12px;
	box-shadow: 2px 2px 0 var(--ink);
	transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.idea-row:hover {
	transform: translate(-1px, -1px);
	box-shadow: 4px 4px 0 var(--ink);
	background: var(--paper-2);
}
.idea-title {
	font-family: var(--display);
	font-weight: 400;
	font-size: 1.05rem;
	color: var(--ink);
	text-decoration: none;
}
.idea-title:hover { color: var(--pop-pink); }

.empty {
	color: var(--ink-muted);
	font-style: normal;
	padding: 1rem 1.1rem;
	font-family: var(--mono);
	font-size: 0.85rem;
	background: var(--paper-2);
	border: 2px dashed var(--ink);
	border-radius: 14px;
}
.empty::before { content: "— "; color: var(--pop-pink); font-weight: 700; }
.empty a { font-weight: 700; }

/* ============================================================
   11. Idea detail — the single note page
   ============================================================ */

.idea {
	max-width: var(--column);
	margin: 0 auto;
}
.idea .page-head { margin-bottom: 0.85rem; border-bottom: 1.5px solid var(--ink); }
.idea .page-head h1 {
	font-size: clamp(1.6rem, 1vw + 1.5rem, 2.2rem);
	font-weight: 600;
}

.idea > .meta {
	display: block;
	margin: 0 0 1.5rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px dashed var(--rule-strong);
	font-family: var(--mono);
	font-size: 0.78rem;
	color: var(--ink-muted);
	line-height: 1.7;
}
.idea > .tags { margin: 0 0 1.5rem; }

.idea .body {
	margin: 2rem 0;
	font-family: var(--sans);
	font-size: 1.05rem;
	line-height: 1.65;
	color: var(--ink);
	max-width: 64ch;
}
.idea .body p { margin: 0 0 1em; }
.idea .body h2 {
	font-size: 1.25rem;
	font-weight: 600;
	margin: 2rem 0 0.5rem;
	padding-bottom: 0.25rem;
	border-bottom: 1px solid var(--rule);
}
.idea .body blockquote {
	margin: 1.25rem 0;
	padding: 0.3rem 1rem;
	border-left: 3px solid var(--red);
	color: var(--ink-2);
	background: var(--red-wash);
	border-radius: 0 3px 3px 0;
}
.idea .body pre {
	background: var(--paper-2);
	border: 1px solid var(--rule-strong);
	padding: 0.85rem 1rem;
	border-radius: 3px;
	overflow-x: auto;
	font-family: var(--mono);
	font-size: 0.86rem;
	line-height: 1.5;
}
.idea .body code {
	background: var(--paper-2);
	padding: 0.08rem 0.35rem;
	border-radius: 2px;
	font-family: var(--mono);
	font-size: 0.88em;
	border: 1px solid var(--rule);
}
.idea .body ul, .idea .body ol { padding-left: 1.5rem; margin: 0 0 1em; }
.idea .body li { margin-bottom: 0.3rem; }
.idea .body a { color: var(--red-deep); }

.vote-button {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.55rem 0.95rem;
	background: var(--paper);
	color: var(--ink);
	border: 1.5px solid var(--ink);
	border-radius: 3px;
	cursor: pointer;
	font-family: var(--sans);
	font-size: 0.88rem;
	font-weight: 500;
	box-shadow: 0 1.5px 0 var(--ink);
	transition: all 0.1s ease;
	font-variant-numeric: tabular-nums;
}
.vote-button:hover {
	transform: translateY(-0.5px);
	box-shadow: 0 2.5px 0 var(--red);
}
.vote-button.voted {
	background: var(--red);
	color: var(--paper);
	border-color: var(--red-deep);
}
.vote-count { font-weight: 600; }

.actions { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }

.banner {
	padding: 0.85rem 1.1rem;
	border: 2.5px solid var(--ink);
	background: var(--pop-yellow);
	margin: 0 0 1rem;
	border-radius: 14px;
	font-size: 0.95rem;
	color: var(--ink);
	box-shadow: 3px 3px 0 var(--ink);
	font-weight: 500;
}
.banner a { color: var(--ink); font-weight: 700; text-decoration-color: var(--ink); }

/* Breadcrumbs */
.breadcrumbs { margin: 0 0 0.85rem; }
.breadcrumbs ol {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	font-family: var(--mono);
	font-size: 0.75rem;
	color: var(--ink-muted);
}
.breadcrumbs li + li::before { content: "/"; margin-right: 0.35rem; color: var(--ink-faint); }
.breadcrumbs a { color: var(--ink-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--red); text-decoration: underline; }

/* ============================================================
   12. Share & Collaborators panel (collapsible)
   ============================================================ */

.share-panel {
	margin: 2rem 0 1.5rem;
	background: #fff;
	border: 2.5px solid var(--ink);
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 4px 4px 0 var(--ink);
}
.share-panel summary {
	list-style: none;
	cursor: pointer;
	padding: 0.85rem 1rem;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-family: var(--mono);
	font-size: 0.85rem;
	color: var(--ink);
	user-select: none;
	transition: background 0.1s ease;
}
.share-panel summary::-webkit-details-marker { display: none; }
.share-panel summary::marker { content: ""; }
.share-panel summary:hover { background: var(--paper-2); }
.share-panel .share-summary-label {
	font-family: var(--display);
	font-weight: 400;
	color: var(--ink);
	font-size: 1rem;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}
.share-panel .share-summary-label::before {
	content: "⌁";
	display: inline-grid;
	place-items: center;
	width: 26px; height: 26px;
	background: var(--pop-cyan);
	color: var(--ink);
	border: 2px solid var(--ink);
	border-radius: 50%;
	font-size: 0.95rem;
	font-weight: 700;
	box-shadow: 1.5px 1.5px 0 var(--ink);
}
.share-panel .share-summary-state {
	font-family: var(--display);
	font-size: 0.7rem;
	padding: 0.15rem 0.6rem;
	background: var(--pop-cyan);
	border: 2px solid var(--ink);
	border-radius: 999px;
	color: var(--ink);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	box-shadow: 1.5px 1.5px 0 var(--ink);
}
.share-panel .share-summary-toggle {
	margin-left: auto;
	font-family: var(--pop);
	font-size: 1.05rem;
	color: var(--ink);
	width: 1.6rem;
	height: 1.6rem;
	display: grid;
	place-items: center;
	border: 2px solid var(--ink);
	background: #fff;
	border-radius: 50%;
	line-height: 1;
	box-shadow: 1.5px 1.5px 0 var(--ink);
	transition: transform 0.15s ease, background 0.15s ease;
}
.share-panel[open] .share-summary-toggle {
	transform: rotate(45deg);
	background: var(--pop-pink);
	color: #fff;
}
.share-panel .share-body {
	padding: 0.5rem 1rem 1.25rem;
	border-top: 2px dotted var(--ink);
}
.share-panel .share-body .hint {
	margin: 0.75rem 0 1rem;
	color: var(--ink-muted);
	font-size: 0.85rem;
}
.share-panel .share-body .hint.fine {
	margin-top: 0.65rem;
	font-family: var(--mono);
	font-size: 0.72rem;
	color: var(--ink-muted);
}

.visibility-form { margin: 0 0 1.25rem; }
.visibility-form fieldset {
	border: 0;
	padding: 0;
	margin: 0 0 0.85rem;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.5rem;
}
.visibility-form legend {
	font-family: var(--mono);
	font-size: 0.7rem;
	font-weight: 600;
	color: var(--ink-muted);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin: 0 0 0.5rem;
	padding: 0;
}
.visibility-form .radio {
	display: grid;
	grid-template-columns: auto 1fr;
	grid-template-rows: auto auto;
	gap: 0.1rem 0.6rem;
	padding: 0.65rem 0.8rem;
	border: 1px solid var(--rule-strong);
	border-radius: 3px;
	cursor: pointer;
	transition: all 0.1s ease;
	background: var(--paper);
}
.visibility-form .radio:hover { border-color: var(--ink); background: var(--paper-2); }
.visibility-form .radio input[type="radio"] {
	grid-row: 1 / span 2;
	margin: 0.25rem 0 0;
	accent-color: var(--red);
}
.visibility-form .radio:has(input:checked) {
	border-color: var(--red);
	background: var(--red-wash);
	box-shadow: inset 0 0 0 1px var(--red);
}
.visibility-form .radio-title {
	font-weight: 600;
	font-size: 0.92rem;
	color: var(--ink);
	line-height: 1.2;
}
.visibility-form .radio-hint {
	font-family: var(--mono);
	font-size: 0.7rem;
	color: var(--ink-muted);
	line-height: 1.35;
}
.visibility-form button {
	font-size: 0.82rem;
	padding: 0.45rem 0.9rem;
}

.collab-block {
	padding-top: 1rem;
	border-top: 1px dashed var(--rule-strong);
}
.collab-block h3 {
	margin: 0 0 0.65rem;
	font-family: var(--mono);
	font-size: 0.72rem;
	font-weight: 600;
	color: var(--ink-muted);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.collab-list {
	list-style: none;
	padding: 0;
	margin: 0 0 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}
.collab-row {
	display: grid;
	grid-template-columns: 1fr auto auto auto;
	align-items: center;
	gap: 0.75rem;
	padding: 0.5rem 0.75rem;
	background: var(--paper-2);
	border: 1px solid var(--rule);
	border-radius: 3px;
	font-size: 0.9rem;
}
.collab-name { font-weight: 500; color: var(--ink); }
.collab-email {
	font-family: var(--mono);
	font-size: 0.78rem;
	color: var(--ink-muted);
}
.collab-role {
	font-family: var(--mono);
	font-size: 0.7rem;
	color: var(--blue);
	background: var(--blue-wash);
	padding: 0.1rem 0.45rem;
	border-radius: 2px;
	border: 1px solid var(--blue);
	text-transform: lowercase;
}
.collab-revoke { margin: 0; display: inline; }

.invite-form {
	display: grid;
	grid-template-columns: 1fr auto auto;
	gap: 0.5rem;
	align-items: end;
	padding: 0.85rem;
	background: var(--paper-2);
	border: 1px dashed var(--rule-strong);
	border-radius: 3px;
}
.invite-form label {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	margin: 0;
}
.invite-form .label-text {
	font-family: var(--mono);
	font-size: 0.68rem;
	color: var(--ink-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.invite-form input[type="email"] { min-width: 0; }
.invite-form button { min-height: auto; padding: 0.55rem 1rem; }

/* ============================================================
   13. Admin controls (collapsible — status / score / merge)
   ============================================================ */

.admin-controls {
	background: #fff;
	border: 2.5px solid var(--ink);
	border-radius: 18px;
	margin: 1.25rem 0;
	overflow: hidden;
	box-shadow: 4px 4px 0 var(--ink);
}
.admin-controls summary {
	list-style: none;
	cursor: pointer;
	padding: 0.85rem 1rem;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-family: var(--mono);
	font-size: 0.85rem;
	color: var(--ink);
	user-select: none;
	transition: background 0.1s ease;
}
.admin-controls summary::-webkit-details-marker { display: none; }
.admin-controls summary::marker { content: ""; }
.admin-controls summary:hover { background: var(--paper-2); }
.admin-controls .admin-summary-label {
	font-family: var(--display);
	font-weight: 400;
	color: var(--ink);
	font-size: 1rem;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}
.admin-controls .admin-summary-label::before {
	content: "⚙";
	display: inline-grid;
	place-items: center;
	width: 26px; height: 26px;
	background: var(--pop-orange);
	color: var(--ink);
	border: 2px solid var(--ink);
	border-radius: 50%;
	font-size: 0.95rem;
	box-shadow: 1.5px 1.5px 0 var(--ink);
}
.admin-controls .admin-summary-state {
	color: var(--ink);
	font-family: var(--display);
	font-size: 0.7rem;
	padding: 0.15rem 0.6rem;
	background: var(--pop-orange);
	border: 2px solid var(--ink);
	border-radius: 999px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	box-shadow: 1.5px 1.5px 0 var(--ink);
}
.admin-controls .admin-summary-toggle {
	margin-left: auto;
	font-family: var(--pop);
	font-size: 1.05rem;
	color: var(--ink);
	width: 1.6rem;
	height: 1.6rem;
	display: grid;
	place-items: center;
	border: 2px solid var(--ink);
	background: #fff;
	border-radius: 50%;
	line-height: 1;
	box-shadow: 1.5px 1.5px 0 var(--ink);
	transition: transform 0.15s ease, background 0.15s ease;
}
.admin-controls[open] .admin-summary-toggle {
	transform: rotate(45deg);
	background: var(--pop-pink);
	color: #fff;
}
.widget-context-identify-head {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0.5rem 0 0.4rem;
}
.widget-context-identify-head h3 { margin: 0; font-size: 0.95rem; }
.widget-context-pill {
	display: inline-block;
	padding: 0.15rem 0.6rem;
	font-family: var(--display);
	font-size: 0.7rem;
	font-weight: 400;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	border-radius: 999px;
	border: 2px solid var(--ink);
	line-height: 1.4;
	box-shadow: 2px 2px 0 var(--ink);
}
.widget-context-pill--unverified {
	color: var(--ink);
	background: var(--pop-yellow);
	border-color: var(--ink);
}
.admin-controls .admin-body {
	padding: 0.5rem 1rem 1.1rem;
	border-top: 1px dashed var(--rule-strong);
}
.admin-controls form {
	display: flex;
	gap: 0.75rem;
	align-items: flex-end;
	flex-wrap: wrap;
	margin-top: 0.9rem;
	padding-top: 0.9rem;
	border-top: 1px dashed var(--rule);
}
.admin-controls .admin-body form:first-of-type { border-top: 0; padding-top: 0; margin-top: 0.35rem; }
.admin-controls label {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	font-family: var(--mono);
	font-size: 0.7rem;
	color: var(--ink-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* ============================================================
   14. Comments — margin notes
   ============================================================ */

.comments { margin: 2.5rem 0 1.5rem; }
.comments > h2,
.children > h2,
.merged-from > h2 {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	font-family: var(--display);
	font-size: 1.4rem;
	font-weight: 400;
	margin: 0 0 1rem;
	padding: 0;
	border-bottom: none;
	color: var(--ink);
	letter-spacing: 0;
}
.comments > h2::after,
.children > h2::after,
.merged-from > h2::after {
	content: "";
	display: inline-block;
	width: 30px; height: 6px;
	background: var(--pop-cyan);
	border: 2px solid var(--ink);
	border-radius: 999px;
	transform: rotate(-3deg);
}
.children > h2::after  { background: var(--pop-yellow); }
.merged-from > h2::after { background: var(--pop-orange); }

.children { margin: 2.5rem 0 1.5rem; }
.children > h2 + .button { margin-left: 0.6rem; transform: translateY(-2px); }

.new-comment {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	margin-bottom: 1.5rem;
	padding: 1rem 1.1rem;
	background: #fff;
	border: 2.5px solid var(--ink);
	border-radius: 14px;
	box-shadow: 3px 3px 0 var(--ink);
}
.new-comment textarea,
.reply-form textarea {
	width: 100%;
	padding: 0.7rem 0.85rem;
	border: 1px solid var(--rule-strong);
	border-radius: 3px;
	font-family: var(--sans);
	font-size: 0.95rem;
	background: var(--paper);
	color: var(--ink);
	resize: vertical;
	line-height: 1.5;
}
.new-comment textarea:focus,
.reply-form textarea:focus {
	outline: none;
	border-color: var(--ink);
	box-shadow: 0 0 0 3px var(--hi);
}
.new-comment button { align-self: flex-start; }

.comments-list { display: flex; flex-direction: column; gap: 0.85rem; }

.comment {
	background: #fff;
	border: 2px solid var(--ink);
	border-radius: 14px;
	padding: 0.85rem 1rem;
	box-shadow: 3px 3px 0 var(--ink);
	position: relative;
}
.comment.reply {
	margin: 0.65rem 0 0 1.5rem;
	background: var(--paper-2);
	border-color: var(--ink);
	box-shadow: 2px 2px 0 var(--ink);
}
.comment-meta {
	font-family: var(--mono);
	font-size: 0.72rem;
	color: var(--ink-muted);
	display: flex;
	gap: 0.65rem;
	align-items: baseline;
	margin-bottom: 0.45rem;
	flex-wrap: wrap;
}
.comment-meta strong { color: var(--ink); font-weight: 600; }
.comment-meta time { font-variant-numeric: tabular-nums; }
.comment-meta .edited { font-style: italic; }
.comment-body {
	margin: 0 0 0.35rem;
	font-size: 0.95rem;
	line-height: 1.55;
}
.comment-body p:first-child { margin-top: 0; }
.comment-body p:last-child { margin-bottom: 0; }
.comment-actions { margin-top: 0.4rem; }
.reply-form { margin-top: 0.4rem; }
.reply-form summary {
	font-family: var(--mono);
	font-size: 0.72rem;
	color: var(--ink-muted);
	cursor: pointer;
	list-style: none;
}
.reply-form summary::before { content: "↳ "; color: var(--red); }
.reply-form summary:hover { color: var(--red); }
.reply-form form { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.5rem; }

.replies { margin-top: 0.5rem; }

/* ============================================================
   15. Activity — log entries
   ============================================================ */

.activity { margin: 2.5rem 0 1.5rem; }
.activity > h2 { font-family: var(--display); font-size: 1.4rem; font-weight: 400; margin: 0 0 0.85rem; color: var(--ink); }
.activity-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.activity-row {
	padding: 0.55rem 0.9rem;
	background: #fff;
	border: 2px solid var(--ink);
	border-radius: 12px;
	box-shadow: 2px 2px 0 var(--ink);
	font-family: var(--mono);
	font-size: 0.8rem;
	color: var(--ink-muted);
	display: flex;
	gap: 0.6rem;
	align-items: center;
	flex-wrap: wrap;
}
.activity-row .action {
	display: inline-block;
	padding: 0.1rem 0.55rem;
	border: 2px solid var(--ink);
	background: var(--pop-cyan);
	color: var(--ink);
	font-family: var(--display);
	font-size: 0.66rem;
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	border-radius: 999px;
	box-shadow: 1.5px 1.5px 0 var(--ink);
}
.activity-row .user { color: var(--ink); font-weight: 700; }
.activity-row time { margin-left: auto; color: var(--ink-faint); font-variant-numeric: tabular-nums; }

/* ============================================================
   16. Dashboard — the desk
   ============================================================ */

.stat-row {
	list-style: none;
	padding: 0;
	margin: 1rem 0 2rem;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
	gap: 0.85rem;
}
.stat {
	background: #fff;
	border: 2.5px solid var(--ink);
	border-radius: 18px;
	padding: 1rem 1.15rem;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	position: relative;
	box-shadow: 4px 4px 0 var(--ink);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.stat:hover {
	transform: translate(-2px, -2px) rotate(-0.4deg);
	box-shadow: 6px 6px 0 var(--ink);
}
.stat::before {
	content: "";
	position: absolute;
	top: -10px; right: 14px;
	width: 32px;
	height: 8px;
	background: var(--pop-pink);
	border: 2px solid var(--ink);
	border-radius: 999px;
	transform: rotate(-4deg);
	box-shadow: 1.5px 1.5px 0 var(--ink);
}
.stat:nth-child(2)::before { background: var(--pop-cyan); }
.stat:nth-child(3)::before { background: var(--pop-yellow); }
.stat:nth-child(4)::before { background: var(--pop-orange); }
.stat-value {
	font-family: var(--pop);
	font-weight: 400;
	font-size: 2.4rem;
	color: var(--ink);
	line-height: 1;
	font-variant-numeric: tabular-nums lining-nums;
	letter-spacing: 0.5px;
}
.stat-label {
	font-family: var(--mono);
	font-size: 0.7rem;
	color: var(--ink-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.dashboard-columns {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
	gap: 1.5rem;
	margin-bottom: 2rem;
}
.dashboard-col h2,
.dashboard-activity h2 {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--display);
	font-size: 1.4rem;
	font-weight: 400;
	margin: 0 0 0.85rem;
	padding: 0;
	color: var(--ink);
	letter-spacing: 0;
	text-transform: none;
}
.dashboard-col h2::after,
.dashboard-activity h2::after {
	content: "";
	display: inline-block;
	width: 30px; height: 6px;
	background: var(--pop-pink);
	border: 2px solid var(--ink);
	border-radius: 999px;
	transform: rotate(-3deg);
}
.dashboard-activity h2::after { background: var(--pop-cyan); }

.status-counts { list-style: none; padding: 0; margin: 0; }
.status-counts li {
	padding: 0.45rem 0;
	border-bottom: 1px dashed var(--rule);
	display: flex;
	align-items: baseline;
	gap: 0.75rem;
	font-family: var(--mono);
	font-size: 0.86rem;
}
.status-counts .count {
	font-weight: 700;
	color: var(--ink);
	margin-left: auto;
	font-variant-numeric: tabular-nums;
	font-size: 1rem;
}

/* ============================================================
   17. Tree / Outline
   ============================================================ */

.tree-list { list-style: none; padding: 0; margin: 0.6rem 0; }
.tree-list.nested {
	margin-left: 1rem;
	border-left: 1px dashed var(--rule-strong);
	padding-left: 1rem;
}
.tree-node { padding: 0.35rem 0; }
.tree-row {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	font-size: 0.95rem;
}
.disclosure {
	background: #fff;
	border: 2px solid var(--ink);
	min-width: 1.6rem;
	height: 1.6rem;
	padding: 0;
	cursor: pointer;
	font-family: var(--pop);
	font-size: 0.9rem;
	color: var(--ink);
	border-radius: 50%;
	line-height: 1;
	box-shadow: 1.5px 1.5px 0 var(--ink);
	transition: transform 0.12s ease, background 0.12s ease;
}
.disclosure:hover { background: var(--pop-yellow); color: var(--ink); transform: translate(-1px, -1px); }

/* ============================================================
   18. Kanban / Roadmap
   ============================================================ */

.roadmap-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1rem 0 1.5rem; }
.roadmap-tags .tag.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.roadmap-tags .tag.active::before { color: var(--red); }

.kanban {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
	gap: 1rem;
	margin-top: 1.25rem;
}
.kanban-col {
	background: #fff;
	border: 2.5px solid var(--ink);
	border-radius: 18px;
	padding: 1rem 0.95rem 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	box-shadow: 4px 4px 0 var(--ink);
}
.kanban-col:nth-child(1) { background: #fff; }
.kanban-col:nth-child(2) { background: #fffaf0; }
.kanban-col:nth-child(3) { background: #fff4f8; }
.kanban-col:nth-child(4) { background: #f1fbfd; }
.kanban-col:nth-child(5) { background: #f1f9ed; }
.kanban-col > header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-bottom: 0.5rem;
	border-bottom: 2px dotted var(--ink);
}
.kanban-col h2 {
	margin: 0;
	font-family: var(--display);
	font-size: 1.05rem;
	font-weight: 400;
	letter-spacing: 0;
}
.kanban-col .count {
	font-family: var(--pop);
	font-size: 0.95rem;
	color: var(--ink);
	background: var(--pop-yellow);
	border: 2px solid var(--ink);
	border-radius: 999px;
	padding: 0.05rem 0.55rem;
	box-shadow: 1.5px 1.5px 0 var(--ink);
}
.kanban-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.kanban-card {
	background: #fff;
	border: 2px solid var(--ink);
	border-radius: 12px;
	padding: 0.65rem 0.8rem;
	box-shadow: 2px 2px 0 var(--ink);
	transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.kanban-card:hover {
	transform: translate(-1px, -1px) rotate(-0.3deg);
	box-shadow: 4px 4px 0 var(--ink);
}
.kanban-card h3 {
	margin: 0 0 0.25rem;
	font-family: var(--display);
	font-size: 0.95rem;
	font-weight: 400;
	line-height: 1.15;
}
.kanban-card .meta {
	font-family: var(--mono);
	font-size: 0.7rem;
	color: var(--ink-muted);
	margin: 0;
}
.kanban-card .tags { margin-top: 0.3rem; }
.kanban-card-link { color: var(--ink); text-decoration: none; display: block; }
.kanban-card-link:hover h3 { color: var(--pop-pink); }

/* ============================================================
   19. Bulk-select bar & idea form
   ============================================================ */

.bulk-bar {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	flex-wrap: wrap;
	padding: 0.7rem 1rem;
	background: var(--pop-yellow);
	border: 2.5px solid var(--ink);
	border-radius: 14px;
	margin-bottom: 1rem;
	font-family: var(--mono);
	font-size: 0.82rem;
	color: var(--ink);
	box-shadow: 3px 3px 0 var(--ink);
}
.bulk-bar .hint { font-family: var(--sans); font-size: 0.85rem; color: var(--ink); font-weight: 500; }
.idea-card-wrap { display: block; position: relative; cursor: pointer; }
.idea-card-wrap .bulk-check {
	position: absolute;
	top: 0.55rem;
	right: 0.55rem;
	width: 1.1rem;
	height: 1.1rem;
	cursor: pointer;
	z-index: 2;
	accent-color: var(--red);
}
.idea-card-wrap:has(.bulk-check:checked) .idea-card {
	border-color: var(--red);
	box-shadow: 0 0 0 1px var(--red), 0 1px 0 var(--red);
}

.idea-form form {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	max-width: 48rem;
	padding: 1.25rem 1.35rem;
	background: var(--paper);
	border: 1px solid var(--rule-strong);
	border-top: 3px solid var(--red);
	border-radius: 3px;
}
.idea-form label {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	font-family: var(--mono);
	font-size: 0.72rem;
	color: var(--ink-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.idea-form input,
.idea-form select,
.idea-form textarea {
	font-family: var(--sans);
	font-size: 1rem;
	text-transform: none;
	letter-spacing: 0;
	color: var(--ink);
	padding: 0.6rem 0.75rem;
	border: 1px solid var(--rule-strong);
	border-radius: 3px;
	background: var(--paper);
}
.idea-form textarea {
	min-height: 14rem;
	line-height: 1.55;
	font-family: var(--sans);
}
.idea-form button { align-self: flex-start; }

/* ============================================================
   19b. Account page (/account, /settings)
   ============================================================ */

.account { max-width: 44rem; margin: 0 auto; }
.account-head { margin-bottom: 1.25rem; padding-bottom: 0.6rem; border-bottom: 1.5px solid var(--ink); }
.account-head h1 { margin: 0 0 0.2rem; font-size: 1.75rem; font-weight: 700; }
.account-sub { margin: 0; font-family: var(--mono); font-size: 0.78rem; color: var(--ink-muted); }

.flash {
	margin: 0.75rem 0;
	padding: 0.65rem 1rem;
	border-radius: 12px;
	font-size: 0.92rem;
	border: 2px solid var(--ink);
	background: #fff;
	color: var(--ink);
	box-shadow: 2px 2px 0 var(--ink);
	font-weight: 500;
}
.flash.ok    { background: var(--pop-grass); color: var(--ink); }
.flash.error { background: var(--pop-pink);  color: #fff; }

.account-identity {
	display: flex;
	align-items: center;
	gap: 1.1rem;
	padding: 1.2rem 1.3rem;
	background: #fff;
	border: 2.5px solid var(--ink);
	border-radius: 18px;
	margin: 1.25rem 0 1.5rem;
	box-shadow: 4px 4px 0 var(--ink);
}
.identity-avatar {
	width: 48px;
	height: 48px;
	display: grid;
	place-items: center;
	background: var(--pop-pink);
	color: #fff;
	font-family: var(--pop);
	font-weight: 400;
	font-size: 1.4rem;
	border: 2.5px solid var(--ink);
	border-radius: 50%;
	text-transform: uppercase;
	flex-shrink: 0;
	box-shadow: 2px 2px 0 var(--ink);
}
.identity-text { min-width: 0; flex: 1; }
.identity-name { margin: 0 0 0.15rem; font-size: 1.2rem; font-weight: 600; color: var(--ink); line-height: 1.2; }
.identity-meta {
	margin: 0;
	font-family: var(--mono);
	font-size: 0.72rem;
	color: var(--ink-muted);
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	align-items: center;
}
.identity-meta .sep { color: var(--ink-faint); }
.role-pill {
	font-family: var(--mono);
	font-size: 0.65rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	padding: 0.1rem 0.4rem;
	border: 1px solid var(--rule-strong);
	border-radius: 2px;
}
.role-pill.role-admin { color: var(--red); border-color: var(--red); background: var(--red-wash); }
.role-pill.role-user { color: var(--blue); border-color: var(--blue); background: var(--blue-wash); }

.account-section {
	background: var(--paper);
	border: 1px solid var(--rule-strong);
	border-radius: 3px;
	margin-bottom: 0.85rem;
	overflow: hidden;
}
.account-section summary {
	list-style: none;
	cursor: pointer;
	padding: 0.9rem 1.1rem;
	display: flex;
	align-items: center;
	gap: 0.85rem;
	user-select: none;
	transition: background 0.1s ease;
}
.account-section summary::-webkit-details-marker { display: none; }
.account-section summary::marker { content: ""; }
.account-section summary:hover { background: var(--paper-2); }
.section-label {
	font-family: var(--sans);
	font-weight: 600;
	font-size: 1rem;
	color: var(--ink);
}
.section-sub {
	font-family: var(--mono);
	font-size: 0.72rem;
	color: var(--ink-muted);
}
.section-toggle {
	margin-left: auto;
	font-family: var(--mono);
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--ink-muted);
	width: 1.3rem;
	height: 1.3rem;
	display: grid;
	place-items: center;
	border: 1px solid var(--rule-strong);
	border-radius: 2px;
	line-height: 1;
	transition: transform 0.15s ease, background 0.15s ease;
}
.account-section[open] .section-toggle {
	transform: rotate(45deg);
	background: var(--ink);
	color: var(--paper);
	border-color: var(--ink);
}
.section-body {
	padding: 0.25rem 1.15rem 1.15rem;
	border-top: 1px dashed var(--rule-strong);
}

.stacked-form {
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
	margin-top: 0.9rem;
	max-width: 28rem;
}
.stacked-form label {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	font-family: var(--sans);
	font-size: 0.9rem;
	color: var(--ink);
}
.stacked-form .label-text {
	font-family: var(--mono);
	font-size: 0.72rem;
	color: var(--ink-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	display: flex;
	align-items: center;
	gap: 0.4rem;
}
.stacked-form .label-hint {
	font-family: var(--mono);
	font-size: 0.7rem;
	color: var(--ink-faint);
	margin-top: 0.2rem;
}
.stacked-form .label-lock {
	font-family: var(--mono);
	font-size: 0.6rem;
	padding: 0.05rem 0.35rem;
	background: var(--paper-2);
	border: 1px solid var(--rule-strong);
	border-radius: 2px;
	color: var(--ink-muted);
	text-transform: uppercase;
}
.stacked-form input {
	padding: 0.6rem 0.75rem;
	font-family: var(--sans);
	font-size: 0.95rem;
	color: var(--ink);
	background: var(--paper);
	border: 1px solid var(--rule-strong);
	border-radius: 3px;
}
.stacked-form input:focus {
	outline: none;
	border-color: var(--ink);
	box-shadow: 0 0 0 3px var(--hi);
}
.stacked-form input:disabled {
	background: var(--paper-2);
	color: var(--ink-muted);
	cursor: not-allowed;
}
.form-actions { display: flex; gap: 0.5rem; margin-top: 0.35rem; }

.inline-form {
	display: flex;
	gap: 0.75rem;
	align-items: end;
	margin: 0.9rem 0 1.25rem;
	flex-wrap: wrap;
}
.inline-form label { display: flex; flex-direction: column; gap: 0.3rem; flex: 1; min-width: 10rem; }
.inline-form input {
	padding: 0.55rem 0.75rem;
	font-family: var(--sans);
	font-size: 0.95rem;
	background: var(--paper);
	border: 1px solid var(--rule-strong);
	border-radius: 3px;
	color: var(--ink);
}
.inline-form .label-text {
	font-family: var(--mono);
	font-size: 0.7rem;
	color: var(--ink-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.api-keys {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}
.api-keys li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.7rem 0.9rem;
	background: var(--paper-2);
	border: 1px solid var(--rule);
	border-left: 2px solid var(--blue);
	border-radius: 0 3px 3px 0;
}
.api-keys .key-info { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.api-keys strong { font-size: 0.95rem; color: var(--ink); }
.api-keys .key-meta {
	font-family: var(--mono);
	font-size: 0.7rem;
	color: var(--ink-muted);
}

.key-flash {
	margin: 0 0 1rem;
	padding: 0.9rem 1rem;
	background: var(--hi);
	border: 1px solid var(--hi-line);
	border-radius: 3px;
}
.key-flash p { margin: 0 0 0.5rem; font-size: 0.9rem; }
.key-value {
	display: block;
	font-family: var(--mono);
	font-size: 0.85rem;
	background: var(--paper);
	border: 1px solid var(--ink);
	padding: 0.55rem 0.75rem;
	border-radius: 2px;
	word-break: break-all;
	color: var(--ink);
}

/* Mention pills inside comment bodies — small lozenge with the
   vermillion accent and a subtle tint so they stand out from
   regular prose without being loud. */
.comment-body .mention {
	display: inline-block;
	padding: 0.05em 0.4em;
	background: var(--red-wash);
	color: var(--red-deep);
	font-family: var(--mono);
	font-size: 0.88em;
	font-weight: 500;
	border: 1px solid var(--red);
	border-radius: 3px;
	line-height: 1.4;
	text-decoration: none;
}

/* Username on the account identity card */
.identity-handle {
	color: var(--red);
	font-family: var(--mono);
	font-weight: 500;
}

/* Notification toggle rows — checkbox + label + hint */
.notif-row {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.85rem;
	align-items: start;
	padding: 0.75rem 0.85rem;
	background: var(--paper-2);
	border: 1px solid var(--rule);
	border-radius: 3px;
	cursor: pointer;
	transition: border-color 0.1s ease, background 0.1s ease;
}
.notif-row:hover { border-color: var(--ink); background: var(--paper); }
.notif-row input[type="checkbox"] {
	margin: 0.2rem 0 0;
	width: 1.1rem;
	height: 1.1rem;
	accent-color: var(--red);
	cursor: pointer;
}
.notif-row .notif-title {
	display: block;
	font-family: var(--sans);
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--ink);
	letter-spacing: -0.005em;
}
.notif-row .notif-hint {
	display: block;
	margin-top: 0.15rem;
	font-family: var(--sans);
	font-size: 0.82rem;
	color: var(--ink-muted);
	line-height: 1.45;
}

.sign-out-line {
	margin-top: 2rem;
	padding-top: 1rem;
	border-top: 1px dashed var(--rule-strong);
	text-align: center;
	font-family: var(--mono);
	font-size: 0.78rem;
}
.sign-out-line a { color: var(--ink-muted); text-decoration: none; }
.sign-out-line a:hover { color: var(--red); text-decoration: underline; }

/* Topbar user link */
.user-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	text-decoration: none;
	color: inherit;
	padding: 0.25rem 0.5rem;
	border-radius: 3px;
	transition: background 0.1s ease;
}
.user-link:hover { background: var(--paper-2); color: inherit; }
.user-link .user-name { color: var(--ink); font-weight: 500; }

/* ============================================================
   19c. Projects — list, detail, and post-it board
   ============================================================ */

.project-cards {
	list-style: none;
	padding: 0;
	margin: 1.25rem 0 2rem;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
	gap: 1rem;
}
.project-card {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	padding: 1.1rem 1.2rem;
	background: #fff;
	border: 2.5px solid var(--ink);
	border-radius: 22px;
	text-decoration: none;
	color: var(--ink);
	box-shadow: var(--shadow-pop);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	min-height: 9rem;
}
.project-card:hover {
	transform: translate(-2px, -2px) rotate(-0.4deg);
	box-shadow: 8px 8px 0 var(--ink);
	color: var(--ink);
}
.project-card:nth-child(2n) { background: var(--paper-2); }
.project-card:nth-child(3n) { background: #fff4f8; }
.project-card header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 0.75rem;
}
.project-card h2 {
	margin: 0;
	font-family: var(--display);
	font-size: 1.25rem;
	font-weight: 400;
	line-height: 1.1;
	color: var(--ink);
	letter-spacing: 0;
}
.project-card:hover h2 { color: var(--pop-pink); }
.project-visibility {
	font-family: var(--display);
	font-size: 0.62rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	padding: 0.15rem 0.55rem;
	background: var(--pop-cyan);
	color: var(--ink);
	border: 2px solid var(--ink);
	border-radius: 999px;
	flex-shrink: 0;
	box-shadow: 1.5px 1.5px 0 var(--ink);
}
.project-description {
	color: var(--ink-muted);
	font-size: 0.92rem;
	line-height: 1.5;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.project-card footer {
	margin-top: auto;
	padding-top: 0.55rem;
	border-top: 2px dotted var(--ink);
	font-family: var(--mono);
	font-size: 0.72rem;
	color: var(--ink-muted);
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 0.55rem;
	align-items: baseline;
}
.project-card footer .sep { color: var(--ink-faint); }
.project-count { font-weight: 600; color: var(--red); }

/* Project detail page */
.project {
	max-width: var(--wide);
	margin: 0 auto;
}
.project-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 1.25rem;
	flex-wrap: wrap;
	padding-bottom: 1rem;
	border-bottom: 1.5px solid var(--ink);
	margin-bottom: 2rem;
}
.project-head-text { flex: 1; min-width: 0; }
.project-head-actions {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}
.project-crumb {
	margin: 0 0 0.4rem;
	font-family: var(--mono);
	font-size: 0.7rem;
	color: var(--ink-muted);
}
.project-crumb a { color: var(--ink-muted); text-decoration: none; }
.project-crumb a:hover { color: var(--red); text-decoration: underline; }
.project-head h1 {
	margin: 0 0 0.35rem;
	font-size: clamp(1.75rem, 1vw + 1.5rem, 2.25rem);
	font-weight: 700;
	letter-spacing: -0.015em;
}
.project-lede {
	margin: 0 0 0.65rem;
	color: var(--ink-2);
	font-size: 1rem;
	line-height: 1.55;
	max-width: 64ch;
}
.project .meta .sep { color: var(--ink-faint); margin: 0 0.3rem; }

/* The post-it board — sticky notes on a corkboard */
.postit-board {
	list-style: none;
	padding: 1rem 0.5rem 3rem;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
	gap: 1.5rem 1.25rem;
	/* Subtle corkboard feel via layered background */
	position: relative;
}

.postit {
	position: relative;
	list-style: none;
	/* Each card picks up a rotation and color via nth-child cycling
	   below, so the board feels hand-arranged rather than gridded. */
	transform: rotate(-1.2deg);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.postit:nth-child(4n+2) { transform: rotate(1.4deg); }
.postit:nth-child(4n+3) { transform: rotate(-0.7deg); }
.postit:nth-child(4n+4) { transform: rotate(2deg); }

.postit-link {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	padding: 1rem 1rem 0.85rem;
	min-height: 11rem;
	background: #fff09c; /* classic post-it yellow */
	color: var(--ink);
	text-decoration: none;
	font-family: var(--sans);
	box-shadow:
		0 1px 1px rgba(0,0,0,0.06),
		0 4px 8px -2px rgba(0,0,0,0.18),
		0 10px 18px -6px rgba(0,0,0,0.12);
	/* Slightly skewed bottom edge so it looks peeled up */
	clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 14px) 100%, 0 100%);
}

/* Color palette, cycled deterministically per card */
.postit:nth-child(5n+1) .postit-link { background: #fff09c; } /* yellow */
.postit:nth-child(5n+2) .postit-link { background: #ffc4c4; } /* pink  */
.postit:nth-child(5n+3) .postit-link { background: #b8dcf0; } /* blue  */
.postit:nth-child(5n+4) .postit-link { background: #c8ecb0; } /* green */
.postit:nth-child(5n+5) .postit-link { background: #f0d0f4; } /* lilac */

/* Tape detail at the top */
.postit::before {
	content: "";
	position: absolute;
	top: -0.55rem;
	left: 50%;
	transform: translateX(-50%) rotate(-2deg);
	width: 3.2rem;
	height: 1rem;
	background: rgba(255, 255, 255, 0.55);
	border: 1px solid rgba(0, 0, 0, 0.07);
	box-shadow: 0 1px 2px rgba(0,0,0,0.08);
	z-index: 2;
	pointer-events: none;
}
.postit:nth-child(3n+2)::before { transform: translateX(-50%) rotate(3deg); left: 55%; }
.postit:nth-child(3n+3)::before { transform: translateX(-50%) rotate(-4deg); left: 48%; }

.postit:hover {
	transform: rotate(0deg) translateY(-2px);
	z-index: 5;
}
.postit:hover .postit-link {
	box-shadow:
		0 2px 2px rgba(0,0,0,0.08),
		0 8px 16px -4px rgba(0,0,0,0.22),
		0 20px 28px -10px rgba(0,0,0,0.18);
}

.postit-link > header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 0.5rem;
}
.postit-link h3 {
	margin: 0;
	font-family: var(--sans);
	font-size: 1.02rem;
	font-weight: 600;
	line-height: 1.25;
	color: var(--ink);
	letter-spacing: -0.005em;
	flex: 1;
	min-width: 0;
}
.postit-link .status-badge {
	font-size: 0.58rem;
	padding: 0.08rem 0.35rem;
	background: rgba(255, 255, 255, 0.55);
	border-color: rgba(0, 0, 0, 0.25);
	transform: none;
}
.postit-body {
	font-family: var(--sans);
	font-size: 0.86rem;
	line-height: 1.45;
	color: var(--ink-2);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 5;
	line-clamp: 5;
	-webkit-box-orient: vertical;
	overflow: hidden;
	/* Handwritten hint without actually using a handwritten font —
	   keeping the engineering-text aesthetic but with slightly more
	   personality via letter-spacing. */
	letter-spacing: 0.005em;
}
.postit-link > footer {
	margin-top: auto;
	font-family: var(--mono);
	font-size: 0.68rem;
	color: rgba(15, 17, 21, 0.62);
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem;
	align-items: baseline;
	padding-top: 0.4rem;
	border-top: 1px dashed rgba(0, 0, 0, 0.12);
}
.postit-link > footer .sep { color: rgba(15, 17, 21, 0.35); }

.postit-empty {
	padding: 3rem 1.5rem;
	text-align: center;
	color: var(--ink-muted);
	font-family: var(--sans);
	font-size: 0.95rem;
	border: 1px dashed var(--rule-strong);
	border-radius: 3px;
	background: var(--paper-2);
}
.postit-empty a { color: var(--red-deep); font-weight: 500; }

/* Danger zone on project edit — red-outlined section with an
   emphasized destructive button, visually isolated from the main
   form so it takes a deliberate gesture to reach. */
.danger-zone {
	margin-top: 2.5rem;
	padding: 1.25rem 1.35rem;
	background: var(--red-wash);
	border: 1px solid var(--red);
	border-left: 3px solid var(--red);
	border-radius: 3px;
}
.danger-zone h2 {
	margin: 0 0 0.5rem;
	font-size: 1rem;
	font-weight: 600;
	color: var(--red-deep);
	font-family: var(--mono);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.danger-zone p {
	margin: 0 0 0.85rem;
	font-size: 0.88rem;
	color: var(--ink-2);
	line-height: 1.5;
}
.button.danger-button {
	background: var(--red);
	color: var(--paper);
	border-color: var(--red-deep);
	box-shadow: 0 1.5px 0 var(--ink);
}
.button.danger-button:hover {
	background: var(--red-deep);
	color: var(--paper);
	box-shadow: 0 2.5px 0 var(--ink);
}

@media (max-width: 520px) {
	.postit-board { padding: 0.5rem 0 2rem; }
	.postit { transform: none !important; }
	.postit::before { display: none; }
	.postit-link { clip-path: none; min-height: 9rem; }
}

/* ============================================================
   20. Footer
   ============================================================ */

.site-footer {
	padding: 1.5rem var(--gutter);
	border-top: 1px solid var(--rule-strong);
	margin-top: 3rem;
	text-align: center;
	font-family: var(--mono);
	font-size: 0.72rem;
	color: var(--ink-muted);
	background: var(--paper);
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	justify-content: center;
}
.site-footer a { color: var(--red-deep); text-decoration: none; }
.site-footer a:hover { color: var(--red); text-decoration: underline; }
.site-footer .sep { color: var(--ink-faint); }

/* ============================================================
   21. Motion (subtle)
   ============================================================ */

@media (prefers-reduced-motion: no-preference) {
	.site-main > * { animation: slide-up 0.25s ease-out both; }
	.idea-card, .feature-card, .stat, .kanban-col { animation: slide-up 0.3s ease-out both; }
}

@keyframes slide-up {
	from { opacity: 0; transform: translateY(4px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   22. Responsive
   ============================================================ */

@media (max-width: 780px) {
	.topbar {
		grid-template-columns: auto 1fr auto;
		gap: 0.75rem;
		row-gap: 0;
	}
	.brand-sub { display: none; }
	.nav-toggle { display: inline-flex; order: 2; justify-self: end; }
	.topbar-actions { order: 3; }
	.tabs {
		grid-column: 1 / -1;
		order: 4;
		display: none;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		margin: 0.5rem -0.5rem -0.85rem;
		padding: 0.25rem 0;
		border-top: 1px solid var(--rule);
	}
	.tabs.is-open { display: flex; }
	.tabs a {
		border-radius: 0;
		border: 0;
		border-bottom: 1px solid var(--rule);
		padding: 0.85rem 1rem;
		font-size: 0.85rem;
	}
	.tabs a:last-child { border-bottom: 0; }
	.tabs a[aria-current="page"], .tabs a.active { background: var(--paper-2); border-color: var(--rule); }
	.user-name { max-width: 7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.hero { padding: 1rem 0 1.5rem; }
	.visibility-form fieldset { grid-template-columns: 1fr; }
	.invite-form { grid-template-columns: 1fr; }
	.site-main::before { display: none; }
}

@media (max-width: 520px) {
	.brand-name { font-size: 1.1rem; }
	.brand-mark { font-size: 1.25rem; }
	.stat-value { font-size: 1.75rem; }
	.collab-row { grid-template-columns: 1fr auto; grid-template-rows: auto auto; }
	.collab-email { grid-column: 1; font-size: 0.72rem; }
	.collab-role { grid-column: 2; grid-row: 1; }
	.collab-revoke { grid-column: 2; grid-row: 2; }
}

/* ============================================================
   22b. Widget admin: embed snippet generator
   ============================================================ */

.widget-snippet { margin: 1.5rem 0; }
.widget-snippet h2 { margin-bottom: 0.25rem; }
.widget-snippet h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: #555; margin: 1rem 0 0.5rem; }

.snippet-config {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 0.75rem 1rem;
	align-items: end;
	margin: 0.75rem 0 1rem;
	padding: 0.75rem;
	border: 1px solid #e2e2e6;
	border-radius: 6px;
	background: #fafafb;
}
.snippet-config fieldset.snippet-modes {
	border: 0;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}
.snippet-config fieldset.snippet-modes legend { font-size: 0.8rem; color: #555; padding: 0; margin-bottom: 0.25rem; }
.snippet-config .snippet-field { display: flex; flex-direction: column; gap: 0.25rem; }
.snippet-config .snippet-field .label-text { font-size: 0.8rem; color: #555; }
.snippet-config input[type="color"] { width: 3rem; height: 2rem; padding: 0; border: 1px solid #ccc; border-radius: 4px; }

.snippet-output { margin-top: 0.5rem; }
.snippet-output-head { display: flex; align-items: center; gap: 0.75rem; }
.snippet-output-head h3 { margin: 0; }
.snippet-copy-status { font-size: 0.8rem; color: #2a7a2a; min-height: 1em; }
.snippet-pre {
	background: #1f2933;
	color: #f7f8fa;
	padding: 0.85rem 1rem;
	border-radius: 6px;
	overflow-x: auto;
	font-size: 0.78rem;
	line-height: 1.45;
	white-space: pre;
}
.snippet-pre code { background: transparent; color: inherit; padding: 0; }
.snippet-no-key { margin-top: 0.5rem; }

.snippet-preview-wrap { margin-top: 1rem; }
.snippet-preview {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.85rem;
	padding: 1.6rem 1.4rem;
	background: #fff;
	border: 2.5px solid var(--ink);
	border-radius: 18px;
	box-shadow: var(--shadow-pop);
}
.snippet-preview .hint { margin: 0; }
.snippet-preview-launch {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 76px;
	height: 76px;
	padding: 0;
	background: var(--pop-yellow);
	color: var(--ink);
	border: 2.5px solid var(--ink);
	border-radius: 50%;
	cursor: pointer;
	box-shadow: var(--shadow-sticker);
	transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.snippet-preview-launch img {
	width: 56px; height: 56px;
	filter: drop-shadow(2px 2px 0 var(--ink));
}
.snippet-preview-launch:hover {
	background: var(--pop-pink);
	transform: translate(-2px, -2px) rotate(-3deg);
	box-shadow: 6px 6px 0 var(--ink);
}
.snippet-preview-launch[aria-disabled="true"] {
	opacity: 0.6;
	cursor: progress;
}

/* ============================================================
   Widget key list — click-to-copy values + edit-in-place
   allow-list. The key cell is itself a <button> so the whole
   monospaced value is the click target; visual cue + ARIA
   announcement carry the "copied" feedback.
   ============================================================ */
.widget-key-value {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font: inherit;
	background: var(--paper-2);
	color: var(--ink);
	border: 2px solid var(--ink);
	border-radius: 8px;
	padding: 0.25rem 0.55rem;
	cursor: pointer;
	max-width: 100%;
	transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
	box-shadow: 1.5px 1.5px 0 var(--ink);
}
.widget-key-value:hover {
	background: var(--pop-yellow);
	transform: translate(-1px, -1px);
	box-shadow: 3px 3px 0 var(--ink);
}
.widget-key-value:focus-visible {
	outline: 3px solid var(--pop-cyan);
	outline-offset: 2px;
}
.widget-key-value code {
	font-family: var(--mono);
	font-size: 0.78rem;
	background: transparent;
	border: 0;
	padding: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 22ch;
}
.widget-key-copy-glyph {
	font-family: var(--mono);
	font-size: 1.05rem;
	color: var(--ink-muted);
	flex-shrink: 0;
}
.widget-key-copy-status {
	font-family: var(--display);
	font-size: 0.7rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--pop-grass);
	flex-shrink: 0;
}
.widget-key-copy-status:empty { display: none; }

/* Allow-list editor — collapsed shows the current entries; the
   edit toggle reveals a small textarea form. */
.widget-allow-edit > summary {
	cursor: pointer;
	list-style: none;
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	padding: 0.25rem 0;
}
.widget-allow-edit > summary::-webkit-details-marker { display: none; }
.widget-allow-list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	flex: 1;
	min-width: 0;
}
.widget-allow-list code {
	font-family: var(--mono);
	font-size: 0.78rem;
	background: transparent;
	border: 0;
	padding: 0;
}
.widget-allow-edit-toggle {
	font-family: var(--display);
	font-size: 0.66rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink);
	background: var(--pop-cyan);
	border: 2px solid var(--ink);
	border-radius: 999px;
	padding: 0.05rem 0.55rem;
	box-shadow: 1.5px 1.5px 0 var(--ink);
	flex-shrink: 0;
	align-self: flex-start;
}
.widget-allow-edit[open] > summary > .widget-allow-edit-toggle {
	background: var(--pop-yellow);
}
.widget-allow-edit-form {
	margin: 0.6rem 0 0.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}
.widget-allow-edit-form .label-text {
	display: block;
	font-family: var(--display);
	font-size: 0.7rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ink);
	margin-bottom: 0.3rem;
}
.widget-allow-edit-form textarea {
	font-family: var(--mono);
	font-size: 0.85rem;
	min-height: 4.5rem;
}
.widget-allow-edit-actions {
	display: flex;
	justify-content: flex-end;
}

/* ============================================================
   Icon picker (project form) — preset gallery + custom URL.
   Hidden input carries the resolved value; tile clicks and the
   custom URL field both write to it via JS in project_form.html.
   ============================================================ */
.icon-picker {
	border: 2.5px solid var(--ink);
	background: #fff;
	border-radius: 16px;
	padding: 1rem 1.1rem 1.1rem;
	margin: 0 0 1rem;
	box-shadow: var(--shadow-sticker);
}
.icon-picker legend {
	font-family: var(--display);
	font-size: 0.85rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	background: var(--pop-yellow);
	color: var(--ink);
	border: 2px solid var(--ink);
	border-radius: 999px;
	padding: 2px 12px;
	box-shadow: 1.5px 1.5px 0 var(--ink);
}
.icon-picker > .hint {
	margin: 0.5rem 0 0.85rem;
	font-family: var(--mono);
	font-size: 0.78rem;
	color: var(--ink-muted);
}
.icon-picker-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
	gap: 0.6rem;
	margin-bottom: 0.85rem;
}
.icon-picker-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
	padding: 0.6rem 0.4rem 0.55rem;
	background: #fff;
	border: 2px solid var(--ink);
	border-radius: 14px;
	font-family: var(--display);
	font-size: 0.72rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ink);
	cursor: pointer;
	box-shadow: 2px 2px 0 var(--ink);
	transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.icon-picker-tile:hover {
	background: var(--pop-yellow);
	transform: translate(-1px, -1px);
	box-shadow: 3px 3px 0 var(--ink);
}
.icon-picker-tile.is-selected {
	background: var(--pop-cyan);
	transform: translate(-1px, -1px);
	box-shadow: 3px 3px 0 var(--ink);
}
.icon-picker-tile img {
	width: 48px; height: 48px;
	object-fit: contain;
	filter: drop-shadow(1.5px 1.5px 0 var(--ink));
}
.icon-picker-tile--none .icon-picker-none-glyph {
	display: grid;
	place-items: center;
	width: 48px; height: 48px;
	background: var(--pop-yellow);
	border: 2px solid var(--ink);
	border-radius: 50%;
	font-family: var(--pop);
	font-size: 1.3rem;
	color: var(--ink);
	box-shadow: 1.5px 1.5px 0 var(--ink);
}
.icon-picker-custom { display: block; }
.icon-picker-custom .label-text {
	display: block;
	font-family: var(--display);
	font-size: 0.7rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: 0.35rem;
	color: var(--ink);
}
.icon-picker-custom input {
	width: 100%;
	padding: 0.55rem 0.75rem;
	border: 2px solid var(--ink);
	border-radius: 10px;
	font-family: var(--mono);
	font-size: 0.85rem;
	background: #fff;
}
.icon-picker-custom input:focus {
	outline: none;
	box-shadow: 3px 3px 0 var(--pop-pink);
}

/* ============================================================
   Project card + idea card — Pop-Up Video info-nugget style:
   the sticker icon is a circular badge that hangs off the left
   edge of the card, overlapping it. Cards reserve left padding
   for the cutout so the title doesn't slide under the badge.
   ============================================================ */
.project-cards { padding-left: 26px; }
.project-card { position: relative; padding-left: 50px; }
.project-icon {
	position: absolute;
	left: -26px;
	top: 16px;
	width: 64px; height: 64px;
	z-index: 2;
	background: #fff;
	border: 2.5px solid var(--ink);
	border-radius: 50%;
	padding: 6px;
	object-fit: contain;
	box-shadow: 3px 3px 0 var(--ink);
	transition: transform 0.15s ease;
}
.project-card:hover .project-icon {
	transform: rotate(-6deg);
}
.project-card-body {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	flex: 1;
	min-width: 0;
}

.idea-cards { padding-left: 22px; }
.idea-card { position: relative; padding-left: 38px; }
.idea-card-icon {
	position: absolute;
	left: -22px;
	top: 14px;
	width: 52px; height: 52px;
	z-index: 2;
	background: #fff;
	border: 2.5px solid var(--ink);
	border-radius: 50%;
	padding: 5px;
	object-fit: contain;
	box-shadow: 3px 3px 0 var(--ink);
	transition: transform 0.15s ease;
}
.idea-card:hover .idea-card-icon {
	transform: rotate(-5deg);
}
.idea-card-body {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	flex: 1;
	min-width: 0;
}

/* ============================================================
   Idea detail header — sticker icon left, title + meta middle,
   vote/edit actions right. Replaces the dense run-on meta line
   with a chunked layout that scans top-to-bottom.
   ============================================================ */
.idea-head {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 1rem 1.1rem;
	padding: 0 0 1rem;
	margin: 0 0 0.75rem;
	border-bottom: 2px dotted var(--ink);
}
.idea-head-icon {
	width: 64px; height: 64px;
	border: 2.5px solid var(--ink);
	border-radius: 50%;
	background: #fff;
	padding: 5px;
	box-shadow: 3px 3px 0 var(--ink);
	object-fit: contain;
	transform: rotate(-3deg);
}
.idea-head-text { min-width: 0; }
.idea-head-text h1 {
	margin: 0 0 0.4rem;
	font-family: var(--display);
	font-weight: 400;
	font-size: clamp(1.6rem, 2.4vw, 2.2rem);
	line-height: 1.1;
	letter-spacing: 0;
}
.idea-head-meta {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.45rem 0.55rem;
	font-family: var(--sans);
	font-size: 0.92rem;
	color: var(--ink-muted);
}
.idea-head-meta .visibility {
	font-family: var(--mono);
	font-size: 0.78rem;
	padding: 0.05rem 0.5rem;
	background: var(--paper-2);
	border: 1.5px solid var(--ink);
	border-radius: 999px;
	color: var(--ink);
}
.idea-head-actions {
	display: inline-flex;
	gap: 0.6rem;
	align-items: center;
	flex-shrink: 0;
}
@media (max-width: 720px) {
	.idea-head { grid-template-columns: auto 1fr; }
	.idea-head-actions { grid-column: 1 / -1; justify-content: flex-end; }
}

/* Body card — paper sticker that holds the rendered markdown so
   the body content has its own surface separate from the page. */
.idea-body-card {
	background: #fff;
	border: 2.5px solid var(--ink);
	border-radius: 18px;
	padding: 1.4rem 1.6rem;
	margin: 1rem 0 1.25rem;
	box-shadow: 4px 4px 0 var(--ink);
}
.idea-body-card .body {
	font-size: 1.02rem;
	line-height: 1.65;
}
.idea-body-card .body :first-child { margin-top: 0; }
.idea-body-card .body :last-child { margin-bottom: 0; }

/* Stat strip — replaces the priority/impact/effort run-on line
   with four sticker chips. Each shows a label + a big pop-font
   value so the score reads at a glance. */
.idea-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
	gap: 0.7rem;
	list-style: none;
	padding: 0;
	margin: 0 0 1.5rem;
}
.idea-stats li {
	background: #fff;
	border: 2px solid var(--ink);
	border-radius: 14px;
	padding: 0.5rem 0.8rem;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	box-shadow: 2px 2px 0 var(--ink);
}
.idea-stats li:nth-child(1) { background: #fff; }
.idea-stats li:nth-child(2) { background: #fff4f8; }
.idea-stats li:nth-child(3) { background: #fffaf0; }
.idea-stats li:nth-child(4) { background: #f1fbfd; }
.idea-stat-label {
	font-family: var(--display);
	font-size: 0.66rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ink-muted);
}
.idea-stat-value {
	font-family: var(--pop);
	font-size: 1.6rem;
	color: var(--ink);
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

/* Archive-only collapsible (shown to non-admin owners). Reuses
   the .admin-controls shell but tints it red since the only
   action inside is destructive. */
.admin-controls.archive-only .admin-summary-label::before {
	background: var(--pop-pink);
	color: #fff;
}
.admin-controls.archive-only .admin-summary-state {
	background: var(--pop-pink);
	color: #fff;
}
.archive-form {
	margin: 0.4rem 0 0;
}

/* Kind pill — sits next to the idea title in a card header to call
   out widget-sourced bugs vs ideas. */
.kind-pill {
	display: inline-block;
	font-family: var(--display);
	font-size: 0.66rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 0.1rem 0.55rem;
	border: 2px solid var(--ink);
	border-radius: 999px;
	box-shadow: 1.5px 1.5px 0 var(--ink);
	color: var(--ink);
	flex-shrink: 0;
}
.kind-pill--idea { background: var(--pop-yellow); }
.kind-pill--bug  { background: var(--pop-pink); color: #fff; }

/* Bug-flavored idea cards get a subtle pink-tinted backdrop so
   the bug roll-up scans at a glance. Idea cards stay white. */
.idea-card--bug { background: #fff4f8; }

/* Dashboard "Latest submissions" wraps idea_card in a wider grid
   than the default idea-list cards so the per-card icon + kind
   pill have room to breathe. */
.dashboard-recent { margin: 1rem 0 2rem; }
.dashboard-recent h2 {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--display);
	font-size: 1.4rem;
	font-weight: 400;
	margin: 0 0 1rem;
	color: var(--ink);
}
.dashboard-recent h2::after {
	content: "";
	display: inline-block;
	width: 36px; height: 6px;
	background: var(--pop-yellow);
	border: 2px solid var(--ink);
	border-radius: 999px;
	transform: rotate(-3deg);
}
.dashboard-recent .idea-cards {
	grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
}

/* Idea-list rows (Dashboard "My recent ideas", etc.) get the same
   overlap treatment for visual consistency with the cards. */
.idea-list { padding-left: 22px; }
.idea-row { padding-left: 38px; position: relative; }

/* ============================================================
   23. Print
   ============================================================ */

@media print {
	body { background: #fff; background-image: none; color: #000; }
	body::before, body::after { display: none; }
	.topbar, .tabs, .actions, .vote-button, .admin-controls,
	.share-panel, .new-comment, .reply-form, .load-more, .bulk-bar { display: none; }
	.idea-card, .feature-card, .stat { box-shadow: none; border-color: #ccc; }
	a { color: #000; text-decoration: underline; }
	.site-main::before { display: none; }
}

/* ============================================================
   Reduced motion — collapse every Pop-Up Video animation to a
   single near-instant frame. Hover transforms still work because
   they're transitions, not animations.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		animation-delay: 0s !important;
		transition-duration: 0.05s !important;
	}
	body::before, body::after { display: none; }
}
