/* ===== THE iOS LAYER (Arash, 2026-11-26: "everything to feel much more latest iOS vibes and more swift motion design,
   buttery smooth"; "make sure you have DS in place"). One layer under every product kit's screens: tokens for iOS
   points, type, corners, materials and SwiftUI's springs, and the components every app is made of (buttons, rows,
   grouped lists, tab bar, nav bar, sheets, segmented control, the icon). A kit keeps its product's own colours, face and
   layout and sets only the variables below; it never restyles a component locally (tools/ios/README.md).

   Units: --pt is one iOS point inside the screen. A kit sets it once on its screen root (Pizza Hut: var(--p); NewDay:
   twice its board pixel, calc(2 * var(--q))). Every size here is in --pt, so a component is the same size on every
   phone on the site.
   Brand: --ios-tint (actions), --ios-tint2 (a second action), --ios-on-tint (text on a tint), --ios-label,
   --ios-label2, --ios-label3, --ios-fill (grey fills), --ios-sep (hairlines), --ios-group (grouped background),
   --ios-cell (cell background), --ios-font (the product's face). */

/* IOS SPRINGS (generated by tools/ios/springs.py, do not edit by hand) */
:root {
  --ios-smooth: linear(0.0000, 0.0148 2.1%, 0.0526 4.2%, 0.1052 6.2%, 0.1668 8.3%, 0.2327 10.4%, 0.2998 12.5%, 0.3660 14.6%, 0.4296 16.7%, 0.4896 18.8%, 0.5455 20.8%, 0.5970 22.9%, 0.6439 25.0%, 0.6865 27.1%, 0.7247 29.2%, 0.7589 31.2%, 0.7894 33.3%, 0.8164 35.4%, 0.8403 37.5%, 0.8613 39.6%, 0.8798 41.7%, 0.8959 43.8%, 0.9100 45.8%, 0.9223 47.9%, 0.9330 50.0%, 0.9423 52.1%, 0.9504 54.2%, 0.9574 56.2%, 0.9634 58.3%, 0.9686 60.4%, 0.9731 62.5%, 0.9770 64.6%, 0.9803 66.7%, 0.9831 68.8%, 0.9856 70.8%, 0.9877 72.9%, 0.9895 75.0%, 0.9910 77.1%, 0.9924 79.2%, 0.9935 81.2%, 0.9945 83.3%, 0.9953 85.4%, 0.9960 87.5%, 0.9966 89.6%, 0.9971 91.7%, 0.9975 93.8%, 0.9979 95.8%, 0.9982 97.9%, 1.0000); --ios-smooth-t: 0.698s;
  --ios-snappy: linear(0.0000, 0.0137 2.1%, 0.0498 4.2%, 0.1014 6.2%, 0.1634 8.3%, 0.2313 10.4%, 0.3020 12.5%, 0.3728 14.6%, 0.4419 16.7%, 0.5079 18.8%, 0.5699 20.8%, 0.6273 22.9%, 0.6797 25.0%, 0.7270 27.1%, 0.7694 29.2%, 0.8070 31.2%, 0.8400 33.3%, 0.8687 35.4%, 0.8935 37.5%, 0.9147 39.6%, 0.9327 41.7%, 0.9479 43.8%, 0.9606 45.8%, 0.9710 47.9%, 0.9795 50.0%, 0.9864 52.1%, 0.9919 54.2%, 0.9961 56.2%, 0.9994 58.3%, 1.0019 60.4%, 1.0037 62.5%, 1.0049 64.6%, 1.0057 66.7%, 1.0061 68.8%, 1.0063 70.8%, 1.0062 72.9%, 1.0060 75.0%, 1.0057 77.1%, 1.0054 79.2%, 1.0049 81.2%, 1.0045 83.3%, 1.0041 85.4%, 1.0036 87.5%, 1.0032 89.6%, 1.0028 91.7%, 1.0024 93.8%, 1.0021 95.8%, 1.0018 97.9%, 1.0000); --ios-snappy-t: 0.665s;
  --ios-bouncy: linear(0.0000, 0.0188 2.1%, 0.0681 4.2%, 0.1386 6.2%, 0.2225 8.3%, 0.3135 10.4%, 0.4066 12.5%, 0.4979 14.6%, 0.5846 16.7%, 0.6647 18.8%, 0.7370 20.8%, 0.8008 22.9%, 0.8559 25.0%, 0.9026 27.1%, 0.9412 29.2%, 0.9723 31.2%, 0.9967 33.3%, 1.0152 35.4%, 1.0286 37.5%, 1.0376 39.6%, 1.0430 41.7%, 1.0456 43.8%, 1.0459 45.8%, 1.0444 47.9%, 1.0418 50.0%, 1.0383 52.1%, 1.0343 54.2%, 1.0300 56.2%, 1.0257 58.3%, 1.0216 60.4%, 1.0177 62.5%, 1.0142 64.6%, 1.0110 66.7%, 1.0082 68.8%, 1.0058 70.8%, 1.0038 72.9%, 1.0021 75.0%, 1.0008 77.1%, 0.9998 79.2%, 0.9991 81.2%, 0.9985 83.3%, 0.9982 85.4%, 0.9980 87.5%, 0.9979 89.6%, 0.9979 91.7%, 0.9980 93.8%, 0.9981 95.8%, 0.9983 97.9%, 1.0000); --ios-bouncy-t: 0.777s;
  --ios-press: linear(0.0000, 0.0147 2.1%, 0.0524 4.2%, 0.1048 6.2%, 0.1661 8.3%, 0.2319 10.4%, 0.2989 12.5%, 0.3649 14.6%, 0.4284 16.7%, 0.4884 18.8%, 0.5442 20.8%, 0.5957 22.9%, 0.6427 25.0%, 0.6852 27.1%, 0.7235 29.2%, 0.7578 31.2%, 0.7883 33.3%, 0.8154 35.4%, 0.8393 37.5%, 0.8604 39.6%, 0.8789 41.7%, 0.8952 43.8%, 0.9093 45.8%, 0.9217 47.9%, 0.9325 50.0%, 0.9418 52.1%, 0.9499 54.2%, 0.9569 56.2%, 0.9630 58.3%, 0.9683 60.4%, 0.9728 62.5%, 0.9767 64.6%, 0.9800 66.7%, 0.9829 68.8%, 0.9854 70.8%, 0.9875 72.9%, 0.9894 75.0%, 0.9909 77.1%, 0.9922 79.2%, 0.9934 81.2%, 0.9944 83.3%, 0.9952 85.4%, 0.9959 87.5%, 0.9965 89.6%, 0.9970 91.7%, 0.9975 93.8%, 0.9979 95.8%, 0.9982 97.9%, 1.0000); --ios-press-t: 0.348s;
  --ios-release: linear(0.0000, 0.0130 2.1%, 0.0476 4.2%, 0.0979 6.2%, 0.1591 8.3%, 0.2271 10.4%, 0.2986 12.5%, 0.3711 14.6%, 0.4424 16.7%, 0.5112 18.8%, 0.5763 20.8%, 0.6368 22.9%, 0.6925 25.0%, 0.7429 27.1%, 0.7881 29.2%, 0.8281 31.2%, 0.8631 33.3%, 0.8935 35.4%, 0.9194 37.5%, 0.9414 39.6%, 0.9598 41.7%, 0.9749 43.8%, 0.9872 45.8%, 0.9969 47.9%, 1.0045 50.0%, 1.0102 52.1%, 1.0143 54.2%, 1.0171 56.2%, 1.0189 58.3%, 1.0197 60.4%, 1.0199 62.5%, 1.0196 64.6%, 1.0188 66.7%, 1.0177 68.8%, 1.0165 70.8%, 1.0151 72.9%, 1.0137 75.0%, 1.0122 77.1%, 1.0108 79.2%, 1.0095 81.2%, 1.0082 83.3%, 1.0070 85.4%, 1.0059 87.5%, 1.0049 89.6%, 1.0040 91.7%, 1.0033 93.8%, 1.0026 95.8%, 1.0020 97.9%, 1.0000); --ios-release-t: 0.515s;
  --ios-sheet: linear(0.0000, 0.0098 2.1%, 0.0357 4.2%, 0.0734 6.2%, 0.1194 8.3%, 0.1708 10.4%, 0.2253 12.5%, 0.2812 14.6%, 0.3371 16.7%, 0.3919 18.8%, 0.4449 20.8%, 0.4956 22.9%, 0.5434 25.0%, 0.5884 27.1%, 0.6301 29.2%, 0.6688 31.2%, 0.7044 33.3%, 0.7369 35.4%, 0.7665 37.5%, 0.7934 39.6%, 0.8176 41.7%, 0.8395 43.8%, 0.8590 45.8%, 0.8765 47.9%, 0.8922 50.0%, 0.9060 52.1%, 0.9183 54.2%, 0.9292 56.2%, 0.9387 58.3%, 0.9472 60.4%, 0.9545 62.5%, 0.9610 64.6%, 0.9666 66.7%, 0.9715 68.8%, 0.9758 70.8%, 0.9795 72.9%, 0.9826 75.0%, 0.9854 77.1%, 0.9877 79.2%, 0.9897 81.2%, 0.9915 83.3%, 0.9929 85.4%, 0.9942 87.5%, 0.9952 89.6%, 0.9961 91.7%, 0.9969 93.8%, 0.9975 95.8%, 0.9980 97.9%, 1.0000); --ios-sheet-t: 0.615s;
  --ios-push: linear(0.0000, 0.0148 2.1%, 0.0526 4.2%, 0.1052 6.2%, 0.1667 8.3%, 0.2326 10.4%, 0.2997 12.5%, 0.3659 14.6%, 0.4294 16.7%, 0.4895 18.8%, 0.5454 20.8%, 0.5968 22.9%, 0.6438 25.0%, 0.6863 27.1%, 0.7246 29.2%, 0.7588 31.2%, 0.7893 33.3%, 0.8163 35.4%, 0.8402 37.5%, 0.8612 39.6%, 0.8797 41.7%, 0.8958 43.8%, 0.9100 45.8%, 0.9223 47.9%, 0.9330 50.0%, 0.9423 52.1%, 0.9503 54.2%, 0.9573 56.2%, 0.9634 58.3%, 0.9686 60.4%, 0.9731 62.5%, 0.9769 64.6%, 0.9803 66.7%, 0.9831 68.8%, 0.9856 70.8%, 0.9877 72.9%, 0.9895 75.0%, 0.9910 77.1%, 0.9923 79.2%, 0.9935 81.2%, 0.9944 83.3%, 0.9953 85.4%, 0.9960 87.5%, 0.9966 89.6%, 0.9971 91.7%, 0.9975 93.8%, 0.9979 95.8%, 0.9982 97.9%, 1.0000); --ios-push-t: 0.628s;
}
/* END IOS SPRINGS */

