:root{
  --navy:#123b68;
  --navy2:#0d2d50;
  --blue:#0b57d0;
  --blue2:#2563eb;
  --blue-soft:#edf4ff;
  --cyan-soft:#edf9ff;
  --bg:#f4f7fb;
  --surface:#ffffff;
  --surface2:#f8fafc;
  --line:#dbe4ef;
  --text:#172033;
  --muted:#64748b;
  --green:#15803d;
  --green-bg:#eaf8ef;
  --amber:#a16207;
  --amber-bg:#fff7dd;
  --shadow:0 8px 28px rgba(15,23,42,.07);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:"Segoe UI","Roboto","Noto Sans",Arial,Helvetica,sans-serif;
}
button,input{font:inherit}

.app-header{
  min-height:60px;
  background:rgba(255,255,255,.97);
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  padding:0 16px;
  position:sticky;
  top:0;
  z-index:30;
}
.brand{
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  gap:18px;
}
.brand-main{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}
.brand-mark{
  width:40px;height:40px;border-radius:12px;
  display:grid;place-items:center;
  color:#fff;font-weight:900;font-size:15px;
  background:linear-gradient(135deg,var(--blue),var(--navy));
  box-shadow:0 6px 18px rgba(11,87,208,.22);
}
.brand h1{
  margin:0;
  font-size:20px;
  color:var(--navy);
  white-space:nowrap;
}
.brand small{display:block;color:var(--muted);margin-top:2px}
.brand-site{
  color:var(--muted);
  font-size:13px;
  white-space:nowrap;
}

