/* A scaled-down iPhone 18 Pro running HomeBase.
   Everything inside .iphone is laid out in real iOS points (screen 402 × 874) with the app's
   real metrics (HBDesignSystem + iOS 26 lists and Liquid Glass bars); `zoom` shrinks the whole
   device, so proportions stay exactly those of the phone. */

.iphone {
  --titanium: #4A4440;
  --titanium-hi: #8C847D;
  position: relative;
  width: 430px;
  padding: 14px;
  border-radius: 76px;
  background: #050505;
  box-shadow:
    0 0 0 3px var(--titanium),
    0 0 0 4px var(--titanium-hi),
    0 50px 80px -30px rgba(47, 38, 31, .45),
    0 20px 40px -20px rgba(47, 38, 31, .3);
  zoom: .8;
  margin-inline: auto;
  flex: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .iphone {
    --titanium: #3A3633;
    --titanium-hi: #5B5550;
    box-shadow: 0 0 0 3px var(--titanium), 0 0 0 4px var(--titanium-hi), 0 40px 80px -30px rgba(0, 0, 0, .8);
  }
}

/* Side buttons: action, volume up/down on the left; side button and Camera Control on the right. */
.iphone > i {
  position: absolute; width: 5px; border-radius: 2px; background: var(--titanium);
}
.iphone > i:nth-child(1) { left: -8px; top: 168px; height: 34px; }
.iphone > i:nth-child(2) { left: -8px; top: 232px; height: 62px; }
.iphone > i:nth-child(3) { left: -8px; top: 308px; height: 62px; }
.iphone > i:nth-child(4) { right: -8px; top: 252px; height: 96px; }
.iphone > i:nth-child(5) { right: -7px; top: 560px; height: 58px; width: 4px; }

.ios {
  position: relative;
  width: 402px;
  height: 874px;
  border-radius: 62px;
  overflow: hidden;
  background: var(--canvas);
  color: var(--ink);
  font: 17px/22px var(--sans);
  letter-spacing: -.01em;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  -webkit-user-select: none;
  user-select: none;
}

.ios svg { flex: none; display: block; }