.ios { --pt: 1px; --ios-tint: #007AFF; --ios-tint2: #34C759; --ios-on-tint: #fff; --ios-label: #000; --ios-label2: rgba(60, 60, 67, 0.6);
  --ios-label3: rgba(60, 60, 67, 0.3); --ios-fill: rgba(120, 120, 128, 0.12); --ios-sep: rgba(60, 60, 67, 0.18); --ios-group: #F2F2F7; --ios-cell: #fff;
  --ios-font: -apple-system, 'SF Pro Text', system-ui, sans-serif;
  /* corners: iOS draws continuous corners (a squircle); where the browser can, so do we */
  --ios-r-card: calc(22 * var(--pt)); --ios-r-cell: calc(12 * var(--pt)); --ios-r-btn: calc(12 * var(--pt)); --ios-r-sheet: calc(38 * var(--pt));
  /* elevation: one soft, wide, low shadow, never a hard drop */
  --ios-lift: 0 calc(1 * var(--pt)) calc(2 * var(--pt)) rgba(0, 0, 0, 0.04), 0 calc(8 * var(--pt)) calc(24 * var(--pt)) rgba(0, 20, 40, 0.08);
  /* spacing: one scale in points; proximity decides the step (a label and its value 2, lines of one group 8, groups 12 to
     16, blocks 20 to 24, the screen margin 16) */
  --s1: calc(2 * var(--pt)); --s2: calc(4 * var(--pt)); --s3: calc(8 * var(--pt)); --s4: calc(12 * var(--pt)); --s5: calc(16 * var(--pt));
  --s6: calc(20 * var(--pt)); --s7: calc(24 * var(--pt)); --s8: calc(32 * var(--pt));
  font-family: var(--ios-font); -webkit-font-smoothing: antialiased; font-feature-settings: 'tnum' 0; }
