/* Budget Packaging site styles. Tokens and components from docs/design-brief.md and docs/ui-patterns.md.
   Mobile first (360 px). Fonts are self-hosted (docs/decisions/0003). */

@font-face {
	font-family: "Quicksand";
	src: url("/fonts/quicksand-latin-wght.woff2") format("woff2");
	font-weight: 300 700;
	font-display: swap;
}

:root {
	--red: #c20051;
	--red-dark: #9c0041;
	--yellow: #ffc801;
	--ink: #1f1a17;
	--muted: #5c5650;
	--cream: #fff7d9;
	--line: #e9e2d4;
	--surface: #faf8f4;
	--font-display: "Quicksand", system-ui, sans-serif;
	--font-body: "Quicksand", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--radius-pill: 999px;
	--radius-card: 12px;
	--shadow-card: 0 1px 2px rgb(31 26 23 / 0.06), 0 4px 12px rgb(31 26 23 / 0.06);
	--green: #15803d;
	--white: #ffffff;
	--gutter: 16px;
	--max: 1120px;
	--radius: 8px;
	font-family: var(--font-body);
	font-weight: 500;
	font-size: 16px;
	line-height: 1.5;
	color: var(--ink);
	background: var(--white);
}

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

body {
	margin: 0;
	background: var(--white);
	overflow-wrap: break-word;
}

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

h1,
h2,
h3 {
	font-family: var(--font-display);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.005em;
	margin: 0 0 12px;
}
h1 { font-size: 26px; }
h2 { font-size: 21px; }
h3 { font-size: 18px; }
strong, b, th, dt, label, legend { font-weight: 700; }
p { margin: 0 0 12px; }

a { color: var(--red-dark); }
a:hover { color: var(--ink); }

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

.wrap {
	max-width: var(--max);
	margin: 0 auto;
	padding: 0 var(--gutter);
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	left: 8px;
	top: -48px;
	background: var(--ink);
	color: var(--white);
	padding: 8px 12px;
	z-index: 20;
}
.skip-link:focus { top: 8px; }

/* Banner and header */

.banner {
	background: var(--yellow);
	color: var(--ink);
	padding: 8px 0;
	font-size: 15px;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 10;
	background: var(--yellow);
	box-shadow: 0 1px 0 rgb(31 26 23 / 0.08);
}

.site-header > .wrap {
	display: flex;
	align-items: center;
	gap: 4px;
	min-height: 64px;
	padding-top: 8px;
	padding-bottom: 8px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--ink);
	text-decoration: none;
	font-weight: 700;
	font-size: 17px;
	margin-right: auto;
	min-height: 44px;
}
.brand img { height: 32px; width: auto; }

.icon-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-width: 44px;
	min-height: 44px;
	color: var(--ink);
	text-decoration: none;
	position: relative;
}
.icon-link { border-radius: var(--radius-pill); }
.icon-link:hover { background: rgb(255 255 255 / 0.55); color: var(--ink); }
.icon-link svg { width: 24px; height: 24px; }

.count {
	position: absolute;
	top: 2px;
	right: 0;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 10px;
	background: var(--red);
	color: var(--white);
	font-size: 12px;
	font-weight: 700;
	line-height: 20px;
	text-align: center;
}

/* Category menu (SF-02): a details element, so it opens without JavaScript */

.menu summary {
	list-style: none;
	cursor: pointer;
}
.menu summary::-webkit-details-marker { display: none; }
.menu-label { display: none; }
.menu[open] summary { background: var(--white); border-radius: var(--radius-pill); }
.menu-panel {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	background: var(--white);
	border-radius: 0 0 var(--radius-card) var(--radius-card);
	box-shadow: 0 12px 24px rgb(31 26 23 / 0.14);
	padding: 8px 0 12px;
}
.menu-links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0 16px;
}
.menu-links a {
	display: flex;
	align-items: center;
	min-height: 44px;
	color: var(--ink);
	font-weight: 700;
	text-decoration: none;
	border-bottom: 1px solid var(--line);
}
.menu-links a:hover { color: var(--red-dark); }

