/* ============================================================
   EpickCloud — HS Chapter 07 sample site
   Standalone stylesheet (no build step, works offline from file://)
   ============================================================ */

:root {
  --teal-900: #134e4a;
  --teal-800: #115e59;
  --teal-700: #0f766e;
  --teal-600: #0d9488;
  --teal-100: #ccfbf1;
  --teal-50:  #f0fdfa;
  --emerald-600: #059669;
  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50:  #f8fafc;
  --amber-700: #b45309;
  --amber-50:  #fffbeb;
  --amber-200: #fde68a;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--slate-50);
  color: var(--slate-900);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; line-height: 1.2; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
strong { color: var(--slate-900); }
.muted { color: var(--slate-500); }

.wrap { width: 100%; max-width: 1280px; margin: 0 auto; }
.section { padding: 56px 16px; }
@media (min-width: 768px) { .section { padding: 80px 24px; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; padding: 14px 24px;
  font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary {
  background: linear-gradient(90deg, var(--teal-600), var(--emerald-600));
  color: #fff; box-shadow: 0 8px 20px -8px rgba(13, 148, 136, .7);
}
.btn-primary:hover { transform: scale(1.02); }
.btn-ghost {
  background: #fff; color: var(--slate-900);
  border: 1px solid var(--slate-300); box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}
.btn-ghost:hover { background: var(--slate-50); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

/* ---------------- header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50; padding: 12px 12px 0;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1280px; margin: 0 auto; padding: 10px 16px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(12px);
  border: 1px solid var(--slate-200); border-radius: 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; }
.brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: 12px; background: var(--teal-50); border: 1px solid var(--slate-200);
  color: var(--teal-600);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand span.dot { color: var(--teal-600); }

.nav { display: none; align-items: center; gap: 4px; }
.nav a.navlink {
  padding: 8px 14px; border-radius: 12px; font-size: 14px; font-weight: 600;
  color: var(--slate-600); transition: background .15s ease, color .15s ease;
}
.nav a.navlink:hover { background: var(--slate-100); color: var(--slate-900); }
.nav a.navcta {
  margin-left: 6px; padding: 9px 16px; border-radius: 12px;
  background: linear-gradient(90deg, var(--teal-600), var(--emerald-600));
  color: #fff; font-size: 14px; font-weight: 700;
  box-shadow: 0 6px 16px -8px rgba(13, 148, 136, .8);
}
.nav-toggle {
  display: grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid var(--slate-200); border-radius: 12px;
  background: var(--slate-50); color: var(--slate-700); cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }
.mobile-nav { display: none; max-width: 1280px; margin: 6px auto 0; }
.mobile-nav.open { display: block; }
.mobile-nav nav {
  display: grid; gap: 4px; padding: 10px; background: #fff;
  border: 1px solid var(--slate-200); border-radius: 16px;
  box-shadow: 0 20px 40px -20px rgba(15, 23, 42, .35);
}
.mobile-nav a {
  padding: 10px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--slate-700);
}
.mobile-nav a:hover { background: var(--slate-100); }
.mobile-nav a.navcta {
  margin-top: 4px; text-align: center; color: #fff;
  background: linear-gradient(90deg, var(--teal-600), var(--emerald-600));
}
@media (min-width: 1024px) {
  .nav { display: flex; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* ---------------- hero ---------------- */
.hero-card {
  padding: 28px;
  border-radius: 24px;
  border: 1px solid var(--teal-100);
  background: linear-gradient(135deg, #fff 0%, var(--teal-50) 55%, #ecfdf5 100%);
  box-shadow: 0 24px 50px -30px rgba(15, 23, 42, .35);
}
@media (min-width: 768px) { .hero-card { padding: 48px; } }

.eyebrow {
  display: inline-block; margin-bottom: 20px; padding: 6px 14px;
  border: 1px solid var(--teal-100); border-radius: 999px; background: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--teal-700);
}
.hero-card h1 { font-size: clamp(26px, 5vw, 46px); font-weight: 800; margin-bottom: 18px; }
.grad-text {
  background: linear-gradient(90deg, var(--teal-600), var(--emerald-600));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead { max-width: 820px; color: var(--slate-600); font-size: 16px; margin-bottom: 30px; }
@media (min-width: 768px) { .hero-lead { font-size: 18px; } }
.hero-actions { display: flex; flex-direction: column; gap: 12px; margin-bottom: 36px; }
@media (min-width: 640px) { .hero-actions { flex-direction: row; flex-wrap: wrap; } }

.hero-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 768px) { .hero-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { padding: 16px; border-radius: 16px; border: 1px solid var(--teal-100); background: rgba(255, 255, 255, .85); }
.kpi b { display: block; font-size: 26px; font-weight: 800; color: var(--teal-700); line-height: 1.15; }
@media (min-width: 768px) { .kpi b { font-size: 30px; } }
.kpi span { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--slate-500); }

/* ---------------- headings / tabs ---------------- */
.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.sec-head h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; }
.sec-head p { margin-top: 4px; max-width: 680px; color: var(--slate-500); font-size: 14px; }
@media (min-width: 768px) { .sec-head p { font-size: 16px; } }

.tabs { display: inline-flex; padding: 4px; border-radius: 12px; border: 1px solid var(--slate-200); background: var(--slate-100); }
.tab {
  border: 0; background: transparent; cursor: pointer;
  padding: 8px 16px; border-radius: 9px; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--slate-600); transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.tab:hover { color: var(--slate-900); }
.tab.active { background: #fff; color: var(--slate-900); box-shadow: 0 2px 8px -3px rgba(11, 37, 66, .28); }
.tab .tab-count { margin-left: 4px; font-size: 12px; font-weight: 600; color: var(--slate-400); }
.tab.active .tab-count { color: var(--teal-600); }

/* ---------------- stat cards ---------------- */
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
@media (min-width: 640px) { .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .stat-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.stat-card {
  padding: 14px 16px; border-radius: 16px; border: 1px solid var(--slate-200);
  background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
}
.stat-card b { display: block; font-size: 22px; font-weight: 800; color: var(--teal-600); line-height: 1.2; }
.stat-card small { font-size: 12px; color: var(--slate-500); }

/* ---------------- bars ---------------- */
.bars-grid { display: grid; gap: 16px; }
@media (min-width: 768px) { .bars-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .bars-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card {
  padding: 20px; border-radius: 16px; border: 1px solid var(--slate-200);
  background: #fff; box-shadow: 0 12px 28px -22px rgba(15, 23, 42, .5);
}
.card.wide { grid-column: span 2; }
@media (min-width: 1280px) { .card.wide { grid-column: span 1; } }
.card h3 { font-size: 16px; font-weight: 700; }
.card .sub { margin: 2px 0 14px; font-size: 12px; color: var(--slate-500); }

.bar-row { display: grid; grid-template-columns: 132px 1fr auto; align-items: center; gap: 10px; margin-bottom: 7px; }
.bar-label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--slate-700); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bar-track { height: 9px; border-radius: 999px; background: var(--slate-100); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--teal-600), var(--emerald-600)); transition: width .5s ease; }
.bar-count { font-size: 12px; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--slate-600); min-width: 54px; text-align: right; }
.bar-other .bar-label, .bar-other .bar-count { color: var(--slate-400); font-weight: 600; }
.bar-other .bar-fill { background: var(--slate-300); }

.hs-row { display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 10px; margin-bottom: 9px; }
.hs-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; font-weight: 700; color: var(--teal-700); }
.hs-body { min-width: 0; }
.hs-label { font-size: 12px; color: var(--slate-600); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; }

/* ---------------- table ---------------- */
.table-card {
  overflow: auto; max-height: 640px;
  border: 1px solid var(--slate-200); border-radius: 16px; background: #fff;
  box-shadow: 0 14px 32px -26px rgba(15, 23, 42, .6);
}
.data-table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 12.5px; }
.data-table thead th {
  position: sticky; top: 0; z-index: 5;
  padding: 10px 12px; background: var(--slate-100); text-align: left; white-space: nowrap;
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--slate-600);
  border-bottom: 1px solid var(--slate-200);
}
.data-table tbody td {
  padding: 9px 12px; border-bottom: 1px solid var(--slate-100); vertical-align: top;
  white-space: nowrap; color: var(--slate-700);
}
.data-table tbody tr:nth-child(even) { background: #fcfdfe; }
.data-table tbody tr:hover { background: var(--teal-50); }
.data-table td.desc { white-space: normal; min-width: 220px; max-width: 340px; color: var(--slate-600); }
.data-table td.cell-num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--slate-900); }
.data-table td.hs { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; font-weight: 700; color: var(--teal-700); }

