:root{
  --paper:#f6f7fb;
  --paper2:#fbfbfe;
  --ink:#0f172a;
  --mut:#475569;
  --line: rgba(15,23,42,.14);
  --line2: rgba(15,23,42,.10);
  --shadow: 0 18px 40px rgba(2,6,23,.10);

  --accent:#1d4ed8;
  --accent2:#0ea5e9;

  --lc-bg0:#05050a;
  --lc-bg2:#0c0c18;
  --lc-txt:#efeaff;
  --lc-mut:#b9b0dd;

  --orange:#ff9b2f;
  --peach:#ffb085;
  --purple:#b58cff;
  --blue:#58b7ff;
  --tan:#d6c291;
  --green:#52f2a2;

  --lc-line2: rgba(255,255,255,.08);
  --lc-shadow: 0 16px 42px rgba(0,0,0,.55);

  --r: 14px;
  --r-lc: 18px;
  --pad: 16px;
  --railw: 132px;
}

*{ box-sizing: border-box; }
html,body{ height:100%; }

html{
  background: var(--paper);
}

body{
  margin:0;
  min-height:100vh;
  position: relative;
  isolation: isolate;
  color: var(--ink);
  font: 16px/1.6 ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  background:
    radial-gradient(1200px 800px at 12% 0%, rgba(29,78,216,.08), transparent 60%),
    radial-gradient(1100px 700px at 88% 12%, rgba(14,165,233,.06), transparent 62%),
    linear-gradient(180deg, var(--paper2), var(--paper));
  background-attachment: fixed, fixed, fixed;
}

body::before{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
}

a{ color: var(--accent); text-decoration: none; }
a:hover{ text-decoration: underline; }

a:focus-visible,
button:focus-visible{
  outline: 3px solid rgba(29,78,216,.35);
  outline-offset: 3px;
  border-radius: 10px;
}

.lcars{
  max-width: 1060px;
  margin: 0 auto;
  padding: 26px 16px 34px;
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.rail{ display:none; }

.titlebar{
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.72);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.titlebar-top{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px var(--pad);
  border-bottom: 1px solid var(--line2);
  background: rgba(255,255,255,.55);
}

.tb-left{ display:none; }

.tb-nav{
  display:flex;
  gap: 10px;
  align-items:center;
}

.lcbtn{
  height: 36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.70);
  color: var(--ink);
  font: 12px/1 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 800;
}

.lcbtn:hover{
  background: rgba(255,255,255,.88);
}

.tb-tools{
  display:flex;
  align-items:center;
  justify-content:flex-end;
}

.theme-toggle{
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(29,78,216,.08);
  color: var(--ink);
  font: 12px/1 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 900;
  cursor: pointer;
}

.theme-toggle:hover{
  background: rgba(29,78,216,.12);
}

.titlebar-main{
  padding: 16px var(--pad) 18px;
}

.elbow, .tb-right{ display:none; }

.kicker{
  color: var(--mut);
  font: 12px/1.2 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
}

.headline{
  margin-top: 10px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: .01em;
}

.subhead{
  margin-top: 10px;
  color: var(--mut);
  font: 15px/1.6 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  max-width: 86ch;
}

.grid{
  margin-top: 10px;
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.panel{
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.72);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.panel-head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line2);
  background: rgba(255,255,255,.55);
}

.bar,.fill{ display:none; }

.label{
  font: 12px/1 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 900;
  color: rgba(15,23,42,.88);
}

.panel-body{ padding: 14px; }

.metrics{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
}

.metric{
  border-radius: 12px;
  border: 1px solid var(--line2);
  background: rgba(255,255,255,.70);
  padding: 12px;
}

.mk{
  color: var(--mut);
  font: 11px/1 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 800;
}

.mv{
  margin-top: 10px;
  color: var(--ink);
  font: 14px/1.25 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  letter-spacing: .02em;
  font-weight: 900;
}

.note{
  margin-top: 12px;
  border-radius: 12px;
  border: 1px solid var(--line2);
  background: rgba(255,255,255,.70);
  padding: 12px;
  max-width: 98ch;
}

.empty{
  border-radius: 12px;
  border: 1px solid var(--line2);
  background: rgba(255,255,255,.70);
  padding: 16px;
  max-width: 98ch;
}

.empty-title{
  font: 12px/1 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 950;
  color: rgba(15,23,42,.90);
}

.empty-sub{
  margin-top: 12px;
  color: rgba(51,65,85,.96);
  font-size: 16px;
}

.bodytext{
  color: rgba(15,23,42,.92);
}

.sources a{
  color: var(--accent);
}

.footer{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.72);
  box-shadow: var(--shadow);
}

.foot-left{
  color: var(--mut);
  font: 12px/1 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 900;
}

.foot-right{
  display:flex;
  align-items:center;
  gap: 8px;
}

.pip{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: rgba(29,78,216,.10);
}

