/* The account page (account/index.html). The top bar, the panels and the titles are the builder's
   (builder.css: b-top, b-title, b-sub, out, out-url, out-buttons, check), the buttons and fields
   the site's (base.css). Signed out, this file lays the page out in one narrow column; signed in,
   it is a dashboard (the frame at the end: "The dashboard"). It adds the few things only this page
   has, and is loaded after builder.css, so a rule here wins over one there. */
.account:not(.dash),
:root:not(.is-in) .account-top {
  max-width: 40rem;
}

.account:not(.dash) {
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* one wide panel never widens the page */
  gap: 1.5rem;
  padding-block: 1rem max(3rem, env(safe-area-inset-bottom));
}

/* The panels are titled with h2 here (h3 in the builder, under its step title): same look */
.account .out h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.account .out .input {
  max-width: 24rem;
}

/* "My card", the panel that matters most: lifted off the page, where the others are outlined */
.account-card {
  border: 0;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.account-qr {
  width: 12.5rem;
  height: auto;
  border-radius: 0.875rem;
  background: #fff;
  image-rendering: pixelated;
}

/* The business card to print: the picture that is downloaded and printed, white on any theme, at its
   own proportions, on a piece of paper (base.css, paper) */
.biz-paper {
  width: 100%;
  max-width: 22rem;
  margin-block: 0.75rem 0.5rem;
}

.biz {
  background: #fff;
}

/* The numbers (the card's, the menu's, the review page's): a period switch, tiles, a chart of scans
   and views by day, and for a card a bar per button. The two series' colours, readable on either theme. */
.account {
  --s1: #2450e6; /* QR scans */
  --s2: #9aa6c9; /* link views */
  --track: #e8eaf0;
}

:root[data-theme="dark"] .account {
  --s1: #5b7cf7;
  --s2: #6b7591;
  --track: #2d3240;
}

.nums-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  width: 100%;
}

/* The switch of the generator (generator.css: keep the two alike), as pills that never break inside,
   each as wide as the others, narrower on a 320 px phone rather than wider than the panel */
.switch {
  display: flex;
  max-width: 100%;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.switch .btn {
  flex: 1 1 0;
  padding-inline: 0.875rem;
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 22rem) {
  .switch .btn {
    padding-inline: 0.5rem;
  }
}

.switch .btn[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}

.nums {
  display: grid;
  gap: 0.75rem;
  width: 100%;
}

/* Two by two on a phone, in one row where there is room */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: 0.5rem;
  margin: 0;
}

.tile {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0.875rem;
  border-radius: var(--r-input);
  background: var(--tint);
}

