:root {
  --blue:#087dcc;
  --dark:#04558f;
  --soft:#eaf5fc;
  --ink:#102433;
  --muted:#657681;
  --line:#dbe4ea;
  --bg:#f4f7f9;
  --white:#ffffff;
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
  min-height:100vh;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
  color:var(--ink);
  background:var(--bg);
}

button,
a {
  font:inherit;
}

.app-shell {
  min-height:100vh;
  display:grid;
  grid-template-columns:240px minmax(0, 1fr);
}

.sidebar {
  padding:22px 16px;
  border-right:1px solid var(--line);
  background:var(--white);
}

.brand {
  display:flex;
  align-items:center;
  gap:11px;
  padding:0 8px 24px;
}

.logo {
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:12px;
  color:#fff;
  background:
    linear-gradient(
      145deg,
      #0074bd,
      #28a9ed
    );
  font-weight:900;
}

.brand-copy {
  display:grid;
  gap:1px;
}

.brand-copy small {
  color:var(--blue);
  font-size:.72rem;
  font-weight:800;
  letter-spacing:.08em;
}

.brand-copy strong {
  font-size:1rem;
}

.nav {
  display:grid;
  gap:5px;
}

.nav a {
  min-height:45px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 12px;
  border-radius:11px;
  color:var(--muted);
  font-weight:750;
  text-decoration:none;
}

.nav a:hover {
  background:#f5f8fa;
  color:var(--ink);
}

.nav a.active {
  background:var(--soft);
  color:var(--dark);
}

.nav-divider {
  height:1px;
  margin:12px 8px;
  background:var(--line);
}

.main {
  min-width:0;
}

.topbar {
  min-height:70px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:12px 28px;
  border-bottom:1px solid var(--line);
  background:
    rgba(
      255,
      255,
      255,
      .92
    );
}

.page {
  width:min(1180px, calc(100% - 48px));
  margin:30px auto 60px;
}

.page-heading small {
  color:var(--blue);
  font-size:.75rem;
  font-weight:850;
  letter-spacing:.08em;
}

.page-heading h1 {
  margin:4px 0 0;
  font-size:
    clamp(
      1.7rem,
      4vw,
      2.3rem
    );
  letter-spacing:-.04em;
}

.grid {
  margin-top:24px;
  display:grid;
  grid-template-columns:
    repeat(
      3,
      minmax(0, 1fr)
    );
  gap:14px;
}

.tool-card {
  min-height:150px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  padding:20px;
  border:1px solid var(--line);
  border-radius:18px;
  background:#fff;
  color:var(--ink);
  text-decoration:none;
  box-shadow:
    0 8px 24px
    rgba(
      31,
      57,
      72,
      .05
    );
}

.tool-card:hover {
  border-color:#9dceec;
  box-shadow:
    0 10px 30px
    rgba(
      31,
      57,
      72,
      .09
    );
}

.tool-card small {
  color:var(--blue);
  font-weight:800;
}

.tool-card strong {
  display:block;
  margin-top:5px;
  font-size:1.15rem;
}

.tool-card p {
  margin:12px 0 0;
  color:var(--muted);
  font-size:.88rem;
  line-height:1.45;
}

.card-arrow {
  margin-top:18px;
  color:var(--blue);
  font-weight:900;
}

.user-chip {
  padding:7px 10px;
  border-radius:999px;
  background:#f0f5f8;
  color:#48606f;
  font-size:.82rem;
  font-weight:750;
}

.mobile-nav {
  display:none;
}

@media(max-width:900px) {

  .app-shell {
    grid-template-columns:1fr;
  }

  .sidebar {
    display:none;
  }

  .topbar {
    padding:11px 16px;
  }

  .page {
    width:min(100% - 28px, 720px);
    margin-top:22px;
    margin-bottom:76px;
  }

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

  .mobile-nav {
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    z-index:20;

    min-height:56px;
    max-width:100vw;

    display:grid;
    grid-auto-flow:column;
    grid-auto-columns:minmax(68px,1fr);
    align-items:stretch;

    overflow-x:auto;
    overscroll-behavior-x:contain;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;

    border-top:1px solid var(--line);
    background:
      rgba(
        255,
        255,
        255,
        .97
      );
  }

  .mobile-nav::-webkit-scrollbar {
    display:none;
  }

  .mobile-nav a {
    min-width:68px;
    display:grid;
    place-items:center;
    padding:7px 5px;
    color:var(--muted);
    font-size:.62rem;
    line-height:1.1;
    font-weight:780;
    text-decoration:none;
    text-align:center;
    white-space:nowrap;
  }

  .mobile-nav a.active {
    color:var(--blue);
  }

}

@media(max-width:580px) {

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

}
