/*! 3D ViSiON WordPress theme. © 2026 3D ViSiON. All rights reserved. Unauthorised copying or reuse of this code, text, drawings or photographs is prohibited. */

/* ---------- Tokens ---------- */
:root {
  --paper: #F6F5F0;
  --paper-hover: #EBEFEC;
  --ink: #1A1A18;
  --ink-soft: #3A3935;
  --grey: #5F5D57;
  --rule: #CFD3CD;
  --tone: #DCE7EC;
  --sky: #DCE7EC;
  --sage: #DFE8DB;
  --sand: #F0E3D1;
  --accent: #4A7A94;
  --error: #A33F1C;
  --mono: 'DM Mono', ui-monospace, Menlo, Consolas, monospace;
  --sans: 'Schibsted Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --line: 1px solid var(--ink);
  --pad: 24px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  padding: var(--pad);
  background-color: var(--paper);
  background-image: var(--grid, radial-gradient(circle at center, rgba(26,26,24,.10) 0.9px, transparent 1.3px));
  background-size: var(--grid-size, 24px) var(--grid-size, 24px);
  background-position: var(--grid-pos, 12px) var(--grid-pos, 12px);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--grey); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }

.skip {
  position: absolute; left: -9999px; top: 32px; z-index: 50;
  background: var(--ink); color: var(--paper); padding: 10px 14px;
}
.skip:focus { left: 32px; color: var(--paper); }

