/* ==========================================================
   Tinker Tarik — kopitiam, teh tarik, workshop.
   One loud thing: the order chit and the pull of the tea.
   ========================================================== */

:root {
	--brand: #8A4519;       /* teh tarik, pulled strong */
	--brand-deep: #3D200C;  /* kopi-o */
	--foam: #F3E6D4;        /* the foam on top */
	--milk: #F6D9AE;        /* condensed milk, for text on dark */
	--tea: #A3530F;
	--paper: #FFFFFF;
	--bg: #FBF8F4;
	--ink: #22160E;
	--ink-2: #5B4637;
	--line: #E6DACB;
	--chili: #C8202F;       /* kopitiam signboard red */
	--tile: #0F6A54;        /* kopitiam floor tile green, used sparingly */

	--f-display: "Unbounded", "Arial Black", system-ui, sans-serif;
	--f-body: "Figtree", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;

	--step--1: 0.875rem;
	--step-0: 1.0625rem;
	--step-1: 1.25rem;
	--step-2: 1.5rem;
	--step-3: clamp(1.75rem, 1.4rem + 1.6vw, 2.25rem);
	--step-4: clamp(2.25rem, 1.6rem + 3vw, 3.5rem);

	--gap: clamp(1rem, 0.6rem + 1.6vw, 2rem);
	--section: clamp(3.5rem, 2.5rem + 4vw, 6rem);
	--radius-s: 6px;
	--radius-m: 14px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 400 var(--step-0)/1.6 var(--f-body);
	text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-deep); text-decoration-thickness: 2px; }

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

h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.15; font-weight: 700; }
h1, h2 { font-family: var(--f-display); letter-spacing: -0.01em; }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1em; }

