@font-face {
  font-family: "Homepage Title Serif";
  src: url("/fonts/homepage-title-serif.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: block;
  unicode-range: U+65E0, U+6DAF, U+77E5, U+8005;
}

:root {
  --page-max: 1120px;

    --font-display: "Iowan Old Style", "Palatino Linotype", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
    --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Inter", "PingFang SC", "Microsoft YaHei UI", sans-serif;
    --font-title: "Segoe UI Variable Display", "Aptos Display", "Inter", "PingFang SC", "Microsoft YaHei UI", sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;

    --text: #f3f6fa;
    --heading: #ffffff;
    --muted: rgba(218, 226, 236, 0.66);

    --prussian: #003153;
    --prussian-rgb: 0, 49, 83;

    
    --panel-alpha: 0.250;
    --glass-dark-alpha: 0.116;
    --glass-tint-alpha: 0.060;

    --line: rgba(255, 255, 255, 0.11);
    --line-strong: rgba(255, 255, 255, 0.18);
    --good: #55d6a5;
    --warn: #f2bf67;
    --bad: #ff7280;
    --idle: #91a0b3;

    --shadow-panel: 0 20px 56px rgba(0, 0, 0, 0.25);
    --shadow-glass: 0 11px 30px rgba(0, 0, 0, 0.21);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
    background: #05090f;
}

body {
  margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: #05090f;
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body::before {
  content: "";
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
      radial-gradient(circle at 18% -10%, rgba(var(--prussian-rgb), 0.31), transparent 39%),
      radial-gradient(circle at 92% 8%, rgba(43, 91, 126, 0.10), transparent 29%),
      linear-gradient(180deg, rgba(3, 7, 12, 0.30) 0%, rgba(4, 8, 14, 0.50) 48%, rgba(3, 6, 10, 0.70) 100%);
}

button, input {
  font: inherit;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

.background {
  position: fixed;
    inset: 0;
    z-index: 0;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    pointer-events: none;
    transform: scale(1.01);
}

.liquid-glass-defs {
  position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

.page-shell {
  position: relative;
    z-index: 2;
    width: min(var(--page-max), calc(100% - 36px));
    margin: 0 auto;
    padding: 22px 0 38px;
}

.topbar {
  min-height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 22px;
    margin-bottom: 18px;
}

.brand {
  display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-logo {
  width: 46px;
    height: 46px;
    flex: 0 0 46px;
    object-fit: contain;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.12),
      0 9px 24px rgba(0, 0, 0, 0.22);
}

.brand h1 {
  margin: 0;
    color: var(--heading);
    font-family: var(--font-display);
    font-size: clamp(1.58rem, 2.2vw, 2.02rem);
    font-weight: 700;
    letter-spacing: .075em;
    line-height: 1.08;
    text-shadow: 0 3px 16px rgba(0, 0, 0, 0.34);
}

.widget-block {
  padding: 8px 11px;
  border-radius: 13px;
}

.widget-block strong {
  display: block;
    color: rgba(255, 255, 255, 0.95);
    font-family: var(--font-ui);
    font-size: .80rem;
    font-weight: 620;
    line-height: 1.28;
}

.widget-block span {
  display: block;
    margin-top: 2px;
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: .64rem;
    font-weight: 430;
    white-space: nowrap;
}

.liquid-glass {
  --lg-blur: 7px;
    --lg-saturate: 148%;
    --lg-brightness: .80;
    --lg-refraction: none;
    --mx: 50%;
    --my: 18%;

    position: relative;
    overflow: hidden;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.115);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.13),
      inset 0 -1px 0 rgba(0, 0, 0, 0.18),
      var(--shadow-glass);
}

.liquid-glass > * {
  position: relative;
    z-index: 2;
}

.liquid-glass::before {
  content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    pointer-events: none;

    background:
      linear-gradient(
        145deg,
        rgb(255 255 255 / var(--glass-tint-alpha)) 0%,
        rgb(255 255 255 / 0.018) 42%,
        rgb(3 8 13 / var(--glass-dark-alpha)) 100%
      );

    -webkit-backdrop-filter:
      blur(var(--lg-blur))
      saturate(var(--lg-saturate))
      brightness(var(--lg-brightness))
      contrast(1.03);
    backdrop-filter:
      blur(var(--lg-blur))
      saturate(var(--lg-saturate))
      brightness(var(--lg-brightness))
      contrast(1.03);

    filter: var(--lg-refraction);
}

.liquid-glass::after {
  content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    pointer-events: none;
    opacity: .90;
    background:
      radial-gradient(
        175px circle at var(--mx) var(--my),
        rgba(255, 255, 255, .18) 0%,
        rgba(255, 255, 255, .07) 24%,
        transparent 62%
      );
    box-shadow:
      inset 0 14px 14px -14px rgba(255, 255, 255, .43),
      inset 0 -12px 12px -12px rgba(255, 255, 255, .26),
      inset 11px 0 12px -12px rgba(0, 0, 0, .28),
      inset -11px 0 12px -12px rgba(0, 0, 0, .28);
    mix-blend-mode: screen;
    transition: opacity 180ms ease;
}

.liquid-glass:hover {
  border-color: rgba(255, 255, 255, 0.19);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.17),
      inset 0 -1px 0 rgba(0, 0, 0, 0.18),
      0 15px 34px rgba(0, 0, 0, 0.26);
}

.liquid-glass:hover::after {
  opacity: 1;
}

.lg-pill {
  --lg-refraction: url(#lg-refraction-pill);
    --lg-blur: 6px;
    --lg-saturate: 154%;
    --lg-brightness: .82;
}

.lg-card {
  --lg-refraction: url(#lg-refraction-card);
    --lg-blur: 7px;
    --lg-saturate: 150%;
    --lg-brightness: .80;
}

.lg-control {
  --lg-refraction: url(#lg-refraction-control);
    --lg-blur: 6px;
    --lg-saturate: 146%;
    --lg-brightness: .82;
}

.primary-root {
  display: grid;
    gap: 16px;
}

.primary-split {
  display: grid;
  gap: 16px;
  align-items: stretch;
}

.section {
  min-width: 0;
}

.primary-section,
.group-row {
  position: relative;
    padding: 13px 15px 15px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 17px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, .028), rgba(255, 255, 255, .008)),
      rgb(4 9 15 / var(--panel-alpha));
    box-shadow:
      var(--shadow-panel),
      inset 0 1px 0 rgba(255, 255, 255, 0.045),
      inset 0 -1px 0 rgba(0, 0, 0, 0.17);
}

.primary-split > .primary-section {
  height: 100%;
}

.group-row {
  margin-top: 18px;
}

.section-heading {
  min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 10px;
    padding: 0 1px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.072);
}

.section-title-wrap {
  min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-icon {
  width: 16px;
    height: 16px;
    flex: 0 0 16px;
    object-fit: contain;
    opacity: .90;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .22));
}