.sheet {
  max-width: var(--frame, 1600px);
  min-height: calc(100vh - 2 * var(--pad));
  margin: 0 auto;
  border: var(--line);
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
main > section { border-bottom: var(--line); }
main > section:last-child { border-bottom: 0; }

/* ---------- Header (sheet strip) ---------- */
.hdr {
  position: sticky; top: 0; z-index: 10;
  display: grid;
  grid-template-columns: 3fr 3fr 5fr 3fr;
  min-height: 72px;
  background: var(--paper);
  border-bottom: var(--line);
}
.hdr__cell { display: flex; align-items: center; padding: 0 var(--pad); border-right: var(--line); }
.hdr__brand { font-size: 17px; font-weight: 500; }
.hdr__meta { font: 12px var(--mono); color: var(--grey); }
.hdr__nav { gap: 28px; font: 12px var(--mono); }
.hdr__nav a { padding: 6px 0; border-bottom: 1px solid transparent; white-space: nowrap; }
.hdr__nav a[aria-current="page"] { border-bottom-color: var(--ink); }
.hdr__nav span { color: var(--grey); margin-right: 6px; }
.hdr__cta {
  display: flex; align-items: center; padding: 0 var(--pad);
  background: var(--ink); color: var(--paper); font-size: 15px; font-weight: 500;
}
.hdr__cta:hover { background: #34332F; color: var(--paper); }
.hdr__menu {
  display: none; align-items: center; padding: 0 20px;
  background: none; border: 0; border-left: var(--line);
  font: 12px var(--mono); cursor: pointer;
}

/* Mobile sheet index */
.menu {
  position: fixed; inset: 0; z-index: 40;
  display: flex; flex-direction: column;
  background: var(--paper);
  padding: 12px;
}
.menu[hidden] { display: none; }
.menu__frame { flex: 1; border: var(--line); display: flex; flex-direction: column; }
.menu__top { display: flex; justify-content: space-between; align-items: stretch; min-height: 56px; border-bottom: var(--line); }
.menu__top a { display: flex; align-items: center; padding: 0 16px; font-weight: 500; }
.menu__close { background: none; border: 0; border-left: var(--line); padding: 0 20px; font: 12px var(--mono); cursor: pointer; }
.menu__list { list-style: none; margin: 0; padding: 0; }
.menu__list a {
  display: grid; grid-template-columns: 72px 1fr; align-items: baseline;
  padding: 20px 16px; border-bottom: 1px solid var(--rule);
  font-size: 30px; font-weight: 500; letter-spacing: -0.02em;
}
.menu__list span { font: 12px var(--mono); color: var(--grey); letter-spacing: 0; }
.menu__cta { margin-top: auto; display: block; padding: 20px 16px; background: var(--ink); color: var(--paper); font-size: 18px; font-weight: 500; }
.menu__cta:hover { color: var(--paper); }

/* ---------- Shared pieces ---------- */
.strip {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 52px; padding: 0 var(--pad);
  border-bottom: var(--line);
  font: 12px var(--mono);
}
.strip a { color: var(--grey); }
.strip a:hover { color: var(--ink); }
.strip__no { color: var(--grey); margin-right: 12px; }

.label { display: block; font: 12px var(--mono); margin-bottom: 36px; }
.label span { color: var(--grey); margin-right: 12px; }

.display {
  font-size: clamp(38px, 4.2vw, 58px);
  font-weight: 500; line-height: 1.06; letter-spacing: -0.025em;
  text-wrap: balance;
}
.h2 { font-size: clamp(26px, 2.4vw, 34px); font-weight: 500; line-height: 1.15; letter-spacing: -0.02em; }
.lede { font-size: 17px; line-height: 1.65; color: var(--ink-soft); max-width: 46ch; }
.prose { max-width: 62ch; display: flex; flex-direction: column; gap: 18px; font-size: 17px; line-height: 1.7; color: var(--ink-soft); }

.link {
  align-self: flex-start;
  font: 13px var(--mono);
  border-bottom: 1px solid currentColor; padding-bottom: 3px;
}

.frame { position: relative; overflow: hidden; background: var(--tone); aspect-ratio: 4 / 3; }
.frame--wide { aspect-ratio: 16 / 9; }
.frame--pano { aspect-ratio: 21 / 9; }
.frame--tall { aspect-ratio: 3 / 4; }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.ph { position: absolute; left: 12px; bottom: 10px; right: 12px; font: 10px/1.4 var(--mono); color: #4E4C46; }
.t2 { background: var(--sage); } .t3 { background: var(--sand); } .t4 { background: #E4EBEF; } .t5 { background: #E6EDE2; } .t6 { background: #F3E8D9; }

.cap { display: flex; justify-content: space-between; gap: 16px; font: 11px var(--mono); color: var(--grey); }

/* Page head used on inner pages */
.pagehead { display: grid; grid-template-columns: 7fr 5fr; }
.pagehead > * { padding: 40px var(--pad) 48px; }
.pagehead > :first-child { border-right: var(--line); }
.pagehead .lede { align-self: end; }
.pagehead__side { display: flex; flex-direction: column; justify-content: flex-end; gap: 24px; }

/* Two-column split */
.split { display: grid; grid-template-columns: 7fr 5fr; }
.split > * { padding: 20px var(--pad) 48px; }
.split > :first-child { border-right: var(--line); }

/* ---------- Home hero ---------- */
.hero { display: grid; grid-template-columns: 7fr 5fr; min-height: 620px; }
.hero__fig { margin: 0; padding: 32px; border-right: var(--line); display: flex; flex-direction: column; gap: 12px; }
.hero__fig svg { width: 100%; height: auto; flex: 1; }
.hero__text { padding: 48px 40px 32px; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; }
.hero__text > div { display: flex; flex-direction: column; gap: 28px; }

/* Drawing animation (enabled by JS, skipped for reduced motion) */
.drawing text { font-family: var(--mono); }

/* ---------- Tiles (work, team, process) ---------- */
.tiles { overflow: hidden; }
.tiles__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 -1px -1px 0; }
.tiles__grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tiles__grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tile {
  display: flex; flex-direction: column; gap: 14px;
  padding: 20px var(--pad) 28px;
  border-right: var(--line); border-bottom: var(--line);
}
.tile[hidden] { display: none; }
a.tile:hover { color: inherit; }
a.tile:hover .tile__name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.tile__meta { display: flex; justify-content: space-between; gap: 12px; font: 11px var(--mono); color: var(--grey); }
.tile__title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.tile__name { font-size: 18px; font-weight: 500; line-height: 1.3; }
.tile__year { font: 12px var(--mono); color: var(--grey); white-space: nowrap; }
.tile__text { font-size: 15px; line-height: 1.6; color: var(--ink-soft); }
.tile__role { font-size: 14px; color: var(--grey); }

/* ---------- Notes list ---------- */
.notes { list-style: none; margin: 0; padding: 0; counter-reset: note; }
.notes li {
  display: grid; grid-template-columns: 56px 1fr;
  padding: 18px 0; border-top: 1px solid var(--rule);
  font-size: 20px; line-height: 1.4;
}
.notes li:last-child { border-bottom: 1px solid var(--rule); }
.notes li::before {
  counter-increment: note; content: counter(note, decimal-leading-zero);
  font: 13px var(--mono); color: var(--grey); padding-top: 5px;
}
.split__stack { display: flex; flex-direction: column; gap: 24px; }

/* ---------- Work index ---------- */
.toolbar {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 12px 24px; padding: 10px var(--pad); border-bottom: var(--line);
}
.chips, .views { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; }
.chip {
  background: none; border: 0; border-bottom: 1px solid transparent;
  padding: 8px 0; cursor: pointer; font-size: 14px; color: var(--grey);
}
.chip:hover { color: var(--ink); }
.chip[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.chip small { font: 11px var(--mono); margin-left: 5px; }
.views .chip { font: 12px var(--mono); }
.count { font: 12px var(--mono); color: var(--grey); }

.table-wrap { overflow-x: auto; }
.idx { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 15px; }
.idx th { padding: 14px var(--pad); border-bottom: var(--line); text-align: left; font: 11px var(--mono); color: var(--grey); font-weight: 400; }
.idx td { padding: 16px var(--pad); border-bottom: 1px solid var(--rule); vertical-align: baseline; }
.idx tr:last-child td { border-bottom: 0; }
.idx tbody tr:hover td { background: var(--paper-hover); }
.idx .m { font: 13px var(--mono); color: var(--grey); white-space: nowrap; }
.idx a { font-weight: 500; }
.idx tr[hidden] { display: none; }

.empty { padding: 64px var(--pad); display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.empty[hidden] { display: none; }
.btn-text { background: none; border: 0; padding: 0 0 3px; border-bottom: 1px solid currentColor; font: 13px var(--mono); cursor: pointer; }

/* ---------- Project page ---------- */
.plate { padding: var(--pad); }
.facts { display: grid; grid-template-columns: 128px 1fr; margin: 0; font-size: 15px; }
.facts dt, .facts dd { padding: 12px 0; border-top: 1px solid var(--rule); margin: 0; }
.facts dt { font: 12px var(--mono); color: var(--grey); padding-top: 14px; }
.facts dt:last-of-type, .facts dd:last-of-type { border-bottom: 1px solid var(--rule); }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--pad); padding: var(--pad); }
.gallery figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.gallery .full { grid-column: 1 / -1; }
.plan { margin: 0; padding: 32px var(--pad) var(--pad); display: flex; flex-direction: column; gap: 12px; }
.plan svg { width: 100%; max-width: 980px; margin: 0 auto; height: auto; }
.pn { display: grid; grid-template-columns: 1fr 1fr; }
.pn a { padding: 20px var(--pad) 28px; display: flex; flex-direction: column; gap: 10px; }
.pn a:first-child { border-right: var(--line); }
.pn a:last-child { text-align: right; align-items: flex-end; }
.pn span { font: 12px var(--mono); color: var(--grey); }
.pn strong { font-size: 22px; font-weight: 500; }

/* ---------- Lists (journal, recognition) ---------- */
.rows { list-style: none; margin: 0; padding: 0; }
.rows a, .rows .row {
  display: grid; grid-template-columns: 160px 1fr 180px; gap: 24px; align-items: baseline;
  padding: 18px var(--pad); border-bottom: 1px solid var(--rule);
}
.rows li:last-child a, .rows li:last-child .row { border-bottom: 0; }
.rows a:hover { background: var(--paper-hover); color: inherit; }
.rows .m { font: 12px var(--mono); color: var(--grey); }
.rows .t { font-size: 19px; font-weight: 500; line-height: 1.35; }
.rows .r { text-align: right; }

.article { padding: 40px var(--pad) 64px; display: flex; flex-direction: column; gap: 32px; align-items: center; }
.article > * { width: 100%; max-width: 760px; }
.article .frame { max-width: 1100px; }
.article__meta { font: 12px var(--mono); color: var(--grey); }

/* ---------- Contact ---------- */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 24px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font: 12px var(--mono); color: var(--grey); }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 0;
  background: transparent; border: 0; border-bottom: var(--line); border-radius: 0;
  font-size: 17px; appearance: none;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 12px) 55%, calc(100% - 7px) 55%;
  background-size: 5px 5px; background-repeat: no-repeat; padding-right: 28px;
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom: 2px solid var(--ink); padding-bottom: 9px; }
.field[data-invalid] input, .field[data-invalid] textarea, .field[data-invalid] select { border-bottom-color: var(--error); }
.field__err { font: 12px var(--mono); color: var(--error); min-height: 0; }
.form__foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; min-height: 52px; padding: 0 28px;
  background: var(--ink); color: var(--paper); border: 0; cursor: pointer;
  font-size: 15px; font-weight: 500;
}
.btn:hover { background: #34332F; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.form__note { font-size: 14px; color: var(--grey); }
.status { grid-column: 1 / -1; font-size: 15px; padding: 14px 16px; border: var(--line); }
.status[hidden] { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.kv { display: grid; grid-template-columns: 1fr 1fr; border-top: var(--line); border-left: var(--line); }
.kv > div { padding: 14px 16px; border-right: var(--line); border-bottom: var(--line); display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.k { font: 11px var(--mono); color: var(--grey); }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 44px 1fr; padding: 14px 0; border-top: 1px solid var(--rule); font-size: 15px; line-height: 1.55; color: var(--ink-soft); }
.steps li::before { counter-increment: step; content: counter(step, decimal-leading-zero); font: 12px var(--mono); color: var(--grey); padding-top: 3px; }
.steps strong { display: block; color: var(--ink); font-weight: 500; }

/* ---------- Footer title block ---------- */
.tb { display: grid; grid-template-columns: 6fr 2fr 2fr 2fr; border-top: var(--line); }
.tb__lead { grid-row: span 2; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 20px var(--pad) 28px; border-right: var(--line); }
.tb__lead:hover { color: inherit; }
.tb__lead:hover .tb__big { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.tb__big { font-size: clamp(30px, 3.2vw, 44px); font-weight: 500; line-height: 1.1; letter-spacing: -0.02em; }
.tb__cell { display: flex; flex-direction: column; gap: 8px; padding: 16px 20px; border-right: var(--line); border-bottom: var(--line); font-size: 14px; }
.tb__cell.nr { border-right: 0; }
.tb__cell.nb { border-bottom: 0; }
.tb__legal { grid-column: 1 / -1; padding: 12px var(--pad); border-top: var(--line); font: 11px/1.6 var(--mono); color: var(--grey); }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .hdr { grid-template-columns: 3fr 6fr 3fr; }
  .hdr__meta { display: none; }
  .tiles__grid--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .tiles__grid, .tiles__grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tb { grid-template-columns: 1fr 1fr 1fr; }
  .tb__lead { grid-column: 1 / -1; grid-row: auto; border-right: 0; border-bottom: var(--line); }
  .tb__cell.nb { border-bottom: 0; }
  .tb__cell:nth-of-type(3n) { border-right: 0; }
}
@media (max-width: 900px) {
  .hero, .split, .pagehead { grid-template-columns: 1fr; }
  .hero__fig, .split > :first-child, .pagehead > :first-child { border-right: 0; border-bottom: var(--line); }
  .hero { min-height: 0; }
  .hero__fig { padding: 20px; }
  .hero__text { padding: 28px 20px 32px; }
  .pagehead > * { padding: 28px 20px 32px; }
  .rows a, .rows .row { grid-template-columns: 1fr; gap: 4px; }
  .rows .r { text-align: left; }
}
@media (max-width: 820px) {
  .hdr { grid-template-columns: 1fr auto; min-height: 56px; }
  .hdr__nav, .hdr__cta { display: none; }
  .hdr__brand { border-right: 0; padding: 0 16px; }
  .hdr__menu { display: flex; }
}
@media (max-width: 620px) {
  :root { --pad: 12px; }
  body { font-size: 15px; }
  .tiles__grid, .tiles__grid--4, .tiles__grid--5 { grid-template-columns: 1fr; }
  .tile { padding: 16px 16px 24px; }
  .strip { padding: 0 16px; }
  .split > * { padding: 20px 16px 36px; }
  .gallery { grid-template-columns: 1fr; padding: 16px; gap: 16px; }
  .form, .kv { grid-template-columns: 1fr; }
  .pn { grid-template-columns: 1fr; }
  .pn a:first-child { border-right: 0; border-bottom: var(--line); }
  .pn a:last-child { text-align: left; align-items: flex-start; }
  .tb { grid-template-columns: 1fr; }
  .tb__cell { border-right: 0; border-bottom: 1px solid var(--rule); }
  .tb__cell.nb { border-bottom: 1px solid var(--rule); }
  .tb__cell:last-of-type { border-bottom: 0; }
  .notes li { font-size: 18px; grid-template-columns: 44px 1fr; }
  .plan { padding: 20px 12px 16px; }
}

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

@media print {
  body { padding: 0; }
  .hdr { position: static; }
  .hdr__menu, .hdr__cta, .toolbar, .form { display: none; }
}

/* ---------- Light colour layer ---------- */
.tb { background: var(--tb-bg, var(--sky)); }
.tile:hover .frame { filter: saturate(1.15); }
.chip[aria-pressed="true"] { border-bottom-color: var(--accent); }
a:hover { color: var(--accent); }
@media print { body { background-image: none; } }

/* Tints used by every section: soft versions of the three colours */
.tint-sky  { background: var(--sky); background: color-mix(in srgb, var(--sky) 70%, var(--paper)); }
.tint-sage { background: var(--sage); background: color-mix(in srgb, var(--sage) 70%, var(--paper)); }
.tint-sand { background: var(--sand); background: color-mix(in srgb, var(--sand) 70%, var(--paper)); }
.tint-ink  { background: var(--ink); color: var(--paper); }
.tint-ink .lede, .tint-ink .cap, .tint-ink .label span, .tint-ink .k, .tint-ink .strip__no, .tint-ink .tile__meta, .tint-ink .tile__year, .tint-ink .tile__text, .tint-ink p { color: color-mix(in srgb, var(--paper) 78%, transparent); }
.tint-ink a:hover { color: var(--paper); }

/* ---------- WordPress basics ---------- */
.screen-reader-text { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
body.admin-bar .hdr { top: 32px; }
@media (max-width: 782px) { body.admin-bar .hdr { top: 46px; } }

/* ---------- Section blocks ---------- */
.strip { margin: 0; }
.strip__title { font: inherit; margin: 0; }
.strip__link { color: var(--grey); }
.tb--block { border-top: 0; }
.tb--block.tint-sky, .tb--block.tint-sage, .tb--block.tint-sand, .tb--block.tint-ink { --tb-bg: transparent; }
.tb--one .tb__lead { grid-row: auto; }
.tb--one { grid-template-columns: 6fr repeat(3, 2fr); }

.hero--short { min-height: 420px; }
.hero--screen { min-height: calc(100vh - 140px); }
.hero--rev { grid-template-columns: 5fr 7fr; }
.hero--rev .hero__fig { order: 2; border-right: 0; border-left: var(--line); }
.hero--noart { grid-template-columns: 1fr; min-height: 0; }
.hero__fig--image { padding: 0; }
.hero__fig--image .cap { padding: 0 20px 14px; }
.hero__fig .tdv-svg, .hero__fig .tdv-svg svg { flex: 1; width: 100%; height: auto; }

.frame--square { aspect-ratio: 1 / 1; }
.frame--natural { aspect-ratio: auto; }
.frame--natural img { height: auto; }
.frame--natural:empty { aspect-ratio: 4 / 3; }
.frame--fill { flex: 1; aspect-ratio: auto; min-height: 320px; }

.split--1-1 { grid-template-columns: 1fr 1fr; }
.split--5-7 { grid-template-columns: 5fr 7fr; }
.split--rev > :first-child { order: 2; border-right: 0; border-left: var(--line); }
.split__notes { display: flex; flex-direction: column; gap: 24px; }
.split__notes .label { margin-bottom: 12px; }

.plate { display: flex; flex-direction: column; gap: 10px; }
.plate--flush { padding: 0; }
.plate--flush .cap { padding: 0 var(--pad) 12px; }

.gallery--c1 { grid-template-columns: 1fr; }
.gallery--c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.tiles__grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.pager { display: flex; justify-content: space-between; gap: 16px; padding: 16px var(--pad); font: 12px var(--mono); border-top: var(--line); }
.pager a { border-bottom: 1px solid currentColor; }

/* Drawings */
.tdv-drawing { margin: 0 auto; width: 100%; display: flex; flex-direction: column; gap: 12px; }
.tdv-drawing svg, .tdv-svg svg { width: 100%; height: auto; }
.tdv-drawing.size-s { max-width: 480px; } .tdv-drawing.size-m { max-width: 720px; } .tdv-drawing.size-l { max-width: 980px; } .tdv-drawing.size-full { max-width: none; }
.tdv-draw svg { color: var(--ink); }

/* ---------- Lined columns (the flexible layout) ---------- */
.tdv-grid { display: grid; grid-template-columns: 1fr 1fr; }
.tdv-grid--1 { grid-template-columns: 1fr; }
.tdv-grid--7-5 { grid-template-columns: 7fr 5fr; }
.tdv-grid--5-7 { grid-template-columns: 5fr 7fr; }
.tdv-grid--2-1 { grid-template-columns: 2fr 1fr; }
.tdv-grid--1-2 { grid-template-columns: 1fr 2fr; }
.tdv-grid--1-1-1 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tdv-grid--1-1-1-1 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tdv-grid--1-2-1 { grid-template-columns: 1fr 2fr 1fr; }
.tdv-grid > * { min-width: 0; }
.tdv-grid > :not(:last-child) { border-right: var(--line); }
.tdv-grid--nolines > :not(:last-child) { border-right: 0; }
.tdv-cell { display: flex; flex-direction: column; gap: 20px; padding: 24px var(--pad) 40px; }
.tdv-cell.pad-none { padding: 0; gap: 0; }
.tdv-cell.pad-large { padding: 48px 40px 64px; }
.tdv-cell.va-center { justify-content: center; }
.tdv-cell.va-bottom { justify-content: flex-end; }
.tdv-cell > * { margin: 0; }

/* Text written with ordinary blocks, inside columns or on its own */
.tdv-flow { padding: 40px var(--pad) 56px; display: flex; flex-direction: column; gap: 20px; }
.tdv-flow > * { margin: 0; }
.tdv-flow > p, .tdv-flow > ul, .tdv-flow > ol, .tdv-flow > h2, .tdv-flow > h3, .tdv-flow > h4, .tdv-flow > blockquote { max-width: 70ch; }
.tdv-flow p, .tdv-cell p { font-size: 17px; line-height: 1.7; color: var(--ink-soft); }
.tdv-flow h1, .tdv-cell h1 { font-size: clamp(38px, 4.2vw, 58px); font-weight: 500; line-height: 1.06; letter-spacing: -0.025em; }
.tdv-flow h2, .tdv-cell h2 { font-size: clamp(26px, 2.4vw, 34px); font-weight: 500; line-height: 1.15; letter-spacing: -0.02em; }
.tdv-flow h3, .tdv-cell h3 { font-size: 20px; font-weight: 500; line-height: 1.3; }
.tdv-flow ul, .tdv-flow ol, .tdv-cell ul, .tdv-cell ol { padding-left: 1.2em; font-size: 17px; line-height: 1.7; color: var(--ink-soft); }
.tdv-flow img, .tdv-cell img { max-width: 100%; height: auto; }
.tdv-flow figure, .tdv-cell figure { margin: 0; }
.tdv-flow figcaption, .tdv-cell figcaption { font: 11px var(--mono); color: var(--grey); margin-top: 8px; }
.tdv-flow a:not([class]), .tdv-cell p a:not([class]) { border-bottom: 1px solid currentColor; }
.tdv-flow blockquote, .tdv-cell blockquote { margin: 0; padding-left: 20px; border-left: 2px solid var(--ink); font-size: 22px; line-height: 1.45; }
.tdv-flow .wp-block-gallery, .tdv-cell .wp-block-gallery { gap: var(--pad); }
.tdv-flow .wp-block-button__link, .tdv-cell .wp-block-button__link { border-radius: 0; background: var(--ink); color: var(--paper); padding: 16px 28px; font-size: 15px; font-weight: 500; }
.tdv-flow .wp-block-separator, .tdv-cell .wp-block-separator { border: 0; border-top: 1px solid var(--rule); margin: 8px 0; }

/* Styles offered on ordinary blocks (Styles panel in the editor) */
.is-style-tdv-display { font-size: clamp(38px, 4.2vw, 58px) !important; font-weight: 500; line-height: 1.06 !important; letter-spacing: -0.025em; }
.is-style-tdv-mono { font: 12px/1.6 var(--mono) !important; color: var(--grey) !important; letter-spacing: 0; }
.is-style-tdv-lede { font-size: 19px !important; line-height: 1.65 !important; color: var(--ink-soft); max-width: 46ch; }
ol.is-style-tdv-notes, ul.is-style-tdv-notes { list-style: none; padding: 0 !important; counter-reset: note; }
.is-style-tdv-notes li { display: grid; grid-template-columns: 56px 1fr; padding: 18px 0; border-top: 1px solid var(--rule); font-size: 20px; line-height: 1.4; color: var(--ink); }
.is-style-tdv-notes li:last-child { border-bottom: 1px solid var(--rule); }
.is-style-tdv-notes li::before { counter-increment: note; content: counter(note, decimal-leading-zero); font: 13px var(--mono); color: var(--grey); padding-top: 5px; }
.wp-block-button.is-style-tdv-link .wp-block-button__link { background: none; color: inherit; padding: 0 0 3px; border-bottom: 1px solid currentColor; font: 13px var(--mono); }
.wp-block-image.is-style-tdv-frame img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--tone); }
.wp-block-image.is-style-tdv-frame figcaption { display: flex; justify-content: space-between; }

/* Elements (can sit inside columns) */
.tdv-facts .label, .tdv-notes .label { margin-bottom: 20px; }
.tdv-ptitle .display { margin-top: 0; }
.tdv-details { display: flex; flex-direction: column; gap: 24px; }
.kv > div:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* ---------- Drawing lines (dividers) ---------- */
.tdv-line { padding: 0 var(--pad); display: flex; flex-direction: column; justify-content: center; gap: 10px; font: 11px var(--mono); color: var(--grey); }
.ln-h-s { min-height: 56px; } .ln-h-m { min-height: 96px; } .ln-h-l { min-height: 160px; }
.ln-side { display: flex; justify-content: space-between; gap: 16px; }
.ln-draw { flex: 1; height: 1px; background: var(--ink); transform-origin: left center; transition: transform 1.2s cubic-bezier(.45,0,.2,1); }
.js-lines .tdv-line:not(.is-in) .ln-draw { transform: scaleX(0); }
.ln-dim, .ln-rule, .ln-cut, .ln-level { display: flex; align-items: center; gap: 12px; }
.ln-dim__tick { width: 14px; height: 14px; flex: none; background: linear-gradient(45deg, transparent 46%, var(--ink) 46%, var(--ink) 54%, transparent 54%); }
.ln-dim__txt, .ln-rule__txt, .ln-level__txt { color: var(--ink); white-space: nowrap; }
.ln-axes { position: relative; display: flex; justify-content: space-between; align-items: flex-start; padding: 12px 0 0; }
.ln-axes::before { content: ""; position: absolute; left: 14px; right: 14px; top: 26px; border-top: 1px solid var(--ink); }
.ln-axes__ax { position: relative; display: flex; flex-direction: column; align-items: center; }
.ln-axes__ax b { position: relative; z-index: 1; width: 28px; height: 28px; border: 1px solid var(--ink); border-radius: 50%; display: grid; place-items: center; background: var(--paper); font-weight: 400; color: var(--ink); }
.ln-axes__ax::after { content: ""; width: 0; height: 36px; border-left: 1px dashed var(--grey); }
.ln-h-l .ln-axes__ax::after { height: 96px; }
.ln-cut__mk { position: relative; width: 30px; height: 30px; flex: none; border: 1px solid var(--ink); border-radius: 50%; display: grid; place-items: center; color: var(--ink); }
.ln-cut__mk::after { content: ""; position: absolute; top: -9px; left: 9px; border: 6px solid transparent; border-bottom: 8px solid var(--ink); border-top: 0; }
.ln-cut__line { height: 3px; background: repeating-linear-gradient(90deg, var(--ink) 0 22px, transparent 22px 28px, var(--ink) 28px 32px, transparent 32px 38px); }
.ln-level__tri { width: 0; height: 0; flex: none; border: 7px solid transparent; border-top: 11px solid var(--ink); border-bottom: 0; }
.ln-ground { display: flex; flex-direction: column; }
.ln-ground__line { flex: none; height: 2px; }
.ln-ground__hatch { height: 12px; background: repeating-linear-gradient(135deg, transparent 0 9px, var(--grey) 9px 10px); opacity: .7; }
.tdv-hint { padding: 32px; border: 1px dashed var(--grey); font: 12px var(--mono); color: var(--grey); }

/* ---------- Responsive for the new sections ---------- */
@media (max-width: 1000px) {
  .tdv-grid--1-1-1-1 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tdv-grid--1-1-1-1 > :nth-child(2n) { border-right: 0; }
  .tdv-grid--1-1-1-1 > :nth-child(-n+2) { border-bottom: var(--line); }
  .tb--one { grid-template-columns: 1fr 1fr 1fr; }
  .gallery--c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .tdv-grid, .tdv-grid--7-5, .tdv-grid--5-7, .tdv-grid--2-1, .tdv-grid--1-2, .tdv-grid--1-1-1, .tdv-grid--1-2-1 { grid-template-columns: 1fr; }
  .tdv-grid > :not(:last-child) { border-right: 0; border-bottom: var(--line); }
  .tdv-grid--nolines > :not(:last-child) { border-bottom: 0; }
  .split--1-1, .split--5-7, .hero--rev { grid-template-columns: 1fr; }
  .split--rev > :first-child, .hero--rev .hero__fig { order: 0; border-left: 0; }
  .hero--screen { min-height: 0; }
  .tdv-cell.pad-large { padding: 32px 20px 40px; }
}
@media (max-width: 620px) {
  .tdv-grid--1-1-1-1 { grid-template-columns: 1fr; }
  .tdv-grid--1-1-1-1 > :not(:last-child) { border-right: 0; border-bottom: var(--line); }
  .gallery--c3 { grid-template-columns: 1fr; }
  .tdv-flow { padding: 28px 16px 36px; }
  .tdv-cell { padding: 20px 16px 32px; }
  .ln-axes__ax b { width: 22px; height: 22px; }
}

/* Header and footer options */
.hdr--notag { grid-template-columns: 3fr 8fr 3fr; }
.hdr--nocta { grid-template-columns: 3fr 3fr 8fr; }
.hdr--notag.hdr--nocta { grid-template-columns: 3fr 11fr; }
.hdr--nocta .hdr__nav { border-right: 0; }
.tb--mini { grid-template-columns: repeat(3, 1fr); }
.tb--mini .tb__cell:nth-of-type(3n) { border-right: 0; }
.tdv-elementor { padding: 0; }
.tdv-elementor .elementor-widget-container > section { border-bottom: var(--line); }
.tdv-flow > .tdv-drawing, .tdv-cell > .tdv-drawing { margin-left: auto; margin-right: auto; }
.wp-block-image img:not([src]), .wp-block-image img[src=""] { display: block; width: 100%; aspect-ratio: 4 / 3; background: var(--tone); }
.tdv-cell.pad-none > .wp-block-image { height: 100%; }
.tdv-cell.pad-none > .wp-block-image img { width: 100%; height: 100%; min-height: 280px; object-fit: cover; }
@media (max-width: 1000px) { .tb--one { grid-template-columns: repeat(3, minmax(0, 1fr)); } .tb--one .tb__lead { grid-column: 1 / -1; } }
@media (max-width: 620px) { .tb--one { grid-template-columns: 1fr; } .tb--one .tb__cell { border-right: 0; } }