@supports (corner-shape: squircle) {
  .ios :is(.ios-card, .ios-group, .ios-sheet) { corner-shape: superellipse(1.6); }   /* never on a capsule: buttons and chips are true pills */
}

/* type: Apple's Dynamic Type ramp at the default size (points, weight, tracking from the HIG) */
.ios .ios-large { font-size: calc(34 * var(--pt)); line-height: calc(41 * var(--pt)); font-weight: 700; letter-spacing: 0.01em; }
.ios .ios-title1 { font-size: calc(28 * var(--pt)); line-height: calc(34 * var(--pt)); font-weight: 700; letter-spacing: 0.012em; }
.ios .ios-title2 { font-size: calc(22 * var(--pt)); line-height: calc(28 * var(--pt)); font-weight: 700; letter-spacing: -0.012em; }
.ios .ios-title3 { font-size: calc(20 * var(--pt)); line-height: calc(25 * var(--pt)); font-weight: 600; letter-spacing: -0.02em; }
.ios .ios-headline { font-size: calc(17 * var(--pt)); line-height: calc(22 * var(--pt)); font-weight: 600; letter-spacing: -0.024em; }
.ios .ios-body { font-size: calc(17 * var(--pt)); line-height: calc(22 * var(--pt)); font-weight: 400; letter-spacing: -0.024em; }
.ios .ios-callout { font-size: calc(16 * var(--pt)); line-height: calc(21 * var(--pt)); font-weight: 400; letter-spacing: -0.02em; }
.ios .ios-subhead { font-size: calc(15 * var(--pt)); line-height: calc(20 * var(--pt)); font-weight: 400; letter-spacing: -0.016em; }
.ios .ios-foot { font-size: calc(13 * var(--pt)); line-height: calc(18 * var(--pt)); font-weight: 400; letter-spacing: -0.005em; }
.ios .ios-cap { font-size: calc(12 * var(--pt)); line-height: calc(16 * var(--pt)); font-weight: 400; }
.ios .ios-cap2 { font-size: calc(11 * var(--pt)); line-height: calc(13 * var(--pt)); font-weight: 500; letter-spacing: 0.006em; }
.ios .ios-num { font-variant-numeric: tabular-nums; }
.ios .ios-2 { color: var(--ios-label2); }
.ios .ios-3 { color: var(--ios-label3); }