@media (max-width: 980px){
  .metrics{ grid-template-columns: 1fr; }
  .titlebar-top{ flex-wrap: wrap; }
  .tb-nav{ width: 100%; }
  .tb-tools{ width: 100%; justify-content: flex-start; }
}

body[data-theme="lcars"]{
  color: var(--lc-txt);
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: none;
}

body[data-theme="lcars"]::before{
  opacity: 1;
  background:
    radial-gradient(1600px 980px at 18% 0%, rgba(88,183,255,.10), transparent 62%),
    radial-gradient(1300px 900px at 84% 10%, rgba(181,140,255,.11), transparent 62%),
    linear-gradient(180deg, var(--lc-bg0), var(--lc-bg2));
}

body[data-theme="lcars"] a{ color: inherit; text-decoration:none; }
body[data-theme="lcars"] a:hover{ text-decoration:none; }

body[data-theme="lcars"] .lcars{
  max-width: 1180px;
  grid-template-columns: var(--railw) 1fr;
  padding: 18px 14px 28px;
}

body[data-theme="lcars"] .rail{
  display:flex;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(0,0,0,.20);
  box-shadow: var(--lc-shadow);
  overflow:hidden;
  padding: 12px 10px;
  flex-direction: column;
}

body[data-theme="lcars"] .rail-top,
body[data-theme="lcars"] .rail-mid,
body[data-theme="lcars"] .rail-bottom{
  display:flex;
  flex-direction: column;
  gap: 10px;
}

body[data-theme="lcars"] .rail-gap{
  height: 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.06);
  margin: 12px 0;
}

body[data-theme="lcars"] .rail-gap.small{ height: 10px; margin: 10px 0; }

body[data-theme="lcars"] .seg{
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.22) inset;
}

body[data-theme="lcars"] .s1{ height: 74px; background: linear-gradient(180deg, var(--orange), var(--peach)); }
body[data-theme="lcars"] .s2{ height: 44px; background: linear-gradient(180deg, var(--purple), var(--blue)); }
body[data-theme="lcars"] .s3{ height: 30px; background: linear-gradient(180deg, var(--tan), var(--orange)); }
body[data-theme="lcars"] .s4{ height: 54px; background: linear-gradient(180deg, rgba(181,140,255,.95), rgba(88,183,255,.72)); }
body[data-theme="lcars"] .s5{ height: 40px; background: linear-gradient(180deg, rgba(255,155,47,.92), rgba(214,194,145,.70)); }
body[data-theme="lcars"] .s6{ height: 120px; background: linear-gradient(180deg, rgba(82,242,162,.90), rgba(82,242,162,.40)); }

body[data-theme="lcars"] .titlebar{
  border-radius: var(--r-lc);
  border: 1px solid var(--lc-line2);
  background: linear-gradient(180deg, rgba(18,18,38,.88), rgba(18,18,38,.62));
  box-shadow: var(--lc-shadow);
}

body[data-theme="lcars"] .titlebar-top{
  border-bottom: 1px solid rgba(255,255,255,.07);
  background:
    linear-gradient(90deg, rgba(255,155,47,.14), transparent 42%),
    rgba(0,0,0,.16);
}

body[data-theme="lcars"] .tb-left{
  display:flex;
  align-items:center;
  gap: 10px;
}

body[data-theme="lcars"] .tb-cap{
  height: 16px;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.22) inset;
}

body[data-theme="lcars"] .cap-orange{ width: 82px; background: linear-gradient(90deg, var(--orange), var(--peach)); }
body[data-theme="lcars"] .cap-purple{ width: 54px; background: linear-gradient(90deg, var(--purple), var(--blue)); }
body[data-theme="lcars"] .cap-tan{ width: 34px; background: linear-gradient(90deg, var(--tan), var(--orange)); }

body[data-theme="lcars"] .lcbtn{
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color: var(--lc-txt);
  font-weight: 950;
}

body[data-theme="lcars"] .theme-toggle{
  border-radius: 999px;
  background: rgba(181,140,255,.10);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--lc-txt);
}

body[data-theme="lcars"] .titlebar-main{
  display:grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items:center;
  padding: var(--pad);
}

body[data-theme="lcars"] .elbow{
  display:block;
  width: 92px;
  height: 74px;
  border-radius: 0 0 0 36px;
  background:
    radial-gradient(44px 44px at 18px 18px, transparent 60%, rgba(0,0,0,0) 61%),
    linear-gradient(90deg, rgba(255,155,47,.95), rgba(255,176,133,.80));
  position: relative;
}

body[data-theme="lcars"] .elbow::after{
  content:"";
  position:absolute;
  right: -22px;
  top: 0;
  width: 22px;
  height: 74px;
  border-radius: 0 16px 16px 0;
  background: rgba(255,255,255,.06);
  border-left: 1px solid rgba(0,0,0,.22);
}

body[data-theme="lcars"] .tb-right{
  display:flex;
  flex-direction: column;
  gap: 10px;
  align-items:flex-end;
  min-width: 120px;
}