/* Buttons and forms */

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 20px;
	border: 2px solid var(--red);
	border-radius: var(--radius-pill);
	background: var(--red);
	color: var(--white);
	font: inherit;
	font-weight: 700;
	letter-spacing: 0.01em;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.button:active { transform: translateY(1px); }
.button:hover,
.button:active { background: var(--red-dark); border-color: var(--red-dark); color: var(--white); }
.button-secondary { background: var(--white); color: var(--red-dark); }
.button-secondary:hover { background: var(--cream); color: var(--red-dark); }
.button-block { width: 100%; }

.field { margin: 0 0 16px; }
.field label { display: block; font-weight: 700; margin-bottom: 4px; }
.field .help { display: block; color: var(--muted); font-size: 15px; margin-bottom: 4px; }
.field input,
.field select,
.field textarea {
	display: block;
	width: 100%;
	min-height: 44px;
	padding: 8px 12px;
	border: 1.5px solid var(--muted);
	border-radius: var(--radius-card);
	font: inherit;
	color: var(--ink);
	background: var(--white);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgb(194 0 81 / 0.25); }
.field textarea { min-height: 96px; resize: vertical; }
.field .optional { font-weight: 400; color: var(--muted); }
.field-error { color: var(--red-dark); font-size: 15px; margin-top: 4px; }
.field-error::before { content: "! "; font-weight: 700; }
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border: 2px solid var(--red-dark); }

/* Request form (design brief §6): groups, radio cards, consent, error summary, honeypot */

.form-group {
	border: 0;
	margin: 0 0 24px;
	padding: 0;
	min-width: 0;
}
.form-group > legend {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.25;
	padding: 0;
	margin-bottom: 12px;
}
.choice-legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.radio-cards { display: grid; gap: 8px; margin-bottom: 16px; }
.radio-card {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	min-height: 44px;
	padding: 12px;
	border: 2px solid var(--line);
	border-radius: var(--radius);
	cursor: pointer;
}
.radio-card:has(input:checked) { border-color: var(--red); background: var(--cream); }
.radio-card input,
.checkbox input {
	flex: none;
	width: 24px;
	height: 24px;
	margin: 0;
	accent-color: var(--red);
}
.radio-card .title { display: block; font-weight: 700; }
.radio-card .hint { display: block; color: var(--muted); font-size: 15px; }
.checkbox {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	min-height: 44px;
	cursor: pointer;
}
.error-summary {
	border: 2px solid var(--red-dark);
	border-radius: var(--radius);
	padding: 12px 16px;
	margin: 0 0 24px;
}
.error-summary h2 { font-size: 18px; color: var(--red-dark); }
.error-summary ul { margin: 0; padding-left: 20px; }
.error-summary a { display: inline-block; min-height: 24px; padding: 2px 0; }
/* Honeypot: off-screen for people, still filled in by simple bots. */
.hp {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.button[disabled] { opacity: 0.6; cursor: wait; }

/* Order summary on the request form (a details element) and the confirmation page */
details.form-group > summary {
	display: flex;
	align-items: center;
	min-height: 44px;
	font-weight: 700;
	cursor: pointer;
}
.summary-lines {
	list-style: none;
	margin: 8px 0 12px;
	padding: 0;
	font-size: 15px;
	font-variant-numeric: tabular-nums;
}
.summary-lines li {
	padding: 8px 0;
	border-bottom: 1px solid var(--line);
}

.alert {
	border-left: 4px solid var(--red-dark);
	background: var(--cream);
	padding: 12px;
	margin: 0 0 16px;
}
.alert-ok { border-left-color: var(--green); }

.search-form {
	display: flex;
	gap: 8px;
}
.search-form input {
	flex: 1;
	min-width: 0;
	min-height: 44px;
	padding: 8px 18px;
	border: 1.5px solid var(--muted);
	border-radius: var(--radius-pill);
	background: var(--white);
	font: inherit;
}
.search-form input:focus-visible { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgb(194 0 81 / 0.25); }
.header-search input { border-color: var(--ink); }
.header-search input,
.header-search .button { height: 44px; min-height: 44px; padding-top: 0; padding-bottom: 0; }
.search-form.header-search { display: none; }

/* Sections */

main { display: block; }
.section { padding: 24px 0; }
.section-alt { background: var(--cream); }
.hero { padding: 32px 0 24px; }
.hero h1 { font-size: 26px; }
.hero p { color: var(--muted); }
.lead { font-size: 18px; color: var(--ink); }

/* Category tiles and product cards */

.grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.tile,
.card {
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius-card);
	padding: 8px;
	transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
@media (hover: hover) {
	.tile:hover,
	.card:hover {
		border-color: var(--red);
		box-shadow: var(--shadow-card);
		transform: translateY(-2px);
	}
}
.tile a {
	display: block;
	color: var(--ink);
	text-decoration: none;
	font-family: var(--font-display);
	font-size: 17px;
	font-weight: 700;
}
.tile img,
.card img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	background: var(--surface);
	border-radius: var(--radius-card);
	padding: 12px;
	margin-bottom: 8px;
}
.tile .meta { display: block; font-family: var(--font-body); font-weight: 500; color: var(--muted); font-size: 14px; }