.app-shell{
  display:grid;
  grid-template-columns:310px minmax(0,1fr);
  height:calc(100dvh - 60px);
  min-height:0;
}
.sidebar{
  background:#fff;
  border-right:1px solid var(--line);
  padding:14px 12px 28px;
  overflow:auto;
  height:100%;
}
.home-btn{
  width:100%;
  border:0;
  border-radius:10px;
  padding:11px 12px;
  margin:0 0 10px;
  cursor:pointer;
  font-weight:800;
  color:var(--navy);
  background:var(--blue-soft);
  display:flex;
  align-items:center;
  gap:9px;
  text-align:left;
}
.home-btn:hover,.home-btn.active{background:#dfeaff;color:var(--blue)}
.search-wrap{padding:0 0 12px}
.search-wrap input{
  width:100%;height:42px;
  border:1px solid #cbd5e1;border-radius:10px;
  padding:0 12px;font-size:14px;background:#fff;
}
.search-wrap input:focus{
  outline:2px solid rgba(11,87,208,.12);
  border-color:var(--blue);
}
.tree-label{
  font-size:11px;
  color:#94a3b8;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  padding:6px 10px 4px;
}
.tree-grade{margin:4px 0}
.tree-grade-btn,.tree-chapter-btn{
  width:100%;border:0;background:transparent;cursor:pointer;text-align:left;
  display:flex;align-items:center;gap:8px;border-radius:8px;
}
.tree-grade-btn{
  padding:10px;
  font-weight:800;font-size:15px;color:var(--navy);
}
.tree-grade-btn:hover{background:var(--blue-soft)}
.tree-chapter-btn{
  padding:8px 10px 8px 25px;color:#334155;font-size:13px;font-weight:700;
}
.tree-chapter-btn:hover,.tree-chapter-btn.active{background:var(--blue-soft);color:var(--blue)}
.tree-graphs{padding-left:38px}
.tree-graph{
  display:block;width:100%;border:0;background:transparent;text-align:left;
  padding:6px 8px;border-radius:7px;cursor:pointer;font-size:12px;color:#526178;
}
.tree-graph:hover{background:#f5f8fc;color:var(--blue)}
.chev{width:14px;display:inline-block;transition:.15s transform}
.collapsed .chev{transform:rotate(-90deg)}
.hidden{display:none!important}

.main{
  padding:20px 22px 38px;
  min-width:0;
  overflow:auto;
  height:100%;
}
.mobile-tree-btn{display:none}

/* HOME */
.home-hero{
  position:relative;
  overflow:hidden;
  background:linear-gradient(135deg,#0d3b72 0%,#0b57d0 58%,#2a74df 100%);
  color:#fff;
  border-radius:20px;
  padding:32px 34px;
  box-shadow:var(--shadow);
  margin-bottom:18px;
}
.home-hero:after{
  content:"";
  position:absolute;right:-90px;top:-110px;width:330px;height:330px;
  border-radius:50%;border:46px solid rgba(255,255,255,.08);
}
.home-hero:before{
  content:"";
  position:absolute;right:170px;bottom:-115px;width:230px;height:230px;
  border-radius:50%;background:rgba(255,255,255,.055);
}
.hero-content{position:relative;z-index:2;max-width:760px}
.eyebrow{
  display:inline-flex;align-items:center;gap:7px;
  background:rgba(255,255,255,.13);
  border:1px solid rgba(255,255,255,.16);
  border-radius:999px;padding:6px 10px;
  font-size:12px;font-weight:800;letter-spacing:.04em;
  margin-bottom:13px;
}
.home-hero h2{
  font-size:31px;line-height:1.15;margin:0 0 12px;
}
.home-hero p{
  margin:0;line-height:1.65;color:rgba(255,255,255,.88);font-size:15px;
}
.hero-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}
.hero-btn{
  border:0;border-radius:10px;padding:10px 14px;font-weight:800;cursor:pointer;
}
.hero-btn.primary{background:#fff;color:var(--blue)}
.hero-btn.ghost{background:rgba(255,255,255,.12);color:#fff;border:1px solid rgba(255,255,255,.18)}

.stats-grid{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:22px;
}
.stat-card{
  background:#fff;border:1px solid var(--line);border-radius:14px;
  padding:15px 16px;box-shadow:0 4px 16px rgba(15,23,42,.035);
}
.stat-value{font-size:24px;font-weight:900;color:var(--navy);line-height:1}
.stat-label{font-size:12px;color:var(--muted);margin-top:6px;line-height:1.35}

.home-section-title{
  display:flex;align-items:end;justify-content:space-between;gap:12px;
  margin:25px 0 12px;
}
.home-section-title h3{margin:0;color:var(--navy);font-size:20px}
.home-section-title p{margin:3px 0 0;color:var(--muted);font-size:13px}
.grade-block{
  background:#fff;border:1px solid var(--line);border-radius:18px;
  overflow:hidden;margin-bottom:17px;box-shadow:0 5px 20px rgba(15,23,42,.035);
}
.grade-head{
  display:flex;justify-content:space-between;align-items:center;gap:14px;
  padding:18px 20px;border-bottom:1px solid var(--line);
  background:linear-gradient(90deg,#f8fbff,#fff);
}
.grade-name{display:flex;align-items:center;gap:12px}
.grade-badge{
  min-width:54px;height:54px;border-radius:14px;display:grid;place-items:center;
  font-size:20px;font-weight:900;color:#fff;background:linear-gradient(135deg,var(--blue),var(--navy));
}
.grade-head h4{margin:0 0 4px;font-size:18px;color:var(--navy)}
.grade-head p{margin:0;color:var(--muted);font-size:12.5px}
.grade-count{
  border-radius:999px;background:var(--blue-soft);color:var(--blue);
  padding:6px 10px;font-size:12px;font-weight:800;white-space:nowrap;
}
.chapter-blocks{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;
}
.chapter-summary{
  padding:16px 18px;border-bottom:1px solid var(--line);
  min-width:0;
}
.chapter-summary:nth-child(odd){border-right:1px solid var(--line)}
.chapter-summary-head{
  display:flex;justify-content:space-between;align-items:flex-start;gap:10px;margin-bottom:11px;
}
.chapter-title-btn{
  border:0;background:transparent;padding:0;cursor:pointer;text-align:left;
  color:var(--navy);font-weight:800;font-size:14px;line-height:1.35;
}
.chapter-title-btn:hover{color:var(--blue)}
.chapter-num{
  color:var(--muted);font-size:11px;white-space:nowrap;
  border:1px solid var(--line);border-radius:999px;padding:3px 7px;
}
.graph-chips{display:flex;flex-wrap:wrap;gap:6px}
.graph-chip{
  border:1px solid #d9e5f7;background:#f7faff;color:#31537a;
  padding:7px 9px;border-radius:9px;font-size:12px;font-weight:700;cursor:pointer;
  line-height:1.28;text-align:left;white-space:normal;
}
.graph-chip:hover{background:var(--blue);border-color:var(--blue);color:#fff}
.no-graphs{font-size:12px;color:#94a3b8;font-style:italic}

.quick-guide{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:20px;
}
.guide-card{
  background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px;
}
.guide-icon{
  width:36px;height:36px;border-radius:10px;background:var(--blue-soft);
  color:var(--blue);display:grid;place-items:center;font-weight:900;margin-bottom:10px;
}
.guide-card h4{margin:0 0 6px;color:var(--navy);font-size:14px}
.guide-card p{margin:0;color:var(--muted);font-size:12.5px;line-height:1.5}

/* CHAPTER + SEARCH */
.breadcrumb{color:var(--muted);font-size:13px;margin:0 0 13px}
.chapter-hero{
  background:#fff;border:1px solid var(--line);border-radius:16px;
  padding:19px 20px;margin-bottom:14px;
}
.chapter-hero h2{margin:0;color:var(--navy);font-size:22px}
.chapter-hero p{margin:6px 0 0;color:var(--muted);line-height:1.5;font-size:13px}
.chapter-heading{
  display:flex;justify-content:space-between;align-items:end;gap:14px;margin:18px 0 12px;
}
.chapter-heading h3{margin:0;color:var(--navy)}
.count{color:var(--muted);font-size:13px}
.graph-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.graph-card{
  background:#fff;border:1px solid var(--line);border-radius:13px;padding:16px;
  min-height:180px;display:flex;flex-direction:column;transition:.15s ease;
}
.graph-card:hover{transform:translateY(-2px);box-shadow:var(--shadow)}
.card-top{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}
.graph-code{
  color:var(--blue);background:var(--blue-soft);border-radius:7px;padding:4px 7px;
  font-weight:800;font-size:12px;
}
.status{
  border-radius:999px;padding:4px 8px;font-size:11px;font-weight:700;white-space:nowrap;
}
.status.ready{background:var(--green-bg);color:var(--green)}
.status.planned{background:#f2f4f7;color:#64748b}
.graph-card h4{margin:13px 0 7px;font-size:16px;line-height:1.35;color:#243449}
.graph-card p{margin:0 0 14px;color:var(--muted);font-size:13px;line-height:1.45;flex:1}
.open-btn{
  width:100%;min-height:39px;border:0;border-radius:8px;cursor:pointer;
  font-weight:800;background:var(--blue);color:#fff;
}
.open-btn:hover{background:#0847ad}
.open-btn:disabled{background:#e5e7eb;color:#94a3b8;cursor:not-allowed}
.empty{
  padding:32px;border:1px dashed var(--line);background:#fff;border-radius:12px;
  color:var(--muted);text-align:center;
}
.search-results-title{margin:0 0 12px;color:var(--navy)}

@media(max-width:1150px){
  .graph-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:950px){
  .chapter-blocks{grid-template-columns:1fr}
  .chapter-summary:nth-child(odd){border-right:0}
}
@media(max-width:780px){
  .app-header{min-height:52px;padding:6px 9px}
  .brand-site{display:none}
  .brand h1{font-size:17px}.brand small{font-size:11px}
  .brand-mark{width:36px;height:36px;border-radius:10px}
  .app-shell{display:block;height:auto;min-height:calc(100dvh - 52px)}
  .mobile-tree-btn{
    display:inline-flex;border:1px solid var(--line);background:#fff;
    border-radius:8px;padding:8px 10px;cursor:pointer;font-weight:800;
  }
  .sidebar{
    display:block;position:fixed;z-index:40;top:52px;left:0;
    width:min(88vw,340px);height:calc(100dvh - 52px);
    box-shadow:8px 0 30px rgba(0,0,0,.16);
    transform:translateX(-102%);opacity:0;visibility:hidden;
    transition:transform .26s cubic-bezier(.22,.61,.36,1),opacity .2s ease,visibility 0s linear .26s;
  }
  .sidebar.open{transform:translateX(0);opacity:1;visibility:visible;transition:transform .26s cubic-bezier(.22,.61,.36,1),opacity .2s ease,visibility 0s}
  .mobile-backdrop{position:fixed;inset:52px 0 0;border:0;background:rgba(15,23,42,.38);z-index:35;display:block;opacity:0;visibility:hidden;transition:opacity .22s ease,visibility 0s linear .22s}
  .mobile-backdrop.is-visible{opacity:1;visibility:visible;transition:opacity .22s ease,visibility 0s}
  .mobile-backdrop[hidden]{display:none}
  .sidebar{z-index:40}
  .main{padding:13px;height:auto;overflow:visible}
  .home-hero{padding:23px 20px;border-radius:16px}
  .home-hero h2{font-size:24px}
  .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .stat-card{padding:13px}
  .stat-value{font-size:21px}
  .grade-head{padding:14px}
  .grade-badge{width:46px;min-width:46px;height:46px;font-size:17px}
  .chapter-blocks{display:block}
  .chapter-summary{border-right:0!important;padding:14px}
  .graph-grid{grid-template-columns:1fr}
  .quick-guide{grid-template-columns:1fr}
}
@media(max-width:430px){
  .brand small{display:none}
  .home-hero h2{font-size:22px}
  .stats-grid{grid-template-columns:1fr 1fr}
  .hero-actions{display:grid;grid-template-columns:1fr}
  .hero-btn{width:100%}
}

/* ===== v8.1 Modern Index ===== */
body{
  background:
    radial-gradient(circle at 82% 8%, rgba(37,99,235,.08), transparent 24rem),
    radial-gradient(circle at 12% 86%, rgba(14,165,233,.055), transparent 28rem),
    var(--bg);
}
.app-header{
  min-height:54px;
  background:rgba(255,255,255,.88);
  backdrop-filter:blur(18px) saturate(150%);
  -webkit-backdrop-filter:blur(18px) saturate(150%);
  box-shadow:0 1px 0 rgba(255,255,255,.75),0 8px 26px rgba(15,23,42,.045);
}
.app-header:after{
  content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;
  background:linear-gradient(90deg,transparent,#0b57d0 35%,#38bdf8 65%,transparent);
  opacity:.55;
}
.brand-mark{
  position:relative;overflow:hidden;
  background:linear-gradient(145deg,#0b57d0,#123b68 70%,#0ea5e9);
}
.brand-mark:after{
  content:"";position:absolute;width:28px;height:70px;top:-18px;left:-18px;
  background:rgba(255,255,255,.18);transform:rotate(28deg);
}
.brand h1{letter-spacing:-.02em;font-size:17px}
.brand-site{
  display:flex;align-items:center;gap:9px;padding:7px 10px;
  border:1px solid var(--line);border-radius:999px;background:rgba(248,250,252,.8);
}
.header-count{
  display:inline-flex;align-items:center;gap:5px;
  color:var(--blue);font-weight:800;font-size:11px;
}
.header-count:before{
  content:"";width:7px;height:7px;border-radius:50%;background:#22c55e;
  box-shadow:0 0 0 3px rgba(34,197,94,.12);
}
.app-shell{grid-template-columns:326px minmax(0,1fr);height:calc(100dvh - 54px)}
.sidebar{
  background:linear-gradient(180deg,rgba(255,255,255,.97),rgba(248,251,255,.96));
  padding:16px 13px 30px;
  box-shadow:10px 0 34px rgba(15,23,42,.028);
}
.home-btn{
  min-height:44px;border:1px solid #dce8f8;
  background:linear-gradient(135deg,#f2f7ff,#eaf3ff);
  transition:.2s ease;
}
.home-btn:hover,.home-btn.active{
  transform:translateY(-1px);
  box-shadow:0 8px 18px rgba(11,87,208,.09);
}
.search-wrap{position:relative}
.search-wrap:before{
  content:"⌕";position:absolute;left:12px;top:10px;color:#64748b;font-size:20px;line-height:1;
}
.search-wrap input{
  height:44px;padding-left:38px;background:rgba(255,255,255,.9);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9);
}
.tree-label{display:flex;align-items:center;justify-content:space-between}
.tree-label:after{
  content:"Rê ~0,4 giây để mở";font-size:9px;letter-spacing:0;text-transform:none;
  color:#94a3b8;font-weight:600;
}
.tree-grade{
  margin:7px 0;border:1px solid transparent;border-radius:12px;
  transition:border-color .18s ease,background .18s ease,box-shadow .18s ease;
}
.tree-grade:hover{
  border-color:#dbe7f7;background:#fff;
  box-shadow:0 8px 18px rgba(15,23,42,.045);
}
.tree-grade-btn{
  min-height:42px;padding:10px 11px;border-radius:11px;
  transition:.18s ease;
}
.tree-grade:hover>.tree-grade-btn{background:#f2f7ff;color:var(--blue)}
.tree-grade-content{
  overflow:hidden;
  max-height:900px;
  opacity:1;
  transform:translateY(0);
  transition:max-height .24s ease,opacity .18s ease,transform .18s ease;
  padding-bottom:7px;
}
.tree-grade-content.hidden{
  display:none!important;
}
.tree-chapter-btn{
  margin:2px 7px;width:calc(100% - 14px);padding:8px 10px 8px 20px;
  border-left:2px solid transparent;transition:.15s ease;
}
.tree-chapter-btn:hover,.tree-chapter-btn.active{
  border-left-color:var(--blue);background:#eef5ff;
}
.tree-graphs{padding:1px 12px 4px 34px}
.tree-graph{
  position:relative;padding:6px 7px 6px 14px;line-height:1.35;
}
.tree-graph:before{
  content:"";position:absolute;left:2px;top:12px;width:5px;height:5px;border-radius:50%;
  background:#cbd5e1;transition:.15s ease;
}
.tree-graph:hover:before{background:var(--blue);transform:scale(1.25)}
.main{padding:24px 26px 42px}
.home-hero{
  border:1px solid rgba(255,255,255,.16);
  box-shadow:0 18px 42px rgba(11,87,208,.15);
}
.home-hero:after{filter:blur(.2px)}
.stat-card,.grade-block,.guide-card,.graph-card,.chapter-hero{
  backdrop-filter:blur(8px);
}
.stat-card{
  transition:.18s ease;
  background:linear-gradient(160deg,#fff,#fbfdff);
}
.stat-card:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(15,23,42,.065)}
.stat-value{letter-spacing:-.04em}
.grade-block{
  border-color:#dce5ef;
  box-shadow:0 10px 28px rgba(15,23,42,.045);
}
.grade-head{
  background:
    linear-gradient(90deg,rgba(237,244,255,.8),rgba(255,255,255,.96)),
    #fff;
}
.grade-badge{box-shadow:0 10px 22px rgba(11,87,208,.17)}
.graph-chip{transition:.15s ease;box-shadow:0 1px 0 rgba(255,255,255,.9)}
.graph-chip:hover{transform:translateY(-1px);box-shadow:0 7px 16px rgba(11,87,208,.14)}
.graph-card{
  min-height:188px;position:relative;overflow:hidden;
  background:linear-gradient(165deg,#fff,#fbfdff);
}
.graph-card:before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:3px;
  background:linear-gradient(#0b57d0,#38bdf8);opacity:0;transition:.18s ease;
}
.graph-card:hover:before{opacity:1}
.open-btn{box-shadow:0 7px 16px rgba(11,87,208,.13)}
@media(max-width:780px){
  .app-header{min-height:58px}
  .app-shell{display:block}
  .tree-label:after{content:"Chạm để mở"}
}


.mobile-backdrop{display:none}
@media (max-width:780px){.mobile-backdrop{position:fixed;inset:52px 0 0;border:0;background:rgba(15,23,42,.38);z-index:35}.mobile-backdrop[hidden]{display:none}}
:where(.tree-grade-btn,.tree-chapter-btn,.tree-graph,.graph-chip,.open-btn,.hero-btn,.home-btn,.mobile-tree-btn):focus-visible{outline:3px solid #f59e0b;outline-offset:2px}
.header-actions{display:flex;align-items:center;gap:8px;margin-left:auto}
.brand-site{display:flex;align-items:center;gap:9px;padding:7px 10px;border:1px solid var(--line);border-radius:999px;background:rgba(248,250,252,.8)}
.app-header{padding:0 12px}
.brand-mark{width:34px;height:34px;border-radius:10px}
.header-actions{flex:0 0 auto}
.header-count{min-height:36px;padding:0 11px;border:1px solid var(--line);border-radius:10px;background:rgba(248,250,252,.86);white-space:nowrap}
.header-actions .theme-toggle,.header-actions .info-link{width:36px;height:36px;min-width:36px;min-height:36px;padding:6px;border-radius:10px}
.mobile-tree-btn{min-height:36px;padding:7px 9px;font-size:12px;white-space:nowrap}
@media(max-width:780px){.app-header{min-height:52px;padding:0 8px}.brand{gap:5px}.brand-main{gap:7px}.brand h1{font-size:14px}.brand small{display:none}.brand-mark{width:30px;height:30px;font-size:12px;border-radius:8px}.header-actions{gap:4px}.brand-site,.info-text{display:none}.header-count{min-height:32px;padding:0 7px;font-size:10px;border-radius:8px}.header-count:before{width:6px;height:6px}.header-actions .theme-toggle,.header-actions .info-link{width:32px;height:32px;min-width:32px;min-height:32px;padding:4px;border-radius:8px}.mobile-tree-btn{font-size:11px;padding:6px 8px;min-height:32px}.info-link{font-size:18px!important}}
@media(max-width:430px){.mobile-tree-btn{width:32px;min-width:32px;height:32px;min-height:32px;padding:0;justify-content:center}.mobile-tree-label{display:none}.mobile-tree-icon{font-size:16px;line-height:1}}
@media(prefers-reduced-motion:reduce){.sidebar,.mobile-backdrop{transition:none!important}}

.app-header .header-actions{display:flex;flex:0 0 auto;align-items:center;flex-flow:row nowrap;white-space:nowrap}
.app-header .brand{justify-content:flex-start;gap:10px}
.app-header .header-actions{margin-left:0;justify-content:flex-start;gap:8px}
.app-header .hvl-header-actions{margin-left:0;justify-content:flex-start;align-items:center;flex-flow:row nowrap;gap:8px}
.app-header .header-actions .info-link{width:auto;min-width:max-content;padding:6px 9px;white-space:nowrap}
@media(max-width:780px){.app-header .header-actions,.app-header .hvl-header-actions{gap:4px}}
@media(max-width:780px){.app-header .brand{gap:5px}.app-header .header-actions .info-link{width:auto;min-width:0;padding:4px 7px;font-size:11px!important}.app-header .header-actions .info-text{display:inline}}
@media(max-width:780px){.app-header .brand{justify-content:flex-start}.app-header .header-actions{order:-1}.app-header .brand-main{order:0}.app-header .mobile-tree-btn{order:1}}
@media(max-width:380px){.app-header .brand-main>div:not(.brand-mark){display:none}.app-header .brand-main{width:26px;flex:0 0 26px}.app-header .brand-mark{width:26px;height:26px}.mobile-tree-label{display:none}.mobile-tree-btn{width:30px;min-width:30px}.app-header .header-count{font-size:9px;padding:0 5px}.app-header .header-actions .info-link{padding:4px 5px;font-size:10px!important}}


/* V8.6.1 – hocvatly.com logo, compact hero, keep HVL-Graphics product identity */
.app-header{min-height:62px;padding:0 14px}
.app-shell{height:calc(100dvh - 62px)}
.brand-main{gap:14px;flex:0 1 auto}
.site-logo-link{display:flex;align-items:center;flex:0 0 auto;line-height:0;border-radius:6px}
.site-logo{display:block;width:232px;height:auto;max-height:44px;object-fit:contain}
.site-logo-link:focus-visible{outline:3px solid #f59e0b;outline-offset:3px}
.brand-product h1{font-size:16px;line-height:1.18;white-space:nowrap}
.brand-product small{display:block;margin-top:4px;font-size:11px;white-space:nowrap}
.brand-product strong{color:var(--navy)}
.app-header .brand{gap:16px}
.home-hero{padding:20px 25px;border-radius:16px;margin-bottom:12px}
.hero-content{max-width:1040px}
.eyebrow{font-size:11px;padding:5px 10px;margin-bottom:9px;letter-spacing:.025em}
.home-hero h2{font-size:clamp(23px,2.1vw,29px);line-height:1.22;margin:0 0 8px}
.home-hero p{max-width:1000px;font-size:13.5px;line-height:1.48}
.hero-actions{margin-top:13px;gap:9px}
.hero-btn{padding:9px 12px;font-size:13px;border-radius:9px}
.home-hero:after{right:-100px;top:-130px;width:290px;height:290px}
.home-hero:before{right:120px;bottom:-130px;width:200px;height:200px}
.stats-grid{gap:10px;margin-bottom:16px}
.stat-card{padding:12px 14px}
.stat-value{font-size:22px}
.stat-value-format{font-size:20px;letter-spacing:-.02em}
.home-section-title{margin:15px 0 10px}
@media(max-width:1150px){.site-logo{width:194px}.brand-product h1{font-size:14px}}
@media(max-width:950px){.brand-product{display:none}.site-logo{width:186px}}
@media(max-width:780px){
  .app-header{min-height:54px;padding:3px 8px}
  .app-shell{height:auto}
  .app-header .brand{gap:6px;justify-content:space-between}
  .app-header .brand-main{width:auto;flex:0 1 auto;min-width:0}
  .site-logo{width:clamp(115px,24vw,164px);max-height:35px}
  .app-header .header-actions{margin-left:auto;order:0}
  .app-header .brand-main{order:-1}
  .app-header .mobile-tree-btn{order:1}
  .sidebar{top:54px;height:calc(100dvh - 54px)}
  .main{padding:11px}
  .home-hero{padding:16px;border-radius:14px}
  .home-hero h2{font-size:21px}
  .home-hero p{font-size:13px;line-height:1.45}
  .hero-btn{padding:10px}
  .stats-grid{gap:8px}
}
@media(max-width:520px){
  .site-logo{width:120px}
  .header-count{font-size:9px!important;padding:0 5px!important}
  .home-hero h2{font-size:20px}
  .eyebrow{font-size:10px;white-space:normal}
  .hero-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}
  .hero-btn{font-size:11px;padding:8px}
  .hero-btn:first-child{grid-column:1/-1}
  .stat-card{padding:10px}
  .stat-label{font-size:11px}
  .stat-value{font-size:20px}
  .stat-value-format{font-size:17px}
}
@media(max-width:380px){.site-logo{width:98px}}

/* V8.6.2 – Brand at left; copyright logo anchored to right edge. */
.app-header .brand{display:flex;align-items:center;justify-content:flex-start;gap:14px;min-width:0;width:100%}
.app-header .brand-main{display:flex;order:0;flex:0 1 auto;min-width:0;gap:0}
.app-header .brand-product{min-width:0}
.app-header .header-actions{order:1;display:flex;flex:0 0 auto;gap:8px;margin-left:5px;align-items:center}
.app-header .site-logo-link{order:2;flex:0 0 auto;margin-left:auto;max-width:100%;padding-left:10px}
.app-header .site-logo{width:clamp(172px,17vw,236px);height:auto;max-height:43px;object-fit:contain}
@media(max-width:1050px){
  .app-header .brand{gap:8px}
  .app-header .brand-product h1{font-size:14px}
  .app-header .brand-product small{font-size:10px}
  .app-header .site-logo{width:170px}
}
@media(min-width:781px) and (max-width:880px){
  .app-header .site-logo{width:145px}
  .app-header .brand-product h1{font-size:13px}
}
@media(min-width:781px) and (max-width:950px){
  .app-header .brand-product{display:block}
}
@media(max-width:780px){
  .app-header .brand{justify-content:flex-start;gap:7px}
  .app-header .brand-main{display:none}
  .app-header .mobile-tree-btn{order:0;flex:0 0 auto}
  .app-header .header-actions{order:1;margin-left:0;gap:5px}
  .app-header .site-logo-link{order:2;margin-left:auto;padding-left:3px}
  .app-header .site-logo{width:clamp(100px,26vw,158px);max-height:36px}
}
@media(max-width:450px){
  .app-header .header-count{display:none}
  .app-header .site-logo{width:clamp(100px,29vw,130px)}
}
@media(max-width:345px){
  .app-header .header-actions .info-text{display:none}
  .app-header .header-actions .info-link{min-width:32px;width:32px;justify-content:center}
}
