/* Version 2 · design from "Dakruco Trace.html" (Claude Design), built as a working page. */
:root {
  --bg: #EEF2EE; --card: #FFFFFF; --line: #E1E7E2; --soft: #EAF4EC; --s2: #F6F8F6;
  --green: #1B7A45; --dark: #0E5730; --conn: #2E9E5B; --ink: #111C16; --text: #43514A;
  --muted: #6B7A71; --faint: #8A9A90; --gold: #C9A227;
}
body { background: var(--bg); color: var(--ink); font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-variant-numeric: tabular-nums; font-size: 16px; line-height: 1.4; -webkit-font-smoothing: antialiased; text-wrap: pretty; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--dark); text-decoration: underline; }
input::placeholder { color: var(--faint); }
h1, h2, h3, p { margin: 0; font-size: inherit; font-weight: inherit; }

/* ---------- Building blocks ---------- */
.v2-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.v2-lab { flex-shrink: 0; }
.v2-lab .vi { font-size: 14px; color: var(--text); }
.v2-lab .en { font-size: 12px; color: var(--muted); }
.v2-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--line); }
.v2-val { font-weight: 600; font-size: 15px; text-align: right; color: var(--ink); min-width: 0; }
.v2-d .v2-rows .v2-row { padding: 10px 0; }

.v2-eyebrow { font-size: 11px; letter-spacing: .18em; color: var(--muted); font-weight: 600; }
.v2-code { font-weight: 800; line-height: 1.05; color: var(--dark); letter-spacing: -.01em; }
.v2-type { font-weight: 700; }
.v2-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.v2-title .vi { font-size: 13px; letter-spacing: .14em; font-weight: 700; color: var(--dark); }
.v2-title .en { font-size: 12px; color: var(--muted); letter-spacing: .08em; }
.v2-title.sm .vi { font-size: 12px; }
.v2-title.sm .en { font-size: 11px; }

