/* NNY company brochure (flip book). Page content is sized in em against the page width, so every page scales as one piece. */

:root {
  --blue: #19499e;
  --blue-deep: #10336f;
  --blue-tint: #e9eff8;
  --red: #e7142e;
  --ink: #0a1b33;
  --ink-3: #07142a;
  --concrete: #eef1f4;
  --line: #d7dde5;
  --text: #15202e;
  --muted: #566476;
  --white: #fff;

  --font-latin: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", var(--font-latin);
  --font-num: "DIN Alternate", "Bahnschrift", "Avenir Next Condensed", "Roboto Condensed", "Arial Narrow", var(--font);
  --font-display: "Inter Tight", "Helvetica Neue", Arial, sans-serif; /* cover wordmark and figures */
  --lh: 1.75;
  --lh-head: 1.25;
  --bar: 52px;
}
:root:lang(th) {
  --font: "Prompt", "Noto Sans Thai", "Leelawadee UI", Tahoma, sans-serif;
  --font-latin: var(--font);
  --lh: 1.8;
  --lh-head: 1.4;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body.bk {
  margin: 0;
  height: 100vh; height: 100dvh;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  font-family: var(--font);
  color: var(--white);
  /* quiet mesh gradient: brand blue easing into navy, with faint violet and mauve glows */
  background-color: #153c8c;
  background-image:
    radial-gradient(38% 48% at 66% 18%, rgba(118, 108, 204, 0.32), rgba(118, 108, 204, 0) 70%),
    radial-gradient(34% 44% at 10% 96%, rgba(168, 112, 184, 0.3), rgba(168, 112, 184, 0) 70%),
    radial-gradient(44% 52% at 30% 70%, rgba(88, 74, 168, 0.22), rgba(88, 74, 168, 0) 70%),
    radial-gradient(38% 50% at 94% 58%, rgba(58, 118, 206, 0.3), rgba(58, 118, 206, 0) 70%),
    radial-gradient(62% 62% at 100% 100%, rgba(6, 18, 56, 0.85), rgba(6, 18, 56, 0) 70%),
    radial-gradient(58% 62% at 0% 0%, rgba(36, 102, 204, 0.55), rgba(36, 102, 204, 0) 70%),
    linear-gradient(135deg, #1a4aa6 0%, #173a86 45%, #0e2663 100%);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

/* ------------------------------------------------------------ viewer chrome */

.bk-bar, .bk-ctrl {
  display: flex; align-items: center; gap: 12px;
  height: var(--bar);
  padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  font-size: 14px;
}
.bk-bar { padding-top: env(safe-area-inset-top); height: calc(var(--bar) + env(safe-area-inset-top)); }
/* the top bar stays faded so the book is the focus; it comes back to full strength when used */
.bk-bar { opacity: 0.5; transition: opacity 0.25s ease; }
.bk-bar:hover, .bk-bar:focus-within { opacity: 1; }
.bk-ctrl { padding-bottom: env(safe-area-inset-bottom); height: calc(var(--bar) + env(safe-area-inset-bottom)); justify-content: center; }
.bk-brand img { height: 26px; width: auto; }
.bk-name { margin-right: auto; padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, 0.25); color: rgba(255, 255, 255, 0.8); letter-spacing: 0.04em; }
.bk-lang { display: flex; gap: 2px; }
.bk-lang a { white-space: nowrap; padding: 6px 8px; color: rgba(255, 255, 255, 0.65); text-decoration: none; border-radius: 2px; }
.bk-lang a[aria-current] { color: var(--white); background: rgba(255, 255, 255, 0.14); }
.bk-exit {
  padding: 7px 14px; border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 2px;
  color: var(--white); text-decoration: none; white-space: nowrap;
}
.bk-exit:hover { background: var(--white); color: var(--ink); }
.bk-btn {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none;
  background: none; border: 0; border-radius: 50%; cursor: pointer;
}
.bk-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); }
.bk-btn:disabled { opacity: 0.3; cursor: default; }
.bk-btn[hidden] { display: none; }
.bk-sound[aria-pressed="true"] .bk-sound__off, .bk-sound[aria-pressed="false"] .bk-sound__on { display: none; }
.bk-toc { padding: 7px 12px; background: none; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 2px; cursor: pointer; white-space: nowrap; }
.bk-toc:hover { background: rgba(255, 255, 255, 0.12); }
.bk-range { width: min(40vw, 420px); accent-color: var(--white); cursor: pointer; }
.bk-pos { min-width: 5.5em; text-align: center; font-size: 15px; letter-spacing: 0.04em; color: rgba(255, 255, 255, 0.85); }