/* the icon: one drawn set (tools/builder/kits/ios.py), stroked to sit with the text beside it: the stroke follows the
   weight of the label (regular 1.6, semibold 2, bold 2.3, on a 24 grid), sized to the cap height plus a little */
.ios .ios-ic { display: inline-block; flex: none; width: calc(var(--ic, 17) * var(--pt)); height: calc(var(--ic, 17) * var(--pt)); vertical-align: -0.16em;
  fill: none; stroke: currentColor; stroke-width: var(--ic-w, 2); stroke-linecap: round; stroke-linejoin: round; }
.ios .ios-ic .f { fill: currentColor; stroke: none; }

/* buttons: capsule or rounded, filled, tinted, grey, plain; labels semibold; the press dims and sinks, the release
   springs back (assets/js/ios.js adds .ios-down; demos add it on their taps) */
.ios .ios-btn { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: calc(6 * var(--pt)); height: calc(var(--h, 34) * var(--pt));
  padding: 0 calc(var(--px, 14) * var(--pt)); border: 0; border-radius: calc(var(--h, 34) / 2 * var(--pt)); background: var(--ios-tint); color: var(--ios-on-tint);
  font: 600 calc(var(--fs, 15) * var(--pt)) / 1 var(--ios-font); letter-spacing: -0.016em; white-space: nowrap; --ic: 13; --ic-w: 2.4;
  transition: transform var(--ios-release-t, 0.5s) var(--ios-release, ease), filter 0.2s ease; }