.tile dt {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.tile dd {
  margin: auto 0 0;
  padding-top: 0.125rem;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.tile dd.zero {
  color: var(--muted);
}

/* The tiles of scans and views are the chart's legend */
.key {
  flex: none;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 3px;
}

.key.s1 {
  background: var(--s1);
}

.key.s2 {
  background: var(--s2);
}

.chart {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 600 / 141;
}

.chart .s1 {
  fill: var(--s1);
}

.chart .s2 {
  fill: var(--s2);
}

.chart .axis {
  stroke: var(--line);
}

.chart-dates {
  display: flex;
  justify-content: space-between;
  margin: -0.5rem 0 0;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.nums-sub {
  margin: 0.25rem 0 0;
  font-size: 1rem;
  font-weight: 700;
}

/* "What people tap": folded, its title the line that opens it */
.nums-more summary {
  width: fit-content;
  min-height: 2.75rem;
  margin: 0;
  padding-block: 0.625rem;
  cursor: pointer;
}

.bars {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bars li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 0.75rem;
  font-size: 0.9375rem;
}

.bars b {
  font-variant-numeric: tabular-nums;
}

.bars svg {
  grid-column: 1 / -1;
  width: 100%;
  height: 0.5rem;
}

.bars .track {
  fill: var(--track);
}

.bars .fill {
  fill: var(--s1);
}

/* Too few scans and views to draw: what will show here, and how to get the first ones */
.nums-empty {
  margin: 0;
  padding: 1rem;
  border: 1.5px dashed var(--line);
  border-radius: var(--r-input);
  color: var(--muted);
}

/* What cannot be undone: the outline of a quiet button, in the colour of an error */
.btn-danger {
  border-color: var(--danger);
  color: var(--danger);
}

/* The account could not be loaded: said in place of it, in the column of the page signed out */
.account-said {
  position: sticky;
  bottom: 1rem;
  max-width: 40rem;
  margin: 1rem auto;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--danger);
  border-radius: var(--r-input);
  background: var(--surface);
  box-shadow: var(--shadow);
}

/* "Take my menu offline" and "Delete my menu": quiet lines under the menu's own button */
.account-quiet {
  color: var(--muted);
  font-size: 0.9375rem;
}

button.account-quiet {
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  font: 600 0.9375rem var(--sans);
  cursor: pointer;
}

.account-quiet summary {
  width: fit-content;
  padding-block: 0.625rem;
  font-weight: 600;
  cursor: pointer;
}

.account-quiet p {
  margin: 0.25rem 0 0.75rem;
}

/* ---- The Google review page: its numbers under its code, the private messages, the sign ---- */
#review-qr {
  scroll-margin-top: 1rem;
}

.account .out h2 .state-pill {
  margin-inline-start: 0.375rem;
  vertical-align: middle;
}

/* "2 new", "New": the accent, where a state is green or amber */
.msg-pill {
  background: var(--tint);
  color: var(--accent-text);
}

.msg-pill::before {
  background: currentColor;
}

.msgs {
  display: grid;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.msgs:empty {
  display: none;
}

.msg {
  display: grid;
  gap: 0.5rem;
  padding: 0.875rem 0 0.25rem;
  border-bottom: 1px solid var(--line);
}

.msg.is-new {
  padding-inline-start: 0.875rem;
  box-shadow: inset 3px 0 var(--accent-text);
}

.msg-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}

/* A customer's own words: as typed, line breaks kept, and a long word breaks rather than widen the page */
.msg-text {
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.msg-from {
  color: var(--muted);
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}

.msg-do {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
}

.msg-do button {
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  font: 600 0.9375rem var(--sans);
  cursor: pointer;
}

.msg-do .msg-del {
  color: var(--danger);
}

/* "Your inbox is full": amber, as what is not online yet */
.msg-full {
  color: var(--warn);
  font-weight: 600;
}

/* The sign ("Print a sign"): on paper only, and then alone on it. The WiFi tool's sign is the model (generator.css). */
.sheet {
  display: none;
}

.card-sheet {
  display: none;
}

/* The business cards ("Print" under the card): on paper only, alone on it, 8 of 85 x 55 mm at their real size (the svg's own width and height, in mm) */
@media print {
  :root.print-card {
    color-scheme: light;
  }

  .print-card,
  .print-card body {
    background: #fff;
  }

  .print-card body > :not(.card-sheet) {
    display: none;
  }

  .print-card .card-sheet {
    display: block;
    margin: 0 auto;
  }
}

@media print {
  :root.print-sign {
    color-scheme: light;
  }

  .print-sign,
  .print-sign body {
    background: #fff;
  }

  .print-sign body > :not(.sheet) {
    display: none;
  }

  /* A framed block, black on white (any printer): the business at the top, the title, the code,
     how to use it, the address. Never cut across two sheets. */
  .print-sign .sheet {
    display: grid;
    justify-items: center;
    gap: 0.9cm;
    box-sizing: border-box;
    width: 16cm;
    max-width: 100%;
    margin: 1cm auto 0;
    padding: 1.3cm 1cm 1.1cm;
    border: 2.5pt solid #000;
    border-radius: 1cm;
    background: #fff;
    color: #000;
    text-align: center;
    break-inside: avoid;
  }

  .sheet-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4cm;
    max-width: 100%;
  }

  .sheet-logo {
    flex: none;
    width: 1.6cm;
    height: 1.6cm;
    border-radius: 0.4cm;
    object-fit: cover;
  }

  .sheet-name {
    font-size: 1.75rem;
    font-weight: 700;
    overflow-wrap: anywhere;
  }

  .sheet-title {
    max-width: 12cm;
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.05;
    text-wrap: balance;
  }

  .sheet-qr {
    width: 11cm;
    height: auto;
    image-rendering: pixelated;
  }

  /* One centred sentence, its icon at the start of the first line */
  .sheet-hint {
    max-width: 12cm;
    font-size: 1.125rem;
    font-weight: 600;
    text-wrap: balance;
  }

  .sheet-hint .icon {
    width: 0.8cm;
    height: 0.8cm;
    margin-inline-end: 0.2cm;
    vertical-align: -0.22cm;
  }

  .sheet-url {
    max-width: 100%;
    padding: 0.15cm 0.5cm;
    border: 1pt solid #000;
    border-radius: 0.6cm;
    font-size: 0.9375rem;
    font-weight: 600;
    overflow-wrap: anywhere;
  }
}

/* ---- The dashboard: menu and views (signed in) ----
   Phones first: the views in one column, the menu a bar fixed at the bottom of the screen (five
   tabs; Settings is the person in the top bar). From 64rem the menu is a column on the left, under
   the top bar, and the views are wider. account.js shows one view at a time and puts "is-in" on
   <html> once signed in. */
.is-in {
  --toast-bottom: 4.75rem; /* the notices (ask.js) stand above the bar */
}

.is-in .account-top {
  width: auto;
  max-width: none;
  padding-inline: 1rem;
}

.dash .d-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  max-width: 48rem;
  margin-inline: auto;
  padding: 0.5rem 1rem calc(5.5rem + env(safe-area-inset-bottom)); /* the bar never covers the last button */
}