.bk-stage { position: relative; display: grid; place-items: center; min-height: 0; overflow: hidden; padding: 12px 20px 8px; }
.bk-fit { max-width: 100%; }
/* a lone cover (right half of the spread) or back cover (left half) is shifted to the centre of the screen */
.bk-fit.at-cover { transform: translateX(-25%); }
.bk-fit.at-back { transform: translateX(25%); }
.bk-fit.is-animated { transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.bk-book { opacity: 0; transition: opacity 0.4s ease; }
.is-ready .bk-book { opacity: 1; }
.bk-book:not(.stf__parent) .pg { display: none; }
.bk-noscript a { color: var(--white); }

/* phone-only "zoom in" button and the enlarged page view it opens */
.bk-zoom { display: none; align-items: center; gap: 4px; padding: 6px 10px 6px 6px; background: none; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 2px; cursor: pointer; white-space: nowrap; }
.bk-zoom svg { width: 18px; height: 18px; }
.bk-zoomview { position: fixed; inset: 0; z-index: 50; overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 60px 12px 28px; background: var(--ink); touch-action: pan-x pan-y pinch-zoom; }
.bk-zoomview[hidden] { display: none; }
.bk-zoomview__pages { display: grid; gap: 16px; justify-content: start; }
.bk-zoomview__page { width: 180vw; aspect-ratio: 600 / 820; }
/* a phone held sideways shows the enlarged page at full width, so it only scrolls vertically */
@media (orientation: landscape) {
  .bk-zoomview__pages { justify-content: stretch; }
  .bk-zoomview__page { width: 100%; max-width: 900px; margin: 0 auto; }
}
.bk-zoomview .pg { position: relative; width: 100%; height: 100%; }
.bk-zoomview .pg::after { display: none; }
.bk-zoomview__close {
  position: fixed; top: max(10px, env(safe-area-inset-top)); right: 10px; z-index: 1;
  display: grid; place-items: center; width: 44px; height: 44px;
  background: var(--white); color: var(--ink); border: 0; border-radius: 50%; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); cursor: pointer;
}

@media (max-width: 640px) {
  :root { --bar: 48px; }
  .bk-bar, .bk-ctrl { gap: 6px; }
  .bk-name { display: none; }
  .bk-lang { margin-left: auto; }
  .bk-lang a { padding: 6px 6px; }
  .bk-bar [data-fs] { display: none; }
  .bk-exit { padding: 6px 10px; font-size: 13px; }
  .bk-range { display: none; }
  .bk-stage { padding: 6px 8px; }
}
@media (max-width: 640px), (max-height: 520px) {
  .bk-zoom { display: inline-flex; }
}
@media (max-height: 520px) {
  :root { --bar: 40px; }
  .bk-stage { padding: 4px 12px; }
}

/* ------------------------------------------------------------ page shell */

.pg { background: var(--white); color: var(--text); overflow: hidden; container-type: size;
  box-shadow: 0 18px 48px rgba(12, 24, 90, 0.3), 0 2px 6px rgba(12, 24, 90, 0.18); }
.pg__in {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  padding: 11% 8.5% 11.5%;
  font-size: 14px; font-size: calc(100cqw / 38);
  line-height: var(--lh);
}
/* the fold: a soft shadow on the spine side of each page */
.pg::after { content: ""; position: absolute; top: 0; bottom: 0; width: 7%; pointer-events: none; z-index: 3; }
.pg--l::after { right: 0; background: linear-gradient(270deg, rgba(10, 27, 51, 0.16), rgba(10, 27, 51, 0)); }
.pg--r::after { left: 0; background: linear-gradient(90deg, rgba(10, 27, 51, 0.16), rgba(10, 27, 51, 0)); }
.pg--cover::after, .pg--back::after, .--portrait .pg::after { display: none; }

.pg__run, .pg__folio {
  position: absolute; z-index: 2; margin: 0;
  font-size: 11px; font-size: calc(100cqw / 52);
  color: var(--muted); letter-spacing: 0.04em;
}
.pg__run { top: 5.2%; display: flex; gap: 0.8em; }
.pg__run .num { color: var(--blue); font-weight: 700; }
.pg__folio { bottom: 4.6%; font-size: calc(100cqw / 44); color: var(--ink); }
.pg--l .pg__run, .pg--l .pg__folio { left: 8.5%; }
.pg--r .pg__run, .pg--r .pg__folio { right: 8.5%; }
.pg--opener .pg__folio, .pg--blue .pg__folio { color: rgba(255, 255, 255, 0.8); }