.card a {
	display: block;
	color: var(--ink);
	text-decoration: none;
}
.card .name {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 3em;
	margin-bottom: 4px;
}
.price {
	font-size: 18px;
	font-weight: 700;
	color: var(--ink);
	font-variant-numeric: tabular-nums;
}
.price .per { font-size: 14px; font-weight: 400; color: var(--muted); }
.code { color: var(--muted); font-size: 13px; }

/* Category and search pages */

.breadcrumbs ol {
	list-style: none;
	margin: 0 0 8px;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0 8px;
	font-size: 15px;
	color: var(--muted);
}
.breadcrumbs li + li::before { content: "/"; margin-right: 8px; }
.breadcrumbs a { display: inline-block; min-height: 24px; padding: 2px 0; }

.page-head { padding: 16px 0 12px; }
.page-head h1 { margin-bottom: 4px; }
.page-head .meta { color: var(--muted); margin: 0; }
.page-head .search-form { margin-top: 12px; }
.page-body { padding-bottom: 32px; }

.empty-state { padding: 8px 0 16px; }
.category-links {
	list-style: none;
	margin: 12px 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.category-links a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 8px 14px;
	border: 1.5px solid var(--line);
	border-radius: var(--radius-pill);
	color: var(--ink);
	font-weight: 700;
	text-decoration: none;
	transition: border-color 0.15s, color 0.15s;
}
.category-links a:hover { border-color: var(--red); color: var(--red); }

/* Product page (design brief §6) */

.product { padding: 16px 0 32px; display: grid; gap: 16px; }
.product-photo img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	background: var(--surface);
	border-radius: var(--radius-card);
	padding: 12px;
}
.product-info h1 { margin-bottom: 8px; }
.price-block { margin: 0 0 12px; }
.price-block .price { font-size: 24px; display: block; }
.price-block .price .per { font-size: 16px; }
.note {
	background: var(--cream);
	border-left: 4px solid var(--yellow);
	padding: 12px;
	margin: 0 0 16px;
	font-size: 15px;
}
.details { margin: 0 0 16px; }
.details dt { font-weight: 700; }
.details dd { margin: 0 0 8px; font-variant-numeric: tabular-nums; }
.specs {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 16px;
	font-size: 15px;
}
.specs th,
.specs td {
	text-align: left;
	vertical-align: top;
	padding: 8px 8px 8px 0;
	border-bottom: 1px solid var(--line);
}
.specs th { font-weight: 700; width: 45%; }
.fits-with { padding: 8px 0 32px; }

/* How ordering works */

