/* The web app (My claims), in the look of the website: see DESIGN.md. Shared pieces
   (buttons, pills, forms, dialogs, tokens) are in style.css. */
:root { --container: 1200px; --gutter: 24px; --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-4.9' fill='none' stroke='%2300785A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
@media (max-width: 639px) { :root { --gutter: 16px; } }
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.app h1, .app h2, .app h3 { text-wrap: balance; }

/* header: the website's menu bar, with the preview tools and account links on the right */
.app-nav { position: sticky; top: 0; z-index: 30; background: rgba(251, 244, 230, .86); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid transparent; transition: border-color .2s ease; }
.app-nav.scrolled { border-bottom-color: var(--line); }
/* room for the sticky menu bar when the browser scrolls to a focused control */
html:has(body.app) { scroll-padding-top: 88px; }
/* the demo bar scrolls away, so the menu bar can stick to the top */
.app .demobar { position: static; }
.app .demobar .wrap { width: min(100% - 2 * var(--gutter), var(--container)); max-width: none; padding: 0; }
.app-nav > .container { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.app-nav .brand { white-space: nowrap; margin-right: auto; }
.app-nav .tools { display: flex; align-items: center; gap: 4px; padding-right: 16px; border-right: 1px solid var(--line-strong); flex-shrink: 0; }
.app-nav .seg { flex-wrap: nowrap; }
.app-nav .seg span { white-space: nowrap; }
.app-nav .account { display: flex; align-items: center; gap: 4px; }
.app-nav label.switch { margin: 0 6px 0 10px; }
.app-nav .switch .lbl { font: inherit; }

/* page heading */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 40px 0 28px; }
.page-head h1 { font-size: 44px; line-height: 1.05; letter-spacing: -.03em; margin: 0 0 8px; }
.page-head .muted { margin: 0; font-size: 16px; }
.page-head .eyebrow { margin-bottom: 12px; }
#banners .banner { margin: 0 0 20px; }

/* the blue summary card, shared with the iPhone app */
.summary { position: relative; overflow: hidden; isolation: isolate; background: var(--voltage); color: #fff; border-radius: 20px; padding: 32px 36px; margin-bottom: 24px; }
/* the map keeps one size, so London and its routes stay on the right of the card */
.summary::after { content: ''; position: absolute; z-index: -1; right: -40px; top: 50%; width: 700px; aspect-ratio: 2 / 1; transform: translateY(-50%); background: url("/img/map-card.svg") center / contain no-repeat;
  -webkit-mask-image: linear-gradient(to right, transparent 8%, #000 36%); mask-image: linear-gradient(to right, transparent 8%, #000 36%); }
.summary .k { display: block; font: 600 12px/1.4 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: rgba(251, 244, 230, .9); }
.summary .main .k { display: flex; align-items: center; gap: 8px; }
.summary .main .k::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--zest); }
.summary .main b { display: block; font: 500 56px/1.05 var(--display); letter-spacing: -.035em; color: #fff; font-variant-numeric: tabular-nums; margin: 8px 0 4px; }
.summary .main small { display: block; font-size: 14px; color: rgba(251, 244, 230, .88); }
.summary .more { display: flex; flex-wrap: wrap; gap: 14px 48px; margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .22); max-width: 560px; }
.summary .more b { display: block; font: 500 26px/1.15 var(--display); letter-spacing: -.02em; color: #fff; font-variant-numeric: tabular-nums; margin-top: 4px; }
.summary b { white-space: nowrap; }
.summary .main b.multi { font-size: 40px; } /* "£520 + €600" */
.summary .more b.multi { font-size: 20px; }
.summary:has(.main b.multi)::after { opacity: .35; } /* a long total runs under the map, so the map steps back */

/* cards */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.panel + .panel { margin-top: 24px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.panel-head h2 { font-size: 26px; margin: 0; }
.panel-head .eyebrow { margin-bottom: 10px; }
.panel-head .acts { display: flex; gap: 4px; margin-right: -14px; }
.panel-head .count { font: 500 14px/1 var(--sans); color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.panel .sub { color: var(--ink-2); margin: 6px 0 0; }

/* set-up steps */
.setup .bar { height: 6px; background: var(--cream-3); border-radius: 999px; overflow: hidden; margin: 18px 0 6px; }
.setup .bar span { display: block; height: 100%; background: var(--voltage); border-radius: inherit; transition: width .4s ease; }
.setup .progress { font-size: 13px; color: var(--muted); margin: 0; }
.steps { list-style: none; margin: 12px 0 0; padding: 0; }
.steps li { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.steps li:first-child { border-top: 0; }
.steps .n { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; font: 600 14px/1 var(--sans); color: var(--voltage-dark); background: var(--voltage-tint); }
.steps li.done .n { background: var(--sprout-tint) var(--check) center / 18px no-repeat; color: transparent; }
.steps .what { flex: 1; min-width: 0; }
.steps .what b { display: block; font-weight: 600; color: var(--ink); }
.steps .what small { display: block; font-size: 14px; color: var(--muted); }
.steps li.done .what b { color: var(--muted); font-weight: 500; }

/* flight rows, like a transaction list */
.flight-list { margin-top: 8px; }
.app .flight { display: grid; grid-template-columns: 44px minmax(0, 1fr) 150px 112px 228px; grid-template-areas: "logo who pill amt acts"; align-items: center; column-gap: 16px; row-gap: 10px; padding: 18px 0; border-top: 1px solid var(--line); }
.app .flight:first-child { border-top: 0; }
.app .flight .foot { display: contents; }
.app .flight .logo { grid-area: logo; }
.app .flight .who { grid-area: who; min-width: 0; }
.app .flight .who > * { overflow-wrap: anywhere; }
.app .flight .route, .app .flight .meta > span:not(.sep) { white-space: nowrap; } /* lines break between parts, not inside a date */
.app .flight .pill { grid-area: pill; justify-self: start; }
.app .flight .amt { grid-area: amt; text-align: right; }
.app .flight .amt:empty { display: none; }
.app .flight .acts { grid-area: acts; justify-content: flex-end; gap: 4px; flex-wrap: nowrap; }
.app .flight.found { grid-template-columns: 44px minmax(0, 1fr) 150px 112px max-content; }
/* rows without a bin keep its space, so the buttons line up down the list */
.app .flight .icon-slot { width: 36px; flex: none; }
.amt .upto { font: 500 13px/1 var(--sans); letter-spacing: 0; color: var(--muted); }
.logo { width: 44px; height: 44px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--line); display: grid; place-items: center; overflow: hidden; font: 600 13px/1 var(--sans); letter-spacing: .04em; color: var(--ink-2); }
.logo img { width: 100%; height: 100%; display: block; }
.app .flight .route { font-weight: 600; font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; }
.app .flight .meta { color: var(--muted); font-size: 14px; }
.app .flight .data { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-top: 2px; }
.amt b { display: block; font: 500 20px/1.2 var(--display); letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.amt small { display: block; font-size: 13px; color: var(--muted); }
.amt.paid b { color: var(--sprout-dark); }
.amt.closed b { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.btn.icon { width: 36px; height: 36px; padding: 0; border-radius: 50%; color: var(--muted); }
.btn.icon svg { width: 18px; height: 18px; }
.btn.icon:hover { color: var(--punch-dark); background: var(--punch-tint); }
@media (pointer: coarse) { .btn.icon, .app .flight .icon-slot { width: 40px; height: 40px; min-height: 40px; } }

.empty { text-align: center; padding: 16px 0 8px; }
.empty .mock { max-width: 380px; margin: 0 auto 24px; background: var(--cream-2); border-radius: 20px; padding: 24px; }
.empty .mock > div { display: flex; align-items: center; gap: 12px; text-align: left; background: #fff; border-radius: 14px; padding: 14px; box-shadow: var(--shadow-sm); }
.empty .mock .logo { width: 36px; height: 36px; border-radius: 9px; }
.empty .mock b { display: block; font-size: 15px; color: var(--ink); }
.empty .mock small { display: block; font-size: 13px; color: var(--muted); }
.empty .mock .pill { margin-left: auto; }
.empty h3 { font: 500 22px/1.2 var(--display); letter-spacing: -.02em; margin-bottom: 8px; }
.empty p { color: var(--ink-2); max-width: 30em; margin: 0 auto 20px; }

/* inbox */
.found-group { margin-top: 24px; }
.found-group > h3 { display: flex; align-items: center; gap: 8px; font: 600 12px/1.4 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 4px; }
.found-group > h3::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--voltage); flex: none; }
.found-group > p { color: var(--ink-2); font-size: 15px; margin: 0 0 4px; }
.app details.fold { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.app details.fold summary { padding: 6px 0; }
.app details.fold summary b { font-weight: 600; }
.app details.fold .flight:first-of-type { border-top: 0; }
.inbox-promo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 48px; align-items: center; }
.inbox-promo h2 { font-size: 30px; letter-spacing: -.025em; margin: 0 0 12px; }
.inbox-promo p { color: var(--ink-2); }
.inbox-promo .trust { list-style: none; padding: 0; margin: 20px 0 16px; }
.inbox-promo .trust li { padding: 12px 0 12px 34px; border-top: 1px solid var(--line); color: var(--ink-2); position: relative; font-size: 15px; }
.inbox-promo .trust li:last-child { border-bottom: 1px solid var(--line); }
.inbox-promo .trust li::before { content: ''; position: absolute; left: 0; top: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--sprout-tint) var(--check) center / 16px no-repeat; }
.inbox-promo .trust b { color: var(--ink); }
.inbox-promo .note { font-size: 13px; color: var(--muted); margin: 0 0 20px; }
.inbox-promo .art { background: var(--cream-2); border-radius: 20px; height: 340px; overflow: hidden; position: relative; }
.inbox-promo .art img { position: absolute; left: 50%; top: 32px; width: 230px; height: auto; transform: translateX(-50%); filter: drop-shadow(0 2px 3px rgba(28, 27, 41, .10)) drop-shadow(0 24px 32px rgba(28, 27, 41, .18)); }
.scan-note { font-size: 14px; color: var(--muted); margin: 6px 0 0; }
#inbox .sub + .banner { margin: 16px 0 0; }

/* dialogs */
.app dialog { max-width: 600px; padding: 32px; border-radius: 24px; }
.app dialog h2 { font-size: 28px; letter-spacing: -.025em; margin-bottom: 8px; }
.app dialog .eyebrow { margin-bottom: 10px; }
#claimTitle:focus { outline: none; } /* focused on opening so the window starts at the top */
.app dialog .acts-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 24px; }
.app dialog form > .acts-row { position: sticky; bottom: -32px; z-index: 2; background: #fff; margin: 24px -32px -32px; padding: 16px 32px 32px; box-shadow: 0 -1px 0 var(--line); }
.claim-top { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.app .claim-top h2 { margin: 0 0 2px; font-size: 24px; }
.claim-top p { margin: 0; font-size: 14px; color: var(--muted); }
.claim-card { background: var(--cream-2); border-radius: 20px; padding: 24px; }
.claim-card .amount-big { font: 500 52px/1 var(--display); letter-spacing: -.035em; color: var(--ink); font-variant-numeric: tabular-nums; margin: 14px 0 4px; }
.claim-card .amount-big.paid { color: var(--sprout-dark); }
.claim-card .amount-big.closed { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 2px; }
.claim-card .caption { font-size: 14px; color: var(--ink-2); margin: 0; }
.tracker { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.tracker li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; line-height: 1.25; color: var(--muted); text-align: center; padding: 0 4px; }
.tracker li::before { content: ''; position: absolute; top: 12px; right: 50%; width: 100%; height: 3px; background: var(--cream-3); z-index: 0; }
.tracker li:first-child::before { display: none; }
.tracker li.done::before, .tracker li.now::before { background: var(--sprout-dark); }
.tracker .dot { position: relative; z-index: 1; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px var(--line-strong); }
.tracker li.done .dot { background: var(--sprout-dark) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-4.9' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; box-shadow: none; }
.tracker li.now .dot { background: var(--voltage); box-shadow: 0 0 0 5px rgba(58, 71, 240, .18); }
.tracker li.now .dot::after { content: ''; position: absolute; inset: 9px; border-radius: 50%; background: #fff; }
.tracker li.done, .tracker li.now { color: var(--ink); font-weight: 600; }
.updates { margin-top: 28px; }
.app .updates .eyebrow { margin-bottom: 4px; }
.app .timeline { margin-top: 12px; border-left-color: var(--line-strong); }
.app .timeline li::before { box-shadow: 0 0 0 3px #fff; }
.app .timeline li:not(:first-child)::before, .app .timeline.closed li::before { background: var(--line-strong); }
.claim-actions { margin-top: 24px; border-top: 1px solid var(--line); }
.claim-actions details { border-bottom: 1px solid var(--line); padding: 10px 0; }
.claim-actions summary { font-weight: 500; color: var(--ink); }
.claim-actions details[open] { padding-bottom: 16px; }
.claim-actions form, .claim-actions p { margin-top: 10px; }
.why .result { margin-top: 12px; }

/* footer */
.app-foot { margin-top: 64px; padding: 28px 0 48px; border-top: 1px solid var(--line-strong); color: var(--muted); font-size: 14px; }
.app-foot .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.app-foot p { margin: 0; }
.app-foot a { color: var(--ink-2); }
.app-foot a:hover { color: var(--ink); }

/* inbox rows have longer buttons, so they take two lines sooner */
@media (max-width: 1119px) {
  .app .flight.found { grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "logo who amt" ". foot foot"; }
  .app .flight.found .foot { display: flex; grid-area: foot; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
  .app .flight.found .acts { margin-left: auto; }
}

/* the menu bar takes two rows before it runs out of room */
@media (max-width: 879px) {
  html:has(body.app) { scroll-padding-top: 124px; }
  .app-nav > .container { flex-wrap: wrap; row-gap: 0; gap: 8px; min-height: 60px; padding: 8px 0; }
  .app-nav .account { display: contents; }
  .app-nav #teamLink, .app-nav #accountBtn { order: 2; }
  .app-nav .tools { order: 3; border-right: 0; padding-right: 0; flex: 1 1 calc(100% - 150px); } /* wide enough to start the second row */
  .app-nav #logout { order: 4; }
}

/* tablet */
@media (max-width: 1023px) {
  .app .flight, .app .flight.found { grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "logo who amt" ". foot foot"; }
  .app .flight .foot { display: flex; grid-area: foot; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
  .app .flight .acts { margin-left: auto; }
  .app .flight .logo { align-self: start; }
  /* the iPhone card's map placement: tucked into the top right, clear of the amounts */
  .summary::after { width: 360px; right: -80px; top: -50px; transform: none; -webkit-mask-image: none; mask-image: none; }
  .inbox-promo { grid-template-columns: 1fr; gap: 28px; }
  .inbox-promo .art { height: 280px; }
}

/* phone */
@media (max-width: 639px) {
  .app-nav { position: static; } /* two rows would take too much of a small screen */
  html:has(body.app) { scroll-padding-top: 0; }
  .app-nav .btn.ghost.small { padding-inline: 10px; }
  .page-head { flex-direction: column; align-items: stretch; gap: 20px; padding: 24px 0 20px; }
  .page-head h1 { font-size: 36px; }
  .page-head .btn { align-self: flex-start; }
  .summary { padding: 24px 22px; border-radius: 20px; }
  .summary::after { width: 250px; right: -62px; top: -32px; } /* above the caption under the amount */
  .summary .main b { font-size: 44px; }
  .summary .main b.multi { font-size: 32px; }
  .summary .more b.multi { font-size: 17px; }
  .summary .more { gap: 14px 28px; margin-top: 18px; padding-top: 16px; }
  .summary .more b { font-size: 22px; }
  .panel { padding: 22px 18px; border-radius: 18px; }
  .panel-head h2 { font-size: 22px; }
  .panel-head .acts { margin-right: 0; margin-left: -10px; width: 100%; }
  .app .flight, .app .flight.found { grid-template-columns: 40px minmax(0, 1fr) auto; column-gap: 12px; padding: 16px 0; }
  .app .flight .foot { margin-top: 2px; }
  .app .flight .acts { margin-left: 0; width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .app .flight .acts > .btn.ghost:first-child { margin-left: -14px; }
  .app .flight .meta .al, .app .flight .icon-slot { display: none; }
  .app .flight .pill { white-space: normal; max-width: 100%; }
  .app .flight .acts .btn { white-space: normal; text-align: left; }
  .logo { width: 40px; height: 40px; border-radius: 10px; }
  .amt b { font-size: 18px; }
  .inbox-promo h2 { font-size: 24px; }
  .steps li { flex-wrap: wrap; gap: 12px 14px; }
  .steps .what { flex: 1 1 calc(100% - 46px); }
  .steps li .btn { margin-left: 46px; }
  .app dialog { padding: 24px 20px; border-radius: 20px; }
  .app dialog form > .acts-row { bottom: -24px; margin: 24px -20px -24px; padding: 14px 20px 24px; }
  .claim-card { padding: 20px 16px; }
  .claim-card .amount-big { font-size: 44px; }
  .tracker li { font-size: 11px; }
  .app-foot .container { flex-direction: column; }
}
@media (max-width: 399px) { .app-nav .beta { display: none; } .app-nav .seg span { padding: 5px 9px; } .app-nav .tools { gap: 2px; } .app-nav label.switch { margin: 0 0 0 4px; } .app-nav #accountBtn { padding-inline: 8px; } }
@media (max-width: 369px) { .app-nav .switch .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
/* very small phones: the amount goes under the route */
@media (max-width: 359px) {
  .app .flight, .app .flight.found { grid-template-columns: 40px minmax(0, 1fr); grid-template-areas: "logo who" "amt amt" "foot foot"; }
  .app .flight .amt { text-align: left; }
  .summary .more { gap: 14px 16px; }
  .summary .k { letter-spacing: .05em; }
}