.pg__title { margin-bottom: 1.6em; }
.pg__title h2 { font-size: 2em; line-height: var(--lh-head); font-weight: 700; color: var(--ink); letter-spacing: 0.01em; }
:lang(th) .pg__title h2 { font-size: 1.75em; }
:lang(th) .pg__title { margin-bottom: 1.2em; }
.pg__sub { margin-top: 0.35em; font-family: var(--font-latin); font-size: 0.8em; color: var(--muted); letter-spacing: 0.03em; }
.pg__lead { margin-top: 1em; font-size: 0.95em; color: var(--text); }
:lang(th) .pg__lead, :lang(th) .prose p { font-size: 0.88em; }
.prose p { font-size: 0.95em; }
.prose p + p { margin-top: 0.8em; }
.list-h { margin: 1.6em 0 0.6em; font-size: 0.8em; font-weight: 700; color: var(--blue); letter-spacing: 0.04em; }

.pg__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pg__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 20, 42, 0.62) 0%, rgba(7, 20, 42, 0) 24%, rgba(7, 20, 42, 0) 36%, rgba(7, 20, 42, 0.6) 58%, rgba(7, 20, 42, 0.92) 100%); }
.pg__cap { font-size: 0.68em; color: rgba(255, 255, 255, 0.72); letter-spacing: 0.02em; }

.tag {
  display: inline-block; padding: 0.1em 0.55em; margin-right: 0.6em;
  border: 1px solid rgba(255, 255, 255, 0.7); border-radius: 2px;
  font-size: 0.92em; font-weight: 600; letter-spacing: 0.06em;
}
/* EPC mark: blue label with a slanted red stripe, echoing the red diagonal in the NNY logo */
.bk-epc {
  position: relative; overflow: hidden;
  display: inline-block; padding: 0.26em 0.5em 0.22em 1.05em;
  background: var(--blue); color: var(--white);
  font-family: var(--font-num); font-weight: 700; font-size: 0.72em; line-height: 1; letter-spacing: 0.12em;
  border-radius: 2px;
  box-shadow: 0 1px 4px rgba(7, 20, 42, 0.25);
}
.bk-epc::before {
  content: ""; position: absolute; top: -10%; bottom: -10%; left: -0.3em; width: 0.95em;
  background: var(--red); transform: skewX(-22deg);
  box-shadow: 0.1em 0 0 var(--white);
}

/* ------------------------------------------------------------ dimension line (the drawing-sheet motif) */

.dim { display: flex; align-items: center; gap: 0.7em; color: var(--blue); }
.dim__line {
  position: relative; flex: 1; display: flex; align-items: center; gap: 0.8em;
  height: 1.6em; border-inline: 1px solid currentColor;
}
.dim__line::before, .dim__line::after { content: ""; flex: 1; height: 1px; background: currentColor; }
.dim__line::before { order: -1; }
.dim__line::after { order: 1; }
.dim__line i { position: absolute; top: 50%; width: 0.9em; height: 1px; background: currentColor; transform: translate(-50%, -50%) rotate(-45deg); }
.dim__line i:first-child { left: 0; }
.dim__line i:last-of-type { left: 100%; }
.dim__v { font-family: var(--font-num); font-weight: 700; font-size: 1.05em; letter-spacing: 0.04em; white-space: nowrap; }
.dim__end { font-size: 0.95em; font-weight: 700; letter-spacing: 0.04em; }
.dim--light { color: var(--white); }

/* ------------------------------------------------------------ cover: photo above, white base */

