/* Clickable mock-up of the Tidegauge window. Sizes are in em and the base
   font follows the window's width, so it scales like a picture. */

.demo > img { display: block; }
.demo.is-live > img { display: none; }
.demo[data-page]:not([data-page="overview"]) .callout { display: none; }
.mk-scroll { border-radius: 14px; overflow: hidden; }

.mock {
  --mk-bg: #1a1a1c;
  --mk-side: #1f1f22;
  --mk-card: #232326;
  --mk-line: rgba(255, 255, 255, 0.08);
  --mk-ink: #ececf0;
  --mk-dim: #8e8e96;
  container-type: inline-size;
  aspect-ratio: 1192 / 780;
  background: var(--mk-bg);
  text-align: left;
}
.mk-in {
  display: grid;
  grid-template-columns: 18.8% 1fr;
  height: 100%;
  font: 13px/1.3 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  font-size: 1.0906cqw; /* 13 px at the full 1192 px width */
  color: var(--mk-ink);
}
.mock button { font: inherit; color: inherit; cursor: pointer; }
.mock svg { display: block; }

/* Sidebar */
.mk-side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0.6em;
  background: var(--mk-side);
  border-right: 1px solid var(--mk-line);
}
.mk-lights { display: flex; gap: 0.55em; padding: 0.9em 0.7em 0.8em; }
.mk-lights i { width: 0.85em; height: 0.85em; border-radius: 50%; background: #3a3a3e; }
.mk-group { margin: 1em 0.7em 0.3em; font-size: 0.72em; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mk-dim); }
.mk-item {
  display: flex;
  align-items: center;
  gap: 0.65em;
  width: 100%;
  padding: 0.42em 0.7em;
  border: 0;
  border-radius: 0.5em;
  background: transparent;
  text-align: left;
  white-space: nowrap;
}
.mk-item:hover { background: rgba(255, 255, 255, 0.05); }
.mk-item[aria-current="page"] { background: rgba(255, 255, 255, 0.09); font-weight: 600; }
.mk-item:focus-visible, .mk-btn:focus-visible, .mk-seg button:focus-visible, .mk-check:focus-visible, .mk-card[data-go]:focus-visible {
  outline: 2px solid #5a9cf0;
  outline-offset: 1px;
}
.mk-item .dot { flex: none; width: 0.65em; height: 0.65em; border-radius: 0.18em; background: var(--c); }
.mk-item svg { flex: none; width: 1.05em; height: 1.05em; color: var(--mk-dim); }
.mk-item span { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.mk-item small { font-size: 0.85em; color: var(--mk-dim); font-weight: 400; }
.mk-side .spacer { flex: 1; }
.mk-foot { border-top: 1px solid var(--mk-line); margin: 0 -0.6em -0.6em; padding: 0.5em 0.6em; }

/* Main */
.mk-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 1.1em 1.5em 0; overflow: hidden; }
.mk-head { display: flex; align-items: center; justify-content: space-between; gap: 1em; margin-bottom: 0.9em; }
.mk-head h3 { margin: 0; font-size: 1.5em; font-weight: 700; letter-spacing: -0.01em; }
.mk-head p { margin: 0.15em 0 0; font-size: 0.85em; color: var(--mk-dim); }
.mk-actions { display: flex; gap: 0.5em; }
.mk-body { display: grid; gap: 0.9em; align-content: start; min-height: 0; }