.section-heading h2 {
  margin: 0;
    color: rgba(249, 252, 255, .94);
    font-family: var(--font-title);
    font-size: .82rem;
    font-weight: 690;
    letter-spacing: .045em;
}

.status-actions {
  display: flex;
    align-items: center;
    gap: 7px;
}

.muted {
  color: rgba(202, 213, 225, .48);
    font-size: .60rem;
    font-weight: 430;
}

.ghost-button {
  border: 1px solid rgba(83, 158, 201, .22);
    padding: 3px 8px;
    border-radius: 8px;
    color: rgba(235, 246, 255, .82);
    background: rgba(var(--prussian-rgb), .48);
    cursor: pointer;
    font-family: var(--font-ui);
    font-size: .62rem;
    font-weight: 540;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.09);
}

.ghost-button:hover {
  color: #fff;
    background: rgba(var(--prussian-rgb), .66);
}

.ghost-button:disabled {
  opacity: .42;
    cursor: progress;
}

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

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

.card {
  min-width: 0;
    min-height: 62px;
    padding: 5px 8px 5px 5px;
    border-radius: 13px;
    color: inherit;
    text-decoration: none;
}

.card-main {
  min-width: 0;
    min-height: 50px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.card-icon,
.card-abbr {
  width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.075);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.085),
      inset 0 0 0 1px rgba(255, 255, 255, 0.03),
      0 4px 11px rgba(0, 0, 0, 0.11);
}

.card-icon {
  object-fit: contain;
    padding: 7px;
}

.card-abbr {
  display: grid;
    place-items: center;
    color: rgba(255, 255, 255, .84);
    font-family: var(--font-title);
    font-size: .72rem;
    font-weight: 700;
}

.card-copy {
  min-width: 0;
    flex: 1;
    padding: 3px 4px;
}

.card-title-row {
  display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
}

.card-title {
  margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(250, 252, 255, .96);
    font-family: var(--font-title);
    font-size: .77rem;
    font-weight: 650;
    letter-spacing: .006em;
}

.card-description {
  margin: 3px 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
    font-family: var(--font-body);
    font-size: .63rem;
    font-weight: 400;
    line-height: 1.38;
    letter-spacing: 0;
}

.status-dot {
  width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 999px;
    background: var(--idle);
    box-shadow: 0 0 0 3px rgba(145, 160, 179, .08);
}

.status-dot.good {
  background: var(--good);
    box-shadow: 0 0 0 3px rgba(85, 214, 165, .09);
}