.pg--cover { background: var(--white); color: var(--ink); }
.cover__photo { position: absolute; left: 0; right: 0; top: 0; height: 66%; }
.cover__photo img { width: 100%; height: 100%; object-fit: cover; }
.cover__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.08) 38%, rgba(0, 0, 0, 0) 55%); }
.cover__photo .pg__cap { position: absolute; z-index: 1; right: 5%; bottom: 2.6%; font-size: calc(100cqw / 60); color: rgba(255, 255, 255, 0.9); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); }
.cover { padding: 7% 7% 7.5%; }
.cover__mark {
  position: relative; z-index: 1; color: var(--white);
  font-family: var(--font-display); font-style: italic; font-weight: 900;
  font-size: 5.6em; line-height: 0.86; letter-spacing: -0.035em;
  margin-left: -0.04em;
}
.cover__base { margin-top: auto; }
.cover h1 { display: flex; align-items: baseline; gap: 0.35em; font-size: 3em; line-height: 1.1; font-weight: 700; color: var(--ink); letter-spacing: 0.02em; }
.cover h1 .num { font-size: 0.5em; font-weight: 800; color: var(--blue); letter-spacing: 0; }
:lang(th) .cover h1 { font-size: 2.4em; letter-spacing: 0; }
.cover .num, .cover .dim__v, .cover .dim__end { font-family: var(--font-display); font-weight: 800; letter-spacing: 0; }
:lang(th) .cover .dim__v { font-family: var(--font); font-weight: 700; }
.cover__kicker { margin: 0.4em 0 1.1em; font-size: 0.95em; font-weight: 600; color: var(--muted); }
/* name lockup: the Chinese and English names are justified to exactly the same width */
.cover__name, .back__name { display: inline-block; text-align: justify; text-align-last: justify; line-height: 1.3; }
.cover__name span, .back__name span { display: block; margin-top: 0.25em; font-family: var(--font-display); font-weight: 500; font-size: 0.56em; letter-spacing: 0.02em; }
.cover__name { margin-top: 1em; font-size: 1.25em; font-weight: 700; color: var(--ink); }
.cover__name span { color: var(--muted); }
:lang(th) .cover__name { font-size: 0.9em; }

/* ------------------------------------------------------------ back cover */

.pg--back { background: var(--ink); color: var(--white); }
.back { align-items: flex-start; padding: 12% 10% 9%; }
.back__logo { width: 30%; height: auto; }
.back__thanks { margin-top: 2.6em; font-size: 2.4em; font-weight: 700; line-height: 1.2; }
.back__name { margin-top: 0.8em; font-size: 1.2em; font-weight: 600; }
.back__name span { opacity: 0.75; }
:lang(th) .back__name { font-size: 1em; }
.back__ct { margin-top: 2em; display: grid; gap: 0.7em; width: 100%; padding-top: 1.4em; border-top: 1px solid rgba(255, 255, 255, 0.25); }
.back__ct div { display: grid; grid-template-columns: 5.5em 1fr; gap: 1em; font-size: 0.92em; }
.back__ct dt { color: rgba(255, 255, 255, 0.6); }
.back__ct dd { font-family: var(--font-latin); word-break: break-all; }
.back__qr { margin-top: auto; display: flex; align-items: center; gap: 1.2em; }
.back__qr svg { width: 7.5em; height: 7.5em; padding: 0.6em; background: var(--white); border-radius: 2px; flex: none; shape-rendering: crispEdges; }
.back__qr p { font-size: 0.85em; max-width: 12em; color: rgba(255, 255, 255, 0.8); }
.back__iso { display: flex; flex-wrap: wrap; gap: 0.4em 1.4em; margin-top: 2em; font-family: var(--font-num); font-size: 0.78em; letter-spacing: 0.04em; color: rgba(255, 255, 255, 0.7); }
.back__tag { margin-top: 0.6em; font-size: 0.78em; color: rgba(255, 255, 255, 0.6); }

/* ------------------------------------------------------------ blue intro page (blueprint grid) */

.pg--blue {
  background-color: var(--blue); color: var(--white);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 5% 3.66%;
  background-position: -1px -1px;
}
.intro { padding-top: 16%; }
.intro__kicker { font-size: 0.9em; letter-spacing: 0.06em; opacity: 0.85; }
.intro h2 { margin: 0.8em 0 0.9em; font-size: 2.6em; line-height: 1.3; font-weight: 700; }
:lang(th) .intro h2 { font-size: 2.2em; }
.intro__lead { font-size: 1em; opacity: 0.92; max-width: 26em; }
.intro__art { margin-top: auto; }
.intro__art .iso { width: 100%; height: auto; }
.iso .f1, .iso .f2, .iso .f3 { fill: none; stroke: rgba(255, 255, 255, 0.85); stroke-width: 0.9; stroke-linejoin: round; }
.iso .f3 { fill: rgba(255, 255, 255, 0.08); }
.iso .rd { stroke: rgba(255, 255, 255, 0.5); stroke-width: 0.6; }
.iso .dm { stroke: var(--white); stroke-width: 0.7; stroke-dasharray: 3 3; }