.v2-badges { display: flex; gap: 8px; }
.v2-badge { display: flex; align-items: center; gap: 7px; padding: 6px 11px 6px 7px; border-radius: 8px; font-size: 13px; }
.v2-badge .box { width: 18px; height: 18px; border-radius: 4px; display: grid; place-items: center; font-size: 12px; line-height: 1; }
.v2-badge.on { border: 1px solid var(--green); background: var(--soft); color: var(--dark); font-weight: 700; }
.v2-badge.on .box { background: var(--green); color: #fff; }
.v2-badge.off { border: 1px solid var(--line); background: #fff; color: var(--text); font-weight: 600; }
.v2-badge.off .box { border: 1.5px solid var(--faint); background: #fff; }

.v2-photo { background: #F3F7F3; display: grid; place-items: center; overflow: hidden; }
.v2-photo img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; display: block; }

.v2-node { width: 32px; height: 32px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 700; font-size: 13px; display: grid; place-items: center; flex-shrink: 0; }
.v2-tile { width: 40px; height: 40px; border-radius: 10px; background: var(--soft); display: grid; place-items: center; flex-shrink: 0; }
.v2-tile img { width: 24px; height: 24px; display: block; }
.v2-shead { display: flex; gap: 12px; align-items: flex-start; }
.v2-d .v2-shead .v2-tile { margin-top: -4px; }
.v2-stitle { min-width: 0; font-size: 16px; font-weight: 700; line-height: 1.3; }
.v2-stitle .en { font-size: 13px; font-weight: 400; color: var(--muted); margin-top: 1px; }
.v2-d .v2-stitle { font-size: 17px; }
.v2-d .v2-stitle .en { margin-top: 0; }

.v2-count { display: flex; align-items: baseline; gap: 6px; margin-top: 14px; }
.v2-count .n { font-size: 18px; font-weight: 700; }
.v2-count .u { font-size: 13px; color: var(--muted); }
.v2-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.v2-chip { padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--s2); font-size: 13px; font-weight: 500; color: var(--ink); white-space: nowrap; line-height: 1.4; }
.v2-d .v2-chip { padding: 6px 10px; }
button.v2-chip { transition: background .15s, border-color .15s, color .15s; }
button.v2-chip:hover { border-color: var(--green); background: var(--soft); color: var(--dark); }
.v2-more { padding: 7px 12px; min-height: 34px; border-radius: 8px; border: 1px dashed var(--green); background: #fff; color: var(--dark); font-size: 13px; font-weight: 600; line-height: 1.4; }
.v2-d .v2-more { padding: 6px 12px; }
.v2-more:hover { background: var(--soft); }

.v2-dates { display: flex; gap: 16px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); justify-content: space-between; }
.v2-dates-v { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: flex-end; flex: 1; font-weight: 600; font-size: 15px; }
.v2-rows { margin-top: 8px; }
.v2-d .v2-rows { margin-top: 10px; }
.v2-specs { margin-top: 8px; border-radius: 10px; background: var(--s2); border: 1px solid var(--line); padding: 4px 12px; }
.v2-d .v2-specs { padding: 4px 14px; }
.v2-specs .v2-title { padding: 10px 0 6px; }
.v2-spec { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); align-items: flex-start; }
.v2-d .v2-spec { padding: 7px 0; }
.v2-spec .vi { font-size: 14px; color: var(--ink); font-weight: 500; }
.v2-spec .en { font-size: 12px; color: var(--muted); }
.v2-spec .v { font-weight: 600; font-size: 15px; text-align: right; flex-shrink: 0; }

.v2-mapbtn { margin-top: 14px; height: 44px; border-radius: 10px; border: 1px solid var(--green); background: #fff; color: var(--dark);
  font-weight: 600; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.v2-d .v2-mapbtn { display: inline-flex; width: auto; height: 44px; padding: 0 16px; }
.v2-mapbtn:hover { background: var(--soft); }
.v2-mapbtn img { width: 18px; height: 18px; }
.v2-mapbtn .en { font-weight: 500; color: var(--muted); }

.v2-pill { height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--green); background: var(--soft); color: var(--dark);
  font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; line-height: 1; transition: background .15s; }
.v2-pill:hover { background: #DCEFE1; }
.v2-pill .en { font-weight: 500; font-size: 11px; color: var(--green); }
.v2-pill .chev { font-size: 14px; }

.v2-certs { display: flex; flex-wrap: wrap; margin-left: -1px; row-gap: 14px; }
.v2-cert { border-left: 1px solid var(--line); padding: 2px 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.v2-cert img { height: 52px; width: auto; display: block; }
.v2-cert span { font-size: 10px; color: var(--muted); text-align: center; max-width: 124px; line-height: 1.3; }

.v2-contacts a { display: flex; justify-content: space-between; align-items: center; min-height: 44px; gap: 12px; }
.v2-contacts .k { font-size: 13px; color: var(--muted); }
.v2-contacts .k i { font-style: normal; color: var(--faint); }
.v2-contacts .v { font-weight: 600; font-size: 15px; }
.v2-copy { font-size: 11px; color: var(--faint); margin-top: 14px; text-align: center; }

.v2-empty { padding: 36px 24px; text-align: center; }
.v2-empty-ic { width: 72px; height: 72px; border-radius: 50%; border: 2px dashed var(--conn); background: var(--soft); margin: 0 auto; display: grid; place-items: center; }
.v2-empty-ic img { width: 30px; height: 30px; }
.v2-primary { margin-top: 22px; height: 44px; padding: 0 20px; border-radius: 999px; border: 0; background: var(--green); color: #fff; font-weight: 600; font-size: 14px; }
.v2-primary:hover { background: var(--dark); }

/* ---------- Mobile ---------- */
.v2-m { max-width: 560px; margin: 0 auto; }
.v2-mhead { background: #fff; border-bottom: 1px solid var(--line); }
.v2-mhead-in { max-width: 560px; margin: 0 auto; padding: 14px 16px 12px; }
.v2-brand { display: flex; align-items: center; gap: 12px; }
.v2-brand img { width: 44px; height: 44px; border-radius: 50%; display: block; flex-shrink: 0; }
.v2-brand .co { font-weight: 700; color: var(--dark); font-size: 14px; letter-spacing: .02em; line-height: 1.25; }
.v2-brand .sub { font-size: 10.5px; letter-spacing: .14em; color: var(--text); margin-top: 3px; font-weight: 500; }
.v2-mbar { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; gap: 12px; }
.v2-time { font-size: 13px; color: var(--text); }
.v2-pill .stack { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.v2-step { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; }
.v2-rail { display: flex; flex-direction: column; align-items: center; }
.v2-line { flex: 1; width: 2px; background: var(--conn); margin: 6px 0; border-radius: 2px; }
.v2-scard { padding: 16px; margin-bottom: 16px; min-width: 0; border-radius: 14px; }

/* ---------- Desktop header ---------- */
.v2-dhead { background: #fff; border-bottom: 1px solid var(--line); }
.v2-dhead-in { max-width: 1440px; margin: 0 auto; padding: 0 40px; height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.v2-dhead .v2-brand { gap: 14px; }
.v2-dhead .v2-brand img { width: 48px; height: 48px; }
.v2-dhead .v2-brand .co { font-size: 20px; line-height: 1.2; }
.v2-dhead .v2-brand .sub { font-size: 11.5px; letter-spacing: .16em; }
.v2-dhead-r { display: flex; align-items: center; gap: 20px; }
.v2-dhead .v2-time { font-size: 14px; }
.v2-dhead .v2-pill { padding: 0 18px; gap: 10px; }
.v2-dhead .v2-pill .en { font-size: 14px; }

/* ---------- Desktop A · hub ---------- */
.v2-hub { max-width: 1440px; margin: 0 auto; padding: 32px 40px 40px; display: grid; grid-template-columns: minmax(300px, 400px) minmax(320px, 1fr) minmax(300px, 400px); gap: 32px; align-items: start; }
.v2-col { display: flex; flex-direction: column; gap: 20px; }
.v2-hcard { position: relative; padding: 20px; }
.v2-hcard::before { content: ''; position: absolute; top: 36px; width: 32px; border-top: 2px dashed var(--conn); }
.v2-hcard::after { content: ''; position: absolute; top: 31px; width: 10px; height: 10px; border-radius: 50%; background: var(--conn); }
.v2-hcard.L::before { right: -32px; } .v2-hcard.L::after { right: -37px; }
.v2-hcard.R::before { left: -32px; } .v2-hcard.R::after { left: -37px; }
.v2-hub-center { display: flex; flex-direction: column; align-items: center; gap: 20px; position: sticky; top: 24px; }
.v2-circle { width: 320px; height: 320px; border-radius: 50%; background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; box-shadow: 0 12px 40px rgba(17, 28, 22, .06); }
.v2-circle .v2-eyebrow { letter-spacing: .2em; }
.v2-circle .v2-code { font-size: 56px; line-height: 1; }
.v2-circle .v2-photo { width: 190px; height: 130px; border-radius: 12px; margin-top: 8px; }
.v2-vline { width: 2px; height: 28px; background: var(--conn); margin: -8px 0; }
.v2-product { width: 100%; max-width: 400px; padding: 18px 22px 10px; }
.v2-product .v2-type { font-size: 22px; }
.v2-hub-foot { max-width: 1440px; margin: 0 auto; padding: 0 40px 32px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center; }
.v2-certrow { padding: 18px 24px; display: flex; align-items: center; gap: 24px; }
.v2-certrow .v2-title { flex-direction: column; gap: 0; }
.v2-certrow .v2-certs { flex-wrap: wrap; align-items: center; }
.v2-certrow .v2-cert { padding: 0 20px; }
.v2-certrow .v2-cert img { height: 56px; }
.v2-dcontacts { display: flex; flex-direction: column; gap: 6px; font-size: 14px; min-width: 260px; }
.v2-dcontacts a { display: flex; justify-content: space-between; gap: 16px; min-height: 28px; align-items: center; }
.v2-dcontacts .k { color: var(--muted); }
.v2-dcontacts .v { font-weight: 600; color: var(--ink); }
@media (max-width: 1279px) {
  .v2-hub-foot { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .v2-dcontacts { flex-direction: row; flex-wrap: wrap; gap: 8px 32px; min-width: 0; }
  .v2-dcontacts a { gap: 10px; }
}
.v2-dcopy { max-width: 1440px; margin: 0 auto; padding: 0 40px 28px; font-size: 11.5px; color: var(--faint); }

/* ---------- Desktop B · timeline ---------- */
.v2-tl { max-width: 1440px; margin: 0 auto; padding: 32px 40px 40px; display: grid; grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); gap: 40px; align-items: start; }
.v2-tl-side { position: sticky; top: 24px; overflow: hidden; }
.v2-tl-side .v2-photo { aspect-ratio: 4 / 3; }
.v2-tl-side .v2-code { font-size: 52px; }
.v2-tl-contacts { border-top: 1px solid var(--line); padding: 14px 22px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; background: var(--s2); }
.v2-tl-contacts a { display: flex; justify-content: space-between; gap: 16px; min-height: 28px; align-items: center; }
.v2-tl-contacts .k { color: var(--muted); }
.v2-tl-contacts .v { font-weight: 600; color: var(--ink); }
.v2-tl-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; position: relative; align-items: start; }
.v2-tl-grid::before { content: ''; position: absolute; left: 36px; top: 24px; bottom: 24px; width: 2px; background: var(--conn); opacity: .35; }
.v2-tl-grid .v2-scard { padding: 20px; margin: 0; border-radius: 16px; position: relative; }
.v2-tl-grid .v2-node { box-shadow: 0 0 0 4px #fff; }
@media (min-width: 1220px) { .v2-tl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Pallet picker ---------- */
.v2-sheet { background: #fff; border-radius: 20px 20px 0 0; max-height: 88%; display: flex; flex-direction: column; box-shadow: 0 -8px 30px rgba(17, 28, 22, .12); padding-bottom: env(safe-area-inset-bottom); }
.v2-handle { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 10px auto 0; flex-shrink: 0; }
.v2-close { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 18px; color: var(--text); display: grid; place-items: center; flex-shrink: 0; }
.v2-close:hover { background: var(--s2); }
.v2-search { width: 100%; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--s2); padding: 0 14px; font: inherit; font-size: 16px; color: var(--ink); outline: none; }
.v2-search:focus { border-color: var(--green); background: #fff; box-shadow: 0 0 0 3px rgba(27, 122, 69, .15); }
.v2-sm-btn { height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--green); background: #fff; color: var(--dark); font-size: 13px; font-weight: 600; white-space: nowrap; }
.v2-sm-btn:hover { background: var(--soft); }
.v2-plist { overflow: auto; padding: 12px 16px 24px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.v2-pcard { text-align: left; border-radius: 12px; padding: 12px 14px; background: #fff; border: 1.5px solid var(--line); color: var(--ink); width: 100%; transition: border-color .15s; }
.v2-pcard:hover { border-color: var(--green); }
.v2-pcard.cur { background: #FDFAF0; border-color: var(--gold); }
.v2-pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 12px; margin-top: 10px; }
.v2-pgrid .k { display: block; font-size: 11px; color: var(--muted); }
.v2-pgrid .v { display: block; font-size: 13px; font-weight: 600; }
.v2-ptop { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.v2-plist { flex: 1; min-height: 0; }
.v2-viewing { font-size: 11px; font-weight: 700; color: #7A5E0B; background: #FBF3D9; border: 1px solid var(--gold); padding: 2px 7px; border-radius: 999px; }
.v2-fsc { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; border: 1px solid; }
.v2-fsc.y { background: var(--soft); color: var(--dark); border-color: var(--green); }
.v2-fsc.n { background: var(--s2); color: var(--text); border-color: var(--line); }
.v2-none { text-align: center; color: var(--muted); font-size: 14px; padding: 24px 8px; }

.v2-drawer { width: min(620px, 100vw); background: #fff; box-shadow: -12px 0 40px rgba(17, 28, 22, .15); display: flex; flex-direction: column; }
.v2-tcols { display: grid; grid-template-columns: 1.1fr 1fr 1fr .7fr .9fr .8fr .6fr; gap: 8px; }
.v2-thead { padding: 0 12px 8px; font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .04em; }
.v2-trow { width: 100%; align-items: center; padding: 10px 12px; font-size: 13px; text-align: left; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); margin-bottom: 6px; transition: border-color .15s; }
.v2-trow:hover { border-color: var(--green); }
.v2-trow.cur { background: #FDFAF0; border-color: var(--gold); }
.v2-trow .v2-fsc { font-size: 11px; padding: 2px 6px; border-radius: 5px; justify-self: start; }
.v2-trow > span, .v2-thead > span { white-space: nowrap; }

/* ---------- Plantation map ---------- */
.v2-mapfull { background: #fff; display: flex; flex-direction: column; }
.v2-maphead { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); padding-top: max(12px, env(safe-area-inset-top)); }
.v2-mapbox { position: relative; height: 48vh; min-height: 280px; }
.v2-lotlinks { font-size: 13px; color: var(--text); margin-top: 6px; line-height: 1.9; }
.v2-lotlink { border: 0; background: none; padding: 2px 0; color: var(--text); font: inherit; font-size: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.v2-lotlink:hover, .v2-lotlink[aria-pressed="true"] { color: var(--dark); text-decoration-color: var(--green); font-weight: 600; }
.v2-lotlink + .sep { color: var(--faint); margin: 0 5px; }
.v2-sel { font-size: 11px; color: var(--dark); background: var(--soft); padding: 3px 8px; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.v2-modal-wrap { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; pointer-events: none; }
.v2-mapmodal { pointer-events: auto; width: min(1080px, 100%); height: min(680px, 100%); background: #fff; border-radius: 20px; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) 380px; box-shadow: 0 30px 80px rgba(17, 28, 22, .3); }
.v2-mapmodal .v2-mapcol { position: relative; }
.v2-maptag { position: absolute; left: 20px; top: 18px; z-index: 500; background: rgba(255, 255, 255, .94); border-radius: 12px; padding: 10px 14px; border: 1px solid var(--line); pointer-events: none; }
.v2-panel { border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; position: relative; }
.v2-panel-scroll { overflow: auto; flex: 1; min-height: 0; }
.v2-panel .v2-close { position: absolute; top: 16px; right: 18px; width: 40px; height: 40px; font-size: 16px; }
.v2-panel-foot { padding: 12px 20px 16px; background: var(--s2); border-top: 1px solid var(--line); max-height: 30%; overflow: auto; }
.v2-panel-foot .v2-lotlinks { font-size: 12px; line-height: 1.7; }
.v2-lotrows .v2-row { padding: 9px 0; }
.v2-panel .v2-lotrows .v2-row { padding: 7px 0; }
.v2-lotrows .v2-val { font-size: 14px; }
@media (max-width: 1100px) { .v2-mapmodal { grid-template-columns: minmax(0, 1fr) 340px; } }
