:root{
  --text:#111;
  --muted:#6b7280;
  --line:#e5e7eb;
  --card:#ffffff;
  --bg:#ffffff;
  --max: 1100px;

  --shadow-soft: 0 10px 28px rgba(0,0,0,.06);
  --radius: 18px;
}

*{ box-sizing:border-box; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:var(--bg);
  line-height:1.5;
}

/* top nav */
.topbar{
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,.04);
}

.topbar-inner{
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px 22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
}

.brand{
  font-weight:800;
  font-size:42px;
  letter-spacing:-.03em;
  color:#111;
  text-decoration:none;
}

.nav{
  display:flex;
  gap: 28px;
  font-size: 14px;
}

.nav a{
  color:#111;
  text-decoration:none;
  opacity:.85;
  font-weight:500;
  padding: 8px 10px;
  border-radius: 10px;
}

.nav a:hover{ opacity:1; }

.nav a.is-active{
  opacity:1;
  background:#f3f4f6;
}

/* page wrapper */
.page{
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 22px 0;
}

/* page header */
.phead{
  display:grid;
  grid-template-columns: 1fr auto 1fr;
  align-items:center;
  gap: 12px;
  padding: 26px 0 10px;
}

.back{
  justify-self: start;
  display:inline-flex;
  align-items:center;
  gap: 8px;
  color:#4b5563;
  text-decoration:none;
  font-size: 13px;
}

.back:hover{ color:#111; }
.back-arrow{ font-size:16px; line-height:1; }

.phead-center{ text-align:center; }

.phead-title{
  margin:0;
  font-size:44px;
  letter-spacing:-0.03em;
}

.phead-subtitle{
  margin: 6px 0 0;
  font-size:12px;
  color: var(--muted);
}

.phead-spacer{ height:1px; }

/* sections */
.section{ padding: 22px 0 0; }

.h2{
  margin: 10px 0 12px;
  font-size: 30px;
  letter-spacing: -0.02em;
}

.h2.tight{ margin-bottom: 10px; }

.h3{
  margin: 0 0 10px;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.lead{
  margin: 0 0 16px;
  max-width: 860px;
  color:#4b5563;
  font-size: 13px;
  line-height: 1.85;
}

.muted{
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.85;
}

/* cards */
.card{
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  padding: 18px;
}

.card-top{ margin-bottom: 14px; }

/* two column grid */
.grid-2{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

/* stacked flows */
.stack{
  display:grid;
  gap: 18px;
}

.flow-head{ margin-bottom: 14px; }

/* =========================
   IMAGE FIT FIXES (NO CROPPING)
========================= */

.media{
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.06);
  background: #ffffff;
}

.caption{
  padding: 10px 12px;
  font-size: 12px;
  color: var(--muted);
  background:#fff;
  border-top: 1px solid rgba(0,0,0,.06);
}

/* common image class */
.img{
  width: 100%;
  height: auto;
  display: block;
}

/* storyboards */
.media:has(.storyboard){
  padding: 12px;
  background: #fff;
}

.img.storyboard{
  object-fit: contain;
  max-height: 460px;
}

/* diagrams (task flows + user flows) */
.media:has(.diagram){
  padding: 14px;
  background: #fff;
}
.media{
  width:100%;
  max-width:900px;
  cursor: zoom-in;
}
.img.diagram{
  object-fit: contain;
  max-height: 520px;
}

/* mockups */
.mock-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.mock{
  display:grid;
  grid-template-columns: 380px 1fr;
  gap: 18px;
  align-items:start;
  padding: 18px;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  background:#fff;
}

.mock-media{
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.06);
  background: #f8fafc;
  padding: 14px;
  display: grid;
  place-items: center;
}

.img.phone{
  width: auto;
  height: 320px;
  max-width: 100%;
  object-fit: contain;
}

.mock-copy{ padding-top: 6px; }

/* footer */
.foot{
  padding: 30px 0 60px;
}

.foot-muted{
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

/* responsive */
@media (max-width: 980px){
  .brand{ font-size: 36px; }
  .phead-title{ font-size: 36px; }
  .h2{ font-size: 26px; }

  .grid-2{ grid-template-columns: 1fr; }
  .mock{ grid-template-columns: 1fr; }
  .img.phone{ height: 300px; }
}

@media (max-width: 520px){
  .nav{ gap: 14px; }
  .brand{ font-size: 32px; }
  .img.diagram{ max-height: 320px; }
  .img.storyboard{ max-height: 320px; }
  .img.phone{ height: 290px; }
}
.prototype-embed{
  width: 100%;
  overflow: hidden;
  border-radius: 18px;
}

.prototype-embed iframe{
  width: 100%;
  min-height: 500px;
  border: 0;
  display: block;
  border-radius: 18px;
}
/* phone-style figma embed */
.phone-frame {
  width: 260px;
  height: 520px;
  margin: 0 auto;
  border-radius: 28px;
  overflow: hidden;
  border: 8px solid #111;
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
  background: #000;
}

.phone-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* design guide image */
.design-guide {
  width: 100%;
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}