/* ------------------------------------------------------------ contents */

.toc { border-top: 2px solid var(--ink); }
.toc li { border-bottom: 1px solid var(--line); }
.toc__link { display: grid; grid-template-columns: 3.2em 1fr auto; align-items: center; gap: 0.6em; padding: 1em 0; color: inherit; text-decoration: none; }
.toc__link > * { pointer-events: none; }
.toc__link:hover .toc__t { color: var(--blue); }
.toc__n { font-size: 1.9em; font-weight: 700; line-height: 1; color: var(--blue); }
.toc__t { font-size: 1.15em; font-weight: 700; line-height: 1.35; }
.toc__t small { display: block; font-family: var(--font-latin); font-size: 0.66em; font-weight: 400; color: var(--muted); letter-spacing: 0.03em; }
.toc__p { font-size: 1.1em; color: var(--ink); }
.toc__minor .toc__link { padding: 0.7em 0; }
.toc__minor .toc__t { font-size: 0.95em; font-weight: 600; }
.toc__hint { margin-top: auto; font-size: 0.78em; color: var(--muted); }

/* ------------------------------------------------------------ chapter openers */

.pg--opener { background: var(--ink); color: var(--white); }
.opener { justify-content: flex-end; padding-bottom: 12%; }
.opener__n { font-size: 7em; line-height: 0.9; font-weight: 700; letter-spacing: -0.02em; }
.opener h2 { margin-top: 0.3em; font-size: 2.5em; line-height: var(--lh-head); font-weight: 700; }
.opener__sub { margin-top: 0.2em; font-family: var(--font-latin); font-size: 0.9em; opacity: 0.8; letter-spacing: 0.03em; }
.opener__lead { margin-top: 1.2em; padding-top: 1.1em; border-top: 1px solid rgba(255, 255, 255, 0.35); font-size: 1em; max-width: 24em; }
.opener .pg__cap { margin-top: 1.6em; }

/* ------------------------------------------------------------ about */

.kstats { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--ink); }
.kstat { padding: 1.2em 0 1.1em; border-bottom: 1px solid var(--line); }
.kstat:nth-child(even) { padding-left: 1.4em; border-left: 1px solid var(--line); }
.kstat__num { font-size: 3.1em; line-height: 1; font-weight: 700; color: var(--blue); }
.kstat__num span { margin-left: 0.15em; font-family: var(--font); font-size: 0.4em; font-weight: 600; color: var(--text); }
.kstat__label { margin-top: 0.5em; font-size: 0.8em; color: var(--muted); }

.tl { border-left: 1px solid var(--blue); margin-left: 0.3em; }
.tl li { position: relative; display: grid; grid-template-columns: 4.4em 1fr; gap: 0.8em; padding: 0 0 2.2em 1.4em; }
.tl li::before { content: ""; position: absolute; left: -0.3em; top: 0.55em; width: 0.6em; height: 0.6em; background: var(--white); border: 1px solid var(--blue); transform: rotate(45deg); }
.tl__year { font-size: 2.3em; line-height: 1; font-weight: 700; color: var(--blue); }
.tl-span { margin-top: auto; }
.tl-span .dim { font-size: 1.1em; }
.tl-span p { margin-top: 0.6em; font-size: 0.8em; color: var(--muted); }
.tl h3 { font-size: 1.12em; line-height: 1.4; }
.tl li div p { margin-top: 0.3em; font-size: 0.88em; color: var(--muted); }

.cos { display: grid; gap: 1em; }
.co { padding: 1em 1.2em; background: var(--concrete); border-left: 3px solid var(--blue); }
.co h3 { font-size: 1.1em; }
.co__en { font-family: var(--font-latin); font-size: 0.72em; color: var(--muted); }
.co dl { display: grid; grid-template-columns: 1fr auto; gap: 1.2em; margin-top: 0.7em; }
.co dt { font-size: 0.7em; color: var(--muted); }
.co dd { font-size: 0.9em; font-weight: 600; }
.capital { margin-top: auto; display: flex; align-items: baseline; justify-content: space-between; gap: 1em; padding: 1em 1.2em; background: var(--blue); color: var(--white); }
.capital p { font-size: 0.9em; }
.capital .capital__v { font-family: var(--font-num); font-size: 1.9em; font-weight: 700; }
:lang(th) .capital .capital__v { font-family: var(--font); font-size: 1.5em; }