.steps {
	list-style: none;
	counter-reset: step;
	margin: 0 0 12px;
	padding: 0;
	display: grid;
	gap: 12px;
}
.steps li {
	counter-increment: step;
	display: flex;
	gap: 12px;
	align-items: flex-start;
}
.steps li::before {
	content: counter(step);
	flex: none;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--yellow);
	color: var(--ink);
	font-weight: 700;
	text-align: center;
	line-height: 32px;
}

/* Contact strip and footer */

.contact-strip .buttons {
	display: grid;
	gap: 8px;
}

.site-footer {
	background: var(--ink);
	border-top: 4px solid var(--yellow);
	padding: 24px 0 32px;
	color: var(--white);
	font-size: 15px;
}
.site-footer img { width: 240px; height: auto; margin-bottom: 12px; }
.site-footer a { color: var(--yellow); }
.footer-links {
	list-style: none;
	padding: 0;
	margin: 12px 0;
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
}
.footer-links a { display: inline-block; min-height: 24px; padding: 2px 0; }

/* Error pages */

.error-page { padding: 32px 0; }

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

/* Reduced motion: no transitions. */
@media (max-width: 359px) {
	.brand span {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}
}

@media (min-width: 600px) {
	:root { --gutter: 24px; }
	.menu-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
	.contact-strip .buttons { grid-template-columns: repeat(3, max-content); }
}

@media (min-width: 768px) {
	.product { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
	.menu-links { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
	.menu summary { padding: 0 8px; }
	.menu-label { display: inline; font-weight: 700; }
	.grid-products { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.grid-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.site-header > .wrap { gap: 12px; min-height: 76px; }
	.search-form.header-search { display: flex; width: 400px; }
	.search-toggle { display: none; }
	h1 { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; animation: none !important; }
}

@media print {
	.site-header,
	.site-footer,
	.banner,
	.contact-strip { display: none; }
}

/* Quote list (M3): stepper, add form, toast, quote rows and sticky bars. quote.js un-hides the stepper buttons. */

/* Specific enough to beat `.stepper .step { display: inline-flex }`, so the buttons stay hidden without JavaScript. */
.stepper .step[hidden],
.button[hidden] { display: none; }

.stepper {
	display: inline-flex;
	align-items: center;
	gap: 0;
	padding: 2px;
	border: 1.5px solid var(--muted);
	border-radius: var(--radius-pill);
	background: var(--white);
}
.stepper .qty {
	width: 64px;
	min-width: 0;
	height: 44px;
	padding: 0 4px;
	border: 0;
	border-radius: 0;
	font: inherit;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	text-align: center;
	color: var(--ink);
	background: transparent;
}
.stepper .step {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--ink);
	cursor: pointer;
	transition: background-color 0.15s;
}
.stepper .step:hover { background: var(--cream); }
.stepper .step:active { background: var(--yellow); }

.add-form {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

/* On a card (about 156 px wide at 360 px): the stepper fills the width, the Add button sits under it. */
.card .add-form {
	margin-top: 8px;
	flex-direction: column;
	align-items: stretch;
}
.card .stepper { display: flex; width: 100%; }
.card .stepper .qty { flex: 1 1 0; width: auto; }
.card .add-button { width: 100%; padding-left: 12px; padding-right: 12px; }

/* Sticky bars: white, a top border, below the header (10) and the toast (30). */
.sticky-bar {
	z-index: 5;
	background: var(--white);
	border-top: 0;
	box-shadow: 0 -6px 18px rgb(31 26 23 / 0.10);
}

/* Product page: the one add form is pinned to the bottom of the screen on phones, with the pack price on top. */
.add-form-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 8px var(--gutter) calc(8px + env(safe-area-inset-bottom));
}
.add-form-bar .bar-price {
	flex: 0 0 100%;
	margin: 0;
	font-weight: 700;
	color: var(--ink);
	font-variant-numeric: tabular-nums;
}
.bar-price .per { font-size: 14px; font-weight: 400; color: var(--muted); }
.add-form-bar .add-button { flex: 1 1 140px; min-width: 0; padding-left: 12px; padding-right: 12px; }
body:has(.add-form-bar) { padding-bottom: 128px; }

/* Toast: the live region is always on the page; the message inside it shows for 4 seconds. */
.toast {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 16px;
	z-index: 30;
	display: flex;
	justify-content: center;
	padding: 0 var(--gutter);
	pointer-events: none;
}
.toast p {
	margin: 0;
	max-width: 480px;
	padding: 12px 16px;
	border-radius: var(--radius-card);
	background: var(--ink);
	color: var(--white);
	box-shadow: 0 4px 16px rgb(31 26 23 / 0.3);
	pointer-events: auto;
	animation: toast-in 0.2s ease-out, toast-out 0.2s ease-in 4s forwards;
}
.toast a {
	display: inline-block;
	min-height: 24px;
	color: var(--white);
	font-weight: 700;
	text-decoration: underline;
}
body:has(.quote-bar) .toast,
body:has(.add-form-bar) .toast { bottom: 132px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes toast-out { to { opacity: 0; visibility: hidden; } }

/* Quote list rows and bar */
.quote-page { padding-bottom: 16px; }
.quote-rows { list-style: none; margin: 0; padding: 0; }
.quote-row {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr);
	gap: 12px;
	padding: 16px 0;
	border-bottom: 1px solid var(--line);
}
.quote-photo { display: block; }
.quote-photo img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	background: var(--surface);
	border-radius: var(--radius-card);
}
.quote-name {
	display: inline-block;
	min-height: 24px;
	color: var(--ink);
	font-weight: 700;
	text-decoration: none;
}
.quote-name:hover { color: var(--red-dark); text-decoration: underline; }
.quote-body .price,
.quote-body .code { margin: 0; }
.quote-body .price { font-size: 16px; }
.quote-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 12px;
	margin-top: 8px;
}
.update-form { display: flex; align-items: center; gap: 8px; }
.update-button { padding: 8px 12px; }
.line-total { margin: 0; font-variant-numeric: tabular-nums; }
.line-total strong { font-size: 18px; }
.link-button {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 4px;
	border: 0;
	background: none;
	color: var(--red-dark);
	font: inherit;
	text-decoration: underline;
	cursor: pointer;
}
.link-button:hover { color: var(--ink); }
.quote-page .note { margin-top: 16px; }

