/* tinkify Docs – one stylesheet for all systems. Colours as tokens, dark mode below. */
:root {
  --brand: #0097b2;
  --brand-ink: #007489;
  --ink: #13232b;
  --muted: #5a6a73;
  --bg: #f6f8f9;
  --card: #ffffff;
  --line: #e2e8eb;
  --soft: #e6f4f7;
  --stage: #f1f3f5; /* background of the rendered videos */
  --shadow: 0 1px 2px rgb(16 40 50 / 6%), 0 8px 24px rgb(16 40 50 / 7%);
  --radius: 18px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #22b4cd;
    --brand-ink: #5fcde0;
    --ink: #e6eef1;
    --muted: #9db0b8;
    --bg: #0e171b;
    --card: #162227;
    --line: #25353c;
    --soft: #123039;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
  }
}
:root[data-theme="dark"] {
  --brand: #22b4cd; --brand-ink: #5fcde0; --ink: #e6eef1; --muted: #9db0b8; --bg: #0e171b; --card: #162227;
  --line: #25353c; --soft: #123039; --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-ink); text-underline-offset: 3px; }
img, video { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 750; }
p { margin: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.i { width: 18px; height: 18px; flex: none; }
.i.big { width: 30px; height: 30px; color: var(--brand); }

/* ---- header ---- */
header.top {
  position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; gap: 14px; height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.15rem; }
.brand img { width: 32px; height: 32px; }
.brand small {
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--brand-ink);
  background: var(--soft); padding: 2px 8px; border-radius: 999px;
}
.sysname { color: var(--muted); text-decoration: none; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sysname::before { content: "/"; margin-right: 12px; color: var(--line); }
.bar .btn { margin-left: auto; }
.tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: -1px; scrollbar-width: none; }
.tabs a {
  padding: 10px 14px; color: var(--muted); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current] { color: var(--ink); border-bottom-color: var(--brand); }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px; border: 1.5px solid var(--brand);
  background: var(--brand); color: #fff; font-weight: 700; text-decoration: none; transition: transform .15s, background .15s;
}
.btn:hover { background: var(--brand-ink); border-color: var(--brand-ink); transform: translateY(-1px); }
.btn.small { padding: 6px 14px; font-size: .9rem; }
.btn.ghost { background: transparent; color: var(--brand-ink); }
.btn.ghost:hover { background: var(--soft); }
.btn.light { background: #fff; border-color: #fff; color: #00586a; }
.btn.ghost.light { background: transparent; color: #fff; border-color: rgb(255 255 255 / 60%); }
.btn.ghost.light:hover { background: rgb(255 255 255 / 12%); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; }

/* ---- hero ---- */
.hero { padding: 40px 0 24px; }
.hero-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 40px; align-items: center; }
.eyebrow { color: var(--brand-ink); font-weight: 700; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 10px; }
.lead { color: var(--muted); font-size: 1.12rem; margin-top: 14px; max-width: 640px; }
.stage { border-radius: 24px; overflow: hidden; background: var(--stage); box-shadow: var(--shadow); aspect-ratio: 16 / 9; }
.stage video { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero { padding-top: 24px; }
}

/* ---- blocks ---- */
.block { margin-top: 56px; }
.block > h2, .head-row { margin-bottom: 20px; }
.head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.intro { padding: 36px 16px 8px; }

.how { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: how; }
.how li {
  counter-increment: how; position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; display: grid; gap: 8px; box-shadow: var(--shadow);
}
.how li::after {
  content: counter(how); position: absolute; top: 18px; right: 20px; font-size: 2.4rem; font-weight: 800; color: var(--soft);
  line-height: 1;
}
.how b { font-size: 1.1rem; }
.how p { color: var(--muted); }
@media (max-width: 760px) { .how { grid-template-columns: 1fr; } }

.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.cat {
  display: grid; gap: 2px; padding: 10px 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink); transition: transform .15s, border-color .15s;
}
.cat:hover { transform: translateY(-3px); border-color: var(--brand); }
.cat img { aspect-ratio: 4 / 3; object-fit: contain; background: var(--stage); border-radius: 12px; margin-bottom: 8px; }
.cat b { padding: 0 4px; }
.cat small { padding: 0 4px; color: var(--muted); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.facts > div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 6px; }
.facts .i { width: 26px; height: 26px; color: var(--brand); }
.facts p { color: var(--muted); }

.cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 32px;
  border-radius: 24px; color: #fff; background: linear-gradient(135deg, #0097b2, #006b80);
}
.cta p { color: rgb(255 255 255 / 85%); margin-top: 6px; max-width: 520px; }
.cta .actions { margin-top: 0; }
.cta.small { padding: 20px 24px; }
.cta.small p { margin: 0; font-weight: 600; color: #fff; }

/* ---- start page ---- */
.systems { display: grid; gap: 16px; }
.system {
  display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: center; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow);
}
.system .pic img { border-radius: 12px; aspect-ratio: 16 / 9; object-fit: cover; background: var(--stage); }
.system h3 { font-size: 1.35rem; }
.system h3 a { color: var(--ink); text-decoration: none; }
.system p { color: var(--muted); margin: 6px 0 14px; }
.system .links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; font-weight: 600; }
@media (max-width: 680px) { .system { grid-template-columns: 1fr; } }

/* ---- walls ---- */
.chips-bar { margin-top: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button {
  border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 7px 15px; cursor: pointer;
  font: inherit; font-size: .92rem; font-weight: 600;
}
.chips button:hover { border-color: var(--brand); }
.chips button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.group { margin: 36px 0 8px; }
.group-head { display: grid; gap: 4px; margin-bottom: 14px; }
.group-head p { color: var(--muted); }
.group-head .links { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: .95rem; }
.group-head .links a { display: inline-flex; align-items: center; gap: 6px; }
.group-head .links span .i { vertical-align: -3px; margin-right: 6px; }
.group-head .links span .i { color: var(--muted); }
.group-head .links a .i { width: 16px; }
.walls { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.wall { position: relative; margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.wall img { aspect-ratio: 4 / 3; object-fit: contain; background: var(--stage); border-radius: 12px; }
.wall figcaption { padding: 8px 6px 4px; font-size: .92rem; font-weight: 650; }
.size {
  position: absolute; top: 14px; left: 14px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px;
  background: var(--card); color: var(--brand-ink); font-weight: 800; font-size: .85rem; box-shadow: var(--shadow);
}

/* ---- assembly ---- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 20px 0 24px; }
.tile {
  display: grid; gap: 2px; padding: 8px 8px 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink); min-width: 0; transition: transform .15s, border-color .15s;
}
.tile:hover { transform: translateY(-3px); border-color: var(--brand); }
.tile .thumb { display: block; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--stage); margin-bottom: 8px; }
.tile .thumb img { width: 100%; height: 100%; object-fit: cover; }
.tile b { padding: 0 4px; hyphens: auto; overflow-wrap: break-word; }
.tile small { padding: 0 4px; color: var(--muted); }
.toolbar { display: flex; gap: 8px; justify-content: flex-end; margin-bottom: 10px; }
.toolbar button {
  border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 6px 13px; cursor: pointer;
  font: inherit; font-size: .88rem;
}
details.sec { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; }
details.sec[open] { box-shadow: var(--shadow); }
details.sec > summary { cursor: pointer; list-style: none; padding: 16px 20px; display: flex; align-items: center; gap: 12px; }
details.sec > summary::-webkit-details-marker { display: none; }
details.sec > summary span { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
details.sec > summary b { font-size: 1.12rem; }
details.sec > summary small { color: var(--muted); }
details.sec > summary::after {
  content: ""; margin-left: auto; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform .2s; flex: none;
}
details.sec[open] > summary::after { transform: rotate(225deg); }
.body { padding: 0 20px 22px; display: grid; gap: 16px; }
.body > p { color: var(--muted); }

.need { display: flex; gap: 12px; background: var(--soft); border-radius: 14px; padding: 14px 16px; }
.need > .i { color: var(--brand-ink); margin-top: 3px; }
.need b { display: block; margin-bottom: 2px; }
.need ul { margin: 0; padding-left: 18px; }

.steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; }
.steps img { border-radius: 12px; aspect-ratio: 4 / 3; object-fit: cover; }
.steps h3 { margin: 12px 0 4px; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.steps h3::before, .vsteps li::before {
  content: counter(step); display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: .8rem; font-weight: 800;
}
.steps p { color: var(--muted); font-size: .95rem; }

.ways { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 5px; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; justify-self: start; }
.ways button {
  display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; text-align: left; border: 0; border-radius: 12px;
  padding: 9px 16px; background: transparent; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer;
}
.ways button small { grid-column: 1 / -1; font-weight: 500; font-size: .8rem; }
.ways button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.way { display: grid; gap: 16px; }
.way[hidden] { display: none; }

.player { display: grid; grid-template-columns: 3fr 2fr; gap: 20px; align-items: start; }
.screen { border-radius: 16px; overflow: hidden; background: var(--stage); aspect-ratio: 4 / 3; }
.screen video { width: 100%; height: 100%; object-fit: cover; }
.vsteps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: step; }
.vsteps li {
  counter-increment: step; display: grid; grid-template-columns: 26px 1fr; column-gap: 12px; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--line); cursor: pointer; transition: background .2s, border-color .2s;
}
.vsteps li::before { grid-row: span 2; background: var(--line); color: var(--muted); transition: background .2s; }
.vsteps li p { color: var(--muted); font-size: .93rem; }
.vsteps li:hover { border-color: var(--brand); }
.vsteps li.on { background: var(--soft); border-color: var(--brand); }
.vsteps li.on::before { background: var(--brand); color: #fff; }
@media (max-width: 760px) { .player { grid-template-columns: 1fr; } }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; }
.checks .i { color: var(--brand); margin-top: 3px; }
.tip { border-left: 3px solid var(--brand); padding: 4px 14px; color: var(--muted); }

table.shop { width: 100%; border-collapse: collapse; }
table.shop td { padding: 10px 6px; border-top: 1px solid var(--line); }
table.shop td:last-child { text-align: right; white-space: nowrap; }
table.shop a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
table.shop .i { width: 15px; height: 15px; }

/* ---- footer ---- */
footer { margin-top: 72px; border-top: 1px solid var(--line); background: var(--card); }
.foot { display: grid; gap: 10px; padding: 28px 16px 36px; color: var(--muted); }
.foot .brand { font-size: 1rem; }
.foot .brand img { width: 26px; height: 26px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: .92rem; }
.foot nav a { color: var(--muted); }

@media (max-width: 560px) {
  .sysname { display: none; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 8px; scrollbar-width: none; }
  .chips button { flex: none; }
  .wall figcaption { font-size: .85rem; }
  .bar .btn span { display: none; }
  .intro { padding-top: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---- shops, views, sizes, photos ---- */
.vendor { color: var(--muted); font-size: .88em; white-space: nowrap; }
.chips-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.view { display: inline-flex; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; }
.view button {
  border: 0; background: transparent; color: var(--muted); border-radius: 999px; padding: 6px 14px; cursor: pointer;
  font: inherit; font-size: .9rem; font-weight: 650;
}
.view button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.wall .in { display: none; }
body.inside .wall .in { display: block; }
body.inside .wall .out { display: none; }

.sizes-box { margin-top: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 12px; }
.sizes-box h3 { font-size: 1.1rem; }
table.sizes { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.sizes th { text-align: left; color: var(--muted); font-weight: 600; font-size: .85rem; padding: 0 8px 6px 0; }
table.sizes td { padding: 8px 8px 8px 0; border-top: 1px solid var(--line); }
.walls-sizes { color: var(--muted); }
details.sizes-details { margin-top: 16px; max-width: 820px; }
details.sizes-details summary {
  cursor: pointer; font-weight: 700; display: inline-flex; padding: 8px 16px; background: var(--card); border: 1px solid var(--line);
  border-radius: 999px;
}
details.sizes-details .sizes-box { margin-top: 10px; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.gallery figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gallery img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; transition: transform .3s; }
.gallery a:hover img { transform: scale(1.03); }
.gallery figcaption { padding: 10px 14px 12px; font-size: .9rem; color: var(--muted); }
.facts + .sizes-box { margin-top: 16px; }
@media (max-width: 560px) {
  table.sizes th:last-child, table.sizes td:last-child { display: none; }
}

/* ---- project ideas ---- */
.projects { display: grid; gap: 20px; margin-top: 20px; }
.project {
  display: grid; grid-template-columns: 5fr 6fr; gap: 28px; align-items: start; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); scroll-margin-top: 120px;
}
.project .pic { background: var(--stage); border-radius: 14px; }
.project .pic img { width: 100%; aspect-ratio: 3 / 2; object-fit: contain; }
.project .txt { display: grid; gap: 10px; }
.project p { color: var(--muted); }
.project h3 { font-size: .95rem; margin-top: 4px; }
.chips.small { gap: 6px; }
a.chip {
  display: inline-block; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 999px; padding: 5px 12px;
  font-size: .88rem; font-weight: 600; text-decoration: none;
}
a.chip:hover { border-color: var(--brand); }
@media (max-width: 760px) { .project { grid-template-columns: 1fr; } }
.gallery.big { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