.mk-card { background: var(--mk-card); border: 1px solid var(--mk-line); border-radius: 0.9em; padding: 0.95em 1.1em; min-width: 0; }
.mk-card[data-go] { cursor: pointer; }
.mk-card[data-go]:hover { border-color: rgba(255, 255, 255, 0.18); }
.mk-cap { display: flex; justify-content: space-between; gap: 1em; margin-bottom: 0.6em; font-size: 0.72em; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mk-dim); }
.mk-cap b { color: var(--c, var(--mk-dim)); font-weight: 600; }
.mk-title { display: flex; align-items: center; gap: 0.5em; margin-bottom: 0.5em; font-weight: 600; color: var(--c); }
.mk-title .dot { width: 0.65em; height: 0.65em; border-radius: 0.18em; background: var(--c); }
.mk-sub { font-size: 0.82em; color: var(--mk-dim); }
.mk-big { font-size: 2.3em; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.mk-big small { margin-left: 0.3em; font-size: 0.42em; font-weight: 500; color: var(--mk-dim); letter-spacing: 0; }
.mk-kvs { display: flex; gap: 1.6em; margin-top: 0.6em; }
.mk-kvs div { min-width: 0; }
.mk-kvs small { display: block; font-size: 0.78em; color: var(--mk-dim); }
.mk-kvs b { font-weight: 600; white-space: nowrap; }
.mk-g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9em; }
.mk-g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9em; }
.mk-split { display: grid; grid-template-columns: 1fr 1.6fr; gap: 1.4em; align-items: end; }
.mk-spark { width: 100%; height: 3.4em; margin-top: 0.7em; border-radius: 0.4em; background: color-mix(in srgb, var(--c) 9%, transparent); }
.mk-spark.tall { height: 6.5em; margin-top: 0; }