.quote-bar {
	position: sticky;
	bottom: 0;
	padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
}
.quote-bar .bar-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
.quote-bar .subtotal {
	flex: 1 1 auto;
	margin: 0;
	font-size: 18px;
	font-variant-numeric: tabular-nums;
}
.quote-bar .button { flex: 1 1 200px; }

@media (min-width: 600px) {
	.quote-row { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; }
	.quote-page .quote-rows,
	.quote-page .note { max-width: 720px; }
}

/* From 768 px the product page form is a normal block next to the photo. */
@media (min-width: 768px) {
	.add-form-bar {
		position: static;
		margin: 0 0 16px;
		padding: 0;
		border: 0;
		box-shadow: none;
		background: none;
	}
	.add-form-bar .bar-price { display: none; }
	.add-form-bar .add-button { flex: 0 1 auto; padding-left: 20px; padding-right: 20px; }
	body:has(.add-form-bar) { padding-bottom: 0; }
	body:has(.add-form-bar) .toast { bottom: 16px; }
}

/* Reduced motion: the toast still goes away after 4 seconds, without fading. */
@media (prefers-reduced-motion: reduce) {
	.toast p { animation: toast-out 0.01s linear 4s forwards !important; }
}

@media print {
	.toast,
	.sticky-bar,
	.add-form { display: none; }
}

/* Quotation page (/q/:token) and the confirmation buttons */

.quotation-actions { display: grid; gap: 8px; margin: 16px 0 24px; }
.quotation-head img { display: block; max-width: 100%; height: auto; margin: 16px 0 8px; }
.quotation-business { margin: 0 0 16px; }
.quotation-title { margin-bottom: 4px; }
.quotation-info { margin: 0 0 16px; font-weight: 700; }
.quotation-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.quotation-app-note { margin: 0; padding: 10px 12px; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius-card); }
.copy-status { flex-basis: 100%; margin: 0; min-height: 1.5em; color: var(--muted); }