/* Status bar */
.ios-status {
  height: 62px; flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 30px 0 50px;
}
.ios-status .time { font: 600 17px/1 var(--sans); letter-spacing: -.02em; }
.ios-status .island { width: 120px; height: 35px; border-radius: 20px; background: #000; margin-top: -2px; }
.ios-status .sys { justify-self: end; display: flex; gap: 6px; align-items: center; color: var(--ink); }

/* Navigation bar: glass capsules */
.ios-nav { height: 52px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; }
.glass {
  display: inline-flex; align-items: center; height: 44px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: inset 0 0 0 .75px color-mix(in srgb, var(--ink) 9%, transparent), 0 6px 18px -8px rgba(47, 38, 31, .25);
}
.switcher { gap: 8px; padding: 0 14px 0 9px; font-weight: 600; }
.switcher .chev { color: var(--ink-3); }
.hh-badge { width: 26px; height: 26px; border-radius: 7.3px; background: color-mix(in srgb, var(--fern) 15%, transparent); color: var(--fern); display: grid; place-items: center; }
.toolbar-trailing { gap: 4px; padding: 0 7px; }
.toolbar-trailing .plain { width: 30px; height: 30px; display: grid; place-items: center; color: var(--ink); }
.toolbar-trailing .plain + .avatar { margin-left: 6px; }

.ios-title { margin: 4px 20px 10px; font: 700 34px/41px var(--sans); letter-spacing: -.02em; flex: none; }

/* Scrolling content and the soft edge under the tab bar */
.ios-body { flex: 1; min-height: 0; overflow: hidden; padding-top: 2px; }
.ios-edge {
  position: absolute; left: 0; right: 0; bottom: 0; height: 150px; pointer-events: none; z-index: 1;
  background: linear-gradient(to top, var(--canvas) 30%, color-mix(in srgb, var(--canvas) 0%, transparent));
}

/* Tab bar: floating Liquid Glass capsule */
.ios-tabs {
  position: absolute; left: 22px; right: 22px; bottom: 28px; height: 62px; z-index: 2; padding: 4px;
  display: grid; grid-template-columns: repeat(4, 1fr); border-radius: 999px;
}
.ios-tabs span {
  display: grid; justify-items: center; align-content: center; gap: 2px; border-radius: 999px;
  font: 600 10px/12px var(--sans); letter-spacing: 0; color: var(--ink);
}
.ios-tabs span.on { color: var(--primary); background: color-mix(in srgb, var(--ink) 7%, transparent); }
.home-indicator { position: absolute; left: 50%; bottom: 8px; width: 140px; height: 5px; margin-left: -70px; border-radius: 3px; background: var(--ink); z-index: 3; }

/* Lists (inset grouped) */
.sec { margin: 0 16px 20px; }
.sec-head { padding: 0 20px 7px; font: 600 15px/20px var(--sans); color: var(--ink-2); }
.sec-head.danger { color: var(--danger); }
.card { background: var(--surface); border-radius: 26px; overflow: hidden; }
.clear { background: transparent; }

.r {
  --sep: 20px;
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 11px 16px 11px 20px;
}
.r + .r::before {
  content: ""; position: absolute; top: 0; right: 0; left: var(--sep); border-top: 1px solid var(--hairline);
}
.r .txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.r .ttl { color: var(--ink); }
.r .sub { font: 13px/18px var(--sans); color: var(--ink-2); display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; }
.r .sub .dot { color: var(--ink-3); }
.r .sub .late { color: var(--danger); }
.r .chev-r { color: var(--ink-3); }
.r.check-row { --sep: 58px; gap: 14px; cursor: pointer; }
.r.link { color: var(--primary); gap: 14px; }

/* HBCheckbox: rounded square; fill springs in, the tick draws left to right */
.hb-check {
  --tint: var(--cornflower);
  appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 24px; height: 24px; margin: 0;
  border-radius: 7px; border: 1.75px solid color-mix(in srgb, var(--tint) 90%, transparent); background: none; cursor: pointer;
  align-self: flex-start; margin-top: -1px;
}
.r.check-row:not(:has(.sub)) .hb-check { align-self: center; margin-top: 0; }
.hb-check::before {
  content: ""; position: absolute; inset: -1.75px; border-radius: 7px; background: var(--tint);
  transform: scale(.4); opacity: 0; transition: transform .32s cubic-bezier(.34, 1.56, .64, 1), opacity .18s;
}
.hb-check::after {
  content: ""; position: absolute; inset: 4px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 8.8 6 13 14 3.4' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  clip-path: inset(0 100% 0 0); transition: clip-path .22s ease-out .06s;
}
.hb-check:checked { border-color: transparent; }
.hb-check:checked::before { transform: scale(1); opacity: 1; }
.hb-check:checked::after { clip-path: inset(0 0 0 0); }
.hb-check:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

.ttl.strike {
  background: linear-gradient(var(--ink-3), var(--ink-3)) 0 11.5px / 0 1.25px no-repeat;
  transition: background-size .28s ease-in-out, color .28s;
  justify-self: start;
}
.hb-check:checked ~ .txt .ttl.strike { background-size: 100% 1.25px; color: var(--ink-3); }

/* Rows that collapse away or appear (completed tasks, shopping moving to the cart) */
.r.arriving { animation: row-in .42s cubic-bezier(.2, .8, .2, 1); }
@keyframes row-in { from { opacity: 0; transform: translateY(-8px); } }

/* Avatars */
.avatar {
  --tint: var(--fern);
  width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: color-mix(in srgb, var(--tint) 18%, var(--surface));
  color: var(--tint); font: 600 10.4px/1 var(--rounded); letter-spacing: 0;
  box-shadow: inset 0 0 0 .5px var(--hairline);
}
.avatar.s30 { width: 30px; height: 30px; font-size: 12px; }

/* Segmented control */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; height: 36px; padding: 2px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 8%, transparent); }
.seg span { display: grid; place-items: center; border-radius: 999px; font: 500 14px/1 var(--sans); color: var(--ink); }
.seg span.on { background: var(--surface); font-weight: 600; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }

/* QuickAddRow: dashed square, then the field */
.qa .dash { width: 24px; height: 24px; border-radius: 7px; border: 1.5px dashed color-mix(in srgb, var(--tint) 45%, transparent); flex: none; }
.qa .ph { color: var(--ink-3); flex: 1; }
.qa .typed { flex: 1; color: var(--ink); }
.qa .caret { display: inline-block; width: 2px; height: 21px; margin-left: 1px; vertical-align: -4px; background: var(--primary); animation: caret 1s steps(1) infinite; }
.qa .more { color: var(--tint); }
@keyframes caret { 50% { opacity: 0; } }

/* Suggestion chips */
.chips { display: flex; gap: 8px; padding: 0 16px 10px 16px; overflow: hidden; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 8px 12px; border-radius: 999px; background: var(--well); font: 15px/20px var(--sans); white-space: nowrap; }
.chip b { font-weight: 600; }
.chip .cdot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 2px; }
.chip svg { color: var(--ink-3); }

/* FigureStrip */
.figures { display: flex; align-items: center; padding: 12px 8px; }
.figures > div { flex: 1; display: grid; justify-items: center; gap: 2px; padding: 4px 0; }
.figures > i { width: 1px; height: 32px; background: var(--hairline); }
.figures b { font: 600 28px/34px var(--rounded); font-variant-numeric: tabular-nums; color: var(--c); }
.figures span { font: 12px/16px var(--sans); color: var(--ink-2); }

/* Home quick actions */
.shortcuts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.shortcuts span { min-height: 60px; border-radius: 16px; background: var(--surface); display: grid; place-items: center; color: var(--c); }

/* Shopping trip */
.trip-icon { color: var(--marigold); }
.trip .ttl { font-weight: 600; }
.trip .sub2 { font: 15px/20px var(--sans); color: var(--ink-2); }
.finish-btn { cursor: pointer; }
.finish-btn[aria-disabled="true"] { opacity: .45; cursor: default; }

/* Warranty */
.search { display: flex; align-items: center; gap: 8px; height: 44px; margin: 0 16px 14px; padding: 0 14px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink-3); }
.filters { display: flex; justify-content: space-between; padding: 0 4px; font: 500 15px/20px var(--sans); color: var(--primary); }
.filters span { display: inline-flex; align-items: center; gap: 6px; }
.thumb { width: 44px; height: 44px; border-radius: 10.5px; background: var(--caramel); color: var(--primary); display: grid; place-items: center; flex: none; }
.left { font: 13px/18px var(--sans); color: var(--ink-2); text-align: right; white-space: nowrap; }
.left.soon { color: var(--warning); font-weight: 600; }

/* Home activity */
.act { align-items: flex-start; }
.act .who { position: relative; flex: none; }
.act .kind { position: absolute; right: -4px; bottom: -4px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: var(--on-accent); box-shadow: 0 0 0 1.5px var(--surface); }
.act .when { font: 12px/16px var(--sans); color: var(--ink-2); }
.cdot10 { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }

/* Presentation: the hero phone floats in with a slight tilt, like a phone set down on the page */
.phone-stage { display: grid; justify-items: center; gap: 14px; }
.phone-float { animation: phone-in .9s cubic-bezier(.2, .7, .2, 1) .2s both, float 7s ease-in-out 1.2s infinite; }
@keyframes phone-in { from { opacity: 0; transform: translateY(40px) rotate(5deg); } to { opacity: 1; transform: rotate(2deg); } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(2deg); } 50% { transform: translateY(-12px) rotate(1.2deg); } }

@media (prefers-reduced-motion: reduce) {
  .phone-float { animation: none; transform: rotate(2deg); }
  .hb-check::before, .hb-check::after, .ttl.strike { transition: none; }
  .r.arriving, .qa .caret { animation: none; }
}

@media (max-width: 1100px) { .iphone { zoom: .74; } }
@media (max-width: 420px) { .iphone { zoom: .7; } }
@media (max-width: 360px) { .iphone { zoom: .64; } }
