/* Incretin Tools SPA shell — self-contained, no external requests.
   Palette mirrors the two tools (receptor.html / dose-curve.html). */
:root {
  --ink: #16202b;
  --muted: #62717f;
  --hair: #c9d3db;
  --hair2: #e2e8ee;
  --paper: #f6f8fa;
  --teal: #0f766e;
  --teal-dk: #0b5a54;
  --card: #ffffff;
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh; /* track mobile browser chrome where supported */
}

/* ---- Nav ---- */
#it-nav {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 18px;
  padding: 0 18px;
  min-height: 52px;
  background: #ffffff;
  border-bottom: 2px solid var(--ink);
  z-index: 10;
}
#it-nav .brand {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.2px;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
}
#it-nav .brand .mark {
  width: 22px; height: 22px; border-radius: 5px; display: block;
}
#it-nav .links { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
#it-nav a.tab {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px; /* sit the underline on the nav's own border */
}
#it-nav a.tab:hover { color: var(--ink); }
#it-nav a.tab.active { color: var(--teal); border-bottom-color: var(--teal); }

/* ---- Main region (landing + iframe host share it) ---- */
#it-main {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
}

/* iframes fill the region; toggled by [hidden] */
#it-main iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  /* wrapper-free smooth scrolling on iOS Safari */
  -webkit-overflow-scrolling: touch;
}
#it-main iframe[hidden] { display: none; }

/* ---- Landing ---- */
#it-home {
  position: absolute;
  inset: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
#it-home[hidden] { display: none; }
.home-wrap { max-width: 1000px; margin: 0 auto; padding: 30px 20px 48px; }

.home-head { border-bottom: 2px solid var(--ink); padding-bottom: 14px; margin-bottom: 24px; }
.home-head .k {
  font-size: 9px; letter-spacing: 2px; color: var(--muted); text-transform: uppercase;
}
.home-head .h { font-size: 26px; font-weight: 800; letter-spacing: 0.2px; margin-top: 5px; }
.home-head .lead { font-size: 14px; color: var(--muted); margin-top: 8px; max-width: 70ch; }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 720px) { .cards { grid-template-columns: 1fr; } }

.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: 10px;
  padding: 20px 20px 18px;
  text-decoration: none;
  color: inherit;
  transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}
.card:hover {
  border-color: var(--teal);
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.10);
  transform: translateY(-1px);
}
.card .ck { font-size: 9px; letter-spacing: 2px; color: var(--teal); text-transform: uppercase; font-weight: 700; }
.card .ct { font-size: 18px; font-weight: 800; margin-top: 8px; }
.card .cd { font-size: 13.5px; color: var(--muted); margin-top: 10px; flex: 1 1 auto; }
.card .cgo { font-size: 13px; font-weight: 700; color: var(--teal); margin-top: 16px; }

.home-foot { margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--hair2); }
.home-foot .foot { font-size: 11px; color: var(--muted); }
.home-foot .foot.tm { margin-top: 6px; font-size: 10px; color: var(--muted); }