.ios .ios-btn.ios-l { --h: 50; --fs: 17; --px: 20; border-radius: var(--ios-r-btn); --ic: 15; }
.ios .ios-btn.ios-tint2 { background: var(--ios-tint2); }
.ios .ios-btn.ios-tinted { background: color-mix(in srgb, var(--ios-tint) 15%, transparent); color: var(--ios-tint); }
.ios .ios-btn.ios-gray { background: var(--ios-fill); color: var(--ios-tint); }
.ios .ios-btn.ios-plain { background: none; color: var(--ios-tint); padding: 0; }
.ios .ios-btn.ios-white { background: #fff; color: var(--ios-tint); }   /* on a coloured ground: a solid white pill (no glass, Arash) */
/* Apple: every button's hit region is at least 44 x 44 pt, whatever its drawn size */
:where(.ios .ios-btn) { position: relative; }   /* zero specificity: a kit that places its button absolutely keeps it there */
.ios .ios-btn::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: max(100%, calc(44 * var(--pt))); translate: 0 -50%; }
.ios :is(.ios-btn, .ios-press).ios-down, .ios :is(.ios-btn, .ios-press).press { transform: scale(0.96); filter: brightness(0.92); transition: transform var(--ios-press-t, 0.2s) var(--ios-press, ease-out), filter 0.08s ease; }
.ios .ios-press { transition: transform var(--ios-release-t, 0.5s) var(--ios-release, ease), filter 0.2s ease; }

/* cards and grouped lists */
.ios .ios-card { background: var(--ios-cell); border-radius: var(--ios-r-card); box-shadow: var(--ios-lift); }
.ios .ios-group { background: var(--ios-cell); border-radius: var(--ios-r-cell); overflow: hidden; }
.ios .ios-cell { position: relative; display: flex; align-items: center; gap: calc(12 * var(--pt)); min-height: calc(44 * var(--pt)); padding: calc(11 * var(--pt)) calc(16 * var(--pt)); }
.ios .ios-cell + .ios-cell::before { content: ""; position: absolute; top: 0; right: 0; left: var(--inset, calc(16 * var(--pt))); border-top: calc(0.5 * var(--pt)) solid var(--ios-sep); }
.ios .ios-cell .ios-grow { flex: 1; min-width: 0; }
.ios .ios-cell .ios-chev { color: var(--ios-label3); --ic: 13; --ic-w: 2.6; }
.ios .ios-gh { padding: 0 calc(16 * var(--pt)) calc(7 * var(--pt)); color: var(--ios-label2); font-size: calc(13 * var(--pt)); line-height: calc(18 * var(--pt)); text-transform: uppercase; letter-spacing: 0.02em; }

/* chips (filters, segments) */
.ios .ios-chip { display: inline-flex; align-items: center; gap: calc(4 * var(--pt)); height: calc(30 * var(--pt)); padding: 0 calc(12 * var(--pt)); border-radius: calc(15 * var(--pt));
  background: var(--ios-fill); color: var(--ios-label); font: 500 calc(15 * var(--pt)) / 1 var(--ios-font); letter-spacing: -0.016em; --ic: 12; --ic-w: 2.4; }
