/* Young Serif and Bitter are self-hosted from fonts/ via tokens.json; no external font request. */

/* Te Kāhui components. Values come from tokens.css; nothing here re-declares a token. */
body { margin: 0; background: var(--surface); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 24px; }
.tk-pad { padding: var(--space-4); }
.tk-row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
:where(a, button):focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* Button: a woven tab beside the label, as the lockup sets the mark beside the name. Square, never a pill.
   The tab is two strands rising over two falling (the logo's greens over its blues); its gaps show the ground. */
.tk-btn { --btn-fill: var(--accent); --btn-ink: var(--on-accent); --tab-a: var(--mark-green); --tab-b: var(--mark-deep-green); --tab-c: var(--mark-blue); --tab-d: var(--mark-navy); --tab-w: 18px;
  display: inline-flex; align-items: center; box-sizing: border-box; min-height: 48px; border: 0; border-radius: 0; padding: 12px 24px 12px calc(var(--tab-w) + 4px + 24px); font-family: var(--font-body); font-size: 16px; line-height: 24px; font-weight: 600; letter-spacing: 0.01em; text-decoration: none; cursor: pointer; color: var(--btn-ink);
  background:
    repeating-linear-gradient(-45deg, var(--tab-a) 0 5px, transparent 5px 6.1px, var(--tab-b) 6.1px 11.1px, transparent 11.1px 12.2px) left top / var(--tab-w) 50% no-repeat,
    repeating-linear-gradient(45deg, var(--tab-c) 0 5px, transparent 5px 6.1px, var(--tab-d) 6.1px 11.1px, transparent 11.1px 12.2px) left bottom / var(--tab-w) 50% no-repeat,
    linear-gradient(var(--btn-fill), var(--btn-fill)) right / calc(100% - var(--tab-w) - 4px) 100% no-repeat; }
.tk-btn:hover { --btn-fill: var(--ink); --btn-ink: var(--surface); }
.tk-btn--cream { --btn-fill: var(--cream); --btn-ink: var(--navy); --tab-a: var(--sage); --tab-b: var(--forest); --tab-c: var(--cream); --tab-d: var(--mark-blue); }
.tk-btn--cream:hover { --btn-fill: var(--sage); --btn-ink: var(--navy); }
.tk-btn--block { display: flex; width: 100%; justify-content: center; }
.tk-btn--quiet { --btn-fill: transparent; --btn-ink: var(--accent); --tab-w: 12px; min-height: 32px; padding: 4px 0 4px calc(var(--tab-w) + 12px); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1.5px; }
.tk-btn--quiet:hover { --btn-fill: transparent; --btn-ink: var(--ink); }

/* Quote */
.tk-quote { margin: 0; max-width: 46rem; }
.tk-quote__text { font-family: var(--font-display); font-size: 30px; line-height: 1.3; letter-spacing: -0.01em; margin: 0 0 var(--space-2); }
.tk-quote__text::before { content: "\201C"; } .tk-quote__text::after { content: "\201D"; }
.tk-quote__by { font-size: 16px; } .tk-quote__role { display: block; color: var(--ink-muted); font-size: 13px; line-height: 18px; letter-spacing: 0.02em; }

/* PhotoBlock: a photograph laid into the weave. Woven: one corner is cut at 45° and three strands lie
   beside the cut, the photo being the next strand. A title sits on a navy strand, not under a wash. */
.tk-photo { position: relative; margin: 0; --cut: 112px; }
.tk-photo__pic { position: relative; height: 100%; }
.tk-photo img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-none); }
.tk-photo--woven img { clip-path: polygon(0 0, 100% 0, 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut))); }
.tk-photo--woven .tk-photo__pic::after { content: ""; position: absolute; left: 0; bottom: 0; width: var(--cut); height: var(--cut); pointer-events: none;
  background: linear-gradient(45deg, transparent 0 13.1%, var(--s3, var(--mark-deep-green)) 13.1% 23.2%, transparent 23.2% 25.4%, var(--s2, var(--mark-blue)) 25.4% 35.5%, transparent 35.5% 37.7%, var(--s1, var(--mark-green)) 37.7% 47.8%, transparent 47.8%); }
