/* ==========================================================================
   Tappi — digital product passport pages
   Layers on top of main.css: tokens, chrome, .card/.prov/.kv/.disclosure
   all come from there. Only passport-specific components live here.
   ========================================================================== */

:root {
  /* carbon breakdown — single navy hue, stepped tints (more authoritative than rainbow) */
  --c1: #1a2b45; --c2: #3a4a66; --c3: #5b6a85; --c4: #8a96aa; --c5: #b56b6b; --c6: #bcc4d0;
}

/* ===== Document metadata band — sits directly under the site masthead ===== */
.doc-meta-band { background: var(--navy); color: #fff; }
.doc-meta-in {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 24px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  padding-top: 15px;
}
.mast-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mast-eyebrow {
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #93a3bd;
  font-weight: 600;
}
.lang-pill {
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  color: #fff;
  font-family: inherit;
  transition: all 0.18s;
}
.lang-pill:hover { background: rgba(255, 255, 255, 0.1); }
.lang-pill:focus-visible { outline: 2px solid #7da2e6; outline-offset: 2px; }
.mast-meta {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.mast-meta .lbl {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8092ab;
  margin-bottom: 2px;
}
.mast-meta .val { font-size: 11.5px; color: #fff; font-weight: 500; }
.mast-meta .val.ok { color: #7fd0aa; }
@media (max-width: 640px) {
  .doc-meta-in { padding: 14px 16px 16px; }
  .mast-meta { gap: 16px; }
}

.demo-note {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 8px 24px;
  font-size: 11px;
  color: var(--demo);
  background: var(--demo-soft);
  text-align: center;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 640px) { .demo-note { padding: 8px 16px; } }

/* ===== Hero ===== */
.hero { display: grid; grid-template-columns: 220px 1fr; gap: 26px; align-items: start; margin-bottom: 8px; }
@media (max-width: 640px) { .hero { grid-template-columns: 1fr; gap: 18px; } }
.hero-img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: contain;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: block;
}
.hero-thumbs { display: flex; gap: 6px; margin-top: 6px; }
.hero-thumb {
  flex: 1;
  aspect-ratio: 1/1;
  border: 1.5px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  cursor: pointer;
  background: var(--card);
  padding: 0;
}
.hero-thumb img { width: 100%; height: 100%; object-fit: contain; }
.hero-thumb.active { border-color: var(--ink); }
.hero-thumb:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }

.hero-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--ink-soft);
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero-brand .dot {
  width: 19px;
  height: 19px;
  border-radius: 5px;
  background: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
}
.hero h1 { margin-bottom: 4px; }
.hero-weight { font-size: 12.5px; color: var(--ink-faint); margin-bottom: 16px; }

.hero-metrics { display: flex; gap: 10px; flex-wrap: wrap; }
.impact-box {
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  border-radius: 7px;
  padding: 12px 16px;
  background: var(--card);
  min-width: 158px;
}
.impact-box .lbl {
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.impact-box .est-chip {
  font-size: 8.5px;
  color: var(--amber);
  background: var(--amber-soft);
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.impact-box .val {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 4px;
  line-height: 1;
  color: var(--navy);
}
.impact-box .val small { font-family: var(--font-sans); font-size: 11px; font-weight: 500; color: var(--ink-soft); }
.impact-box .rng { font-size: 10.5px; color: var(--ink-faint); margin-top: 5px; }
.verify-chip {
  border: 1px solid var(--navy-line);
  border-left: 3px solid var(--green);
  border-radius: 7px;
  padding: 12px 16px;
  background: var(--card);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 148px;
}
.verify-chip .v-top { font-size: 10px; color: var(--green); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.verify-chip .v-mid { font-size: 14px; font-weight: 700; color: var(--ink); margin-top: 4px; }
.verify-chip .v-bot { font-size: 10.5px; color: var(--ink-soft); margin-top: 2px; }

/* ===== Tabs ===== */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-top: 28px; }
.tab {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 11px 16px;
  cursor: pointer;
  border: 0;
  background: none;
  font-family: inherit;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  letter-spacing: 0.01em;
}
.tab.active { color: var(--navy); font-weight: 600; border-bottom-color: var(--navy); }
.tab:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
.tabpane { display: none; }
.tabpane.active { display: block; }

/* ===== Collapsible passport cards (extends shared .card) ===== */
.card-head { cursor: pointer; user-select: none; }
.card-head .prov { margin-right: 12px; }
.card-head .chev { color: var(--ink-faint); transition: transform 0.2s; font-size: 12px; }
.card.collapsed .chev { transform: rotate(180deg); }
.card.collapsed .card-body { display: none; }

/* ===== Journey ===== */
.journey { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 640px) { .journey { grid-template-columns: 1fr; } }
.jstage .jname { font-size: 12.5px; font-weight: 600; }
.jstage .jloc { font-size: 11.5px; color: var(--ink-soft); }
.jstage .jloc .mono { font-size: 10.5px; color: var(--ink-faint); }

/* ===== Carbon journey flow ===== */
.cjourney { margin-top: 2px; }
.cj-rail { display: flex; align-items: stretch; gap: 0; }
.cj-step { flex: 1; position: relative; padding: 0 4px; }
.cj-step:not(:last-child)::after {
  content: ''; position: absolute; top: 19px; right: -8px; width: 16px; height: 2px;
  background: var(--line); z-index: 1;
}
.cj-step:not(:last-child)::before {
  content: ''; position: absolute; top: 15px; right: -10px; z-index: 2;
  border-left: 6px solid #cfcfcf; border-top: 5px solid transparent; border-bottom: 5px solid transparent;
}
.cj-node {
  width: 40px; height: 40px; border-radius: 11px; margin: 0 auto 9px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; position: relative; z-index: 3;
}
.cj-node svg { width: 21px; height: 21px; display: block; }
.cj-stage { text-align: center; font-size: 11.5px; font-weight: 600; line-height: 1.25; }
.cj-loc { text-align: center; font-size: 10.5px; color: var(--ink-soft); line-height: 1.3; margin-top: 2px; min-height: 26px; }
.cj-loc .mono { font-size: 9px; color: var(--ink-faint); display: block; }
.cj-carbon { margin-top: 9px; position: relative; padding-top: 9px; }
.cj-track {
  height: 64px;
  background: var(--line-soft);
  border-radius: 4px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  position: relative;
}
.cj-track::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; bottom: 0;
  background-image: repeating-linear-gradient(to top, transparent, transparent 15px, rgba(0,0,0,0.04) 15px, rgba(0,0,0,0.04) 16px);
  pointer-events: none; z-index: 1;
}
.cj-fill {
  width: 100%; border-radius: 4px 4px 0 0;
  transition: height 0.9s cubic-bezier(0.22,1,0.36,1);
  min-height: 4px; position: relative; z-index: 2;
}
.cj-pct { text-align: center; margin-top: 6px; }
.cj-pct b { font-family: var(--font-serif); font-size: 15px; font-weight: 600; color: var(--navy); }
.cj-pct .lbl {
  display: block; font-size: 8.5px; font-weight: 500; color: var(--ink-faint);
  letter-spacing: 0.06em; text-transform: uppercase; margin-top: 1px;
}
.cj-axis {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 4px 2px 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.cj-axis-title { font-size: 12px; font-weight: 600; color: var(--ink); letter-spacing: 0.01em; }
.cj-axis-note { font-size: 10px; color: var(--ink-faint); }
.cj-hot {
  position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  font-size: 8px; font-weight: 700; color: #fff; background: var(--amber);
  padding: 1.5px 6px; border-radius: 999px; white-space: nowrap; z-index: 4; letter-spacing: 0.04em;
}
@media (max-width: 640px) {
  .cj-loc { min-height: 34px; }
  .cj-node { width: 34px; height: 34px; border-radius: 9px; }
  .cj-node svg { width: 18px; height: 18px; }
  .cj-stage { font-size: 10.5px; }
}

/* ===== Impact breakdown ===== */
.impact-select { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); margin-bottom: 14px; }
.impact-select .pill { border: 1px solid var(--line); border-radius: 6px; padding: 5px 11px; font-weight: 500; color: var(--ink); }
.impact-total { font-size: 15px; font-weight: 600; margin-left: 6px; }
.impact-total .est-chip {
  font-size: 9px; color: var(--amber); background: var(--amber-soft);
  padding: 2px 6px; border-radius: 3px; margin-left: 6px; font-weight: 600; letter-spacing: 0.03em;
}
.bdbar { display: flex; height: 13px; border-radius: 4px; overflow: hidden; margin-bottom: 14px; }
.bdbar span { display: block; }
.bdlegend { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 20px; }
@media (max-width: 480px) { .bdlegend { grid-template-columns: 1fr; } }
.bdlegend .item { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; }
.bdlegend .lft { display: flex; align-items: center; gap: 8px; }
.bdlegend i { width: 9px; height: 9px; border-radius: 2px; }
.bdlegend .pct { color: var(--ink-soft); font-size: 12px; }

/* ===== Certification grid ===== */
.certgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .certgrid { grid-template-columns: 1fr; } }
.cert { border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: flex; gap: 12px; align-items: flex-start; }
.cert .seal {
  width: 42px; height: 42px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: #fff; text-align: center; line-height: 1.1;
}
.seal.us { background: #3a5278; }
.seal.eu { background: #2d4a8a; }
.seal.kr { background: #4a6c5a; }
.seal.bv { background: #c0151c; }
.cert .cbody h3 { font-size: 12.5px; font-weight: 600; margin-bottom: 2px; }
.cert .cbody .pass { font-size: 10.5px; font-weight: 700; color: var(--green); }
.cert .cbody p { font-size: 11px; color: var(--ink-soft); line-height: 1.5; margin-top: 3px; }
.cert .cbody .mono { font-size: 10px; color: var(--ink-faint); }

/* ===== Document footer (the passport's own sign-off, above the site footer) ===== */
.doc-foot { max-width: var(--measure); margin: 0 auto; padding: 26px 24px 40px; text-align: center; }
.foot-updated { font-size: 11px; color: var(--ink-faint); }
.foot-powered { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-soft); margin-top: 12px; }
.foot-powered .tappi { font-weight: 700; color: var(--ink); }
.foot-powered .tappi::before { content: '◆'; color: var(--green); margin-right: 3px; font-size: 10px; }
.foot-attest { font-size: 11px; color: var(--ink-soft); margin-top: 16px; line-height: 1.6; }
.foot-attest .bv-mark {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 6px; padding: 6px 11px; margin-top: 8px; background: var(--card);
}
.foot-attest .bv-mark b { color: #c0151c; font-size: 12px; }
.foot-meta { font-size: 10px; color: var(--ink-faint); margin-top: 16px; line-height: 1.7; }
.foot-meta a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* ===== Methodology dialog ===== */
dialog.method {
  border: 1px solid var(--line); border-radius: 10px; padding: 0;
  max-width: 600px; width: calc(100% - 36px);
  background: var(--card); color: var(--ink);
  box-shadow: 0 30px 60px -22px rgba(0, 0, 0, 0.3); max-height: 86vh;
}
dialog.method::backdrop { background: rgba(0, 0, 0, 0.4); }
.method-inner { padding: 24px 26px 20px; overflow-y: auto; max-height: 86vh; }
.method-inner h3 { font-family: var(--font-serif); font-size: 18px; font-weight: 600; margin-bottom: 3px; }
.method-inner .msub { font-size: 11px; color: var(--ink-faint); margin-bottom: 14px; }
.mblock { padding: 12px 0; border-top: 1px solid var(--line); }
.mblock h4 {
  font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 5px; font-weight: 600;
}
.mblock p { font-size: 12px; color: var(--ink-soft); line-height: 1.6; }
.mblock p strong { color: var(--ink); font-weight: 500; }
.method-close {
  margin-top: 14px; font-size: 13px; font-weight: 500; padding: 9px 18px;
  border: 1px solid var(--ink); border-radius: 6px; background: var(--ink); color: #fff;
  cursor: pointer; font-family: inherit;
}
