@import url('/fonts/fonts.css');

:root {
  --forest-950: #07130f; --forest-900: #0c1f19; --forest-800: #12302a; --forest-700: #1b4238; --forest-600: #275a4c;
  --moss: #6f8f5b; --tea: #9cc27a; --gold: #d8a948; --gold-soft: #f1d9a0; --mist: #e9efec; --ink: #16231f;
  --ink-2: #45554f; --ink-3: #7a8a84; --paper: #f6f3ec; --card: #ffffff; --line: #e3ded2; --line-2: #d2cbbb;
  --red: #b5483b; --amber: #c7892a; --blue: #3f6f8f; --violet: #6d5a91;
  --serif: 'Cormorant Garamond', 'Songti SC', 'Noto Serif SC', Georgia, serif;
  --sans: 'Be Vietnam Pro', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
  --r: 16px; --r-sm: 10px; --shadow: 0 10px 30px -12px rgba(12, 31, 25, .25), 0 2px 6px rgba(12, 31, 25, .06);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); color: var(--ink); background: var(--paper); font-size: 15.5px; line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--forest-600); }
button, input, select, textarea { font: inherit; }
.serif { font-family: var(--serif); }
.hidden { display: none !important; }

/* ================================================================ LOGIN */
#login { position: fixed; inset: 0; overflow: hidden; background: var(--forest-950); color: #fff; z-index: 50; }
.slides { position: absolute; inset: 0; }
.slide { position: absolute; inset: -2%; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.8s ease; will-change: transform, opacity; }
.slide.on { opacity: 1; animation: kenburns 22s ease-out forwards; }
.slide:nth-child(even).on { animation-name: kenburns2; }
@keyframes kenburns { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.14) translate(-1.5%, -1%); } }
@keyframes kenburns2 { from { transform: scale(1.14) translate(1.5%, 0); } to { transform: scale(1.03) translate(0, -1%); } }
.veil { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(5, 16, 12, .86) 0%, rgba(5, 16, 12, .55) 42%, rgba(5, 16, 12, .15) 70%, rgba(5, 16, 12, .45) 100%), linear-gradient(0deg, rgba(5, 16, 12, .75), transparent 40%); }
.fog { position: absolute; left: -50%; width: 200%; height: 55%; bottom: -8%; pointer-events: none; opacity: .5;
  background: radial-gradient(ellipse at 20% 60%, rgba(255, 255, 255, .28), transparent 55%), radial-gradient(ellipse at 60% 70%, rgba(255, 255, 255, .22), transparent 50%), radial-gradient(ellipse at 90% 55%, rgba(255, 255, 255, .25), transparent 55%);
  filter: blur(18px); animation: drift 48s linear infinite; }
