/* RentItJA components and layouts (T11, rebrand 3 Nov 2026). Colours come only from tokens.css.
   Breakpoints (decision 32): phone under 600px, tablet 600 to 1023px, desktop 1024px and wider.
   Dark mode is only the Appearance choice; it lives in tokens.css. */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--surface); color: var(--ink); font-family: var(--body); font-size: var(--fs-body); line-height: var(--lh-body);
  min-height: 100dvh; display: flex; flex-direction: column; overflow-x: clip; overflow-wrap: anywhere;
}
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.15; margin: 0; text-wrap: balance; }
strong, b { font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding-left: 20px; }
a { color: var(--cobalt); }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }

/* type */
.dxl { font-size: var(--fs-display-xl); line-height: var(--lh-display-xl); font-weight: 700; letter-spacing: -.02em; }
.dl { font-size: var(--fs-display-l); line-height: var(--lh-display-l); font-weight: 700; letter-spacing: -.01em; }
.ti { font-size: var(--fs-title); line-height: var(--lh-title); font-weight: 700; }
.st { font-size: var(--fs-subtitle); line-height: var(--lh-subtitle); font-weight: 700; }
.lead { font-size: var(--fs-body-l); line-height: var(--lh-body-l); }
.small { font-size: var(--fs-small); line-height: var(--lh-small); }
.muted { color: var(--ink-muted); }
.mono { font-family: var(--mono); }
.label { font: 600 var(--fs-label)/var(--lh-label) var(--body); color: var(--ink-muted); }
.usd { color: var(--ink-muted); font-size: var(--fs-small); font-weight: 400; }
.warnline { color: var(--warning); font-size: var(--fs-small); line-height: var(--lh-small); }