.mk-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1em; padding: 0.48em 0.1em; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.mk-row:first-of-type { border-top: 0; }
.mk-row .who { display: flex; align-items: center; gap: 0.65em; min-width: 0; }
.mk-row .who > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-row .who small { display: block; font-size: 0.82em; color: var(--mk-dim); overflow: hidden; text-overflow: ellipsis; }
.mk-row .end { display: flex; align-items: center; gap: 0.9em; white-space: nowrap; font-weight: 600; }
.mk-row .end small { font-weight: 400; color: var(--mk-dim); }
.mk-row.sub { padding-left: 2em; }
.mk-row.dim { opacity: 0.45; }
.mk-ico { flex: none; display: grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 0.45em; background: color-mix(in srgb, var(--c, #808088) 22%, transparent); color: var(--c, #b4b4bb); font-size: 0.95em; font-weight: 700; }
.mk-cols { display: grid; grid-template-columns: 1fr 5em 6em 5em; gap: 1em; align-items: center; padding: 0.42em 0.1em; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.mk-cols > :not(:first-child) { text-align: right; }
.mk-cols.head { border-top: 0; font-size: 0.72em; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mk-dim); }

.mk-bar { height: 0.5em; border-radius: 1em; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.mk-bar i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--c); transition: width 0.4s; }
.mk-bar.thick { height: 0.75em; }
.mk-meter { display: grid; grid-template-columns: 7.5em 1fr 3.4em; align-items: center; gap: 0.9em; padding: 0.3em 0; }
.mk-meter > :last-child { text-align: right; color: var(--mk-dim); }
.mk-cores { display: flex; gap: 0.28em; align-items: flex-end; height: 2.6em; margin-top: 0.5em; }
.mk-cores i { flex: 1; max-width: 1em; height: 100%; border-radius: 0.2em; background: linear-gradient(to top, var(--c) var(--h), rgba(255, 255, 255, 0.07) var(--h)); }

.mk-chip { display: inline-block; padding: 0.15em 0.55em; border-radius: 0.45em; font-size: 0.8em; font-weight: 500; white-space: nowrap; background: color-mix(in srgb, var(--c, #808088) 16%, transparent); color: var(--c, #b4b4bb); }
.mk-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45em; font-size: 0.92em; }
.mk-btn { padding: 0.32em 0.8em; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 0.55em; background: rgba(255, 255, 255, 0.04); font-size: 0.9em; font-weight: 500; white-space: nowrap; }
.mk-btn:hover { background: rgba(255, 255, 255, 0.09); }
.mk-btn.go { border-color: transparent; background: #e8ad39; color: #17130a; font-weight: 600; }
.mk-btn.go:hover { background: #f0b94c; }
.mk-btn.icon { padding: 0.32em 0.6em; }
.mk-seg { display: inline-flex; gap: 0.15em; padding: 0.2em; border: 1px solid var(--mk-line); border-radius: 0.6em; background: rgba(255, 255, 255, 0.04); }
.mk-seg button { padding: 0.25em 0.85em; border: 0; border-radius: 0.45em; background: transparent; color: var(--mk-dim); font-size: 0.9em; font-weight: 500; }
.mk-seg button[aria-pressed="true"] { background: #34343a; color: var(--mk-ink); }
.mk-check { flex: none; display: grid; place-items: center; width: 1.1em; height: 1.1em; padding: 0; border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 0.3em; background: transparent; font-size: 1em; line-height: 1; }
.mk-check[aria-checked="true"] { border-color: transparent; background: #e8ad39; }
.mk-check[aria-checked="true"]::after { content: ""; width: 0.3em; height: 0.55em; margin-top: -0.12em; border: solid #17130a; border-width: 0 0.15em 0.15em 0; transform: rotate(45deg); }
.mk-check:disabled { cursor: default; opacity: 0.5; }
.mk-lock { flex: none; width: 1.1em; text-align: center; color: #e8ad39; font-size: 0.85em; }
.mk-toggle { flex: none; width: 2.2em; height: 1.25em; border-radius: 1em; background: rgba(255, 255, 255, 0.14); position: relative; }
.mk-toggle::after { content: ""; position: absolute; top: 0.14em; left: 0.14em; width: 0.97em; height: 0.97em; border-radius: 50%; background: #fff; }
.mk-toggle.on { background: #30d158; }
.mk-toggle.on::after { left: auto; right: 0.14em; }
.mk-ring { flex: none; display: grid; place-items: center; width: 3.6em; height: 3.6em; border-radius: 50%; background: radial-gradient(closest-side, var(--mk-card) 72%, transparent 73%), conic-gradient(var(--c) var(--p), rgba(255, 255, 255, 0.09) 0); font-size: 1em; font-weight: 700; color: var(--c); }
.mk-ring span { font-size: 0.85em; }
.mk-plan { display: flex; align-items: center; gap: 0.9em; }
.mk-plan b { display: block; }
.mk-pill { display: flex; align-items: center; gap: 0.6em; padding: 0.45em 0.8em; border: 1px solid var(--mk-line); border-radius: 0.7em; background: var(--mk-card); white-space: nowrap; }
.mk-pill .mk-ring { width: 1.7em; height: 1.7em; }
.mk-pill small { display: block; font-size: 0.8em; color: var(--mk-dim); }
.mk-pill b span { color: var(--c); font-weight: 600; }
.mk-progress { display: grid; gap: 0.5em; }
.mk-note { color: #e8ad39; font-size: 0.9em; }
.mk-ok { color: #30d158; }
.mk-empty { padding: 2.4em 1em; text-align: center; color: var(--mk-dim); }

/* Page names under the window: the way in on narrow screens */
.demo-tabs { display: none; }
@media (max-width: 960px) {
  .demo-tabs {
    display: flex;
    gap: 6px;
    max-width: 1100px;
    margin: 22px auto 0;
    padding: 4px 4px 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .demo-tabs[hidden] { display: none; }
  .demo-tabs button {
    flex: none;
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--ink-2);
    font-size: 12.5px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
  }
  .demo-tabs button[aria-pressed="true"] { color: var(--ink); background: var(--card-hi); border-color: var(--line-2); }
  .demo-tabs button:focus-visible { outline: 2px solid var(--cpu); outline-offset: 2px; }
}
@media (max-width: 720px) {
  /* Keep the text readable: the window stays 720 px wide and pans sideways. */
  .mk-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .mock { width: 720px; }
}