.status-dot.warn {
  background: var(--warn);
    box-shadow: 0 0 0 3px rgba(242, 191, 103, .09);
}

.status-dot.bad {
  background: var(--bad);
    box-shadow: 0 0 0 3px rgba(255, 114, 128, .09);
}

.status-card {
  padding-bottom: 8px;
}

.status-metrics {
  display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    padding: 0 4px 0 49px;
}

.metric {
  min-width: 0;
    padding: 5px 7px;
    border: 1px solid rgba(255, 255, 255, .045);
    border-radius: 7px;
    background: rgba(255, 255, 255, .048);
}

.metric-label {
  display: block;
    margin-bottom: 1px;
    color: rgba(196, 207, 220, .46);
    font-size: .54rem;
    font-weight: 500;
}

.metric-value {
  display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(242, 246, 251, .88);
    font-family: var(--font-ui);
    font-size: .64rem;
    font-weight: 580;
}

.compact .card {
  min-height: 58px;
}

.glass-tuner-toggle {
  min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 11px;
    border-radius: 13px;
    color: rgba(246, 251, 255, .94);
    cursor: pointer;
}

.glass-tuner-toggle span {
  font-size: 12px;
    font-weight: 520;
}

.glass-tuner-toggle strong {
  color: #fff;
    font-size: 12px;
    font-weight: 650;
}

.glass-tuner-panel {
  width: 238px;
    padding: 12px 13px 11px;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 15px;
    background: rgba(6, 11, 18, .90);
    box-shadow:
      0 18px 42px rgba(0, 0, 0, .36),
      inset 0 1px 0 rgba(255,255,255,.05);
}

.glass-tuner-panel[hidden] {
  display: none;
}

.glass-tuner-heading,
.glass-tuner-scale {
  display: flex;
    justify-content: space-between;
    align-items: center;
}

.glass-tuner-heading {
  margin-bottom: 10px;
    color: rgba(239, 245, 251, .86);
    font-size: 12px;
}

.glass-tuner-heading strong {
  color: #fff;
    font-size: 12px;
}

.glass-tuner-scale {
  margin-top: 4px;
    color: rgba(193, 204, 216, .45);
    font-size: 10px;
}

#glass-transparency {
  width: 100%;
    height: 18px;
    margin: 0;
    accent-color: var(--prussian);
    cursor: pointer;
}

.glass-tuner-reset {
  width: 100%;
    min-height: 30px;
    margin-top: 10px;
    border: 1px solid rgba(83, 158, 201, .18);
    border-radius: 9px;
    color: rgba(233, 244, 252, .78);
    background: rgba(var(--prussian-rgb), .27);
    cursor: pointer;
    font-size: 11px;
    font-weight: 520;
}

.glass-tuner-reset:hover {
  color: #fff;
    background: rgba(var(--prussian-rgb), .42);
}

@media (max-width: 960px) {
  :root {
    --page-max: 920px;
  }


  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .page-shell {
    width: min(100% - 20px, var(--page-max));
        padding-top: 12px;
  }

  .topbar {
    flex-direction: column;
        align-items: stretch;
        gap: 12px;
  }

  .brand {
    width: 100%;
    justify-content: center;
  }

  .brand h1 {
    font-family: "Homepage Title Serif", serif;
    font-weight: 700;
    font-synthesis: none;
    text-align: center;
  }


  .card-grid {
    grid-template-columns: 1fr;
  }

  .primary-section,
    .group-row {
    padding: 11px 11px 12px;
        border-radius: 15px;
  }

  .status-actions .muted {
    display: none;
  }

}

@media (hover: none), (pointer: coarse) {
  .liquid-glass::before {
    filter: none;
  }

  .card:not(.status-card).liquid-glass::before {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background:
      linear-gradient(
        145deg,
        rgb(255 255 255 / var(--glass-tint-alpha)) 0%,
        rgb(255 255 255 / 0.018) 42%,
        rgb(3 8 13 / var(--glass-dark-alpha)) 100%
      );
  }

  .liquid-glass::after {
    background: linear-gradient(145deg, rgba(255,255,255,.09), transparent 42%);
  }

  .card:not(.status-card).liquid-glass::after {
    opacity: .78;
  }
}

@media (prefers-reduced-transparency: reduce) {
  :root {
    --panel-alpha: .82 !important;
        --glass-dark-alpha: .62 !important;
        --glass-tint-alpha: .13 !important;
  }

  .liquid-glass::before {
    filter: none;
        -webkit-backdrop-filter: blur(18px) saturate(115%);
        backdrop-filter: blur(18px) saturate(115%);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
  }

  .liquid-glass::after {
    opacity: .72;
  }
}