.tk-photo--right img { clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%); }
.tk-photo--right .tk-photo__pic::after { left: auto; right: 0; transform: scaleX(-1); }
.tk-photo__strand { position: absolute; z-index: 1; right: 0; bottom: var(--space-4); max-width: 72%; min-height: 96px; box-sizing: border-box; background: var(--navy); color: var(--cream); padding: var(--space-2) var(--space-4) var(--space-2) 104px; clip-path: polygon(0 0, 100% 0, 100% 100%, 96px 100%); }
.tk-photo__title { font-family: var(--font-display); font-weight: 400; font-size: 32px; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 4px; }
.tk-photo__strand span { font-size: 14px; line-height: 20px; }
.tk-photo__caption { display: flex; gap: var(--space-1); align-items: baseline; font-size: 13px; line-height: 18px; color: var(--ink-muted); padding-top: var(--space-1); }
.tk-photo__caption::before { content: ""; width: 8px; height: 8px; background: var(--whetu); transform: rotate(45deg) translateY(-1px); flex: none; }

/* Split (copy beside a woven photo) */
.tk-split { display: grid; grid-template-columns: 5fr 6fr; gap: var(--space-6); align-items: center; padding: var(--space-6) var(--space-4); background: var(--surface); color: var(--ink); }
.tk-split__eyebrow { display: flex; align-items: center; gap: var(--space-1); font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 0 0 var(--space-2); }
.tk-split__eyebrow::before { content: ""; width: 9px; height: 9px; background: var(--whetu); transform: rotate(45deg); flex: none; }
.tk-split h2 { font-family: var(--font-display); font-weight: 400; font-size: 40px; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 var(--space-2); }
.tk-split__lead { font-size: 19px; line-height: 30px; margin: 0 0 var(--space-4); max-width: 30em; }
.tk-split__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); }
.tk-split .tk-photo { --cut: 128px; }
.tk-split .tk-photo img { aspect-ratio: 5 / 4; height: auto; }
.tk-split--flip { grid-template-columns: 6fr 5fr; }
.tk-split--flip > .tk-photo { order: -1; }
.tk-split--night { background: var(--navy); color: var(--cream); --s1: var(--sage); --s2: var(--cream); --s3: var(--mark-blue); }
.tk-split--night .tk-split__eyebrow { color: var(--sage); }
.tk-split--night .tk-split__eyebrow::before { background: var(--cream); }
.tk-split--night .tk-btn--quiet { --btn-ink: var(--cream); --tab-a: var(--sage); --tab-b: var(--forest); --tab-c: var(--cream); --tab-d: var(--mark-blue); }
.tk-split--night .tk-btn--quiet:hover { --btn-ink: var(--sage); }
@media (max-width: 640px) { .tk-split, .tk-split--flip { grid-template-columns: 1fr; gap: var(--space-4); padding: var(--space-4) var(--space-2); } .tk-split--flip > .tk-photo { order: 0; } .tk-split .tk-photo { --cut: 88px; } }

/* TeamCard: each person inside their own broken circle (RingFrame), the layout chosen from their name. */
.tk-team { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--space-4); }
.tk-person { text-align: center; }
.tk-person .tk-ring { width: 100%; margin: 0 0 var(--space-2); }
.tk-person__name { font-family: var(--font-display); font-size: 26.8px; line-height: 1.17; letter-spacing: -0.02em; margin: 0; }
.tk-person__role { color: var(--ink-muted); font-size: 13px; line-height: 18px; letter-spacing: 0.02em; margin: 4px 0 0; }

/* PublicationCard: a published book shown as printed (its cover is not redrawn), on its own ground, under a
   band of its own weave, the photo laid in with a woven corner in the book's colours. */