.org-top { display: flex; flex-direction: column; align-items: center; margin-bottom: 1.4em; }
.org-top li { position: relative; padding: 0.45em 1.2em; border: 1px solid var(--ink); font-size: 0.85em; font-weight: 600; text-align: center; }
.org-top li + li { margin-top: 1.3em; }
.org-top li + li::before { content: ""; position: absolute; left: 50%; bottom: 100%; height: 1.3em; border-left: 1px solid var(--ink); }
.org-top li:last-child { background: var(--ink); color: var(--white); }
.depts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.8em; border-top: 1px solid var(--ink); padding-top: 1.2em; position: relative; }
.depts::before { content: ""; position: absolute; left: 50%; top: -1.4em; height: 1.4em; border-left: 1px solid var(--ink); }
.depts li { padding: 0.8em 0.8em 0.9em; background: var(--concrete); border-top: 2px solid var(--blue); }
.depts h3 { font-size: 0.9em; line-height: 1.35; }
.depts p { margin-top: 0.35em; font-size: 0.72em; line-height: 1.55; color: var(--muted); }

.iso { margin-top: auto; display: grid; gap: 1.1em; }
.iso li { padding: 1.1em 0 0; border-top: 3px solid var(--blue); }
.iso__std { display: flex; align-items: baseline; gap: 0.3em; color: var(--blue); }
.iso__iso { font-family: var(--font-num); font-size: 1.1em; font-weight: 700; letter-spacing: 0.08em; }
.iso__code { font-size: 3.4em; line-height: 1; font-weight: 700; }
.iso__year { font-size: 1.3em; color: var(--muted); }
.iso__name { margin-top: 0.3em; font-size: 1.05em; font-weight: 700; }

/* ------------------------------------------------------------ EPC */

.model { padding: 0.9em 1.1em 1em; border: 1px solid var(--line); text-align: center; }
.model + .model { margin-top: 0.8em; }
.model--epc { border: 2px solid var(--blue); }
.model__h { font-size: 0.85em; font-weight: 700; color: var(--muted); text-align: left; }
.model--epc .model__h { color: var(--blue); }
.model__owner { display: inline-block; margin-top: 0.4em; padding: 0.3em 1.6em; border: 1px solid var(--ink); font-size: 0.85em; font-weight: 700; }
/* vertical connector with its label to the right */
.model__line { position: relative; padding-left: calc(50% + 0.7em); font-size: 0.72em; line-height: 2.2em; text-align: left; color: var(--muted); }
.model__line::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1px dashed var(--muted); }
.model--epc .model__line { color: var(--blue); font-weight: 700; }
.model--epc .model__line::before { border-left: 2px solid var(--blue); }
.model__parties, .model__epc { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4em; border-top: 1px dashed var(--muted); padding-top: 0.6em; }
.model__parties li { padding: 0.5em 0.2em; background: var(--concrete); font-size: 0.7em; line-height: 1.35; display: grid; place-items: center; }
.model__nny { display: inline-flex; align-items: center; gap: 0.6em; padding: 0.45em 1.2em; background: var(--blue); color: var(--white); font-size: 0.9em; font-weight: 700; }
.model__nny img { height: 1.3em; width: auto; }
.model__epc { grid-template-columns: repeat(3, 1fr); margin-top: 0.9em; border-top: 2px solid var(--blue); }
.model__epc li { padding: 0.45em 0.2em; background: var(--blue-tint); font-size: 0.8em; font-weight: 600; display: flex; justify-content: center; align-items: baseline; gap: 0.4em; }
.model__epc b { color: var(--blue); font-size: 1.3em; }
.model__note { margin-top: 0.8em; font-size: 0.74em; line-height: 1.6; color: var(--muted); text-align: left; }
:lang(th) .model__note { margin-top: 0.6em; font-size: 0.66em; }
:lang(th) .model__parties li { font-size: 0.62em; }

.pils { display: grid; gap: 1.1em; }
.pil { display: grid; grid-template-columns: 2.4em 1fr; gap: 0.9em; padding-top: 1em; border-top: 1px solid var(--line); }
.pil__l { font-size: 3.2em; line-height: 0.85; font-weight: 700; color: var(--blue); }
.pil h3 { font-size: 1.1em; }
.pil h3 small { margin-left: 0.6em; font-family: var(--font-latin); font-size: 0.7em; font-weight: 400; color: var(--muted); }
.pil div > p { margin-top: 0.3em; font-size: 0.82em; line-height: 1.7; }
:lang(th) .pil div > p { font-size: 0.74em; line-height: 1.6; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4em; margin-top: 0.6em; }
.chips li { padding: 0.15em 0.6em; background: var(--blue-tint); color: var(--blue-deep); font-size: 0.7em; }
:lang(th) .chips li { font-size: 0.62em; }