/* Small screens: each row is a block, with the column name before each value. */
.quotation-table { display: block; width: 100%; margin: 0 0 16px; border-collapse: collapse; }
.quotation-table caption { display: block; text-align: left; font-weight: 700; margin-bottom: 8px; }
.quotation-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.quotation-table tbody { display: block; }
.quotation-table tr { display: block; margin-bottom: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-card); break-inside: avoid; }
.quotation-table th[scope="row"] { display: block; padding: 0 0 6px; text-align: left; font-weight: 700; }
.quotation-table td { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; text-align: right; font-variant-numeric: tabular-nums; }
.quotation-table td::before { content: attr(data-label); flex: none; color: var(--muted); text-align: left; }

.quotation-totals { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; margin: 0 0 24px; padding: 12px; background: var(--cream); border-radius: var(--radius-card); font-variant-numeric: tabular-nums; }
.quotation-totals dt { font-weight: 700; }
.quotation-totals dd { margin: 0; text-align: right; }
.quotation-totals .total { padding-top: 8px; border-top: 2px solid var(--ink); font-size: 18px; }
.quotation-note { white-space: pre-line; }

@media (min-width: 640px) {
	.quotation-actions { grid-template-columns: repeat(3, max-content); }
	.quotation-table { display: table; }
	.quotation-table caption { display: table-caption; }
	.quotation-table thead { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
	.quotation-table tbody { display: table-row-group; }
	.quotation-table tr { display: table-row; margin: 0; padding: 0; border: 0; }
	.quotation-table th,
	.quotation-table td { display: table-cell; padding: 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
	.quotation-table thead th { border-bottom: 2px solid var(--ink); }
	.quotation-table th[scope="row"] { padding: 8px; }
	.quotation-table td::before { content: none; }
	.quotation-table td:nth-child(n+3) { text-align: right; }
	.quotation-table thead th:nth-child(n+3) { text-align: right; }
	.quotation-totals { max-width: 420px; margin-left: auto; }
}

@media print {
	@page { margin: 15mm; }
	.banner,
	.site-header,
	.skip-link,
	.contact-strip,
	.footer-links,
	.site-footer,
	.screen-only { display: none !important; }
	:root { font-size: 12pt; }
	body,
	main { background: #fff; color: #000; }
	a { color: #000; text-decoration: none; }
	.wrap { max-width: none; padding: 0; }
	h1, h2 { color: #000; break-after: avoid; }
	.quotation-table { display: table; width: 100%; border: 1px solid #000; }
	.quotation-table caption { display: table-caption; }
	.quotation-table thead { position: static; width: auto; height: auto; overflow: visible; clip-path: none; display: table-header-group; }
	.quotation-table tbody { display: table-row-group; }
	.quotation-table tr { display: table-row; margin: 0; padding: 0; border: 0; break-inside: avoid; page-break-inside: avoid; }
	.quotation-table th,
	.quotation-table td { display: table-cell; padding: 6px; border: 1px solid #000; text-align: left; vertical-align: top; }
	.quotation-table th[scope="row"] { font-weight: 400; }
	.quotation-table td::before { content: none; }
	.quotation-table td:nth-child(n+3) { text-align: right; }
	.quotation-totals { background: none; border: 1px solid #000; max-width: 80mm; margin-left: auto; break-inside: avoid; }
	.quotation-totals .total { border-top: 1px solid #000; }
	.quotation-head img { margin-top: 0; }
	.details dd,
	.quotation-info { color: #000; }
}

/* Content pages: a single column of text (design brief §6) */
.prose { max-width: 680px; }
.prose h2 { margin-top: 24px; }
.prose ul { padding-left: 20px; }
.prose li + li { margin-top: 4px; }