.tk-pub { display: grid; grid-template-rows: auto auto 1fr; max-width: 300px; background: var(--navy); color: var(--cream); --strand-gap: var(--navy); --s1: var(--sage); --s2: var(--mark-blue); --s3: var(--cream); }
.tk-pub > .tk-weave { height: 28px; }
.tk-pub .tk-photo { margin: var(--space-2) var(--space-2) 0; --cut: 80px; }
.tk-pub .tk-photo img { aspect-ratio: 4 / 5; height: auto; }
.tk-pub__body { padding: var(--space-2); display: grid; align-content: start; grid-template-rows: auto auto auto 1fr; gap: 4px; }
.tk-pub__body > .tk-btn { align-self: end; }
.tk-row > .tk-pub { flex: 1 1 0; min-width: 0; }
.tk-pub__eyebrow { font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin: 0; opacity: 0.85; }
.tk-pub__title { font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 1.1; letter-spacing: -0.02em; margin: 0; }
.tk-pub__meta { font-size: 13px; line-height: 18px; margin: 0 0 var(--space-1); opacity: 0.9; }
.tk-pub .tk-btn--quiet { --btn-ink: var(--cream); --tab-a: var(--s1); --tab-b: var(--s3); --tab-c: var(--s2); --tab-d: var(--s1); justify-self: start; }
.tk-pub .tk-btn--quiet:hover { --btn-ink: var(--s1); }
.tk-pub--wahine { background: var(--wahine-maroon); --strand-gap: var(--wahine-maroon); --s1: var(--wahine-gold); --s2: var(--cream); --s3: var(--wahine-gold); } .tk-pub--wahine .tk-pub__title { color: var(--wahine-gold); }
.tk-pub--taiohi { background: var(--taiohi-night); --strand-gap: var(--taiohi-night); --s1: var(--taiohi-aqua); --s2: var(--taiohi-blue); --s3: var(--taiohi-aqua); } .tk-pub--taiohi .tk-pub__title { color: var(--taiohi-aqua); }
.tk-pub--workbook { background: var(--navy); }

/* ExercisePrompt: a workshop or workbook prompt. Numbered steps, a challenge set off by a weave divider, and
   ruled room to write. Brand tokens only, so it works on cream, on navy and photocopied in the print theme. */
.tk-prompt { background: var(--surface); color: var(--ink); max-width: 34rem; padding: var(--space-4); box-sizing: border-box; }
.tk-prompt__eyebrow { display: flex; align-items: center; gap: var(--space-1); font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 0 0 var(--space-1); }
.tk-prompt__eyebrow::before { content: ""; width: 9px; height: 9px; background: var(--whetu); transform: rotate(45deg); flex: none; }
.tk-prompt__title { font-family: var(--font-display); font-weight: 400; font-size: 40px; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 var(--space-4); }
.tk-prompt__steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.tk-prompt__steps li { counter-increment: step; display: grid; grid-template-columns: 40px 1fr; font-size: 17px; line-height: 26px; }
.tk-prompt__steps li::before { content: counter(step); font-family: var(--font-display); font-size: 34px; line-height: 28px; letter-spacing: -0.02em; color: var(--accent); }
.tk-prompt__steps strong { font-weight: 600; }
.tk-prompt__challenge { margin-top: var(--space-4); }
.tk-prompt__challenge > .tk-weave { margin-bottom: var(--space-2); }
.tk-prompt__challenge p { margin: 0; font-size: 17px; line-height: 26px; }
.tk-prompt__lines { height: 128px; margin-top: var(--space-2); background: repeating-linear-gradient(to bottom, transparent 0 31px, var(--rule) 31px 32px); }

/* ===== v2: motifs ===== */
/* Weave: a box the script fills. Height sets the band; strand width comes from data-strip (strand-s/m/l). */
.tk-weave { display: block; height: 120px; overflow: hidden; background: var(--strand-gap); }
.tk-weave--divider { height: 24px; }
.tk-weave--cover { height: 100%; }
.tk-weave svg { display: block; }

/* Whetū cluster */
.tk-whetu { display: block; height: 300px; }
.tk-whetu svg { display: block; overflow: visible; }
.tk-star--dim { opacity: 0.32; }

