:root {
  --bg: #eef8fc;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-strong: #ffffff;
  --line: rgba(41, 101, 153, 0.12);
  --text: #12314b;
  --muted: #55718a;
  --blue: #1686d9;
  --blue-deep: #0f4c81;
  --aqua: #6bd3eb;
  --shadow: 0 24px 60px rgba(21, 84, 128, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at top, rgba(107, 211, 235, 0.18), transparent 28%),
    linear-gradient(180deg, #f7fcff 0%, #eef8fc 55%, #e7f3f8 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(247, 252, 255, 0.88);
  border-bottom: 1px solid rgba(22, 134, 217, 0.08);
}

.topbar-inner {
  max-width: 1480px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.8rem;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--aqua), var(--blue));
  box-shadow: 0 12px 30px rgba(22, 134, 217, 0.24);
}

.nav-links,
.status-pills {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.nav-links a,
.status-pills span,
.shape-tab {
  padding: 0.52rem 0.82rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(22, 134, 217, 0.12);
  font-size: 0.95rem;
}

.page-shell {
  max-width: 1480px;
  margin: 0 auto;
  padding: 1.45rem 1.5rem 2.2rem;
}

.page-intro {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.1rem;
  align-items: end;
  margin-bottom: 1.35rem;
}

.eyebrow {
  margin: 0 0 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.74rem;
  color: var(--blue-deep);
}

h1 {
  margin: 0;
  font-size: clamp(2.7rem, 5vw, 4.9rem);
  line-height: 0.94;
  letter-spacing: -0.045em;
}

.lead {
  max-width: 60ch;
  margin: 0.85rem 0 0;
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--muted);
}

.shape-tabs {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.shape-tab.active {
  color: white;
  border-color: transparent;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 300px;
  gap: 1.2rem;
  align-items: start;
}

.panel,
.wide-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1.55rem;
  box-shadow: var(--shadow);
}

.panel {
  padding: 1.15rem;
}

.wide-panel {
  padding: 1.3rem;
}

.panel h2,
.wide-panel h2,
.wide-panel h3 {
  margin: 0;
  font-size: 1.1rem;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.panel-head p,
.formula-card p,
.route-card p,
.tip-card p,
.wide-panel p {
  margin: 0.45rem 0 0;
  line-height: 1.65;
  color: var(--muted);
}

.field-grid {
  display: grid;
  gap: 0.85rem;
}

.field label {
  display: block;
  margin-bottom: 0.34rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue-deep);
}

.field input {
  width: 100%;
  padding: 0.78rem 0.9rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(22, 134, 217, 0.14);
  background: rgba(255, 255, 255, 0.9);
  font: inherit;
  color: var(--text);
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.hint,
.formula-note,
.helper-row span {
  font-size: 0.9rem;
  color: var(--muted);
}

.shape-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.shape-buttons button,
.action-row button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.shape-buttons button {
  padding: 0.85rem 0.65rem;
  border-radius: 1rem;
  background: rgba(229, 245, 250, 0.92);
  color: var(--blue-deep);
  border: 1px solid rgba(22, 134, 217, 0.12);
}

.shape-buttons button.active,
.action-row button {
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
}

.action-row {
  margin-top: 1rem;
  display: grid;
  gap: 0.7rem;
}

.action-row button {
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  box-shadow: 0 14px 30px rgba(15, 76, 129, 0.25);
}

.board-frame {
  padding: 1rem;
  border-radius: 1.3rem;
  background:
    linear-gradient(rgba(255, 255, 255, 0.93), rgba(255, 255, 255, 0.93)),
    linear-gradient(90deg, rgba(22, 134, 217, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(22, 134, 217, 0.08) 1px, transparent 1px);
  background-size: auto, 32px 32px, 32px 32px;
  border: 1px solid rgba(22, 134, 217, 0.1);
}

.board-frame img {
  width: 100%;
  border-radius: 1rem;
  border: 1px solid rgba(22, 134, 217, 0.08);
  background: white;
}

.formula-strip {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.formula-card,
.route-card,
.tip-card,
.result-card {
  border-radius: 1.15rem;
  border: 1px solid rgba(22, 134, 217, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.formula-card,
.tip-card,
.result-card {
  padding: 1rem;
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.95rem;
  margin-top: 1.1rem;
}

.route-card {
  padding: 1rem 1.05rem;
}

.route-card h3,
.tip-card h3 {
  margin: 0;
  font-size: 1.02rem;
}

.results-stack {
  display: grid;
  gap: 0.9rem;
}

.metric {
  display: grid;
  gap: 0.3rem;
}

.metric span {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue-deep);
}

.metric strong {
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.helper-row {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.7rem 0;
  border-bottom: 1px dashed rgba(22, 134, 217, 0.14);
}

.helper-row:last-child {
  border-bottom: 0;
}

.content-grid {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr);
  gap: 1.2rem;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.2rem;
  align-items: start;
}

.article-body,
.sidebar-stack {
  display: grid;
  gap: 1rem;
}

.section-card {
  padding: 1.2rem;
}

.section-card h2 {
  font-size: 1.45rem;
}

.section-card ul {
  margin: 0.85rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.72;
}

.footer {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 1180px) {
  .dashboard-grid,
  .content-grid,
  .article-layout,
  .route-grid,
  .formula-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .topbar-inner,
  .page-intro,
  .footer {
    grid-template-columns: 1fr;
    display: grid;
  }

  .topbar-inner {
    gap: 0.8rem;
  }

  .field-row,
  .shape-buttons {
    grid-template-columns: 1fr;
  }
}