.view,
.stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  align-content: start;
}

.view h1 {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  outline: 0; /* it takes the focus only so that a screen reader says where it is */
}

.v-head {
  display: grid;
  justify-items: start;
  gap: 0.5rem;
}

.v-head > p:not([class]) {
  color: var(--muted);
}

.v-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

/* Why it is not online, in the colour of that state (amber) */
.v-state {
  color: var(--warn);
  font-weight: 600;
}

/* An address on one line: cut with "…" rather than wrapped */
.dash .out-url {
  display: block;
  max-width: 100%;
  overflow: hidden;
  overflow-wrap: normal;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.view > .out-buttons {
  margin: 0;
}

.dash .out {
  padding: 1.25rem;
}

.eyebrow {
  color: var(--muted);
  font-size: 0.9375rem;
}

.eyebrow {
  margin-bottom: -0.5rem;
  font-weight: 600;
}

.sub-h {
  margin-top: 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
}

/* The overview: a card per product, its small QR code at the right, then what can be added, in one grid */
.prods,
.two {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.prod {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto 1fr auto; /* the buttons of cards side by side on one line */
  align-items: start;
  gap: 0.625rem 1rem;
  padding: 1.25rem;
  border-radius: var(--r-panel);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.prod > * {
  grid-column: 1;
}

.prod-kind {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.prod-kind .icon {
  width: 1.375rem;
  height: 1.375rem;
  color: var(--accent-text);
}

/* The title and the small QR code open the product's view */
.prod-kind a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: inherit;
  text-decoration: none;
}

.prod .prod-qr {
  grid-area: 1 / 2 / span 2;
  width: 5.5rem;
}

.prod-qr img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
  image-rendering: pixelated;
}

/* The address and the figures of 7 days take the whole width, under the QR code */
.prod .out-url,
.prod .mini {
  grid-column: 1 / -1;
}

.prod .out-url {
  justify-self: start;
  padding: 0.25rem 0.625rem;
  font-size: 0.875rem;
}

/* A product's last 7 days: two small figures, the number over its label */
.mini {
  display: grid;
  gap: 0.25rem;
}

.mini-when {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.mini dl {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
}

.mini dl div {
  display: flex;
  flex-direction: column-reverse;
}

.mini dt {
  color: var(--muted);
  font-size: 0.8125rem;
}

.mini dd {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.mini dd.zero {
  color: var(--muted);
}

.week-line {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.week-line .text-link {
  white-space: nowrap;
}

.prod .prod-do {
  align-self: end;
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

/* What the account can add, and a product it does not have yet: a dashed outline, an invitation */
.new,
.empty {
  display: grid;
  gap: 0.5rem;
  padding: 1.25rem;
  border: 1.5px dashed var(--line);
  border-radius: var(--r-panel);
}

.new {
  grid-template-rows: auto 1fr auto; /* the buttons of tiles side by side on one line */
  justify-items: start;
}

/* An account with nothing yet: the three tiles are the page's main thing, solid and inviting */
.is-first .new {
  border: 0;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.is-first .new .prod-kind .icon {
  color: var(--accent-text);
}

.over-first {
  font-size: 1.125rem;
  font-weight: 600;
}

.new .prod-kind {
  font-size: 1.0625rem;
}

.new .prod-kind .icon {
  color: var(--muted);
}

.new p,
.empty p {
  color: var(--muted);
}

.new .btn {
  margin-top: 0.25rem;
}

.empty {
  justify-items: center;
  gap: 0.75rem;
  padding: 2.5rem 1.25rem;
  text-align: center;
}

.empty > .icon {
  width: 3rem;
  height: 3rem;
  color: var(--accent-text);
}

.empty h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

.empty p {
  max-width: 28rem;
}

.quiet-end {
  display: grid;
  justify-items: start;
}

/* Settings: two panels of sentences, at a width that reads */
#view-settings {
  max-width: 48rem;
}

/* The switch between the products' numbers: as wide as its words, quieter than the period switch
   under it (no fill: the product chosen is tinted) */
.which {
  justify-self: start;
  border: 0;
  background: none;
  padding: 0;
}

.which .btn[aria-pressed="true"] {
  background: var(--tint);
  color: var(--accent-text);
}

/* The lone QR code panel of the menu: as wide as what it holds */
#view-menu > .out {
  max-width: 30rem;
}

/* Settings in words, at the end of the overview: for a phone, where Settings is only an icon */
.over-settings {
  margin: 0;
}

/* Settings, in the top bar of a phone: tinted while it is the view shown, like the bar's tabs */
#to-settings[aria-current] {
  border-color: transparent;
  background: var(--tint);
  color: var(--accent-text);
}

/* Two products side by side once there is room (a tablet), three on a laptop; two panels side by side from a tablet */
@media (min-width: 40rem) {
  .prods {
    grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  }
}

@media (min-width: 48rem) {
  .two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

/* A tablet: the bar keeps a phone's width, in the middle, rather than five tabs of 150 px */
@media (min-width: 48rem) and (max-width: 63.99rem) {
  .d-nav {
    max-width: 32rem;
    margin-inline: auto;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 1rem 1rem 0 0;
  }
}

/* The menu, on a phone: a bar at the bottom of the screen */
.d-nav {
  position: fixed;
  inset: auto 0 0;
  z-index: 20;
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  padding: 0.25rem 0.25rem max(0.25rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.d-nav a {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.125rem;
  min-height: 3.25rem;
  padding: 0.25rem 0;
  border-radius: 0.75rem;
  color: var(--muted);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.d-nav a .icon {
  box-sizing: content-box;
  width: 1.375rem;
  height: 1.375rem;
  padding: 0.1875rem 0.8125rem;
  border-radius: 999px;
}

.d-nav a[aria-current] {
  color: var(--accent-text);
}

.d-nav a[aria-current] .icon {
  background: var(--tint);
}

.d-nav .short {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.d-nav .long,
.d-nav .d-settings,
.d-nav .d-site {
  display: none;
}

/* How many private messages are new: on the icon's corner in the bar, at the end of the line in the column */
.nav-count {
  position: absolute;
  top: 0.125rem;
  left: calc(50% + 0.5rem);
  min-width: 1.25rem;
  padding: 0 0.3125rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.25rem;
  text-align: center;
}

@media (min-width: 64rem) {
  .is-in {
    --toast-bottom: 1rem;
  }

  .is-in .account-top {
    position: sticky;
    top: 0;
    z-index: 20;
    padding-inline: 1.5rem;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
  }

  #to-settings {
    display: none;
  }

  .dash {
    display: grid;
    grid-template-columns: 15rem minmax(0, 1fr);
  }

  .dash .d-main {
    grid-area: 1 / 2;
    max-width: 72rem;
    padding: 2.25rem 2.5rem 4rem;
  }

  .dash .out {
    padding: 1.5rem;
  }

  .view {
    gap: 1.5rem;
  }

  .view h1 {
    font-size: 2rem;
  }

  /* The menu: a column on the left, in sight while the view scrolls */
  .d-nav {
    position: sticky;
    top: calc(4.25rem + 1px);
    grid-area: 1 / 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    height: calc(100dvh - 4.25rem - 1px);
    padding: 1.25rem 0.875rem 1rem;
    border-top: 0;
    border-right: 1px solid var(--line);
    overflow-y: auto;
  }

  .d-nav a {
    display: flex;
    flex: none;
    align-items: center;
    gap: 0.75rem;
    min-height: 2.75rem;
    padding: 0 0.75rem;
    font: 550 1rem/1.2 var(--sans);
  }

  .d-nav a .icon {
    box-sizing: border-box;
    width: 1.25rem;
    height: 1.25rem;
    padding: 0;
  }

  .d-nav a[aria-current] {
    background: var(--tint);
    font-weight: 650;
  }

  .d-nav a[aria-current] .icon {
    background: none;
  }

  .d-nav .short {
    display: none;
  }

  .d-nav .long {
    display: inline;
  }

  .d-nav .d-settings {
    display: flex;
  }

  /* "Back to the site", at the foot of the column, under a line */
  .d-nav .d-site {
    display: flex;
    margin-top: auto;
    font-size: 0.9375rem;
  }

  .d-nav .d-site::before {
    content: "";
    position: absolute;
    inset: -0.625rem 0 auto;
    border-top: 1px solid var(--line);
  }

  .nav-count {
    position: static;
    min-width: 1.5rem;
    margin-left: auto;
    padding: 0 0.4375rem;
    font-size: 0.8125rem;
    line-height: 1.5rem;
  }

  /* The tools after the products, under a line */
  .d-nav a[href="#stats"] {
    margin-top: 1.25rem;
  }

  .d-nav a[href="#stats"]::before {
    content: "";
    position: absolute;
    inset: -0.625rem 0 auto;
    border-top: 1px solid var(--line);
  }

  .over-settings {
    display: none;
  }

  #review-qr {
    scroll-margin-top: 5.5rem;
  }
}

@media (min-width: 64rem) and (hover: hover) {
  .d-nav a:not([aria-current]):hover {
    background: var(--bg);
    color: var(--ink);
  }
}

/* The site's foot shows on the sign-in screen only: not in the dashboard, which has its own menu, nor while the page loads */
#signed-out[hidden] ~ .site-foot {
  display: none;
}

/* The sign-in screen is short: the foot sits at the bottom of the window, never with bare page under it */
body:has(> #signed-out:not([hidden])) {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

#signed-out {
  flex: 1 0 auto;
}

/* ---- Several cards and menus, and the QR codes kept in the account (October 2026) ----
   One list for each (#card-items, #menu-items, #code-items), the same row: a small QR code, the name, the address
   on its own line, the state with its figures of 7 days (each figure and its words in one piece that does not
   break), on a laptop where a QR code leads, and a chevron. The whole row leads to the item. */
.items-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.items-head h1 {
  margin-right: auto;
}

.count {
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.items {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: var(--r-panel);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.items li + li {
  border-top: 1px solid var(--line);
}

.item {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.25rem 0.875rem;
  padding: 0.875rem 1rem;
  color: inherit;
  text-decoration: none;
}

.item:hover .item-name {
  color: var(--accent-text);
}

.item img {
  grid-row: 1 / span 3;
  width: 3.5rem;
  height: 3.5rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
  image-rendering: pixelated;
}

.item-name,
.item-url {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-name {
  font-weight: 700;
}

.item-url {
  color: var(--muted);
  font-size: 0.875rem;
}

.item-week {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.375rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.item-week .state-pill {
  flex: none;
  margin-right: 0.125rem;
  font-size: 0.75rem;
}

.item-fig {
  white-space: nowrap;
}

.item-opens {
  display: none;
}

.item > .icon {
  grid-area: 1 / 3 / span 3;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--muted);
}

@media (min-width: 64rem) {
  .item {
    grid-template-columns: 3.5rem minmax(0, 1fr) minmax(0, 1fr) auto;
  }

  .item-opens {
    display: block;
    grid-area: 1 / 3 / span 3;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.875rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .item-opens b {
    display: block;
    overflow: hidden;
    color: var(--ink);
    font-weight: 600;
    text-overflow: ellipsis;
  }

  .item > .icon {
    grid-area: 1 / 4 / span 3;
  }
}

/* At the limit: one amber sentence in place of the button that makes another */
.limit {
  color: var(--warn);
  font-weight: 600;
}

/* What a QR code kept here is, against one of the free generator: one paragraph that reads */
.two-ways {
  max-width: 46rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* "New QR code" and "Where it leads": a short form */
.add-form {
  display: grid;
  gap: 0.75rem;
  max-width: 34rem;
}

.add-form .out-buttons {
  margin: 0.25rem 0 0;
}

.add-form .error {
  margin: -0.25rem 0 0;
}

/* What a QR code opens, in both forms: the switch (a link, a contact, a WiFi network), then the fields of one,
   two by two where there is room, as in the generator's Contact mode */
.code-kinds {
  justify-self: start;
}

.code-part {
  display: grid;
  justify-self: stretch; /* .out lays its parts at the start (builder.css): the fields take the whole width */
  gap: 0.75rem;
}

.code-part .label {
  min-width: 0;
  margin: 0;
}

.code-part .input {
  margin-top: 0.375rem;
}

.code-part .check {
  margin: 0;
}

.code-part .error,
.code-part .help {
  margin: 0;
}

@media (min-width: 30rem) {
  .code-grid {
    grid-template-columns: 1fr 1fr;
  }

  .code-grid .wide {
    grid-column: 1 / -1;
  }
}

/* The QR codes' card of the overview: how many, then their scans of 7 days */
.over-count {
  grid-column: 1 / -1;
  color: var(--muted);
  font-weight: 600;
}

/* "Download my photo", a quiet line over "Delete this card" */
a.account-quiet {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 600;
}

/* "Which card" (or menu, or QR code) of Statistics, when the account has two or more of the kind shown */
.stats-pick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem 0.75rem;
  margin: 0;
}

.stats-pick .label {
  margin: 0;
}

.stats-pick .input {
  width: auto;
  max-width: 100%;
}