/* Broken circle (ring) around a photo, the mark or a number */
.tk-ring { position: relative; display: grid; place-items: center; aspect-ratio: 1; width: 240px; }
.tk-ring > .tk-ring-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tk-ring > img { width: 80%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-round); display: block; }
.tk-ring__num { font-family: var(--font-display); font-size: 64px; line-height: 1; letter-spacing: -0.03em; color: var(--ink); }

/* ===== v2: writing ===== */
.tk-piece { max-width: 34rem; margin: 0; }
.tk-piece__eyebrow { font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 0 0 var(--space-1); }
.tk-piece__title { font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 var(--space-2); color: var(--ink); }
.tk-piece__body { font-size: 19px; line-height: 32px; white-space: pre-line; hyphens: manual; text-align: left; margin: 0 0 var(--space-2); }
.tk-piece__body--prose { white-space: normal; }
.tk-piece__body--prose p { margin: 0 0 var(--space-2); }
.tk-piece__by { display: flex; align-items: center; gap: var(--space-1); font-size: 14px; line-height: 20px; font-style: italic; letter-spacing: 0.01em; color: var(--ink-muted); margin: 0; }
.tk-piece__by::before { content: ""; width: 10px; height: 10px; background: var(--whetu); transform: rotate(45deg); flex: none; }

/* ===== v2: reporting ===== */
.tk-stat { display: grid; grid-template-rows: auto auto 1fr; gap: var(--space-1); max-width: 300px; }
.tk-stat__num { font-family: var(--font-display); font-size: 96px; line-height: 1; letter-spacing: -0.03em; color: var(--ink); margin: 0; }
.tk-stat__label { font-size: 16px; line-height: 24px; margin: 0; }
.tk-stat__sky { height: 96px; }
.tk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-4); }

/* ===== v2: publication cover framework ===== */
.tk-cover { position: relative; width: 300px; aspect-ratio: 148 / 210; overflow: hidden; display: grid; grid-template-rows: 38% 1fr auto; background: var(--navy); color: var(--cream); }
.tk-cover__weave { --strand-gap: var(--navy); }
.tk-cover__body { padding: var(--space-2) var(--space-2) 0; }
.tk-cover__eyebrow { font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 var(--space-1); opacity: 0.9; }
.tk-cover__title { font-family: var(--font-display); font-weight: 400; font-size: 40px; line-height: 1; letter-spacing: -0.02em; margin: 0; }
.tk-cover__foot { display: flex; align-items: flex-end; justify-content: space-between; padding: var(--space-2); font-size: 11px; line-height: 15px; }
.tk-cover__foot img { width: 36px; height: 36px; }
.tk-cover--wahine { background: var(--wahine-maroon); } .tk-cover--wahine .tk-cover__weave { --strand-gap: var(--wahine-maroon); } .tk-cover--wahine .tk-cover__title { color: var(--wahine-gold); }
.tk-cover--taiohi { background: var(--taiohi-night); } .tk-cover--taiohi .tk-cover__weave { --strand-gap: var(--taiohi-night); } .tk-cover--taiohi .tk-cover__title { color: var(--taiohi-aqua); }
.tk-cover--cohort { background: var(--surface); color: var(--ink); }
.tk-cover--cohort .tk-cover__weave { --strand-gap: var(--surface); }

/* ===== v2: one-pager (print theme) ===== */
.tk-sheet { width: 595px; min-height: 842px; box-sizing: border-box; background: var(--surface); color: var(--ink); padding: 48px; display: grid; grid-template-rows: auto auto 1fr auto; gap: var(--space-4); }
.tk-sheet__head { display: flex; justify-content: space-between; align-items: center; }
.tk-sheet__head img { height: 48px; }
.tk-sheet h1 { font-family: var(--font-display); font-weight: 400; font-size: 40px; line-height: 1.1; letter-spacing: -0.02em; margin: 0; }
.tk-sheet__foot { font-size: 11px; line-height: 15px; color: var(--ink-muted); border-top: 1px solid var(--rule); padding-top: var(--space-1); }
@media print { .tk-sheet { width: auto; min-height: 0; padding: 0; } }
.tk-cover > .tk-cover__weave { height: 100%; min-height: 0; overflow: hidden; }