.fog.f2 { bottom: 12%; height: 40%; opacity: .28; animation-duration: 75s; animation-direction: reverse; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(25%); } }
.login-wrap { position: relative; z-index: 2; height: 100%; display: grid; grid-template-columns: 1.25fr 440px; gap: 48px; align-items: center; padding: 6vh 7vw; }
.brand-big .mark { font-family: var(--serif); font-weight: 600; font-size: clamp(64px, 10vw, 148px); letter-spacing: .12em; line-height: .9; margin: 0; background: linear-gradient(180deg, #fff 30%, var(--gold-soft)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-big .sub { font-size: 13px; letter-spacing: .38em; text-transform: uppercase; color: var(--gold-soft); margin: 18px 0 26px; }
.brand-big .tag { font-family: var(--serif); font-size: clamp(22px, 2.3vw, 32px); line-height: 1.3; max-width: 620px; color: #eef3ef; font-weight: 500; }
.brand-big .pillars { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.brand-big .pillars span { border: 1px solid rgba(255, 255, 255, .28); padding: 6px 14px; border-radius: 99px; font-size: 13px; backdrop-filter: blur(6px); background: rgba(255, 255, 255, .06); }
.reveal-up { opacity: 0; transform: translateY(26px); animation: up 1.1s var(--ease) forwards; }
@keyframes up { to { opacity: 1; transform: none; } }
.glass { background: rgba(14, 32, 27, .52); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); border-radius: 22px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5); }
.login-card { padding: 36px 34px 30px; }
.login-card h2 { font-family: var(--serif); font-weight: 600; font-size: 30px; margin: 0 0 4px; }
.login-card p.muted { color: #c8d4cf; margin: 0 0 24px; font-size: 14px; }
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #b9c8c2; margin-bottom: 6px; }
.field input { width: 100%; padding: 13px 15px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .08); color: #fff; outline: none; transition: .2s; }
.field input:focus { border-color: var(--gold); background: rgba(255, 255, 255, .13); box-shadow: 0 0 0 4px rgba(216, 169, 72, .18); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 11px 20px; cursor: pointer; font-weight: 600; transition: transform .15s, box-shadow .2s, background .2s; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-gold { background: linear-gradient(135deg, #e3b85a, #c8922f); color: #1a1406; box-shadow: 0 10px 24px -10px rgba(216, 169, 72, .8); }
.btn-gold:hover { box-shadow: 0 14px 30px -10px rgba(216, 169, 72, .95); }
.btn-dark { background: var(--forest-800); color: #fff; }
.btn-dark:hover { background: var(--forest-700); }
.btn-ghost { background: transparent; border: 1px solid var(--line-2); color: var(--ink); }
.btn-ghost:hover { background: #fff; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; padding: 14px; font-size: 15px; }
.err { color: #ffb4a8; font-size: 13.5px; min-height: 20px; margin: 4px 0 10px; }
.lang-switch { display: inline-flex; gap: 2px; background: rgba(255, 255, 255, .1); border-radius: 99px; padding: 3px; }
.lang-switch button { white-space: nowrap; border: 0; background: transparent; color: inherit; padding: 4px 11px; border-radius: 99px; cursor: pointer; font-size: 12.5px; opacity: .8; }
.lang-switch button.on { background: rgba(255, 255, 255, .92); color: var(--forest-900); opacity: 1; font-weight: 600; }
.login-top { position: absolute; top: 22px; right: 28px; z-index: 3; }
.credit { position: absolute; left: 7vw; bottom: 22px; z-index: 3; font-size: 12px; color: rgba(255, 255, 255, .72); transition: opacity .6s; }
.credit b { font-weight: 500; color: #fff; }
.dots { position: absolute; right: 28px; bottom: 26px; z-index: 3; display: flex; gap: 7px; }
.dots i { width: 22px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .3); transition: .4s; cursor: pointer; }
.dots i.on { background: var(--gold); width: 38px; }

/* ================================================================ SHELL */
.topbar { position: fixed; top: 0; left: 0; right: 0; height: 64px; z-index: 30; display: flex; align-items: center; gap: 18px; padding: 0 22px; color: #fff; transition: background .35s, box-shadow .35s; }
.topbar.solid { background: rgba(9, 26, 21, .9); backdrop-filter: blur(14px); box-shadow: 0 6px 24px -12px rgba(0, 0, 0, .5); }
.topbar .logo { font-family: var(--serif); font-size: 27px; font-weight: 700; letter-spacing: .16em; color: #fff; text-decoration: none; display: flex; align-items: baseline; gap: 10px; }
.topbar .logo small { font-family: var(--sans); font-size: 11px; letter-spacing: .25em; color: var(--gold-soft); font-weight: 500; }
.nav { display: flex; gap: 2px; margin-left: 10px; overflow-x: auto; scrollbar-width: none; }
.nav a { color: rgba(255, 255, 255, .82); text-decoration: none; padding: 8px 13px; border-radius: 10px; font-size: 14px; white-space: nowrap; transition: .2s; }
.nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.nav a.on { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: inset 0 -2px 0 var(--gold); }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.search-box { position: relative; }
.search-box input { width: 220px; padding: 8px 12px 8px 34px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .1); color: #fff; outline: none; transition: width .3s var(--ease), background .2s; }
.search-box input::placeholder { color: rgba(255, 255, 255, .6); }
.search-box input:focus { width: 300px; background: rgba(255, 255, 255, .18); }
.search-box svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); opacity: .7; }
.userchip { display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 4px 10px 4px 4px; border-radius: 99px; background: rgba(255, 255, 255, .1); position: relative; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--gold), var(--moss)); display: grid; place-items: center; font-weight: 700; color: #102019; font-size: 13px; }
.userchip .meta { line-height: 1.15; font-size: 13px; white-space: nowrap; max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.userchip .meta small { display: block; color: var(--gold-soft); font-size: 11px; }
.menu { position: absolute; right: 0; top: 46px; background: #fff; color: var(--ink); border-radius: 12px; box-shadow: var(--shadow); min-width: 210px; padding: 6px; display: none; }
.menu.open { display: block; animation: pop .18s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: none; color: var(--ink); text-decoration: none; border-radius: 8px; cursor: pointer; font-size: 14px; }
.menu a:hover, .menu button:hover { background: var(--mist); }
.burger { display: none; background: none; border: 0; color: #fff; cursor: pointer; padding: 6px; }

/* hero banner per page */
.hero { position: relative; min-height: 360px; display: flex; align-items: flex-end; color: #fff; overflow: hidden; isolation: isolate; }
.hero .bg { position: absolute; inset: -10% 0 -10% 0; background-size: cover; background-position: center; z-index: -2; transform: scale(1.08); animation: heroIn 2.2s var(--ease) forwards; will-change: transform; }
@keyframes heroIn { from { transform: scale(1.16); filter: saturate(.7); } to { transform: scale(1.04); filter: none; } }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(6, 18, 14, .55) 0%, rgba(6, 18, 14, .15) 40%, rgba(6, 18, 14, .78) 100%); }
.hero .fog { z-index: -1; opacity: .35; height: 70%; }
.hero-in { width: 100%; max-width: 1280px; margin: 0 auto; padding: 110px 28px 38px; }
.eyebrow { font-size: 12px; letter-spacing: .32em; text-transform: uppercase; color: var(--gold-soft); margin-bottom: 10px; }
.hero h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(34px, 4.6vw, 60px); line-height: 1.05; margin: 0 0 10px; max-width: 900px; }
.hero p.lead { max-width: 760px; font-size: 16.5px; color: #e4ece8; margin: 0; }
.hero .photo-credit { position: absolute; right: 18px; bottom: 10px; font-size: 11px; color: rgba(255, 255, 255, .6); }
.hero.tall { min-height: 470px; }

main { min-height: 100vh; }
.page { max-width: 1280px; margin: 0 auto; padding: 34px 28px 80px; }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: 0 1px 0 rgba(0, 0, 0, .02); transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .3s; }
.card.hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-2); }
.card h3 { margin: 0 0 12px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.sec-title { font-family: var(--serif); font-size: 32px; font-weight: 600; margin: 44px 0 16px; display: flex; align-items: center; gap: 14px; }
.sec-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }

/* scroll reveal */
.rv { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.rv.in { opacity: 1; transform: none; }
.rv.d1 { transition-delay: .08s; } .rv.d2 { transition-delay: .16s; } .rv.d3 { transition-delay: .24s; } .rv.d4 { transition-delay: .32s; }

/* stats */
.stat { position: relative; overflow: hidden; }
.stat .n { font-family: var(--serif); font-size: 50px; font-weight: 600; line-height: 1; color: var(--forest-800); }
.stat .l { color: var(--ink-2); font-size: 14px; margin-top: 6px; }
.stat::after { content: ''; position: absolute; right: -30px; bottom: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, rgba(156, 194, 122, .25), transparent 70%); }

/* mountain journey */
.journey { position: relative; background: linear-gradient(180deg, #0d231d, #173a31); border-radius: 22px; color: #fff; padding: 26px 26px 18px; overflow: hidden; }
.journey svg { width: 100%; height: auto; display: block; }
.journey .draw { stroke-dasharray: 2400; stroke-dashoffset: 2400; animation: draw 3.2s var(--ease) .3s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.peak-label { font-family: var(--sans); fill: #fff; font-size: 13px; font-weight: 600; }
.peak-sub { fill: var(--gold-soft); font-size: 11.5px; }
.journey .legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: #cfe0d8; margin-top: 8px; }
.journey .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; letter-spacing: .03em; border: 1px solid transparent; white-space: nowrap; }
.st-DRAFT { background: #f3ede1; color: #8a6a2b; border-color: #e6d9bd; }
.st-REVIEW { background: #e7f0f6; color: var(--blue); border-color: #cddfeb; }
.st-ISSUED { background: #e4f1e3; color: #2f6b3a; border-color: #c8e2c6; }
.st-SUPERSEDED, .st-ARCHIVED { background: #eee; color: #777; }
.st-NONE { background: transparent; color: var(--ink-3); border: 1px dashed var(--line-2); }
.cl-shared { background: #fbf1dc; color: #8d6415; }
.cl-internal { background: #e9f0ec; color: var(--forest-600); }
.cl-management { background: #ece8f4; color: var(--violet); }
.cl-restricted { background: #f7e3e0; color: var(--red); }
.ver { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12px; color: var(--ink-2); background: var(--mist); padding: 1px 7px; border-radius: 6px; }
.docid { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12px; color: var(--forest-600); letter-spacing: .02em; }

/* lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 11px 0; border-bottom: 1px dashed var(--line); display: flex; gap: 10px; align-items: baseline; }
.list li:last-child { border-bottom: 0; }
.list .t { flex: 1; min-width: 0; }
.list a { color: var(--ink); text-decoration: none; font-weight: 500; }
.list a:hover { color: var(--forest-600); text-decoration: underline; }

/* framework columns */
.parts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.part-col { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; }
.part-col .ph { position: relative; height: 128px; background-size: cover; background-position: center; color: #fff; display: flex; align-items: flex-end; padding: 14px 16px; }
.part-col .ph::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .05), rgba(6, 20, 15, .82)); }
.part-col .ph div { position: relative; }
.part-col .ph b { font-family: var(--serif); font-size: 22px; font-weight: 600; display: block; line-height: 1.1; }
.part-col .ph span { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-soft); }
.part-col .bar { height: 4px; background: var(--mist); }
.part-col .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--tea), var(--gold)); width: 0; transition: width 1.6s var(--ease); }
.doc-mini { display: block; padding: 13px 16px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: background .2s; }
.doc-mini:hover { background: #faf8f3; }
.doc-mini .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 3px; }
.doc-mini .tt { font-weight: 500; font-size: 14px; line-height: 1.35; }
.doc-mini.locked { opacity: .55; pointer-events: none; }

/* library */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.filters select, .filters input { padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; }
.pill-group { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { border: 1px solid var(--line-2); background: #fff; padding: 6px 13px; border-radius: 99px; cursor: pointer; font-size: 13px; transition: .2s; }
.pill.on { background: var(--forest-800); color: #fff; border-color: var(--forest-800); }
.doc-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--ink); }
.doc-card .tt { font-family: var(--serif); font-size: 21px; font-weight: 600; line-height: 1.2; }
.doc-card .sm { font-size: 13.5px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.doc-card .ft { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: auto; padding-top: 6px; }

/* document view */
.doc-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr) 290px; gap: 30px; align-items: start; }
.toc { position: sticky; top: 84px; font-size: 13px; max-height: calc(100vh - 110px); overflow: auto; }
.toc b { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.toc a { display: block; color: var(--ink-2); text-decoration: none; padding: 4px 0 4px 10px; border-left: 2px solid var(--line); line-height: 1.35; }
.toc a.h3 { padding-left: 22px; font-size: 12.5px; }
.toc a:hover, .toc a.on { color: var(--forest-700); border-left-color: var(--gold); }
.doc-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.doc-meta .chip { backdrop-filter: blur(6px); }
.prose { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 34px 40px; }
.prose h1 { font-family: var(--serif); font-size: 36px; line-height: 1.15; margin: 0 0 18px; }
.prose h2 { font-family: var(--serif); font-size: 27px; margin: 36px 0 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.prose h3 { font-size: 17px; margin: 26px 0 8px; color: var(--forest-700); }
.prose blockquote { margin: 18px 0; padding: 14px 20px; background: linear-gradient(90deg, #f7f1e2, #fbf8f1); border-left: 4px solid var(--gold); border-radius: 0 12px 12px 0; color: #3b3a2e; }
.prose blockquote p { margin: .3em 0; }
.prose code { background: var(--mist); padding: 1px 6px; border-radius: 5px; font-size: .88em; }
.prose pre { background: #0f1f1a; color: #dfe9e4; padding: 16px 18px; border-radius: 12px; overflow: auto; font-size: 13px; line-height: 1.5; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose img { max-width: 100%; border-radius: 12px; }
.tbl { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 12px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 14px; }
.prose th { background: #f3f0e7; text-align: left; font-weight: 600; font-size: 12.5px; letter-spacing: .02em; }
.prose th, .prose td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }
.prose tr:hover td { background: #fcfbf7; }
.xref { color: var(--forest-600); background: #edf4f0; padding: 0 6px; border-radius: 6px; text-decoration: none; font-weight: 500; font-size: .94em; white-space: nowrap; }
.xref:hover { background: #dbeae2; }
.xref.code { font-family: ui-monospace, Menlo, monospace; font-size: .85em; background: #f5eedd; color: #7c5b16; }
.xref.locked { color: var(--ink-3); background: #f1f1ee; }
.xref.locked::before { content: '🔒 '; font-size: .8em; }
.lbl { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; font-size: 11px; font-weight: 700; margin-right: 3px; vertical-align: 1px; }
.lf { background: #e2f0df; color: #2f6b3a; } .la { background: #fbeccb; color: #8d6415; } .lr { background: #e3ecf5; color: var(--blue); }
.lneed { background: #f8e1dd; color: var(--red); padding: 0 8px; }
.mermaid { background: #fbfaf6; border: 1px solid var(--line); border-radius: 12px; padding: 14px; overflow-x: auto; text-align: center; }
.rail .card { padding: 18px; margin-bottom: 16px; }
.rail .card h3 { margin-bottom: 8px; }
.rail .list li { padding: 8px 0; font-size: 13.5px; }
.kv { display: grid; grid-template-columns: 96px 1fr; gap: 5px 10px; font-size: 13.5px; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; }
.comments .c { padding: 12px 0; border-bottom: 1px solid var(--line); }
.comments .c .who { font-size: 13px; font-weight: 600; } .comments .c .who small { color: var(--ink-3); font-weight: 400; margin-left: 6px; }
.comments .c p { margin: 4px 0 0; white-space: pre-wrap; }
textarea.inp, input.inp, select.inp { width: 100%; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; outline: none; }
textarea.inp:focus, input.inp:focus { border-color: var(--forest-600); box-shadow: 0 0 0 4px rgba(39, 90, 76, .12); }

/* timeline decisions */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(180deg, var(--gold), var(--tea), var(--line)); }
.tl { position: relative; margin-bottom: 18px; }
.tl::before { content: ''; position: absolute; left: -26px; top: 22px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--gold); }
.tl.DE_XUAT::before { border-color: var(--blue); } .tl.THAY_THE::before, .tl.HUY::before { border-color: #aaa; }
.tl .card { padding: 18px 20px; }
.tl .hd { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.tl .code { font-family: ui-monospace, Menlo, monospace; font-weight: 700; color: #7c5b16; }
.tl h4 { margin: 0; font-size: 17px; }
.tl .row { font-size: 14px; margin: 4px 0; } .tl .row b { color: var(--ink-3); font-weight: 500; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; margin-right: 6px; }
.tl:target .card { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(216, 169, 72, .2); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
table.data th { text-align: left; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 10px 12px; border-bottom: 2px solid var(--line); background: #faf8f2; position: sticky; top: 64px; }
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr:hover td { background: #fcfbf6; }

/* R&D */
.rnd-card { position: relative; overflow: hidden; }
.rnd-card .rg { position: absolute; top: 16px; right: 16px; font-size: 11px; font-weight: 700; letter-spacing: .12em; padding: 3px 9px; border-radius: 99px; }
.rg-VN { background: #e3f0de; color: #2f6b3a; } .rg-INTL { background: #e3ecf5; color: var(--blue); } .rg-CN { background: #f8e1dd; color: var(--red); }
.rnd-card .tt { font-weight: 600; font-size: 16px; line-height: 1.35; margin: 2px 60px 8px 0; }
.rnd-card .path { font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; color: var(--ink-3); word-break: break-all; margin-top: 10px; }
.conf { display: inline-flex; gap: 2px; } .conf i { width: 7px; height: 7px; border-radius: 2px; background: var(--line-2); } .conf i.on { background: var(--moss); }

/* partner spaces */
.drop { border: 2px dashed var(--line-2); border-radius: 16px; padding: 28px; text-align: center; transition: .2s; background: #fcfbf7; cursor: pointer; }
.drop.over { border-color: var(--gold); background: #fbf3df; transform: scale(1.01); }
.file-row { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.file-row .ic { width: 38px; height: 38px; border-radius: 10px; background: var(--mist); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--forest-600); }

.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--forest-900); color: #fff; padding: 12px 20px; border-radius: 12px; box-shadow: var(--shadow); opacity: 0; transition: .35s var(--ease); z-index: 90; max-width: 90vw; }
.toast.on { opacity: 1; transform: translateX(-50%); }
.modal-bg { position: fixed; inset: 0; background: rgba(6, 18, 14, .55); backdrop-filter: blur(4px); z-index: 80; display: grid; place-items: center; padding: 16px; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: 18px; padding: 26px; width: min(520px, 100%); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5); animation: pop .25s var(--ease); max-height: 90vh; overflow: auto; }
.modal h3 { font-family: var(--serif); font-size: 26px; margin: 0 0 14px; }
.foot { text-align: center; padding: 34px 20px 40px; color: var(--ink-3); font-size: 12.5px; border-top: 1px solid var(--line); background: #f1ede3; }
.foot .credits { max-width: 1000px; margin: 8px auto 0; font-size: 11.5px; }
.loading { padding: 80px; text-align: center; color: var(--ink-3); }
.spinner { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 40px; color: var(--ink-3); }

/* ================================================================ responsive */
@media (max-width: 1320px) { .search-box input { width: 150px; } .search-box input:focus { width: 220px; } .nav a { padding: 8px 10px; } }
@media (max-width: 1180px) {
  .nav { position: fixed; top: 64px; left: 0; right: 0; flex-direction: column; background: rgba(9, 26, 21, .97); padding: 10px; margin: 0; display: none; }
  .nav.open { display: flex; }
  .burger { display: block; }

  .doc-layout { grid-template-columns: minmax(0, 1fr) 270px; }
  .toc { display: none; }
  .parts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .login-wrap { grid-template-columns: 1fr; padding: 90px 22px 70px; overflow: auto; align-content: start; gap: 26px; }
  #login { overflow: auto; }
  .brand-big .tag { font-size: 20px; }
  .brand-big .pillars { display: none; }
  .credit { left: 22px; right: 80px; }
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g2 { grid-template-columns: minmax(0, 1fr); }
  .doc-layout { grid-template-columns: minmax(0, 1fr); }
  .hero .photo-credit { display: none; }
  .mermaid svg { max-width: none; }
  .search-box input { width: 130px; } .search-box input:focus { width: 170px; }
  .userchip .meta { display: none; }
  .prose { padding: 22px 18px; }
  .hero-in { padding: 96px 16px 28px; }
  .page { padding: 24px 16px 60px; }
}
@media (max-width: 560px) {
  .g3, .g4, .parts { grid-template-columns: minmax(0, 1fr); }
  .search-box { display: none; }
  .topbar { gap: 8px; padding: 0 12px; }
  .topbar .logo { font-size: 22px; }
  .topbar .logo small { display: none; }
  .topbar .right { gap: 6px; }
  .lang-switch button { padding: 4px 7px; }
  .stat .n { font-size: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .rv { opacity: 1; transform: none; }
}

/* ================================================================ v2: brief, P0, advisors, lightbox */
.brief-card { display: flex; align-items: flex-end; min-height: 210px; border-radius: 22px; padding: 30px 34px; color: #fff; text-decoration: none; background-size: cover; background-position: center; box-shadow: var(--shadow); transition: transform .4s var(--ease), box-shadow .4s; position: relative; overflow: hidden; }
.brief-card:hover { transform: translateY(-3px); box-shadow: 0 24px 50px -20px rgba(7, 19, 15, .6); }
.brief-card .bt { font-family: var(--serif); font-size: clamp(24px, 3vw, 36px); font-weight: 600; line-height: 1.15; max-width: 720px; margin: 4px 0 16px; }
.brief-card .ba { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-ghost.light { color: #fff; border-color: rgba(255, 255, 255, .5); }
.btn-ghost.light:hover { background: rgba(255, 255, 255, .12); }
.p0-row .ph { height: 150px; }
.p0-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.p0-grid .doc-mini { border-right: 1px solid var(--line); }
.adv-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .35s var(--ease), box-shadow .35s; }
.adv-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.adv-top { height: 120px; background-size: cover; background-position: center; position: relative; }
.adv-av { position: absolute; left: 22px; bottom: -34px; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-size: 28px; font-weight: 700; color: var(--forest-900); background: linear-gradient(135deg, var(--gold-soft), var(--tea)); border: 4px solid #fff; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .4); }
.adv-body { padding: 44px 22px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.adv-name { font-family: var(--serif); font-size: 24px; font-weight: 600; line-height: 1.15; }
.adv-seat { font-size: 13.5px; margin-top: 4px; } .adv-seat span { display: block; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.adv-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; } .adv-tags span { font-size: 11.5px; background: var(--mist); color: var(--forest-700); padding: 2px 8px; border-radius: 99px; }
.adv-ft { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; color: var(--forest-600); }
.prose img { display: block; margin: 10px 0 18px; box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .35); border: 1px solid var(--line); }
.lb { position: fixed; inset: 0; z-index: 95; background: rgba(4, 12, 9, .94); display: grid; place-items: center; padding: 30px 60px; animation: fade .2s; }
.lb img { max-width: 100%; max-height: calc(100vh - 90px); border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.lb-cap { color: #cfe0d8; font-size: 13px; margin-top: 10px; text-align: center; }
.lb button { position: absolute; background: rgba(255, 255, 255, .1); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 28px; cursor: pointer; }
.lb button:hover { background: rgba(255, 255, 255, .22); }
.lb-x { top: 18px; right: 18px; } .lb-p { left: 14px; top: 50%; } .lb-n { right: 14px; top: 50%; }
@media (max-width: 900px) { .p0-grid { grid-template-columns: minmax(0, 1fr); } .lb { padding: 20px 8px; } .lb-p, .lb-n { top: auto; bottom: 16px; } }