.big { display: flex; align-items: baseline; gap: 0.5em; margin-bottom: 1em; font-size: 0.95em; font-weight: 600; }
.big .num { font-size: 3.6em; line-height: 1; font-weight: 700; color: var(--blue); }
.epc-list { border-top: 2px solid var(--ink); }
.epc-list li { display: grid; grid-template-columns: 3.4em 1fr auto; gap: 0.8em; align-items: baseline; padding: 0.55em 0; border-bottom: 1px solid var(--line); font-size: 0.85em; line-height: 1.45; }
.epc-list li span:first-child { color: var(--blue); font-weight: 700; }
.epc-list li span:last-child { color: var(--muted); white-space: nowrap; }
.epc-list small, .rec small { display: block; font-family: var(--font); font-size: 0.72em; color: var(--red); font-weight: 600; }

/* ------------------------------------------------------------ capabilities */

.std { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.4em; border-top: 1px solid var(--ink); }
.std li { padding: 0.3em 0 0.3em 1em; border-bottom: 1px solid var(--line); font-size: 0.82em; position: relative; }
.std li::before { content: ""; position: absolute; left: 0; top: 50%; width: 0.4em; height: 0.4em; margin-top: -0.2em; background: var(--blue); }
/* photos that fill whatever height the text leaves, so longer (Thai) text never pushes them off the page */
.wide { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; margin-top: 1.2em; }
.wide img { flex: 1 1 0; min-height: 0; width: 100%; height: 100%; object-fit: cover; }
.wide figcaption, .machines figcaption, .proj__thumbs figcaption { margin-top: 0.4em; font-size: 0.68em; color: var(--muted); }
.wide--bim { margin-top: 0; margin-bottom: 1.4em; }

.techs { display: grid; gap: 1.3em; }
.tech { display: grid; grid-template-columns: 44% 1fr; gap: 1.1em; align-items: start; }
.tech img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.tech h3 { font-size: 1.1em; line-height: 1.35; }
.tech p { margin-top: 0.4em; font-size: 0.85em; color: var(--muted); }

.plant-fig { flex: 1; min-height: 0; margin-bottom: 1.3em; }
.plant-fig img { width: 100%; height: 100%; object-fit: cover; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--ink); }
.kpis div { padding: 0.8em 0; border-bottom: 1px solid var(--line); }
.kpis div:nth-child(even) { padding-left: 1.2em; border-left: 1px solid var(--line); }
.kpis dt { font-size: 0.78em; color: var(--muted); }
.kpis dd { font-size: 0.95em; font-weight: 600; }
.kpis .num { font-size: 2.2em; line-height: 1.1; font-weight: 700; color: var(--blue); }

.equip { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.4em; border-top: 1px solid var(--ink); }
.equip li { display: flex; justify-content: space-between; gap: 0.6em; padding: 0.35em 0; border-bottom: 1px solid var(--line); font-size: 0.8em; }
.equip .num { font-weight: 700; color: var(--blue); }
.machines { margin-top: auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6em; }
.machines img { width: 100%; aspect-ratio: 1; object-fit: cover; }

.benefits { display: grid; gap: 0.9em; }
.benefits li { padding-left: 1em; border-left: 3px solid var(--blue); }
.benefits h3 { font-size: 1em; }
.benefits p { font-size: 0.8em; color: var(--muted); line-height: 1.65; }

/* ------------------------------------------------------------ project pages */