/* buttons, links, fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: var(--r-btn); font: 600 16px/1.2 var(--body); border: 1.5px solid var(--ink); background: var(--surface-raised); color: var(--ink); text-align: center; text-decoration: none; }
.btn.pri { background: var(--cobalt); border-color: var(--cobalt); color: var(--on-cobalt); }
.btn.pri:hover { background: var(--cobalt-hover); border-color: var(--cobalt-hover); }
.btn.sm { min-height: 44px; padding: 0 14px; font-size: 15px; }
.btn.wide { width: 100%; }
.btn.ok { background: var(--success-soft); border-color: var(--success); color: var(--success); }
.btn:disabled { background: var(--fill); border-color: var(--line); color: var(--ink-muted); cursor: not-allowed; }
.btn.armed { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.lnk { background: none; border: 0; color: var(--cobalt); text-decoration: underline; text-underline-offset: 2px; min-height: 44px; padding: 0 4px; font-size: 16px; display: inline-flex; align-items: center; gap: 6px; }
.x { width: 44px; height: 44px; border: 0; background: none; border-radius: var(--r-btn); font-size: 24px; line-height: 1; display: inline-grid; place-items: center; color: var(--ink); text-decoration: none; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: sp .8s linear infinite; flex: none; }
@keyframes sp { to { transform: rotate(360deg); } }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.fld { margin: 0 0 16px; }
.fld > label, .lab { display: block; font-weight: 600; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=tel], input[type=number], select, textarea {
  width: 100%; min-height: 48px; font: 16px/1.4 var(--body); color: var(--ink); background: var(--surface-raised); border: 1px solid var(--line-strong); border-radius: var(--r-in); padding: 10px 12px;
}
textarea { min-height: 88px; resize: vertical; }
.help { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-muted); margin-top: 4px; }
.err { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--danger); margin-top: 6px; font-weight: 600; }
.err:empty { display: none; }
.bad { border: 2px solid var(--danger) !important; }
.chk { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding: 10px 0; cursor: pointer; }
.chk input { width: 24px; height: 24px; margin: 0; flex: none; accent-color: var(--cobalt); }
.stepper { display: inline-flex; align-items: center; gap: 8px; }
.stepper output { min-width: 40px; text-align: center; font-weight: 600; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }

/* cards, badges, chips, boxes */
.card { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; }
.card > * + * { margin-top: 10px; }
.stack > * + * { margin-top: 12px; }
.ic { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 12px; align-items: center; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--r-card); padding: 12px; }
.ic h3 { font: 600 16px/22px var(--body); }
.ic.dim { background: var(--fill); }
.ic.dim h3 { color: var(--ink-muted); }
.ph { width: 72px; height: 72px; border-radius: var(--r-card); display: grid; place-items: center; background: var(--fill); color: var(--ink-muted); border: 1px solid var(--line); flex: none; }
.ph.baby { background: var(--cobalt-soft); color: var(--cobalt); }
.ph.tryit { background: var(--papaya-soft); color: var(--papaya-ink); }
.ph.events { background: var(--cobalt-soft); color: var(--cobalt); }
.ph.supplies { background: var(--fill); color: var(--ink); }
.ph.sm { width: 100%; height: auto; aspect-ratio: 1; }
.bdg { display: inline-flex; align-items: center; gap: 4px; font: 600 var(--fs-caption)/var(--lh-caption) var(--body); padding: 4px 8px; border-radius: var(--r-tag); white-space: nowrap; border: 1px solid transparent; }
.bdg.ok { background: var(--success-soft); color: var(--success); border-color: var(--success); }
.bdg.warn { background: var(--warning-soft); color: var(--warning); border-color: var(--warning); }
.bdg.grey { background: var(--fill); color: var(--ink-muted); border-color: var(--line-strong); }
.bdg.err { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.bdg.buy { background: var(--cobalt-soft); color: var(--cobalt); border-color: var(--cobalt); }
.bdg.try { background: var(--papaya); color: var(--on-accent); }
.bdg.used { background: var(--seaglass); color: var(--on-accent); }
.bdg.brand { background: var(--cobalt-soft); color: var(--cobalt); border-color: var(--cobalt); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: var(--r-chip); border: 1px solid var(--line-strong); background: var(--surface-raised); font: 600 15px var(--body); color: var(--ink); white-space: nowrap; cursor: pointer; flex: none; text-decoration: none; }
.chip[aria-pressed="true"], .chip[aria-current="page"], .chip:has(input:checked) { background: var(--cobalt-soft); color: var(--cobalt); border-color: var(--cobalt); }
.chip:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.box { border: 1px solid var(--line); border-radius: var(--r-card); padding: 12px 14px; background: var(--surface-raised); }
.box > * + * { margin-top: 8px; }
.box.ok { background: var(--success-soft); border-color: var(--success); }
.box.warn { background: var(--warning-soft); border-color: var(--warning); }
.box.err { background: var(--danger-soft); border-color: var(--danger); }
.box.grey { background: var(--fill); border-color: var(--line-strong); }
.box.sun { background: var(--papaya-soft); border-color: var(--papaya); }
.box.ok strong, .box.ok h3 { color: var(--success); }
.box.warn strong, .box.warn h3 { color: var(--warning); }
.box.err strong, .box.err h3 { color: var(--danger); }
.seg { display: flex; gap: 4px; padding: 4px; background: var(--fill); border-radius: var(--r-card); }
.seg button, .seg a { flex: 1; min-height: 44px; border: 0; border-radius: var(--r-in); background: none; font: 600 15px var(--body); color: var(--ink-muted); padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.seg [aria-selected="true"], .seg [aria-current="page"] { background: var(--surface-raised); color: var(--ink); box-shadow: var(--shadow); }
.logo { font: 700 22px/1 var(--display); color: var(--ink); background: none; border: 0; display: inline-flex; align-items: center; gap: 2px; letter-spacing: -.01em; padding: 0; min-height: 44px; text-decoration: none; }
.tag { position: relative; background: var(--cobalt); color: var(--on-cobalt); border-radius: var(--r-tag); padding: 3px 6px 3px 13px; font-size: .78em; }
.tag::before { content: ""; position: absolute; left: 4px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--surface-raised); }
.tag.sun { background: var(--papaya); color: var(--on-accent); }
.tot { width: 100%; border-collapse: collapse; font-size: 15px; }
.tot td { padding: 6px 0; vertical-align: top; border-bottom: 1px solid var(--line); }
.tot td:last-child { text-align: right; white-space: nowrap; padding-left: 8px; }
.tot .h td { font-weight: 600; padding-top: 12px; border-bottom: 0; }
.tot .big td { font: 600 18px var(--body); border-bottom: 0; }
.copyrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.copyrow .v { font: 500 16px var(--mono); word-break: break-all; }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; font-size: 15px; }
.kv dt { color: var(--ink-muted); }
.kv dd { margin: 0; }
/* User-supplied text never forces a sideways scroll: body inherits overflow-wrap; flex and grid children may shrink. */
.between > *, .tools > * { min-width: 0; }
.kv dt, .kv dd, .card, .box, .ic, .copyrow, .tot td, .waiver, .when > div, .tl li { min-width: 0; overflow-wrap: anywhere; }
details summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--cobalt); font-weight: 600; }
.waiver { background: var(--fill); border-radius: var(--r-card); padding: 12px; font-size: 15px; }
.waiver > * + * { margin-top: 8px; }
.open { font-family: var(--mono); background: var(--warning-soft); color: var(--ink); padding: 0 4px; border-radius: var(--r-tag); }
.plain { list-style: none; padding: 0; }
.plain li { padding: 4px 0; border-bottom: 1px solid var(--line); }
.tl { list-style: none; padding: 0; margin: 6px 0 0; }
.tl li { display: flex; gap: 10px; align-items: center; min-height: 28px; color: var(--ink-muted); font-size: var(--fs-small); }
.tl .dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; font-size: 10px; flex: none; }
.tl .done { color: var(--ink); }
.tl .done .dot { background: var(--success); border-color: var(--success); color: var(--surface-raised); }
.tl .now { color: var(--ink); font-weight: 600; }
.tl .now .dot { border-color: var(--cobalt); background: var(--cobalt-soft); }
.sk { height: 96px; border-radius: var(--r-card); background: var(--fill); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.strip { display: flex; gap: 12px; overflow-x: auto; padding: 2px 0 8px; scroll-snap-type: x mandatory; }
.sg { flex: 0 0 min(42%, 200px); scroll-snap-align: start; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--r-card); padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.sg .btn { margin-top: auto; }
#toast { position: fixed; left: 16px; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); z-index: 40; background: var(--ink); color: var(--surface-raised); border-radius: var(--r-card); padding: 12px 16px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s; text-align: center; }
#toast.on { opacity: 1; }

/* sheets: native dialog. Phone slides up from the bottom; tablet and desktop centre it. */
dialog.sheet { position: fixed; border: 0; padding: 16px 20px 24px; margin: auto; width: min(560px, calc(100% - 32px)); max-width: none; max-height: 90dvh; overflow: auto; background: var(--surface-raised); color: var(--ink); border-radius: var(--r-sheet); box-shadow: var(--elev-2); }
dialog.sheet::backdrop { background: var(--scrim); }
dialog.sheet > * + * { margin-top: 12px; }
.sheet-body > * + * { margin-top: 12px; }
.mh { display: flex; justify-content: space-between; align-items: center; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal .dh { font: 600 var(--fs-caption)/20px var(--body); text-align: center; color: var(--ink-muted); }
.day { min-height: 44px; border-radius: var(--r-in); border: 1px solid transparent; background: none; font: 600 16px var(--body); color: var(--ink); padding: 0; }
.day.off { color: var(--ink-muted); text-decoration: line-through; font-weight: 400; }
.day.in { background: var(--cobalt-soft); color: var(--cobalt); }
.day.sel { background: var(--cobalt); color: var(--on-cobalt); }
.day.today { border-color: var(--line-strong); }
.why { min-height: 20px; font-size: var(--fs-small); color: var(--warning); }
@keyframes up { from { transform: translateY(100%); } }

/* shell: phone and tablet use an app header and a bottom tab bar; desktop uses the website top bar */
.ah { position: sticky; top: 0; z-index: 6; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px max(8px, env(safe-area-inset-right, 0px)) 6px max(16px, env(safe-area-inset-left, 0px)); background: var(--surface-raised); border-bottom: 1px solid var(--line); min-height: 56px; }
.ah .r { display: flex; align-items: center; }
.ah .x { margin-left: -12px; }
.aht { flex: 1; min-width: 0; font: 700 17px var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 7; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface-raised); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.nav a, .nav button { min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: 600 12px var(--body); color: var(--ink-muted); background: none; border: 0; text-decoration: none; }
.nav [aria-current="page"] { color: var(--cobalt); }
.wnav { display: none; }
body.has-tabs { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
.m { flex: 1; width: 100%; padding: 16px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); }
.m > * + * { margin-top: 16px; }
.m.narrow { max-width: 840px; margin-left: auto; margin-right: auto; }
.back { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.when { display: grid; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--r-card); }
.when > div { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 8px 6px 14px; }
.when > div + div { border-top: 1px solid var(--line); }
.wfoot { background: var(--surface-raised); border-top: 1px solid var(--line); margin-top: 24px; }
.wfoot .in { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 20px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); }
.wfoot .in > :first-child { grid-column: 1 / -1; }
.wfoot h3 { font: 600 var(--fs-label)/var(--lh-label) var(--body); color: var(--ink-muted); margin-bottom: 4px; }
.wfoot ul { list-style: none; padding: 0; }
.wfoot .lnk { padding: 0; text-align: left; font-size: 15px; }
.wfoot .fine { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px max(16px, env(safe-area-inset-right, 0px)) 20px max(16px, env(safe-area-inset-left, 0px)); border-top: 1px solid var(--line); font-size: var(--fs-small); color: var(--ink-muted); }
.hero { display: grid; gap: 16px; }
.hero.try { background: var(--papaya-soft); border-radius: var(--r-sheet); padding: 24px; }
.hero .card { background: var(--surface-raised); color: var(--ink); }
.steps { display: grid; gap: 12px; }
.steps .card h3 { font: 700 18px var(--display); }
.steps .num { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--papaya); color: var(--on-accent); font: 700 15px var(--display); }
.grid-items { display: grid; gap: 12px; }
.grid-items > * + * { margin-top: 0; }
.cats-chips { margin-left: 0; }
.split { display: grid; gap: 16px; }
.split > .mm > * + * { margin-top: 16px; }
.sumcol > * + * { margin-top: 12px; }
.bline { display: flex; }
.stepnav { display: none; }