.pill-hidden {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  background: var(--amber-50); border: 1px solid var(--amber-200);
  font-size: 11px; font-weight: 700; color: var(--amber-700); white-space: nowrap;
}
.flag { margin-right: 5px; font-size: 13px; }

.toolbar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
@media (min-width: 640px) { .toolbar { flex-direction: row; align-items: center; } }
.search {
  width: 100%; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--slate-300); background: #fff; font: inherit; font-size: 14px; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
@media (min-width: 640px) { .search { width: 340px; } }
.search:focus { border-color: var(--teal-600); box-shadow: 0 0 0 3px var(--teal-100); }

.pager { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
@media (min-width: 640px) { .pager { flex-direction: row; align-items: center; justify-content: space-between; } }
.pager-btns { display: flex; align-items: center; gap: 8px; }
.page-indicator { min-width: 104px; text-align: center; font-size: 13px; color: var(--slate-500); font-variant-numeric: tabular-nums; }

.notice {
  margin-top: 18px; padding: 14px 16px; border-radius: 14px;
  border: 1px dashed var(--teal-100); background: var(--teal-50);
  font-size: 13px; color: var(--slate-600);
}
.notice b { color: var(--teal-700); }
.notice a { font-weight: 700; color: var(--teal-600); text-decoration: underline; }

/* ---------------- footer ---------------- */
.site-footer { background: var(--teal-900); color: var(--teal-100); padding: 56px 16px 40px; }
.footer-cta {
  display: flex; flex-direction: column; gap: 24px; padding: 28px;
  border-radius: 24px; border: 1px solid rgba(204, 251, 241, .18);
  background: linear-gradient(90deg, var(--teal-800), #065f46);
  box-shadow: 0 24px 48px -30px rgba(0, 0, 0, .6);
}
@media (min-width: 768px) {
  .footer-cta { flex-direction: row; align-items: center; justify-content: space-between; padding: 40px; }
  .site-footer { padding: 56px 24px 40px; }
}
.footer-cta h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; color: #fff; margin-bottom: 8px; }
.footer-cta p { color: #a7f3d0; font-size: 14px; max-width: 720px; }
.footer-cta .btn { background: #fff; color: var(--teal-800); flex-shrink: 0; }
.footer-meta { display: flex; flex-direction: column; gap: 16px; margin-top: 32px; }
@media (min-width: 768px) { .footer-meta { flex-direction: row; align-items: center; justify-content: space-between; } }
.footer-brand { font-size: 18px; font-weight: 700; color: #fff; }
.footer-brand .dot { color: #2dd4bf; }
.footer-meta small { display: block; font-size: 13px; color: #5eead4; line-height: 1.6; }
.footer-meta .legal { font-size: 12.5px; color: #99f6e4; max-width: 620px; }
@media (min-width: 768px) { .footer-meta .legal { text-align: right; } }

/* ---------------- locked importer columns ---------------- */
.unlock {
  margin-top: 16px; padding: 22px;
  border-radius: 18px; border: 1px solid var(--teal-100);
  background: linear-gradient(135deg, #fff, var(--teal-50));
  box-shadow: 0 14px 30px -26px rgba(15, 23, 42, .5);
}
.unlock-head { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-start; }
.unlock-head h3 { font-size: 17px; font-weight: 800; }
.unlock-list {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px; margin: 18px 0 0; padding: 0; list-style: none;
}
@media (min-width: 768px) { .unlock-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .unlock-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.unlock-list li {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--slate-700);
  padding: 7px 10px; border-radius: 10px;
  background: rgba(255, 255, 255, .9); border: 1px solid var(--slate-200);
}
.unlock-list li svg { flex-shrink: 0; width: 14px; height: 14px; color: var(--amber-700); }
.unlock-foot { margin-top: 14px; font-size: 12.5px; color: var(--slate-500); }

/* locked cells in the data table */
.data-table th.locked-col {
  background: #fef3c7; color: var(--amber-700);
  border-bottom: 1px solid var(--amber-200);
}
.data-table th.locked-col .lockmark { margin-right: 4px; }
.data-table td.locked-cell {
  background: rgba(255, 251, 235, .6); text-align: center;
}
.data-table tbody tr:hover td.locked-cell { background: #fef3c7; }