.ios .ios-chip.on { background: var(--ios-tint); color: var(--ios-on-tint); }
.ios .ios-seg { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; height: calc(32 * var(--pt)); padding: calc(2 * var(--pt)); border-radius: calc(9 * var(--pt)); background: var(--ios-fill); }
.ios .ios-seg > span { position: relative; z-index: 1; display: grid; place-items: center; font: 500 calc(13 * var(--pt)) / 1 var(--ios-font); }
.ios .ios-seg > i { position: absolute; top: calc(2 * var(--pt)); bottom: calc(2 * var(--pt)); left: calc(2 * var(--pt)); width: calc((100% - 4 * var(--pt)) / var(--n, 2)); border-radius: calc(7 * var(--pt));
  background: #fff; box-shadow: 0 calc(3 * var(--pt)) calc(8 * var(--pt)) rgba(0, 0, 0, 0.12), 0 calc(3 * var(--pt)) calc(1 * var(--pt)) rgba(0, 0, 0, 0.04);
  transform: translateX(calc(var(--at, 0) * 100%)); transition: transform var(--ios-snappy-t) var(--ios-snappy); }

/* bars: the tab bar and the nav bar sit on a material, the content scrolls under them */
.ios .ios-tabbar { position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; height: calc(83 * var(--pt)); padding-top: calc(7 * var(--pt));
  background: var(--ios-bar, rgba(249, 249, 249, 0.86)); -webkit-backdrop-filter: blur(20px) saturate(1.8); backdrop-filter: blur(20px) saturate(1.8);
  box-shadow: 0 calc(-0.5 * var(--pt)) 0 var(--ios-sep); }
.ios .ios-tab { display: grid; justify-items: center; align-content: start; gap: calc(2 * var(--pt)); color: var(--ios-tab, rgba(60, 60, 67, 0.6)); font: 500 calc(10 * var(--pt)) / calc(12 * var(--pt)) var(--ios-font); letter-spacing: 0.01em; --ic: 25; --ic-w: 1.7; }
.ios .ios-tab.on { color: var(--ios-tab-on, var(--ios-tint)); }
.ios .ios-tabbar.ios-clear { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
.ios .ios-navbar { display: flex; align-items: center; justify-content: space-between; height: calc(44 * var(--pt)); padding: 0 calc(16 * var(--pt)); color: var(--ios-tint); --ic: 22; --ic-w: 2.2; }

/* sheets: the grabber, the radius of the screen, the spring from below */
.ios .ios-sheet { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; background: var(--ios-group); border-radius: var(--ios-r-sheet) var(--ios-r-sheet) 0 0;
  transform: translateY(104%); transition: transform var(--ios-sheet-t) var(--ios-sheet); box-shadow: 0 calc(-2 * var(--pt)) calc(30 * var(--pt)) rgba(0, 0, 0, 0.18); }
.ios .ios-sheet.on { transform: none; }
.ios .ios-grab { position: absolute; top: calc(5 * var(--pt)); left: 50%; width: calc(36 * var(--pt)); height: calc(5 * var(--pt)); margin-left: calc(-18 * var(--pt)); border-radius: calc(2.5 * var(--pt)); background: rgba(60, 60, 67, 0.3); }
.ios .ios-close { display: grid; place-items: center; width: calc(30 * var(--pt)); height: calc(30 * var(--pt)); border-radius: 50%; background: var(--ios-fill); color: var(--ios-label2); --ic: 12; --ic-w: 2.8; }

/* the dim behind a sheet or an alert */
.ios .ios-dim { position: absolute; inset: 0; z-index: 4; background: rgba(0, 0, 0, 0.3); opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.ios .ios-dim.on { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .ios * { transition-duration: 0.01s !important; }
}