/* phone only */
@media (max-width: 599px) {
  dialog.sheet { inset: auto 0 0 0; margin: 0; width: 100%; max-height: 94dvh; border-radius: var(--r-sheet) var(--r-sheet) 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); animation: up .25s ease-out; }
  .wfoot .in { grid-template-columns: 1fr; }
  .step { display: none; }
  .step.is-current { display: block; }
  .stepnav { display: flex; position: sticky; bottom: calc(0px); z-index: 5; gap: 8px; padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--line); }
  .stepnav .btn { flex: 1; }
  body.no-tabs { padding-bottom: 0; }
}

/* tablet */
@media (min-width: 600px) and (max-width: 1023px) {
  .grid-items { grid-template-columns: 1fr 1fr; }
  .grid-items .ic { grid-template-columns: 56px minmax(0, 1fr); }
  .grid-items .ic .ph { width: 56px; height: 56px; }
  .grid-items .ic > :last-child { grid-column: 1 / -1; justify-self: start; }
  .split { display: flex; flex-direction: column; }
  .split .sumcol { order: -1; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .hero.try { padding: 32px; }
}

/* desktop: real website */
@media (min-width: 1024px) {
  .ah, .nav { display: none; }
  body.has-tabs { padding-bottom: 0; }
  .wnav { display: block; position: sticky; top: 0; z-index: 8; background: var(--surface-raised); border-bottom: 1px solid var(--line); }
  .wnav .in, .wcats, .wfoot .in, .wfoot .fine { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
  .wnav .in { display: flex; align-items: center; gap: 20px; padding-top: 10px; padding-bottom: 6px; }
  .wnav .srch { flex: 1; max-width: 460px; }
  .wnav .srch input { min-height: 44px; border-radius: var(--r-chip); padding-left: 18px; }
  .wnav .r { display: flex; align-items: center; gap: 8px; margin-left: auto; }
  .wcats { display: flex; gap: 4px; padding-bottom: 6px; }
  .wcats a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: var(--r-in); font: 600 15px var(--body); color: var(--ink-muted); text-decoration: none; }
  .wcats a[aria-current="page"] { color: var(--cobalt); background: var(--cobalt-soft); }
  .m { max-width: 1200px; margin: 0 auto; padding: 24px 24px 56px; }
  .m.narrow { max-width: 840px; }
  .hero { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: center; gap: 32px; padding: 40px; border-radius: var(--r-sheet); background: var(--cobalt-soft); }
  .hero.try { background: var(--papaya-soft); padding: 40px; }
  .hero .dxl { font-size: 56px; line-height: 58px; }
  .cats-chips { display: none; }
  .grid-items { grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 16px; }
  .grid-items .ic { grid-template-columns: 1fr; align-content: start; padding: 14px; }
  .grid-items .ic .ph { width: 100%; height: auto; aspect-ratio: 4 / 3; }
  .grid-items .ic > :last-child { justify-self: start; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .split { grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
  .sumcol { position: sticky; top: 120px; max-height: calc(100vh - 136px); overflow: auto; padding: 2px; }
  .bline { display: none; }
  .back > .lnk:only-child { display: inline-flex; }
  .wfoot .in { grid-template-columns: 2fr repeat(3, 1fr); gap: 24px; padding-top: 32px; padding-bottom: 20px; }
  .wfoot .in > :first-child { grid-column: auto; }
  .wfoot .fine { padding-top: 12px; padding-bottom: 24px; }
  #toast { left: auto; right: 24px; bottom: 24px; max-width: 380px; }
}
@media (hover: hover) {
  .ic:hover, .card.hov:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
  .btn:not(:disabled):not(.pri):hover { background: var(--fill); }
  .lnk:hover { text-decoration-thickness: 2px; }
  .wcats a:hover { background: var(--fill); color: var(--ink); }
  .nav a:hover, .nav button:hover { color: var(--ink); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* basket bar and the phone search field */
.bbar { position: fixed; left: 0; right: 0; bottom: calc(56px + env(safe-area-inset-bottom, 0px)); z-index: 6; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); background: var(--surface-raised); border-top: 1px solid var(--line); box-shadow: var(--shadow); }
.bbar[hidden] { display: none; }
body.has-bbar .m { padding-bottom: 96px; }
@media (min-width: 1024px) {
  .mobsearch { display: none; }
  .bbar { bottom: 16px; left: 50%; right: auto; transform: translateX(-50%); width: min(720px, calc(100% - 48px)); border: 1px solid var(--line); border-radius: var(--r-card); }
}
@media (max-width: 599px) {
  body.no-tabs .bbar { bottom: 0; }
}
