/* Printerix site: the test page, set as a web page. Tokens follow DESIGN.md (Pixel P). */

@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-display: swap; font-weight: 400; src: url(assets/fonts/be-vietnam-pro-vietnamese-400-normal.woff2) format("woff2"); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-display: swap; font-weight: 400; src: url(assets/fonts/be-vietnam-pro-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-display: swap; font-weight: 500; src: url(assets/fonts/be-vietnam-pro-vietnamese-500-normal.woff2) format("woff2"); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-display: swap; font-weight: 500; src: url(assets/fonts/be-vietnam-pro-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-display: swap; font-weight: 600; src: url(assets/fonts/be-vietnam-pro-vietnamese-600-normal.woff2) format("woff2"); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-display: swap; font-weight: 600; src: url(assets/fonts/be-vietnam-pro-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-display: swap; font-weight: 700; src: url(assets/fonts/be-vietnam-pro-vietnamese-700-normal.woff2) format("woff2"); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-display: swap; font-weight: 700; src: url(assets/fonts/be-vietnam-pro-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  --cobalt: #0756F5;
  --cobalt-deep: #0734D7;
  --cyan: #09C9F2;
  --violet: #8538F7;
  --ink: #0B1D46;
  --ink-2: #374968;
  --ink-3: #536482;
  --rule: #D5DEEE;
  --paper: #FFFFFF;
  --canvas: #F4F8FF;
  --chrome-text: #0B1D46;
  --chrome-muted: #536482;
  --sheet-shadow: 0 1px 2px rgb(11 29 70 / 6%), 0 24px 60px -24px rgb(11 29 70 / 22%);
  /* Test-page inks: printer colours, not brand colours. Used only as swatches. */
  --ink-c: #00A0E0;
  --ink-m: #E0007A;
  --ink-y: #FFE600;
  --ink-k: #111114;
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #081532;
    --chrome-text: #EAF2FF;
    --chrome-muted: #A9BBDA;
    --sheet-shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 30px 80px -30px rgb(0 0 0 / 70%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --canvas: #081532;
  --chrome-text: #EAF2FF;
  --chrome-muted: #A9BBDA;
  --sheet-shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 30px 80px -30px rgb(0 0 0 / 70%);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--chrome-text);
  font: 400 16px/1.55 var(--font);
  font-feature-settings: "kern";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  scrollbar-color: var(--chrome-muted) var(--canvas);
}
::selection { background: rgb(7 86 245 / 22%); color: inherit; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; border-radius: 4px; }
.sheet :focus-visible { outline-color: var(--cobalt); }

html[data-lang="vi"] [data-l="en"],
html[data-lang="en"] [data-l="vi"] { display: none !important; }

.skip { position: absolute; left: 16px; top: -60px; background: var(--paper); color: var(--ink); padding: 10px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 12px; }

/* ---------- Chrome outside the sheet ---------- */
.chrome {
  max-width: 880px;
  margin: 0 auto;
  padding: 20px 16px 0;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.brand img { width: 30px; height: 30px; }
.chrome nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.chrome nav a { text-decoration: none; color: var(--chrome-muted); font-size: 14px; font-weight: 500; padding: 10px 10px; border-radius: 8px; transition: color 150ms; }
.chrome nav a:hover { color: var(--chrome-text); }
.chrome nav a[aria-current="page"] { color: var(--chrome-text); }
.lang {
  display: inline-flex; margin-left: 6px; padding: 3px; border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--chrome-muted) 45%, transparent);
}
.lang button {
  font: 600 13px/1 var(--font); color: var(--chrome-muted); background: none; border: 0;
  min-width: 40px; min-height: 34px; padding: 0 10px; border-radius: 7px; cursor: pointer; transition: color 150ms, background-color 150ms;
}
.lang button[aria-pressed="true"] { background: var(--chrome-text); color: var(--canvas); }

/* ---------- The sheet ---------- */
.sheet {
  position: relative;
  max-width: 880px;
  margin: 18px auto 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--sheet-shadow);
  padding: clamp(40px, 7vw, 76px) clamp(26px, 7vw, 76px) clamp(48px, 7vw, 72px);
}
/* The 5 mm edge frame: all four sides visible means the printer reaches the edge. */
.sheet::before {
  content: "";
  position: absolute;
  inset: clamp(10px, 1.8vw, 18px);
  border: 1.5px dashed rgb(11 29 70 / 38%);
  pointer-events: none;
}

.strip {
  height: 6px;
  background: linear-gradient(90deg, var(--cobalt) 0 65%, var(--cyan) 65% 85%, var(--violet) 85% 100%);
  margin-bottom: clamp(28px, 4vw, 40px);
  transform-origin: left center;
}

h1, h2, h3 { color: var(--ink); text-wrap: balance; margin: 0; }
h1 {
  font-weight: 700;
  font-size: clamp(2.6rem, 8.4vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 11ch;
}
.stamp {
  margin: 18px 0 0;
  color: var(--ink-2);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.lead {
  margin: 26px 0 0;
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  line-height: 1.5;
  max-width: 34ch;
  color: var(--ink);
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border-radius: 12px;
  font: 600 16px/1 var(--font); text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent;
  transition: background-color 160ms, border-color 160ms, transform 160ms var(--ease-out), box-shadow 160ms;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--cobalt); color: #fff; box-shadow: 0 1px 1px rgb(7 52 215 / 30%), 0 8px 20px -10px rgb(7 86 245 / 70%); }
.btn-primary:hover { background: var(--cobalt-deep); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { background: var(--paper); color: var(--ink); border-color: #B9C6DE; }
.btn-ghost:hover { border-color: var(--ink); }
.note { margin: 14px 0 0; font-size: 14px; color: var(--ink-3); }

/* ---------- Ink swatches as the section index ---------- */
.swatches {
  margin: clamp(44px, 7vw, 64px) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(8px, 2vw, 18px);
}
.swatches a { display: block; text-decoration: none; color: var(--ink); }
.swatch {
  aspect-ratio: 1;
  display: flex; align-items: flex-end; justify-content: flex-end;
  padding: 10px 12px;
  font-weight: 700; font-size: clamp(14px, 2.2vw, 20px); color: #fff;
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
}
.swatches li:nth-child(1) .swatch { background: var(--ink-c); color: rgb(11 29 70 / 88%); }
.swatches li:nth-child(2) .swatch { background: var(--ink-m); }
.swatches li:nth-child(3) .swatch { background: var(--ink-y); color: rgb(11 29 70 / 88%); }
.swatches li:nth-child(4) .swatch { background: var(--ink-k); }
.swatch-label { display: block; margin-top: 10px; font-size: 13px; line-height: 1.35; color: var(--ink-2); }
.swatch-label b { display: block; font-size: clamp(14px, 1.9vw, 17px); font-weight: 600; color: var(--ink); }
@media (hover: hover) {
  .swatches a:hover .swatch { transform: translateY(-4px); box-shadow: 0 14px 24px -14px rgb(11 29 70 / 55%); }
}

/* ---------- Sections ---------- */
.part { margin-top: clamp(72px, 11vw, 116px); }
.part-head { display: flex; align-items: flex-start; gap: 14px; }
.part-head .chip { width: 16px; height: 16px; flex: none; margin-top: calc(0.55em - 8px); font-size: clamp(1.75rem, 4.4vw, 2.6rem); }
.chip.c { background: var(--ink-c); } .chip.m { background: var(--ink-m); }
.chip.y { background: var(--ink-y); box-shadow: inset 0 0 0 1px rgb(11 29 70 / 18%); } .chip.k { background: var(--ink-k); }
.chip.ramp { background: linear-gradient(90deg, #e6e6e6, #191919); }
h2 { font-weight: 700; font-size: clamp(1.75rem, 4.4vw, 2.6rem); line-height: 1.1; letter-spacing: -0.025em; }
.part-intro { margin: 16px 0 0; font-size: 17px; color: var(--ink-2); max-width: 52ch; }

.part-body {
  margin-top: clamp(28px, 4vw, 40px);
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 64px);
  align-items: start;
}

/* A real screen, framed by the dashed cut line the app draws around an ID card copy. */
.shot {
  margin: 0; position: relative; padding: 18px;
  /* L-shaped cut ticks outside a square dashed cut line, as on the app's ID card copy. */
  --t: linear-gradient(#0B1D46, #0B1D46);
  background:
    var(--t) left 0 top 8px / 6px 1px, var(--t) left 8px top 0 / 1px 6px,
    var(--t) right 0 top 8px / 6px 1px, var(--t) right 8px top 0 / 1px 6px,
    var(--t) left 0 bottom 8px / 6px 1px, var(--t) left 8px bottom 0 / 1px 6px,
    var(--t) right 0 bottom 8px / 6px 1px, var(--t) right 8px bottom 0 / 1px 6px;
  background-repeat: no-repeat;
}
.shot::before { content: ""; position: absolute; inset: 8px; border: 1px dashed #8C96A8; pointer-events: none; }
.shot img { border-radius: 4px; background: var(--canvas); }
.shot figcaption { margin-top: 12px; font-size: 13px; color: var(--ink-3); text-align: center; }

/* "How to read this page": each line pairs what you see with what it means. */
.readings { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.readings li { padding: 16px 0; border-bottom: 1px solid var(--rule); font-size: 17px; line-height: 1.5; color: var(--ink-2); }
.readings b { color: var(--ink); font-weight: 600; }

/* ---------- Grey ramp: honest status ---------- */
.ramp { margin-top: clamp(28px, 4vw, 40px); }
.ramp-bar { display: grid; grid-template-columns: repeat(10, 1fr); height: 56px; border: 1px solid #B9B9B1; }
.ramp-bar span:nth-child(1) { background: rgb(230 230 230); } .ramp-bar span:nth-child(2) { background: rgb(204 204 204); }
.ramp-bar span:nth-child(3) { background: rgb(179 179 179); } .ramp-bar span:nth-child(4) { background: rgb(153 153 153); }
.ramp-bar span:nth-child(5) { background: rgb(128 128 128); } .ramp-bar span:nth-child(6) { background: rgb(102 102 102); }
.ramp-bar span:nth-child(7) { background: rgb(77 77 77); } .ramp-bar span:nth-child(8) { background: rgb(51 51 51); }
.ramp-bar span:nth-child(9) { background: rgb(26 26 26); } .ramp-bar span:nth-child(10) { background: rgb(0 0 0); }
.ramp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.ramp-steps li { padding: 14px 14px 0 0; border-left: 1px solid var(--ink); padding-left: 10px; font-size: 14px; line-height: 1.4; color: var(--ink-2); }
.ramp-steps li b { display: block; color: var(--ink); font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.ramp-steps li.unknown { border-left-style: dashed; }

/* ---------- Text sizes ---------- */
.sizes { margin: clamp(28px, 4vw, 40px) 0 0; display: grid; gap: 10px; }
.sizes p { margin: 0; color: var(--ink); line-height: 1.35; overflow-wrap: anywhere; }
.sizes .pt { display: inline-block; min-width: 3.4em; color: var(--ink-3); font-variant-numeric: tabular-nums; font-weight: 500; }
.sizes p:nth-child(1) { font-size: 10.7px; } .sizes p:nth-child(2) { font-size: 13.3px; }
.sizes p:nth-child(3) { font-size: 16px; } .sizes p:nth-child(4) { font-size: 21.3px; }
.sizes p:nth-child(5) { margin-top: 18px; font-size: clamp(28px, 4.6vw, 42.7px); font-weight: 700; letter-spacing: -0.02em; }

/* ---------- Closing ---------- */
.close { margin-top: clamp(80px, 12vw, 120px); padding-top: clamp(36px, 5vw, 48px); border-top: 6px solid transparent; border-image: linear-gradient(90deg, var(--cobalt) 0 65%, var(--cyan) 65% 85%, var(--violet) 85% 100%) 1; }
.close h2 { font-size: clamp(2rem, 5.6vw, 3.4rem); max-width: 14ch; }
.close p { margin: 16px 0 0; font-size: 17px; color: var(--ink-2); max-width: 46ch; }

.print-only { display: none; }

/* ---------- Footer ---------- */
.foot {
  max-width: 880px; margin: 0 auto; padding: 28px 16px 48px;
  display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center;
  font-size: 14px; color: var(--chrome-muted);
}
.foot a { color: var(--chrome-muted); text-decoration: none; padding: 6px 0; }
.foot a:hover { color: var(--chrome-text); }
.foot .spacer { margin-left: auto; }

/* ---------- Reading pages (support, privacy) ---------- */
.doc h1 { font-size: clamp(2.2rem, 6.4vw, 3.8rem); max-width: 16ch; }
.doc .stamp { margin-top: 14px; }
.prose { margin-top: clamp(36px, 5vw, 52px); max-width: 66ch; font-size: 17px; line-height: 1.65; color: var(--ink-2); }
.prose h2 { font-size: clamp(1.35rem, 3vw, 1.65rem); letter-spacing: -0.015em; margin: 48px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 1.2em; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--ink-3); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--cobalt); }
.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative;
  font-weight: 600; font-size: 18px; color: var(--ink); line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg);
  transition: transform 180ms var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.faq .answer { padding: 0 0 20px; }
.contact {
  margin-top: 48px; padding: 24px; border: 1.5px dashed rgb(11 29 70 / 30%);
  display: grid; gap: 6px;
}
.contact b { color: var(--ink); font-size: 18px; }
.todo { background: #FFF4D6; color: #6B3D00; padding: 1px 6px; border-radius: 4px; font-weight: 600; text-decoration: none; }

/* ---------- Motion: the sheet comes out of the printer once ---------- */
@media (prefers-reduced-motion: no-preference) {
  .sheet > .strip { animation: lay-strip 900ms var(--ease-out) both; }
  .swatch { animation: lay-ink 700ms var(--ease-out) both; }
  .swatches li:nth-child(1) .swatch { animation-delay: 220ms; }
  .swatches li:nth-child(2) .swatch { animation-delay: 300ms; }
  .swatches li:nth-child(3) .swatch { animation-delay: 380ms; }
  .swatches li:nth-child(4) .swatch { animation-delay: 460ms; }
  @keyframes lay-strip { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
  @keyframes lay-ink { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
}

/* ---------- Narrow screens: the sheet becomes the page ---------- */
@media (max-width: 680px) {
  .chrome { padding-top: 14px; gap: 8px; }
  .chrome nav a.hide-sm { display: none; }
  .sheet { margin-top: 12px; box-shadow: none; }
  .part-body { grid-template-columns: 1fr; }
  .shot { max-width: 260px; margin: 0 auto; }
  .ramp-steps { grid-template-columns: 1fr 1fr; row-gap: 18px; }
  .swatch { padding: 6px 8px; }
  .swatch-label { font-size: 12px; }
  .btn { flex: 1 1 100%; }
}

/* ---------- Print: the page prints as a working one-sheet test page ---------- */
@media print {
  @page { size: A4; margin: 0; }
  :root { --canvas: #fff; }
  html, body { background: #fff !important; }
  body { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .chrome, .foot, .actions, .note, .lead, .part, .close, .skip, .screen-only { display: none !important; }
  .print-only { display: block; }
  .sheet { max-width: none; width: 210mm; height: 297mm; margin: 0; box-shadow: none; padding: 18mm 18mm 0; overflow: hidden; }
  .sheet::before { inset: 5mm; border: 0.5mm dashed #0B1D46; }
  .strip { height: 3mm; margin-bottom: 9mm; animation: none !important; }
  h1 { font-size: 13mm; max-width: none; }
  .stamp { font-size: 4.2mm; margin-top: 3mm; }
  .swatches { margin-top: 10mm; gap: 4.67mm; grid-template-columns: repeat(4, 40mm); }
  .swatch { animation: none !important; font-size: 5mm; padding: 2mm 3mm; }
  .swatch-label b { display: none; }
  .swatch-label { font-size: 3.6mm; margin-top: 2mm; }
  .swatch-label b { font-size: 4mm; }
  .print-only .ramp { margin-top: 9mm; }
  .print-only .ramp-bar { height: 14mm; }
  .print-only .ph { font-size: 4.5mm; font-weight: 600; margin: 9mm 0 3mm; }
  .print-only .sizes { margin-top: 0; gap: 2mm; }
  .print-only .sizes p:nth-child(1) { font-size: 8pt; } .print-only .sizes p:nth-child(2) { font-size: 10pt; }
  .print-only .sizes p:nth-child(3) { font-size: 12pt; } .print-only .sizes p:nth-child(4) { font-size: 16pt; }
  .print-only ul { margin: 0; padding-left: 4mm; font-size: 3.8mm; line-height: 1.6; color: #374968; }
}

.btn[aria-disabled="true"] { background: #DCE5F5; color: var(--ink-2); box-shadow: none; cursor: default; }
