/* ==========================================================================
   Threedoo design system, "Spool wall"
   One stylesheet for the whole site. Loads after Bootstrap 3 and restyles it,
   so views that still print Bootstrap markup look native.
   Sections: 1 tokens, 2 base, 3 shell, 4 legacy components, 5 spool + cards,
   6 home, 7 listing, 8 design page, 9 calculator, 10 forms and account, 11 footer, 12 utilities
   ========================================================================== */

/* 1. TOKENS ---------------------------------------------------------------- */
@font-face { font-family: "Bricolage Grotesque"; font-weight: 500 800; font-style: normal; font-display: swap; src: url("fonts/bricolage-latin.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-weight: 400 700; font-style: normal; font-display: swap; src: url("fonts/hanken-latin.woff2") format("woff2"); }

:root {
	--ground: #eceff1;
	--ground-2: #e1e5e8;
	--surface: #ffffff;
	--ink: #14171a;
	--ink-2: #454d55;
	--ink-3: #66707a;
	--line: #d3d9de;
	--line-2: #bcc4cb;

	--blue: #1670d9;      /* logo blue, darkened a step so it carries text on white (5.0:1) */
	--blue-logo: #2388fa;
	--orange: #f29100;
	--red: #c94a37;
	--focus: #0b4fa8;

	--font-display: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif;
	--font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	--r-s: 8px;
	--r-m: 14px;
	--r-l: 22px;
	--wrap: 1240px;
	--gutter: clamp(16px, 4vw, 32px);
	--header-h: 64px;

	--shadow-1: 0 1px 2px rgba(20, 23, 26, .06), 0 4px 14px rgba(20, 23, 26, .06);
	--shadow-2: 0 2px 4px rgba(20, 23, 26, .08), 0 14px 34px rgba(20, 23, 26, .12);
	--ease: cubic-bezier(.22, 1, .36, 1);

	/* Spool colours: one per category id (ids repeat after 16). --spool-on is the readable text colour on top. */
	--spool-1: #2388fa;  --spool-on-1: #fff;
	--spool-2: #7b5cf0;  --spool-on-2: #fff;
	--spool-3: #0f9f94;  --spool-on-3: #fff;
	--spool-4: #e0489a;  --spool-on-4: #fff;
	--spool-5: #c94a37;  --spool-on-5: #fff;
	--spool-6: #f29100;  --spool-on-6: #14171a;
	--spool-7: #3fa34d;  --spool-on-7: #fff;
	--spool-8: #f2c200;  --spool-on-8: #14171a;
	--spool-9: #1d5fb8;  --spool-on-9: #fff;
	--spool-10: #66737f; --spool-on-10: #fff;
	--spool-11: #86c12f; --spool-on-11: #14171a;
	--spool-12: #e8743b; --spool-on-12: #14171a;
	--spool-13: #159bb8; --spool-on-13: #fff;
	--spool-14: #9a6b3f; --spool-on-14: #fff;
	--spool-15: #b03ab5; --spool-on-15: #fff;
	--spool-16: #2f3e4e; --spool-on-16: #fff;
}

/* 2. BASE ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	padding: 0 !important;       /* Bootstrap navbar offset no longer needed */
	background: var(--ground);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
	font-family: var(--font-display);
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: -.012em;
	color: var(--ink);
	margin: 1.6em 0 .55em;
}
h1, .h1 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3rem); margin-top: .6em; }
h2, .h2 { font-size: clamp(1.45rem, 1.1rem + 1.2vw, 2rem); }
h3, .h3 { font-size: 1.3rem; }
h4, .h4 { font-size: 1.1rem; }
h1 small, h2 small, h3 small { font-family: var(--font-body); font-weight: 500; font-size: .5em; color: var(--ink-3); letter-spacing: 0; }
p { margin: 0 0 1em; max-width: 70ch; }
a { color: var(--blue); text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: #0b4fa8; }
img { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
::selection { background: var(--blue-logo); color: #fff; }
input, textarea, select { caret-color: var(--blue); accent-color: var(--blue); }
html { scrollbar-color: var(--line-2) var(--ground); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 999px; border: 2px solid var(--ground); } ::-webkit-scrollbar-track { background: var(--ground); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sr-only, .skip-link:not(:focus) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 1000; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r-s); }

/* Container: fluid, wide, same gutter everywhere */
.container, .wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.container::before, .container::after { display: none; }
main#main { display: block; min-height: 60vh; }
.min-container-height { min-height: 0; }
.row { margin-left: calc(var(--gutter) / -2); margin-right: calc(var(--gutter) / -2); }
.row > [class*="col-"] { padding-left: calc(var(--gutter) / 2); padding-right: calc(var(--gutter) / 2); }

/* 3. SHELL: header, menu, footer ------------------------------------------ */
.site-header {
	position: sticky; top: 0; z-index: 100;
	background: rgba(255, 255, 255, .94);
	-webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid var(--line);
}
.site-header__bar { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { height: 30px; width: auto; display: block; }
.site-search { flex: 1 1 320px; max-width: 520px; position: relative; margin: 0 auto 0 8px; }
.site-search input[type="search"] {
	width: 100%; height: 44px; padding: 0 48px 0 16px;
	border: 1.5px solid var(--line-2); border-radius: 999px; background: var(--surface);
	font: inherit; font-size: 1rem; color: var(--ink);
	-webkit-appearance: none; appearance: none;
	transition: border-color .15s, box-shadow .15s;
}
.site-search input[type="search"]::placeholder { color: var(--ink-3); }
.site-search input[type="search"]:hover { border-color: var(--ink-3); }
.site-search input[type="search"]:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(35, 136, 250, .18); }
.site-search button {
	position: absolute; right: 4px; top: 4px; width: 36px; height: 36px; border: 0; border-radius: 50%;
	background: var(--ink); color: #fff; display: grid; place-items: center; cursor: pointer;
}
.site-search button:hover { background: var(--blue); }
.site-search svg { width: 18px; height: 18px; }

.site-nav { display: flex; align-items: center; gap: 4px; flex: none; }
.site-nav > a, .site-nav summary, .nav-link {
	display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px;
	border-radius: 999px; color: var(--ink); font-weight: 600; font-size: .97rem; text-decoration: none; cursor: pointer;
	list-style: none; white-space: nowrap;
}
.site-nav summary::-webkit-details-marker { display: none; }
.site-nav > a:hover, .site-nav summary:hover, .nav-link:hover { background: var(--ground); color: var(--ink); }
.site-nav .is-current { background: var(--ground-2); }
.site-nav .btn-primary-pill {
	background: var(--ink); color: #fff; padding: 0 18px; margin-left: 6px;
}
.site-nav .btn-primary-pill:hover { background: var(--blue); color: #fff; }
.menu-pop { position: relative; }
.menu-pop > .menu-panel {
	position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; z-index: 120;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-2); padding: 8px;
}
.menu-pop .menu-panel a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-s); color: var(--ink); text-decoration: none; font-weight: 500; }
.menu-pop .menu-panel a:hover { background: var(--ground); }
.menu-pop .menu-panel .menu-sep { height: 1px; background: var(--line); margin: 6px 0; }
.menu-pop--cats > .menu-panel { left: 0; right: auto; width: min(760px, calc(100vw - 2 * var(--gutter))); display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px; padding: 12px; }
.dot { display: inline-block; flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--ink-3)); position: relative; }
.dot::after { content: ""; position: absolute; inset: 3.5px; border-radius: 50%; background: var(--surface); }
.nav-toggle { display: none; }