.screen-reader-text, .hp {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: #fff; padding: 0.6rem 1rem; border-radius: var(--radius-s); }
.skip-link:focus { top: 1rem; }

.wrap { width: min(1160px, 100% - 2rem); margin-inline: auto; }
.wrap--text { width: min(720px, 100% - 2rem); }
.muted { color: var(--ink-2); }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li + li { margin-top: 0.35rem; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
	min-height: 44px; padding: 0.65rem 1.2rem;
	border: 2px solid transparent; border-radius: 999px;
	font: 600 var(--step-0)/1.1 var(--f-body); text-decoration: none; cursor: pointer;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn--lg { min-height: 52px; padding: 0.8rem 1.5rem; font-size: var(--step-1); }
.btn--primary { background: var(--chili); color: #fff; }
.btn--primary:hover { background: #A8141F; color: #fff; }
.btn--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--light { background: var(--milk); color: var(--brand-deep); }
.btn--light:hover { background: #fff; color: var(--brand-deep); }
.text-link { font-weight: 600; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(251, 248, 244, 0.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 1rem; }

.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; }
.brand__logo { max-height: 44px; width: auto; }
.brand__name { font: 800 1.15rem/1 var(--f-display); letter-spacing: -0.02em; }
/* Mark: two cups and the pull between them (inline SVG in header.php). */
.brand__mark { width: 34px; height: 34px; flex: none; color: var(--brand); }
.brand__mark .pour { stroke: var(--tea); }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; align-items: center; }
.site-nav a { display: block; padding: 0.55rem 0.85rem; border-radius: 999px; color: var(--ink); font-weight: 600; text-decoration: none; }
.site-nav a:hover, .site-nav .current-menu-item > a { background: var(--foam); color: var(--brand-deep); }
.site-nav li:last-child > a { background: var(--ink); color: #fff; }
.site-nav li:last-child > a:hover { background: var(--brand-deep); }
.site-nav .sub-menu { display: none; }

.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; border-radius: var(--radius-s); }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 22px; height: 2px; background: var(--ink); margin: 0 auto; position: relative; transition: transform .2s ease; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after { top: 7px; }
.nav-open .nav-toggle__bars { background: transparent; }
.nav-open .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
	.nav-toggle { display: block; }
	.site-nav { display: none; position: absolute; inset: 68px 0 auto; background: var(--bg); border-bottom: 1px solid var(--line); padding: 0.5rem 1rem 1rem; }
	.nav-open .site-nav { display: block; }
	.site-nav ul { flex-direction: column; align-items: stretch; }
	.site-nav a { padding: 0.8rem 1rem; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(3rem, 2rem + 5vw, 6.5rem) 0 var(--section); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr); gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: center; }
.hero__title { font-size: var(--step-4); font-weight: 800; line-height: 1.05; max-width: 15ch; margin-bottom: 1.25rem; }
.hero__text { font-size: var(--step-1); color: var(--ink-2); max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

/* The order chit: the one memorable object. */
.chit {
	position: relative; background: var(--paper); color: var(--ink);
	padding: 1.5rem 1.5rem 2.25rem; transform: rotate(1.5deg);
	box-shadow: 0 1px 0 var(--line), 0 18px 40px -18px rgba(61, 32, 12, 0.45);
	font-variant-numeric: tabular-nums;
	background-image: repeating-linear-gradient(to bottom, transparent 0 2.2rem, var(--foam) 2.2rem calc(2.2rem + 1px));
	background-position: 0 3.4rem;
}
.chit::after { /* torn bottom edge */
	content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 12px;
	background: linear-gradient(-45deg, transparent 6px, var(--paper) 0) 0 0 / 12px 12px repeat-x,
	            linear-gradient(45deg, transparent 6px, var(--paper) 0) 0 0 / 12px 12px repeat-x;
}
.chit__head { display: flex; justify-content: space-between; font: 700 var(--step--1)/1.2 var(--f-display); color: var(--brand); border-bottom: 2px solid var(--ink); padding-bottom: 0.75rem; margin-bottom: 0.4rem; }
.chit__lines { list-style: none; margin: 0; padding: 0; }
.chit__lines li { display: flex; justify-content: space-between; gap: 1rem; min-height: 2.2rem; align-items: center; font-weight: 500; }
.chit__lines li span:last-child { color: var(--tea); font-weight: 700; text-align: right; white-space: nowrap; }
.chit__extra { color: var(--ink-2); font-style: italic; }
.chit__total { display: flex; justify-content: space-between; gap: 1rem; border-top: 2px dashed var(--ink); padding-top: 0.75rem; margin: 0.6rem 0 1rem; font: 700 var(--step-0)/1.2 var(--f-display); }
.chit__total span:last-child { color: var(--chili); text-align: right; }
.chit__link { font-weight: 700; }
@media (prefers-reduced-motion: no-preference) {
	.chit { animation: chit-in .7s cubic-bezier(.2, .8, .2, 1) both .15s; }
	@keyframes chit-in { from { opacity: 0; transform: translateY(24px) rotate(-4deg); } to { opacity: 1; transform: rotate(1.5deg); } }
}
@media (max-width: 900px) {
	.hero__grid { grid-template-columns: 1fr; }
	.chit { transform: none; max-width: 440px; }
	@keyframes chit-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
}

/* ---------- Sections ---------- */
.section { padding: var(--section) 0; }
.section--tint { background: var(--foam); }
.section__title { font-size: var(--step-3); }
.section__head { display: flex; justify-content: space-between; align-items: end; gap: 1rem 3rem; flex-wrap: wrap; margin-bottom: 2rem; }
.section__head p { max-width: 46ch; color: var(--ink-2); margin: 0; }
.section__head--light p { color: var(--milk); }

.audiences__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 2px solid var(--ink); margin-top: 1.5rem; }
.audience { padding: 1.75rem 2rem 2rem 0; border-bottom: 1px solid var(--line); }
.audience:nth-child(even) { padding-left: 2rem; border-left: 1px solid var(--line); }
.audience p { color: var(--ink-2); max-width: 42ch; }
.audience a { font-weight: 700; }
@media (max-width: 700px) {
	.audiences__grid { grid-template-columns: 1fr; }
	.audience, .audience:nth-child(even) { padding: 1.5rem 0; border-left: 0; }
}

.steps { list-style: none; counter-reset: step; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 1rem; }
.steps li::before { content: counter(step); display: block; font: 800 var(--step-3)/1 var(--f-display); color: var(--brand); margin-bottom: 0.75rem; }
.steps p { color: var(--ink-2); margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

.cta-band { background: var(--ink); color: #fff; }
.cta-band__inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta-band h2 { font-size: var(--step-3); max-width: 22ch; margin: 0; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0; }
.cta-band .btn--ghost { border-color: #fff; color: #fff; }
.cta-band .btn--ghost:hover { background: #fff; color: var(--ink); }

.empty { padding: 1.5rem; border: 2px dashed var(--line); border-radius: var(--radius-m); color: var(--ink-2); }

/* ---------- Apps ---------- */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--gap); margin-bottom: 1.5rem; }
.app-card__link { display: flex; gap: 1rem; padding: 1.25rem; background: var(--paper); border-radius: var(--radius-m); color: var(--ink); text-decoration: none; height: 100%; border: 1px solid var(--line); transition: border-color .15s ease; }
.app-card__link:hover { border-color: var(--brand); color: var(--ink); }
.app-card__icon, .app-hero__icon { flex: none; width: 64px; height: 64px; border-radius: 16px; overflow: hidden; background: var(--brand); display: grid; place-items: center; }
.app-card__icon span, .app-hero__icon span { color: var(--milk); font: 800 1.75rem/1 var(--f-display); }
.app-card__icon img, .app-hero__icon img { width: 100%; height: 100%; object-fit: cover; }
.app-card__title { font-family: var(--f-display); font-size: var(--step-1); margin-bottom: 0.25rem; }
.app-card__tagline { color: var(--ink-2); margin-bottom: 0.6rem; }
.app-card__meta { display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem; align-items: center; font-size: var(--step--1); color: var(--ink-2); margin: 0; }

.pill { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px; font-weight: 700; font-size: var(--step--1); background: var(--foam); color: var(--brand-deep); }
.pill--beta { background: #FDE7C8; color: #6A3E0A; }
.pill--soon { background: #E8E8E8; color: #3C3C3C; }

.app-hero { display: flex; gap: 1.5rem; align-items: flex-start; padding: clamp(2.5rem, 2rem + 3vw, 4.5rem) 0 2rem; }
.app-hero__icon { width: 112px; height: 112px; border-radius: 26px; }
.app-hero__icon span { font-size: 3rem; }
@media (max-width: 600px) { .app-hero { flex-direction: column; } .app-hero__icon { width: 80px; height: 80px; border-radius: 20px; } }

/* ---------- Work ---------- */
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: calc(var(--gap) * 1.25) var(--gap); margin-bottom: 1.5rem; }
.work-card__link { display: block; color: var(--ink); text-decoration: none; }
.work-card__media { aspect-ratio: 3 / 2; border-radius: var(--radius-m); overflow: hidden; background: var(--brand); margin-bottom: 0.9rem; }
.work-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.work-card__link:hover img { transform: scale(1.03); }
.work-card__placeholder { display: grid; place-items: center; height: 100%; padding: 1.5rem; text-align: center; color: var(--milk); font: 800 var(--step-2)/1.1 var(--f-display); }
.work-card__title { font-family: var(--f-display); font-size: var(--step-1); margin-bottom: 0.25rem; }
.work-card__link:hover .work-card__title { color: var(--brand); }
.work-card__meta { color: var(--ink-2); font-size: var(--step--1); margin-bottom: 0.25rem; }
.work-card__result { font-weight: 600; margin: 0; }

.filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }
.filter a { padding: 0.45rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); text-decoration: none; color: var(--ink); font-weight: 600; }
.filter a[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }

.facts { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; margin: 1.5rem 0; }
.facts dt { font-size: var(--step--1); color: var(--ink-2); }
.facts dd { margin: 0; font-weight: 700; }

/* ---------- Page ---------- */
.page-head { padding: clamp(2.5rem, 2rem + 3vw, 4.5rem) 0 2rem; }
.page-title { font-size: var(--step-4); font-weight: 800; max-width: 20ch; }
.page-lead { font-size: var(--step-1); color: var(--ink-2); max-width: 52ch; }
.feature-image { margin-bottom: 2rem; }
.feature-image img { border-radius: var(--radius-m); width: 100%; }
.site-main { min-height: 60vh; padding-bottom: var(--section); }
.home .site-main { padding-bottom: 0; }

.entry > * + * { margin-top: 1.1em; }
.entry h2 { font-size: var(--step-2); margin-top: 2em; }
.entry h3 { margin-top: 1.6em; }
.entry ul, .entry ol { padding-left: 1.25rem; }
.entry blockquote { margin: 1.5em 0; padding-left: 1.25rem; border-left: 4px solid var(--brand); font-size: var(--step-1); }

.post-row { padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.post-row h2 { font-size: var(--step-2); }
.post-row h2 a { color: var(--ink); text-decoration: none; }

.next-step { margin-top: 3rem; padding: 2rem; border-radius: var(--radius-m); background: var(--foam); }
.next-step h2 { font-size: var(--step-2); }

/* ---------- Dark band ---------- */
.section--board { background: var(--brand-deep); color: #fff; }
.section--board .section__title { color: #fff; }

/* ---------- Forms ---------- */
.quote-form { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
.slip { margin: 0; padding: 1.5rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); min-width: 0; }
.slip legend { padding: 0 0.5rem; margin-left: -0.5rem; font: 700 var(--step-1)/1.2 var(--f-display); color: var(--brand); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 600px) { .grid-2 { grid-template-columns: 1fr; } }
.field { display: grid; gap: 0.35rem; }
.field--full { grid-column: 1 / -1; margin-top: 1rem; }
.field > span { font-weight: 600; font-size: var(--step--1); }
.field input, .field select, .field textarea, .comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea, .comment-form select {
	width: 100%; min-height: 46px; padding: 0.65rem 0.8rem;
	border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--bg);
	font: inherit; color: var(--ink);
}
.field textarea, .comment-form textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .comment-form textarea:focus, .comment-form input:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px var(--foam); }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 0.6rem 1rem; border: 1.5px solid var(--line); border-radius: 999px; background: var(--bg); font-weight: 600; transition: background-color .15s ease, border-color .15s ease; }
.chip input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--chili); outline-offset: 2px; }

.consent { display: flex; gap: 0.7rem; align-items: flex-start; margin-top: 1.25rem; font-size: var(--step--1); }
.consent input { width: 20px; height: 20px; margin-top: 0.15rem; accent-color: var(--brand); flex: none; }

.notice { padding: 1.25rem 1.5rem; border-radius: var(--radius-m); margin: 1.5rem 0; }
.notice h2 { font-size: var(--step-2); }
.notice p:last-child { margin: 0; }
.notice--ok { background: var(--foam); border-left: 6px solid var(--brand); }
.notice--error { background: #FDE6E8; border-left: 6px solid var(--chili); }

/* ---------- Share ---------- */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin: 2.5rem 0; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.share__label { font-weight: 700; }
.share ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; }
.share a, .share button { display: inline-block; padding: 0.45rem 0.9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: 600 var(--step--1)/1.2 var(--f-body); text-decoration: none; cursor: pointer; }
.share a:hover, .share button:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- Feedback / comments ---------- */
.comments { margin-top: 2rem; }
.comments__title { font-size: var(--step-2); }
.comment-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.comment-list .comment { padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.comment-list .children { list-style: none; padding-left: 1.5rem; border-left: 2px solid var(--foam); }
.comment-meta { display: flex; gap: 0.6rem; align-items: center; font-size: var(--step--1); }
.comment-author .avatar { border-radius: 50%; float: left; margin-right: 0.6rem; }
.comment-author .says { display: none; }
.comment-metadata a { color: var(--ink-2); }
.feedback-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.5rem 0; }
.stars-static { color: #C98A00; letter-spacing: 0.08em; }
.stars-static .off { color: var(--line); }
.tag { display: inline-block; padding: 0.1rem 0.55rem; border-radius: 999px; font-size: var(--step--1); font-weight: 700; background: var(--foam); color: var(--brand-deep); }
.tag--bug { background: #FDE6E8; color: #8E1420; }
.tag--idea { background: #FDF0CF; color: #6B4B00; }

.comment-respond { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 1.5rem; }
.comment-reply-title { font-size: var(--step-2); }
.comment-form p { margin-bottom: 1rem; }
.comment-form label { display: block; font-weight: 600; font-size: var(--step--1); margin-bottom: 0.3rem; }
.comment-form .form-submit input, .comment-form input[type="submit"] { min-height: 48px; padding: 0.7rem 1.4rem; border: 0; border-radius: 999px; background: var(--chili); color: #fff; font: 600 var(--step-0)/1 var(--f-body); cursor: pointer; }
.comment-form-cookies-consent { display: flex; gap: 0.5rem; align-items: flex-start; }
.comment-form-cookies-consent label { font-weight: 400; }

.rating-field { border: 0; padding: 0; margin: 0 0 1rem; }
.rating-field legend { font-weight: 600; font-size: var(--step--1); margin-bottom: 0.3rem; padding: 0; }
.stars { display: inline-flex; flex-direction: row-reverse; gap: 0.15rem; }
.stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars label { font-size: 2rem; line-height: 1; color: var(--line); cursor: pointer; margin: 0; padding: 0 0.1rem; }
.stars label:hover, .stars label:hover ~ label, .stars input:checked ~ label { color: #C98A00; }
.stars input:focus-visible + label { outline: 3px solid var(--chili); outline-offset: 2px; border-radius: 4px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-deep); color: rgba(255, 255, 255, 0.86); padding: var(--section) 0 1.5rem; }
.site-footer a { color: #fff; }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2rem; }
.site-footer__name { font: 800 var(--step-2)/1.1 var(--f-display); color: #fff; }
.site-footer__brand p { max-width: 36ch; }
.site-footer__heading { font: 700 var(--step-0)/1.2 var(--f-body); color: var(--milk); margin-bottom: 0.75rem; }
.site-footer .muted { color: rgba(255, 255, 255, 0.65); font-size: var(--step--1); }
.site-footer__legal { margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.15); font-size: var(--step--1); }
@media (max-width: 860px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* ---------- WhatsApp float ---------- */
.wa-float {
	position: fixed; right: 1rem; bottom: 1rem; z-index: 60;
	display: inline-flex; align-items: center; gap: 0.5rem;
	padding: 0.7rem 1.1rem 0.7rem 0.8rem; border-radius: 999px;
	background: #1F8F4E; color: #fff; font-weight: 700; text-decoration: none;
	box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.45);
}
.wa-float:hover { background: #17733E; color: #fff; }
@media (max-width: 520px) { .wa-float span { display: none; } .wa-float { padding: 0.8rem; } }

/* ---------- Pagination ---------- */
.nav-links { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 2rem; }
.page-numbers { padding: 0.5rem 0.9rem; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--paper); text-decoration: none; }
.page-numbers.current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Core blocks ---------- */
.wp-block-button__link { border-radius: 999px; background: var(--chili); }
.alignwide { width: min(1160px, 100vw - 2rem); margin-inline: calc(50% - min(580px, 50vw - 1rem)); }
.alignfull { width: 100vw; margin-inline: calc(50% - 50vw); }
.wp-caption-text, figcaption { font-size: var(--step--1); color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Fixes after visual review */
.site-footer .btn--light, .section--board .btn--light { color: var(--brand-deep); }


/* ---------- Playground ---------- */
.play-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: calc(var(--gap) * 1.25) var(--gap); margin-bottom: 1.5rem; }
.play-card__link { display: block; color: var(--ink); text-decoration: none; }
.play-card__media { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-m); overflow: hidden; background: var(--ink); margin-bottom: 0.9rem; }
.play-card__media img { width: 100%; height: 100%; object-fit: cover; }
.play-card__placeholder { display: grid; place-content: center; gap: 0.5rem; height: 100%; padding: 1.5rem; text-align: center; color: var(--milk); font: 800 var(--step-1)/1.15 var(--f-display);
	background: radial-gradient(circle at 20% 20%, rgba(246, 217, 174, 0.16) 0 2px, transparent 3px) 0 0 / 18px 18px, var(--brand-deep); }
.play-card__glyph { font-size: 2.5rem; line-height: 1; opacity: 0.6; }
.play-card__play { position: absolute; right: 0.9rem; bottom: 0.9rem; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--chili); color: #fff; font-size: 1.1rem; padding-left: 3px; transition: transform .15s ease; }
.play-card__link:hover .play-card__play { transform: scale(1.08); }
.play-card__title { font-family: var(--f-display); font-size: var(--step-1); margin-bottom: 0.25rem; }
.play-card__link:hover .play-card__title { color: var(--brand); }
.play-card__text { color: var(--ink-2); margin-bottom: 0.5rem; }

.play-head { padding: clamp(2rem, 1.5rem + 2vw, 3.5rem) 0 1.5rem; }
.crumb { margin-bottom: 0.5rem; font-weight: 600; }
.test-note { margin-top: 1rem; padding: 0.75rem 1rem; border-radius: var(--radius-s); background: #FDF0CF; color: #5A3E00; max-width: 60ch; }
.admin-hint { font-size: var(--step--1); color: var(--ink-2); }

.play-stage { margin-bottom: 2rem; }
.play-frame { position: relative; margin-inline: auto; background: var(--ink); border-radius: var(--radius-m); overflow: hidden; box-shadow: 0 0 0 6px var(--ink), 0 24px 48px -24px rgba(61, 32, 12, 0.6); }
.play-frame iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.play-stage--landscape .play-frame { aspect-ratio: 16 / 9; max-height: 82vh; }
.play-stage--portrait .play-frame { aspect-ratio: 9 / 16; height: min(82vh, 820px); max-width: 100%; }
.play-stage--tall .play-frame { height: 85vh; }
.play-frame:fullscreen { border-radius: 0; box-shadow: none; max-height: none; width: 100vw; height: 100vh; aspect-ratio: auto; }
.play-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin-top: 1.25rem; }
@media (max-width: 600px) {
	.play-stage--portrait .play-frame { height: 78vh; width: 100%; aspect-ratio: auto; }
	.play-stage--landscape .play-frame { aspect-ratio: 4 / 3; }
}
/* Fallback "fullscreen" for iPhone Safari */
.play-maximised { overflow: hidden; }
.play-frame.is-maximised { position: fixed; inset: 0; z-index: 1000; width: 100vw; height: 100dvh; max-height: none; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
.play-close { display: none; }
.is-maximised .play-close { display: block; position: absolute; top: max(0.75rem, env(safe-area-inset-top)); right: 0.75rem; z-index: 2; padding: 0.5rem 1rem; border: 0; border-radius: 999px; background: rgba(22, 32, 28, 0.85); color: #fff; font: 600 var(--step--1)/1 var(--f-body); }
.play-maximised .wa-float { display: none; }

/* ---------- The pull: a cup pouring into the order chit ---------- */
.chit-wrap { position: relative; padding-top: 96px; }
.pull { position: absolute; top: 0; left: -8%; width: min(260px, 70%); height: auto; overflow: visible; }
.pull__stream { stroke-dasharray: 260; stroke-dashoffset: 0; }
@media (prefers-reduced-motion: no-preference) {
	.pull__stream { stroke-dashoffset: 260; animation: pour 1s cubic-bezier(.5, 0, .3, 1) .9s forwards; }
	@keyframes pour { to { stroke-dashoffset: 0; } }
}
@media (max-width: 900px) { .chit-wrap { max-width: 440px; } .pull { left: 0; } }

/* ==========================================================
   Think tank pieces: ideas board, votes, stove track, list
   ========================================================== */

/* Chit lines can be links now */
.chit__lines li a { color: var(--ink); text-decoration: none; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chit__lines li a:hover { color: var(--brand); text-decoration: underline; }

/* Vote button */
.vote { margin: 0; flex: none; }
.vote__btn {
	display: grid; place-items: center; gap: 0.1rem; width: 58px; min-height: 64px; padding: 0.4rem;
	border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--paper); color: var(--ink);
	font: 700 var(--step-0)/1 var(--f-body); cursor: pointer; transition: border-color .15s ease, background-color .15s ease;
}
.vote__btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.vote__arrow { font-size: 0.9rem; color: var(--tea); }
.vote__btn.is-voted { background: var(--brand); border-color: var(--brand); color: #fff; cursor: default; }
.vote__btn.is-voted .vote__arrow { color: var(--milk); }

/* Idea rows */
.idea-list { display: grid; gap: 0.75rem; }
.idea { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); }
.idea__body { min-width: 0; }
.idea__title { font-size: var(--step-1); margin-bottom: 0.25rem; }
.idea__title a { color: var(--ink); text-decoration: none; }
.idea__title a:hover { color: var(--brand); text-decoration: underline; }
.idea__text { color: var(--ink-2); margin-bottom: 0.5rem; }
.idea__meta { display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; align-items: center; margin: 0; font-size: var(--step--1); color: var(--ink-2); }

/* Stage pills: colour follows the tea as it gets pulled */
.stage { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px; font-weight: 700; font-size: var(--step--1); }
.stage--fresh { background: #EFE7DC; color: #4F3B2A; }
.stage--brewing { background: #F6D9AE; color: #5B3410; }
.stage--pulling { background: var(--tea); color: #fff; }
.stage--served { background: var(--tile); color: #fff; }
.stage--shelf { background: #E5E5E5; color: #444; }

/* Board layout */
.board { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--gap); align-items: start; }
.board__side { position: sticky; top: 90px; }
@media (max-width: 900px) { .board { grid-template-columns: 1fr; } .board__side { position: static; } }
.slip__title { font-size: var(--step-2); margin-bottom: 0.25rem; }
.slip__lead { color: var(--ink-2); font-size: var(--step--1); }
.idea-form .field--full:first-of-type { margin-top: 0.5rem; }
.idea-form .btn { margin-top: 1rem; width: 100%; }

.board-teaser { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: calc(var(--gap) * 1.5); align-items: start; }
.board-teaser__intro p { color: var(--ink-2); max-width: 40ch; }
@media (max-width: 900px) { .board-teaser { grid-template-columns: 1fr; } }

/* Single idea */
.idea-single__head { display: flex; gap: 1.25rem; align-items: flex-start; }
.idea-single__head .page-title { font-size: var(--step-3); margin-bottom: 0.5rem; }
.track { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; }
.track li { padding: 0.75rem; border-top: 4px solid var(--line); color: var(--ink-2); font-size: var(--step--1); }
.track li strong { display: block; color: var(--ink-2); font-size: var(--step-0); }
.track li.is-done { border-color: var(--tea); }
.track li.is-now { border-color: var(--brand); background: var(--foam); border-radius: 0 0 var(--radius-s) var(--radius-s); }
.track li.is-now strong { color: var(--brand); }
@media (max-width: 560px) { .track { grid-template-columns: 1fr 1fr; } }
.stage-note { padding: 0.75rem 1rem; background: #EEE; border-radius: var(--radius-s); }

/* Build log */
.log-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--gap); margin-bottom: 2rem; }
.log-card__link { display: block; height: 100%; padding: 1.25rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); color: var(--ink); text-decoration: none; }
.log-card__link:hover { border-color: var(--brand); color: var(--ink); }
.log-card__media { margin: -1.25rem -1.25rem 1rem; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius-m) var(--radius-m) 0 0; }
.log-card__media img { width: 100%; height: 100%; object-fit: cover; }
.log-card__date { font-size: var(--step--1); color: var(--tea); font-weight: 700; margin-bottom: 0.4rem; }
.log-card__title { font-family: var(--f-display); font-size: var(--step-1); }
.log-card__text { color: var(--ink-2); margin: 0; }
.log-join { margin-top: 3rem; padding: 1.5rem; background: var(--foam); border-radius: var(--radius-m); }
.log-join h2 { font-size: var(--step-2); }

/* Join form */
.join-form__row { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 0.75rem; align-items: end; }
.join-form__row .btn { min-height: 46px; }
@media (max-width: 700px) { .join-form__row { grid-template-columns: 1fr; } }
.check { display: flex; gap: 0.6rem; align-items: flex-start; margin-top: 1rem; font-weight: 600; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; margin-top: 0.15rem; }
.join-form .consent { margin-top: 0.6rem; }
.join-band__inner { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: calc(var(--gap) * 1.5); align-items: center; }
.join-band p { color: var(--milk); max-width: 44ch; }
.join-band .field > span, .join-band .check, .join-band .consent { color: #fff; }
.join-band .consent a { color: var(--milk); }
.join-band .field input { background: #fff; border-color: transparent; }
@media (max-width: 900px) { .join-band__inner { grid-template-columns: 1fr; } }

/* Let's build together form */
.build-form { display: grid; gap: 1rem; margin-top: 1.5rem; }
.topic-pick { border: 0; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.topic-pick legend { font: 700 var(--step-1)/1.2 var(--f-display); color: var(--brand); margin-bottom: 0.75rem; padding: 0; }
.radio-row { display: flex; gap: 0.7rem; align-items: center; padding: 0.7rem 0.9rem; border: 1.5px solid var(--line); border-radius: var(--radius-s); cursor: pointer; }
.radio-row input { accent-color: var(--brand); width: 18px; height: 18px; }
.radio-row:has(input:checked) { border-color: var(--brand); background: var(--foam); }
.build-form .btn { justify-self: start; }

.support-link { display: inline-block; margin-left: 0.75rem; font-weight: 600; }
.site-footer__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }

/* Keep long idea titles on the slip from widening the page on phones */
.hero__grid > * { min-width: 0; }
.chit__lines li a { min-width: 0; flex: 1 1 auto; }
.chit__lines li span:last-child { flex: none; }

/* Closing band: lighter so it does not merge with the dark join band */
.cta-band { background: var(--foam); color: var(--ink); }
.cta-band .btn--ghost { border-color: var(--ink); color: var(--ink); }
.cta-band .btn--ghost:hover { background: var(--ink); color: #fff; }

/* Projects */
.project-card__link { display: block; color: var(--ink); text-decoration: none; }
.project-card__media { position: relative; aspect-ratio: 3 / 2; border-radius: var(--radius-m); overflow: hidden; background: var(--brand); margin-bottom: 0.9rem; }
.project-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.project-card__link:hover img { transform: scale(1.03); }
.project-card__placeholder { display: grid; place-content: center; gap: 0.6rem; height: 100%; padding: 1.5rem; text-align: center; color: var(--milk); font: 800 var(--step-1)/1.15 var(--f-display);
	background: repeating-linear-gradient(135deg, rgba(246, 217, 174, 0.06) 0 10px, transparent 10px 20px), var(--brand); }
.project-card__kind { justify-self: center; padding: 0.2rem 0.7rem; border: 1px solid rgba(246, 217, 174, 0.5); border-radius: 999px; font: 600 var(--step--1)/1.2 var(--f-body); }
.project-card:nth-child(3n+2) .project-card__media { background-color: var(--brand-deep); }
.project-card:nth-child(3n+2) .project-card__placeholder { background: repeating-linear-gradient(135deg, rgba(246, 217, 174, 0.06) 0 10px, transparent 10px 20px), var(--brand-deep); }
.project-card:nth-child(3n+3) .project-card__placeholder { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0 10px, transparent 10px 20px), var(--tile); }
.project-card__title { font-family: var(--f-display); font-size: var(--step-1); margin-bottom: 0.25rem; }
.project-card__link:hover .project-card__title { color: var(--brand); }
.project-card__text { color: var(--ink-2); margin-bottom: 0.5rem; }
.pill--inuse, .pill--live { background: #DCEFE6; color: #0F5A46; }
.pill--progress { background: #FDE7C8; color: #6A3E0A; }
.pill--prototype { background: #EFE7DC; color: #4F3B2A; }
.pill--retired { background: #E8E8E8; color: #3C3C3C; }
/* Six menu items: tighten spacing before the mobile menu kicks in */
@media (max-width: 1080px) { .site-nav a { padding: 0.55rem 0.6rem; } }

/* Playground device preview */
.play-devices { display: flex; justify-content: center; gap: 0.4rem; margin-bottom: 1rem; }
.play-devices button { padding: 0.45rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: 600 var(--step--1)/1.2 var(--f-body); cursor: pointer; }
.play-devices button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.play-stage[data-device="phone"] .play-frame { aspect-ratio: auto; width: 390px; max-width: 100%; height: min(82vh, 780px); border-radius: 34px; box-shadow: 0 0 0 10px var(--ink), 0 24px 48px -24px rgba(61, 32, 12, 0.6); }
.play-stage[data-device="tablet"] .play-frame { aspect-ratio: auto; width: 820px; max-width: 100%; height: min(82vh, 900px); border-radius: 22px; box-shadow: 0 0 0 12px var(--ink), 0 24px 48px -24px rgba(61, 32, 12, 0.6); }
.play-stage[data-device="desktop"] .play-frame { width: 100%; }
.play-stage[data-device="desktop"].play-stage--portrait .play-frame { aspect-ratio: 16 / 10; height: auto; }
@media (max-width: 600px) { .play-devices { display: none; } .play-stage .play-frame { width: 100% !important; } }
.pill--play-private { background: #E8E1F5; color: #4B2C83; }
.pill--play-testing { background: #FDE7C8; color: #6A3E0A; }
.pill--play-launched { background: #DCEFE6; color: #0F5A46; }
.test-note--private { background: #EEE8F8; color: #3B2268; }
.try-link { font-weight: 700; color: var(--chili); }