body[data-theme="lcars"] .tb-strip{
  height: 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.05);
}

body[data-theme="lcars"] .strip-1{ width: 128px; background: rgba(255,155,47,.14); border-color: rgba(255,155,47,.12); }
body[data-theme="lcars"] .strip-2{ width: 92px; background: rgba(181,140,255,.14); border-color: rgba(181,140,255,.12); }
body[data-theme="lcars"] .strip-3{ width: 64px; background: rgba(88,183,255,.14); border-color: rgba(88,183,255,.12); }

body[data-theme="lcars"] .kicker{ color: var(--lc-mut); }
body[data-theme="lcars"] .headline{
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 22px;
  font-weight: 950;
  color: var(--lc-txt);
}
body[data-theme="lcars"] .subhead{
  color: var(--lc-mut);
  font: 14px/1.6 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

body[data-theme="lcars"] .panel{
  border-radius: var(--r-lc);
  border: 1px solid var(--lc-line2);
  background: linear-gradient(180deg, rgba(23,23,52,.78), rgba(18,18,38,.66));
  box-shadow: var(--lc-shadow);
  position: relative;
}

body[data-theme="lcars"] .panel::before{
  content:"";
  position:absolute;
  left: 0;
  top: 0;
  width: 12px;
  height: 100%;
  opacity: .75;
}

body[data-theme="lcars"] .panel-a::before{ background: linear-gradient(180deg, rgba(255,155,47,.70), rgba(255,176,133,.45)); }
body[data-theme="lcars"] .panel-b::before{ background: linear-gradient(180deg, rgba(181,140,255,.70), rgba(88,183,255,.45)); }

body[data-theme="lcars"] .panel-head{
  display:grid;
  grid-template-columns: 82px auto 1fr;
  align-items:center;
  gap: 12px;
  background:
    linear-gradient(90deg, rgba(255,155,47,.16), transparent 46%),
    rgba(0,0,0,.18);
  border-bottom: 1px solid var(--lc-line2);
}

body[data-theme="lcars"] .bar{
  display:block;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange), var(--peach));
}
body[data-theme="lcars"] .panel-b .bar{
  background: linear-gradient(90deg, var(--purple), var(--blue));
}
body[data-theme="lcars"] .fill{
  display:block;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.06);
}

body[data-theme="lcars"] .label{
  color: rgba(239,234,255,.92);
  font: 12px/1 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 950;
}

body[data-theme="lcars"] .metric{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
}
body[data-theme="lcars"] .mk{ color: var(--lc-mut); }
body[data-theme="lcars"] .mv{
  color: var(--lc-txt);
  text-transform: uppercase;
  letter-spacing: .10em;
  font-weight: 950;
}

body[data-theme="lcars"] .note,
body[data-theme="lcars"] .empty{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  color: rgba(239,234,255,.88);
}

body[data-theme="lcars"] .empty-title{
  color: rgba(239,234,255,.92);
  text-transform: uppercase;
  letter-spacing: .16em;
  font: 12px/1 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 950;
}

body[data-theme="lcars"] .empty-sub{
  color: var(--lc-mut);
  font: 14px/1.65 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
body[data-theme="lcars"] .bodytext{ color: rgba(239,234,255,.88); }
body[data-theme="lcars"] .sources a{ color: rgba(181,140,255,.92); }

body[data-theme="lcars"] .footer{
  border-radius: var(--r-lc);
  border: 1px solid var(--lc-line2);
  background: rgba(0,0,0,.18);
  box-shadow: var(--lc-shadow);
}

body[data-theme="lcars"] .foot-left{
  color: var(--lc-mut);
  font: 12px/1 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 950;
}

body[data-theme="lcars"] .pip{
  width: 12px;
  height: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
}
body[data-theme="lcars"] .p1{ background: rgba(255,155,47,.22); border-color: rgba(255,155,47,.25); }
body[data-theme="lcars"] .p2{ background: rgba(181,140,255,.22); border-color: rgba(181,140,255,.25); }
body[data-theme="lcars"] .p3{ background: rgba(88,183,255,.22); border-color: rgba(88,183,255,.25); }
body[data-theme="lcars"] .p4{ background: rgba(214,194,145,.20); border-color: rgba(214,194,145,.22); }

@media (max-width: 1040px){
  body[data-theme="lcars"] .lcars{ grid-template-columns: 1fr; }
  body[data-theme="lcars"] .rail{ display:none; }
}

@media (max-width: 980px){
  body[data-theme="lcars"] .titlebar-main{
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }
  body[data-theme="lcars"] .tb-right{ display:none; }
  body[data-theme="lcars"] .metrics{ grid-template-columns: 1fr; }
  body[data-theme="lcars"] .elbow{ width: 86px; height: 66px; }
  body[data-theme="lcars"] .elbow::after{ height: 66px; }
}