@media (max-width: 899px) {
	.site-header__bar { flex-wrap: wrap; padding-block: 8px; gap: 8px 12px; }
	.brand { order: 1; margin-right: auto; }
	.site-nav { order: 2; }
	.site-search { order: 3; flex: 1 0 100%; max-width: none; margin: 0; }
	.site-nav .nav-text, .site-nav .nav-extra { display: none; }
	.site-nav .nav-toggle { display: inline-flex; }
	.site-nav .btn-primary-pill { margin-left: 0; }
	.menu-pop--cats > .menu-panel { position: fixed; left: var(--gutter); right: var(--gutter); top: 120px; width: auto; max-height: calc(100vh - 140px); overflow: auto; }
}

/* mobile sheet */
.nav-sheet { position: relative; }
.nav-sheet > .menu-panel { right: 0; width: min(320px, calc(100vw - 2 * var(--gutter))); }

/* 4. LEGACY COMPONENTS: restyle Bootstrap 3 output --------------------------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px;
	border: 1.5px solid transparent; border-radius: 999px; font: 600 1rem/1.2 var(--font-body);
	text-decoration: none; cursor: pointer; white-space: normal; text-shadow: none; box-shadow: none;
	transition: background-color .15s, color .15s, border-color .15s, transform .15s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-xs, .btn-sm { min-height: 36px; padding: 0 14px; font-size: .92rem; }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 1.08rem; }
.btn-default { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-default:hover, .btn-default:focus { background: var(--ground); color: var(--ink); border-color: var(--ink-3); }
.btn-primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-success { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-success:hover, .btn-success:focus { background: #0f5cb8; border-color: #0f5cb8; color: #fff; }
.btn-info { background: var(--surface); color: var(--blue); border-color: var(--blue); }
.btn-info:hover { background: var(--blue); color: #fff; }
.btn-warning { background: var(--orange); color: #14171a; border-color: var(--orange); }
.btn-warning:hover { background: #d98200; border-color: #d98200; color: #14171a; }
.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:hover { background: #a93a29; border-color: #a93a29; color: #fff; }
.btn-link { background: none; border: 0; color: var(--blue); text-decoration: underline; padding: 0 4px; min-height: 0; }
.btn.disabled, .btn[disabled] { opacity: .5; pointer-events: none; }
.btn-group { display: inline-flex; flex-wrap: wrap; gap: 6px; }

label { font-weight: 600; font-size: .95rem; color: var(--ink); margin-bottom: 6px; display: inline-block; }
.form-group { margin-bottom: 18px; }
.form-control, select, textarea, input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="url"], input[type="search"] {
	font-family: inherit;
}
.form-control {
	display: block; width: 100%; min-height: 46px; padding: 10px 14px; background: var(--surface); color: var(--ink);
	border: 1.5px solid var(--line-2); border-radius: var(--r-s); box-shadow: none; font-size: 1rem; line-height: 1.4;
	transition: border-color .15s, box-shadow .15s;
}
textarea.form-control { min-height: 120px; }
.form-control:hover { border-color: var(--ink-3); }
.form-control:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(35, 136, 250, .18); outline: none; }
.form-control::placeholder { color: var(--ink-3); }
.help-block { color: var(--ink-3); font-size: .92rem; }
.has-error .form-control { border-color: var(--red); }
.has-error .help-block, .has-error label { color: var(--red); }
.input-group { display: flex; width: 100%; }
.input-group .form-control { border-radius: var(--r-s) 0 0 var(--r-s); }
.input-group-addon { display: grid; place-items: center; padding: 0 14px; background: var(--ground); border: 1.5px solid var(--line-2); border-right: 0; border-radius: var(--r-s) 0 0 var(--r-s); font-weight: 600; }
.input-group-addon + .form-control { border-radius: 0; }
.input-group-btn { display: flex; }
.input-group-btn .btn { border-radius: 0 var(--r-s) var(--r-s) 0; }
.input-group-lg .form-control, .input-group-lg .btn { min-height: 56px; }
.checkbox, .radio { margin: 8px 0; }

.alert { --tone: var(--line-2); border: 1.5px solid var(--tone); border-radius: var(--r-s); background: color-mix(in srgb, var(--tone) 9%, var(--surface)); color: var(--ink); padding: 14px 18px; margin: 0 0 20px; }
.alert-success { --tone: var(--spool-7); }
.alert-info { --tone: var(--blue-logo); }
.alert-warning { --tone: var(--orange); }
.alert-danger, .alert-error { --tone: var(--red); }
.alert h4 { margin-top: 0; }
.alert a { font-weight: 600; }

.well, .panel, .thumbnail, .jumbotron { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: none; padding: 20px; margin-bottom: 20px; }
.panel { padding: 0; overflow: hidden; }
.panel-heading { padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--ground); font-family: var(--font-display); font-weight: 700; border-radius: 0; }
.panel-body { padding: 20px; }
.panel-footer { padding: 14px 20px; border-top: 1px solid var(--line); background: var(--ground); }
.thumbnail { padding: 8px; }
.page-header { border: 0; margin: 2rem 0 1rem; padding: 0; }

.table { width: 100%; max-width: 100%; margin-bottom: 20px; border-collapse: collapse; background: var(--surface); border-radius: var(--r-s); overflow: hidden; }
.table > thead > tr > th, .table > tbody > tr > td, .table > tbody > tr > th { padding: 12px 16px; border: 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table > thead > tr > th { font-family: var(--font-display); font-size: .9rem; text-transform: none; letter-spacing: 0; color: var(--ink-2); background: var(--ground); border-bottom: 1px solid var(--line-2); }
.table-striped > tbody > tr:nth-child(odd) > td { background: #f7f9fa; }
.table-hover > tbody > tr:hover > td { background: #eef3f8; }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.nav-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line-2); margin: 0 0 24px; padding: 0; list-style: none; }
.nav-tabs > li { float: none; margin: 0 0 -1px; }
.nav-tabs > li > a { display: block; padding: 12px 18px; border: 1px solid transparent; border-radius: var(--r-s) var(--r-s) 0 0; color: var(--ink-2); font-weight: 600; text-decoration: none; }
.nav-tabs > li > a:hover { background: var(--ground); color: var(--ink); border-color: transparent; }
.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover { background: var(--surface); color: var(--ink); border-color: var(--line-2); border-bottom-color: var(--surface); }
.tab-content > .tab-pane { padding-top: 4px; }
.nav-pills > li > a { border-radius: 999px; color: var(--ink); font-weight: 600; }
.nav-pills > li.active > a { background: var(--ink); color: #fff; }

.breadcrumb, .pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; list-style: none; padding: 0; margin: 0 0 20px; background: none; border-radius: 0; }
.breadcrumb > li { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: .95rem; }
.breadcrumb > li + li::before { content: "/"; color: var(--line-2); padding: 0; }
.breadcrumb > .active { color: var(--ink); font-weight: 600; }
.pagination { justify-content: center; margin: 32px 0; }
.pagination > li > a, .pagination > li > span { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; border: 1.5px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 600; text-decoration: none; float: none; margin: 0; }
.pagination > li > a:hover { background: var(--ground); border-color: var(--ink-3); }
.pagination > .active > a, .pagination > .active > span { background: var(--ink); border-color: var(--ink); color: #fff; }
.pagination > .disabled > a, .pagination > .disabled > span { opacity: .45; }

.label, .badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; background: var(--ground-2); color: var(--ink); font-size: .82rem; font-weight: 600; line-height: 1.4; }
.label-success { background: #dff3e2; color: #1a5b25; }
.label-warning { background: #fdeccc; color: #7a4a00; }
.label-danger { background: #f9dcd6; color: #8a2a1b; }
.label-info, .label-primary { background: #dbeafd; color: #0b4a97; }
.dropdown-menu { border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-2); padding: 8px; }
.dropdown-menu > li > a { padding: 10px 12px; border-radius: var(--r-s); color: var(--ink); }
.dropdown-menu > li > a:hover { background: var(--ground); color: var(--ink); }
.modal-content { border: 0; border-radius: var(--r-l); box-shadow: var(--shadow-2); }
.progress { height: 10px; background: var(--ground-2); border-radius: 999px; box-shadow: none; }
.progress-bar { background: var(--blue-logo); box-shadow: none; }
.glyphicon { top: 2px; }
.hidden-phone { }
.text-muted { color: var(--ink-3); }
.lead { font-size: 1.25rem; color: var(--ink-2); max-width: 60ch; }

/* 5. SPOOLS and CARDS ------------------------------------------------------ */
/* A spool end: coloured flange with winding grooves, a hub and a core hole. */
.spool {
	display: block; position: relative; aspect-ratio: 1; width: 100%; border-radius: 50%;
	background: repeating-radial-gradient(circle at 50% 50%, var(--c, var(--ink-3)) 0 3px, color-mix(in srgb, var(--c, var(--ink-3)) 84%, #000) 3px 4px);
	box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--c, var(--ink-3)) 70%, #000);
	transition: transform .5s var(--ease), box-shadow .3s;
}
.spool__count {
	position: absolute; inset: 30%; display: grid; place-items: center; border-radius: 50%; background: var(--ground);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, var(--ink-3)) 55%, #000), inset 0 2px 4px rgba(20, 23, 26, .18);
	font-family: var(--font-display); font-weight: 700; font-size: clamp(.95rem, 1.6vw, 1.3rem); color: var(--ink); line-height: 1;
}
.spool-link { display: grid; gap: 12px; justify-items: stretch; align-content: start; text-align: center; text-decoration: none; color: var(--ink); padding: 6px; border-radius: var(--r-m); }
.spool-link:hover { color: var(--ink); }
.spool-link:hover .spool { transform: rotate(60deg) scale(1.04); box-shadow: 0 16px 28px -12px color-mix(in srgb, var(--c, var(--ink-3)) 80%, #000); }
.spool-link__name { justify-self: center; font-family: var(--font-display); font-weight: 600; font-size: .98rem; line-height: 1.2; max-width: 14ch; text-wrap: balance; min-height: 3.6em; }

/* Model card (also used for the legacy .masonryItem output) */
.model-grid, #dynamicContentContainer { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 20px; }
#masonryContainer { position: static !important; height: auto !important; margin: 0; }
.model-card, .masonryItem {
	position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m);
	overflow: hidden; display: flex; flex-direction: column; margin: 0 !important; width: auto !important; position: static !important;
	transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
.model-card:hover, .masonryItem:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--line-2); }
.model-card__media, .masonryItem > div > a:first-child { display: block; aspect-ratio: 16 / 10; background: var(--ground); overflow: hidden; position: relative; }
.model-card__media img, .masonryItem img.image_product { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease); }
.model-card:hover img, .masonryItem:hover img.image_product { transform: scale(1.04); }
.model-card__mediawrap { position: relative; }
.model-card__body { padding: 14px 16px 16px; display: grid; gap: 10px; flex: 1; align-content: start; }
.model-card__title { margin: 0; font-size: 1.05rem; font-weight: 650; line-height: 1.25; color: var(--ink); }
.model-card__title a { color: inherit; text-decoration: none; }
.model-card__title a::after { content: ""; position: absolute; inset: 0; } /* whole card is the link */
.model-card__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; color: var(--ink-3); font-size: .9rem; }
.model-card__cat { display: inline-flex; align-items: center; gap: 7px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 10px; border-radius: 999px; font-size: .82rem; font-weight: 650; background: var(--ground-2); color: var(--ink); white-space: nowrap; }
.chip--free { background: #dff3e2; color: #174f20; }
.chip--paid { background: #14171a; color: #fff; }
.model-card__chips { display: flex; flex-wrap: nowrap; gap: 6px; margin-top: auto; overflow: hidden; }
.model-card__chips .chip { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; padding: 0 9px; font-size: .78rem; }
.model-card .chip { position: relative; z-index: 2; }
.model-card__actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; z-index: 3; }
.model-card__actions .icon-btn { background: rgba(255, 255, 255, .92); box-shadow: var(--shadow-1); }
.model-card__actions .icon-btn:hover { background: #fff; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); cursor: pointer; transition: background-color .15s, color .15s; }
.icon-btn:hover { background: var(--ground); color: var(--ink); }
.btnLike[style*="green"], .btnFollow[style*="green"] { color: var(--red) !important; }

/* Spool-end label: a small spool disc beside the six readouts, always in the same six positions */
.spool--sm { width: 44px; flex: none; box-shadow: none; }
.spool--sm::after { content: ""; position: absolute; inset: 31%; border-radius: 50%; background: var(--ground); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c, var(--ink-3)) 55%, #000); }
.spool-label { display: flex; align-items: center; gap: 12px; padding: 8px 10px; background: var(--ground); border-radius: var(--r-s); }
.spool-label__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 10px; margin: 0; flex: 1; min-width: 0; }
.spool-label__grid dt { font-size: .62rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spool-label__grid dd { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: .92rem; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
/* Spool-end label: the print recipe in six fixed slots, always the same order */
.recipe { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; margin: 0 0 20px; }
.recipe__head { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; background: var(--c, var(--ink)); color: var(--on, #fff); padding: 10px 16px; font-family: var(--font-display); font-weight: 700; }
.recipe__cell { background: var(--surface); padding: 12px 16px; display: grid; gap: 2px; }
.recipe__k { font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.recipe__v { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; font-variant-numeric: tabular-nums; color: var(--ink); }
@media (max-width: 520px) { .recipe { grid-template-columns: repeat(2, 1fr); } }

/* 6. HOME ------------------------------------------------------------------ */
.home-hero { padding: clamp(20px, 4vw, 48px) 0 clamp(20px, 3vw, 36px); }
.home-hero__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.home-hero h1 { margin: 0 0 16px; font-size: clamp(2.1rem, 1.1rem + 3.4vw, 3.6rem); line-height: 1.02; letter-spacing: -.025em; text-wrap: balance; }
.home-hero h1 .accent { color: var(--blue); }
.home-hero__lead { font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem); color: var(--ink-2); max-width: 46ch; margin-bottom: 28px; }
.hero-search { position: relative; max-width: 560px; margin-bottom: 20px; }
.hero-search input { width: 100%; height: 64px; padding: 0 76px 0 24px; border: 2px solid var(--ink); border-radius: 999px; background: var(--surface); font: inherit; font-size: 1.15rem; color: var(--ink); -webkit-appearance: none; appearance: none; }
.hero-search input::placeholder { color: var(--ink-3); }
.hero-search input:focus { outline: none; box-shadow: 0 0 0 5px rgba(35, 136, 250, .25); border-color: var(--blue); }
.hero-search button { position: absolute; right: 6px; top: 6px; height: 52px; width: 52px; border: 0; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; cursor: pointer; }
.hero-search button:hover { background: var(--blue); }
.hero-search svg { width: 22px; height: 22px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: stretch; }
.hero-cta .btn { font-size: 1rem; min-height: 52px; }
.spool-wall { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(8px, 1.6vw, 20px) clamp(8px, 1.2vw, 16px); align-items: start; }
@media (min-width: 1100px) { .spool-wall { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.spool-wall .spool { max-width: 120px; margin-inline: auto; }
@media (max-width: 899px) {
	.home-hero__grid { grid-template-columns: 1fr; }
	.spool-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 600px) and (max-width: 899px) { .spool-wall { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 520px) { .spool-wall { grid-template-columns: repeat(3, 1fr); gap: 4px; } .spool-link__name { font-size: .85rem; } }
.section { padding: clamp(24px, 4vw, 48px) 0; }
.section--surface { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 4px 24px; margin-bottom: 18px; }
.section__head h2 { font-size: clamp(1.35rem, 1.1rem + .9vw, 1.75rem); }
.section__head h2 { margin: 0; }
.section__head p { margin: 0; color: var(--ink-3); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { background: var(--ground); border-radius: var(--r-m); padding: 24px; counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--font-display); font-weight: 700; margin-bottom: 14px; }
.steps h3 { margin: 0 0 6px; font-size: 1.2rem; }
.steps p { margin: 0; color: var(--ink-2); }
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; } }
.home-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.link-card { display: grid; gap: 6px; padding: 24px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: transform .25s var(--ease), box-shadow .25s; }
.link-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); color: var(--ink); }
.link-card strong { font-family: var(--font-display); font-size: 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.link-card strong .icon { flex: none; }
.link-card span { color: var(--ink-2); }

/* 7. LISTING --------------------------------------------------------------- */
.page-head { padding: clamp(20px, 4vw, 40px) 0 8px; }
.page-head h1 { margin: 0 0 8px; }
.page-head__cat { display: flex; align-items: center; gap: 16px; }
.page-head__cat .spool { width: 64px; flex: none; }
.cat-rail { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 16px; margin: 0 calc(var(--gutter) * -1); padding-left: var(--gutter); padding-right: var(--gutter); scrollbar-width: thin; }
.cat-rail a { display: inline-flex; align-items: center; gap: 8px; flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line-2); color: var(--ink); font-weight: 600; text-decoration: none; }
.cat-rail a:hover { border-color: var(--ink); }
.cat-rail a[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.cat-rail a[aria-current="page"] .dot::after { background: var(--ink); }

/* 8. DESIGN PAGE ----------------------------------------------------------- */
.design-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(20px, 4vw, 48px); align-items: start; }
@media (max-width: 899px) { .design-layout { grid-template-columns: 1fr; } }
.design-viewer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.design-aside { position: sticky; top: calc(var(--header-h) + 16px); display: grid; gap: 16px; }
@media (max-width: 899px) { .design-aside { position: static; } }
.buy-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 20px; display: grid; gap: 12px; }
.buy-box .btn { width: 100%; }
.buy-box__price { font-family: var(--font-display); font-weight: 800; font-size: 2rem; }

/* 9. FILAMENT CALCULATOR --------------------------------------------------- */
.calc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: clamp(18px, 3vw, 32px); }
.calc__fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
@media (max-width: 720px) { .calc__fields { grid-template-columns: 1fr; } }
.calc__out { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
@media (max-width: 720px) { .calc__out { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.calc__out > div { background: var(--ground); padding: 16px 18px; }
.calc__out dt { font-size: .78rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.calc__out dd { margin: 4px 0 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.4rem, 1rem + 1.6vw, 2.1rem); font-variant-numeric: tabular-nums; }
.filamentLength { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; }

/* 10. FORMS and ACCOUNT ---------------------------------------------------- */
.narrow { max-width: 640px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: clamp(18px, 3vw, 32px); margin-bottom: 24px; }
legend { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; border: 0; margin-bottom: 12px; }
.fileinput-button, .dropzone { border: 2px dashed var(--line-2); border-radius: var(--r-m); background: var(--surface); }

/* 11. FOOTER --------------------------------------------------------------- */
.site-footer { margin-top: clamp(32px, 6vw, 80px); background: var(--ink); color: #dfe4e8; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding: clamp(32px, 5vw, 56px) 0; }
@media (max-width: 899px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer__grid { grid-template-columns: 1fr; } }
.site-footer h2 { font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: #9aa5ae; margin: 0 0 12px; font-family: var(--font-body); font-weight: 700; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.site-footer li a { display: inline-block; padding: 6px 0; min-height: 32px; }
.site-footer__brand img { height: 28px; width: auto; filter: none; background: #fff; padding: 6px 10px; border-radius: 10px; }
.site-footer__brand p { color: #b8c1c8; margin: 14px 0 0; max-width: 34ch; }
.site-footer__legal { border-top: 1px solid #2c3339; padding: 18px 0 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: .92rem; color: #9aa5ae; }
.footer-ext { color: #9aa5ae; }

/* 12. UTILITIES ------------------------------------------------------------ */
.go { cursor: pointer; }
.text-center { text-align: center; }
.newline { display: block; }
.hideme { }
.is-size-xs, .is-size-sm, .is-size-md, .is-size-lg { display: none; }
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
	.spool-link:hover .spool { transform: none; }
}
@media print {
	.site-header, .site-footer, .hero-search, .cat-rail { display: none !important; }
	body { background: #fff; }
}

/* Empty state */
.empty-state { text-align: center; padding: clamp(32px, 8vw, 96px) 16px; background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r-l); }
.empty-state h2 { margin-top: 0; }
.empty-state p { margin: 0 auto; color: var(--ink-2); }

/* Calculator extras */
.calc__presets { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 8px; }
.calc__fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
@media (max-width: 720px) { .calc__fields { grid-template-columns: 1fr; } }
.chip--button { border: 1.5px solid var(--line-2); background: var(--surface); min-height: 40px; padding: 0 14px; cursor: pointer; font-family: inherit; }
.chip--button:hover { border-color: var(--ink); }
.calc h3 { font-size: 1rem; margin: 8px 0 12px; font-family: var(--font-body); }
.calc__hint { margin: 12px 0 0; }
pre.code { background: var(--ink); color: #e7edf2; padding: 18px 20px; border-radius: var(--r-m); overflow-x: auto; font-size: .92rem; line-height: 1.6; tab-size: 4; }
pre.code code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: inherit; background: none; padding: 0; }
.faq-list { display: grid; gap: 8px; max-width: 760px; }
.faq { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 0 20px; }
.faq summary { cursor: pointer; padding: 16px 0; font-family: var(--font-display); font-weight: 650; font-size: 1.08rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 1.4rem; line-height: 1; color: var(--ink-3); }
.faq[open] summary::after { content: "\2212"; }
.faq p { margin: 0 0 16px; color: var(--ink-2); }

/* 8b. Design page --------------------------------------------------------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 0; align-items: center; margin: 20px 0 4px; font-size: .95rem; color: var(--ink-3); }
.crumbs a, .crumbs span { display: inline-flex; align-items: center; }
.crumbs > * + *::before { content: "/"; margin: 0 8px; color: var(--line-2); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.design-main { min-width: 0; }
.design-title { margin: .2em 0 .25em; font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3rem); text-wrap: balance; }
.design-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 20px; }
.design-cat { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 10px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line-2); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.design-cat:hover { border-color: var(--ink); color: var(--ink); }
.design-main section { margin-top: clamp(28px, 4vw, 48px); }
.design-main section > h2 { margin-top: 0; }
.design-main .multiline { white-space: pre-line; max-width: 70ch; }
.design-main .multiline ul, .design-main .multiline ol { white-space: normal; padding-left: 1.2em; margin: 0 0 1em; }
.design-viewer { margin: 0; background: radial-gradient(120% 90% at 50% 0%, #fff, var(--ground-2)); }
.design-viewer .carousel { position: relative; }
.design-viewer .carousel-inner > .item { padding: 0; min-height: 280px; }
.design-viewer .carousel-inner img { margin: 12px auto; max-height: 560px; width: auto; max-width: calc(100% - 24px); border-radius: var(--r-s); }
.design-viewer .carousel-control { width: 56px; background: none !important; opacity: 1; text-shadow: none; display: flex; align-items: center; justify-content: center; color: var(--ink); }
.design-viewer .carousel-control .glyphicon, .design-viewer .carousel-control .icon-prev, .design-viewer .carousel-control .icon-next { position: static; display: grid; place-items: center; width: 44px; height: 44px; margin: 0; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-1); font-size: 1rem; color: var(--ink); }
.design-viewer .carousel-indicators li { border-color: var(--ink-3); }
.design-viewer .carousel-indicators .active { background: var(--ink); border-color: var(--ink); }
#threedoo-button { padding: 0 12px 12px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 12px; }
#threedoo-button select, #threedoo-button .btn { min-height: 40px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--surface); padding: 0 14px; font: inherit; font-weight: 600; }
#threedoo-button .btn-primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.design-aside .buy-box { gap: 12px; }
.buy-box__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.buy-box__note { margin: 0; color: var(--ink-3); font-size: .95rem; }
.designer-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); text-decoration: none; color: var(--ink); }
.designer-card:hover { border-color: var(--line-2); color: var(--ink); box-shadow: var(--shadow-1); }
.designer-card img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--ground); flex: none; }
.designer-card > span { display: grid; gap: 2px; min-width: 0; }
.designer-card strong { font-family: var(--font-display); font-size: 1.15rem; overflow-wrap: anywhere; }
.stat-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; font-size: .95rem; }
.stat-list li { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-2); }
.stat-list strong { color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; }
.share { display: flex; gap: 4px; margin: 4px 0 0; }
.share .icon-btn { font-weight: 700; font-family: var(--font-display); border: 1.5px solid var(--line-2); }
.btnLike[style*="green"], .btnFollow[style*="green"] { color: var(--red) !important; border-color: var(--red); }
.btn .badge { background: var(--ink); color: #fff; }
.recipe { margin-bottom: 8px; }
.recipe__head { justify-content: space-between; }
.recipe__head::before { content: ""; width: 28px; height: 28px; flex: none; border-radius: 50%; background: repeating-radial-gradient(circle, color-mix(in srgb, var(--on, #fff) 92%, transparent) 0 2px, color-mix(in srgb, var(--on, #fff) 55%, transparent) 2px 3px); box-shadow: inset 0 0 0 8px var(--c, var(--ink)); margin-right: 4px; }
.recipe__head > span:first-child { margin-right: auto; }
.recipe__type { font-size: .78rem; letter-spacing: .06em; opacity: .85; font-weight: 700; }
.recipe__extra { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 6px 20px; color: var(--ink-2); font-size: .95rem; }
.recipe__extra span { color: var(--ink-3); }
.recipe__note { color: var(--ink-2); max-width: 70ch; }
.comment { display: grid; grid-template-columns: 48px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.comment__avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: var(--ground-2); }
.comment p { margin: 4px 0 0; white-space: pre-line; }
.liked { display: flex; gap: 8px; flex-wrap: wrap; }
.card .form-group:last-child { margin-bottom: 0; }
.download-inline { display: none; margin: 0 0 20px; gap: 10px; }
.download-inline .btn { width: 100%; }
@media (max-width: 899px) {
	.download-inline { display: grid; }
	.buy-box--download { display: none; }
}
.menu-form { margin: 0; }
.menu-form button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: var(--r-s); background: none; color: var(--ink); font: inherit; font-weight: 500; text-align: left; cursor: pointer; }
.menu-form button:hover { background: var(--ground); }

@media (max-width: 599px) {
	.model-card__media { aspect-ratio: 16 / 9; }
	.model-grid--home .model-card:nth-child(n+7) { display: none; }
}

@media (max-width: 520px) {
	.table > thead > tr > th, .table > tbody > tr > td, .table > tbody > tr > th { padding: 10px 8px; font-size: .9rem; }
}
.faq-list + p { margin-top: 28px; }
