/* ==========================================================
   Ingredient Swap UI mockups (Case 03 figures)
   HTML/CSS stand-ins for the app screens, so the page matches the
   other case studies (real screens in the frame) without images.
   Type: site stack (Yeseva One headings, Josefin Sans body, JetBrains
   Mono labels). Colours: planbee palette, cream, slate, yellow,
   teal, coral tint for failure warnings.
   ========================================================== */
.su {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(.75rem, 2vw, 1.5rem);
  padding: clamp(.75rem, 2.5vw, 2rem);
  font-family: var(--sans);
  color: var(--text);
  font-size: .72rem;
  line-height: 1.35;
}
.su__mono { font-family: var(--mono); font-size: .58rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.su__h { font-family: var(--serif); font-weight: 400; line-height: 1.1; margin: 0; color: var(--text); }

/* Phone frame */
.su-phone {
  flex: none;
  width: 10.5rem;
  aspect-ratio: 9 / 19;
  background: #FFFFFF;
  border: 5px solid var(--text);
  border-radius: 1.5rem;
  box-shadow: 0 18px 30px -18px rgba(44, 59, 68, .45);
  padding: .8rem .65rem;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  overflow: hidden;
}
.su-phone--lg { width: 12rem; }
.su-phone--wire { width: 7.4rem; border-width: 2px; border-color: #5E6770; box-shadow: none; border-radius: 1rem; padding: .5rem .45rem; gap: .32rem; }
.su-phone__title { font-family: var(--serif); font-size: .95rem; line-height: 1.1; color: var(--text); }

/* Browser frame */
.su-browser {
  flex: 1;
  height: 100%;
  max-height: 100%;
  background: #FFFFFF;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: 0 18px 30px -20px rgba(44, 59, 68, .4);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.su-browser__bar { display: flex; align-items: center; gap: .3rem; padding: .45rem .6rem; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.su-browser__bar i { width: .42rem; height: .42rem; border-radius: 50%; background: var(--line-strong); }
.su-browser__bar i:first-child { background: var(--yellow); }
.su-browser__body { flex: 1; display: grid; grid-template-columns: 1.1fr 1fr; gap: .8rem; padding: .8rem; min-height: 0; }

/* Shared pieces */
.su-search { display: flex; align-items: center; justify-content: space-between; gap: .4rem; background: #FFFFFF; border: 1px solid var(--line-strong); border-radius: 999px; padding: .32rem .32rem .32rem .7rem; color: var(--muted); font-size: .66rem; }
.su-search b { font-weight: 600; background: var(--yellow); color: var(--text); border-radius: 999px; padding: .22rem .6rem; font-size: .6rem; }
.su-chips { display: flex; flex-wrap: wrap; gap: .28rem; }
.su-chips span { border: 1px solid var(--line-strong); border-radius: 999px; padding: .12rem .45rem; font-size: .6rem; background: #FFFFFF; }
.su-chips span.is-on { background: var(--teal); border-color: var(--teal-ink); color: var(--text); font-weight: 600; }

.su-card { background: #FFFFFF; border: 1px solid var(--line); border-radius: 10px; padding: .45rem .5rem; display: grid; gap: .18rem; }
.su-card__row { display: flex; justify-content: space-between; align-items: center; gap: .3rem; }
.su-card__name { font-weight: 600; font-size: .7rem; }
.su-card__meta { color: var(--muted); font-size: .6rem; }
.su-badge { font-family: var(--mono); font-size: .58rem; font-weight: 500; background: var(--yellow); color: var(--text); border-radius: 999px; padding: .12rem .42rem; white-space: nowrap; }
.su-badge--teal { background: var(--teal); }
.su-badge--ink { background: var(--text); color: #FFFFFF; }
.su-bar { height: .3rem; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.su-bar i { display: block; height: 100%; background: var(--teal); border-radius: 999px; }

.su-warn { background: #FBD3C4; border-left: 3px solid #E4572E; border-radius: 6px; padding: .4rem .5rem; font-size: .6rem; display: grid; gap: .12rem; }
.su-warn b { font-weight: 700; }

.su-matrix { display: grid; grid-template-columns: repeat(3, 1fr); gap: .25rem; }
.su-matrix span { border-radius: 5px; background: var(--surface-2); padding: .28rem .2rem; font-size: .54rem; text-align: center; line-height: 1.2; color: var(--text); }
.su-matrix span.is-top { background: var(--yellow); font-weight: 700; }
.su-matrix span.is-low { background: #FBD3C4; }

/* Hero: copy + two phones */
.su--hero { justify-content: space-between; }
.su__copy { display: grid; gap: .55rem; max-width: 46%; align-content: center; }
.su__copy .su__h { font-size: clamp(1rem, 2vw, 1.5rem); }
.su__phones { display: flex; gap: .8rem; align-items: center; }
.su__phones .su-phone:last-child { transform: translateY(1.8rem); }

/* Artifact 2: wireframes */
.su--wires { flex-direction: column; justify-content: center; gap: .9rem; }
.su__wires { display: flex; gap: .7rem; align-items: flex-start; justify-content: center; }
.su__wires figure { margin: 0; display: grid; gap: .4rem; justify-items: center; }
.su__wires figcaption { font-family: var(--mono); font-size: .55rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.su-blk { background: #E4E7EA; border-radius: 3px; height: .52rem; }
.su-blk--tall { height: 2.6rem; }
.su-blk--sm { height: .34rem; width: 60%; }
.su-blk--pill { border-radius: 999px; height: .7rem; }
.su-blk--ink { background: #5E6770; }
.su-wire-row { display: flex; gap: .2rem; }
.su-wire-row i { flex: 1; height: .8rem; border: 1px solid #5E6770; border-radius: 3px; }
.su-wire-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .18rem; }
.su-wire-grid i { height: .55rem; border: 1px solid #5E6770; border-radius: 2px; }

/* Artifact 3: prototype board */
.su--proto { justify-content: center; gap: 1rem; flex-wrap: nowrap; }
.su__proto-col { flex: 1; display: grid; gap: .6rem; align-content: center; min-width: 0; }
.su__proto-col--r { max-width: 46%; }

/* Final UI: mobile / desktop */
.su--mobile { justify-content: center; }
.su--desktop { padding: 0; align-items: stretch; }

@media (max-width: 40rem) {
  .su__copy { max-width: 100%; }
  .su__phones .su-phone:last-child { display: none; }
  .su__wires figure:nth-child(3) { display: none; }
  .su--proto { flex-direction: column; }
  .su__proto-col--r { max-width: 100%; }
}