.proj__media { position: absolute; left: 0; right: 0; top: 0; height: 43%; background: var(--concrete); }
.proj__media img { width: 100%; height: 100%; object-fit: cover; }
/* EPC mark sits in the image's bottom-right corner, the same distance from the right and bottom edges (above the spine shadow) */
.proj__media .bk-epc { position: absolute; z-index: 4; right: 2.2cqw; bottom: 2.2cqw; font-size: calc(100cqw / 30); }
.proj__media figcaption { position: absolute; bottom: 0; left: 0; right: 0; padding: 2.4% 8.5%; font-size: calc(100cqw / 56); color: var(--white); background: linear-gradient(0deg, rgba(7, 20, 42, 0.6), rgba(7, 20, 42, 0)); }
.pg--project .pg__run { color: var(--white); text-shadow: 0 1px 3px rgba(7, 20, 42, 0.6); }
.pg--project .pg__run .num { color: var(--white); }
.proj { padding-top: calc(43% * 820 / 600 + 1.3em); }
.proj__cat { font-size: 0.75em; color: var(--blue); font-weight: 700; letter-spacing: 0.04em; }
.proj h2 { margin-top: 0.2em; font-size: 1.5em; line-height: 1.3; color: var(--ink); }
:lang(th) .proj h2 { font-size: 1.3em; }
.proj .pg__sub { font-size: 0.72em; }
.proj__sum { margin-top: 0.8em; font-size: 0.85em; line-height: 1.7; }
:lang(th) .proj__sum { font-size: 0.8em; line-height: 1.6; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2em; margin-top: 0.9em; border-top: 1px solid var(--ink); }
.facts .fact { display: flex; justify-content: space-between; gap: 0.6em; padding: 0.35em 0; border-bottom: 1px solid var(--line); font-size: 0.74em; }
.facts dt { color: var(--muted); white-space: nowrap; }
.facts dd { font-weight: 600; text-align: right; }
/* thumbnails follow the text and take the remaining height */
.proj__thumbs { flex: 1 1 0; min-height: 0; max-height: 17em; margin-top: 1.2em; display: grid; grid-template-columns: 1fr 1fr; gap: 0.7em; }
.proj__thumbs figure { display: flex; flex-direction: column; min-height: 0; }
.proj__thumbs img { flex: 1 1 0; min-height: 0; width: 100%; height: 100%; object-fit: cover; background: var(--concrete); }

.minis { flex: 1 1 0; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(0, 1fr); gap: 1.2em 1em; }
.mini { display: flex; flex-direction: column; min-height: 0; }
.mini__media { flex: 1 1 0; min-height: 0; position: relative; background: var(--concrete); }
.mini__media img { width: 100%; height: 100%; object-fit: cover; }
.mini__media .bk-epc { position: absolute; right: 0.6em; bottom: 0.6em; }
.mini__media .tag { position: absolute; bottom: 0.5em; left: 0.6em; margin: 0; font-size: 0.62em; color: var(--white); background: rgba(7, 20, 42, 0.45); }
.mini h3 { margin-top: 0.5em; font-size: 0.92em; line-height: 1.35; }
.mini__meta { display: flex; gap: 1em; margin-top: 0.15em; font-size: 0.78em; color: var(--muted); }
.pg--minis-3 .minis { grid-template-columns: 1fr; gap: 1.3em; }
.pg--minis-3 .mini { display: grid; grid-template-columns: 50% 1fr; grid-template-rows: auto 1fr; gap: 0 1.1em; }
.pg--minis-3 .mini__media { grid-row: span 2; min-height: 0; }
.pg--minis-3 .mini h3 { margin-top: 0; font-size: 1.05em; }
.pg--minis-3 .mini__meta { flex-direction: column; gap: 0.2em; margin-top: 0.4em; }

/* ------------------------------------------------------------ records */

.pg--records .pg__title { margin-bottom: 1em; }
.pg--records .pg__lead { font-size: 0.8em; color: var(--muted); }
.rec { font-size: 0.72em; line-height: 1.4; }
:lang(th) .rec { font-size: 0.68em; }
.rec th { padding: 0 0.6em 0.5em 0; text-align: left; font-weight: 600; color: var(--muted); border-bottom: 2px solid var(--ink); }
.rec td { padding: 0.5em 0.6em 0.5em 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.rec td:first-child { width: 3.6em; color: var(--blue); font-weight: 700; }
.rec td:nth-child(3) { white-space: nowrap; text-align: right; color: var(--muted); }
.rec th:nth-child(3) { text-align: right; }
.rec td:last-child, .rec th:last-child { width: 3.2em; padding-right: 0; text-align: right; }
.rec .bk-epc { font-size: 0.85em; }

/* ------------------------------------------------------------ clients */

.logos { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7em; }
.logos li { display: grid; place-items: center; height: 4.6em; padding: 0.7em 1em; background: var(--white); border: 1px solid var(--line); }
.logos img { max-height: 3.2em; max-width: 100%; width: auto; height: auto; }

@media (prefers-reduced-motion: reduce) {
  .bk-book, .bk-fit.is-animated { transition: none; }
}
