/* The app's own layer over tokens.css, theme.css and /looks.css. First,
   rastrillo's components in the card page's colours: its tokens are
   pointed at looks.css's own colours and faces, so a box, a list, a
   field or a button is printed on the page as the card page's settings
   are, light or dark as it is. Then the columns of
   its lists, set here because the content security policy forbids
   style attributes. */
:root {
  --rst-font: var(--sans);
  --rst-fs-base: var(--body-size);
  --rst-fs-sm: 0.9375rem;
  --rst-fs-xs: 0.8125rem;
  --rst-fs-lg: 1.25rem;
  --rst-radius: var(--radius);
  --rst-radius-sm: var(--radius);
  --rst-bg: var(--ground);
  --rst-surface: var(--ground);
  --rst-surface-2: light-dark(#f3eee7, #211f1c);
  --rst-line: light-dark(rgb(35 33 31 / 0.3), rgb(244 241 234 / 0.25));
  --rst-line-strong: var(--rule);
  --rst-header-rule: var(--rule);
  --rst-text: var(--on);
  --rst-text-muted: var(--on-soft);
  --rst-text-faint: var(--on-soft);
  --rst-muted: var(--on-soft);
  --rst-accent: var(--on);
  --rst-accent-strong: var(--on);
  --rst-accent-soft: var(--hover);
  --rst-on-accent: var(--chosen-ink);
  --rst-shadow-lift: 0 0 0 transparent;
  --rst-shadow-knob: 0 0 0 transparent;
  --rst-shadow-pop: 0 10px 24px -10px rgb(var(--shade) / 0.6);
}

/* The page's title, in the masthead's face, a size down. */
[rst-page-header] h1 {
  font: var(--display-weight) clamp(1.75rem, 1.1rem + 1.6vw, 2.6rem)/1.05 var(--display);
  font-stretch: var(--display-stretch);
  letter-spacing: -0.025em;
  text-wrap: balance;
}
[rst-box-head] h2 {
  font: var(--display-weight) 1.25rem/1.2 var(--display);
  font-stretch: var(--display-stretch);
}
/* A page of reading: privacy, terms and help. A big wide title and a
   line saying what the page is for; then, on a wide screen, what is on
   the page down the left, kept in view, beside the text, its sections
   ruled off. On a narrow one the contents come first and scroll away.
   doc.js marks the section being read; without it the list is still a
   list of links. */
.doc { --doc-gap: clamp(2.75rem, 5vw, 3.75rem); --doc-rule: light-dark(#cfcac0, #3a3631); padding: clamp(0.75rem, 4vw, 3.25rem) 0 3rem; }
.doc-head { display: grid; gap: 1.25rem; max-width: 44rem; padding-bottom: clamp(2rem, 4vw, 3rem); }
.doc-head h1 {
  margin: 0;
  font: 850 clamp(2.75rem, 1.6rem + 3.6vw, 4.75rem)/0.92 var(--display);
  font-stretch: 125%;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.doc-head p { margin: 0; max-width: 34rem; font-size: clamp(1.125rem, 1rem + 0.4vw, 1.375rem); line-height: 1.4; color: var(--on-soft); text-wrap: pretty; }
.doc-body { display: grid; gap: var(--doc-gap); }
@media (min-width: 52rem) {
  .doc-body { grid-template-columns: minmax(12rem, 16rem) minmax(0, 40rem); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
  .doc-contents { position: sticky; top: 2rem; }
}
.doc-contents ol { list-style: none; margin: 0; padding: 0; border-left: 1.5px solid var(--doc-rule); }
[rst-page] .doc-contents a {
  display: block;
  margin-left: -1.5px;
  padding: 0.55rem 0 0.55rem 1rem;
  border-left: 2.5px solid transparent;
  color: var(--on-soft);
  line-height: 1.3;
  text-decoration: none;
}
[rst-page] .doc-contents a:hover { color: var(--on); }
[rst-page] .doc-contents a[aria-current] { border-left-color: var(--on); color: var(--on); font-weight: 650; }
.doc-text { display: grid; gap: var(--doc-gap); font-size: 17px; line-height: 1.62; text-wrap: pretty; }
.doc-text section { display: grid; gap: 1rem; scroll-margin-top: 2rem; }
.doc-text section + section { border-top: 1px solid var(--doc-rule); padding-top: var(--doc-gap); }
.doc-text h2 {
  margin: 0;
  font: 800 1.5rem/1.15 var(--display);
  font-stretch: 112%;
  letter-spacing: -0.015em;
}
.doc-text :is(p, ul, ol) { margin: 0; max-width: 36rem; }
.doc-text :is(ul, ol) { display: grid; gap: 0.4rem; padding-left: 1.25rem; }
[rst-page] .doc-text a { text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
[rst-page] .doc-text a:hover { color: var(--chosen); }
.doc-text h3 { margin: 0.5rem 0 -0.5rem; font-size: 1.0625rem; line-height: 1.3; }

/* How it works opens as an invitation: the sample card beside what
   PrintCard does and the way to start, then the four things that
   happen, numbered, before the detail. */
.help-head { max-width: none; grid-template-columns: minmax(0, 1fr); align-items: center; }
.help-head-text { display: grid; gap: 1.25rem; justify-items: start; max-width: 34rem; }
.help-head .home-sample { max-width: 26rem; }
@media (min-width: 52rem) {
  .help-head { grid-template-columns: minmax(0, 1fr) minmax(16rem, 26rem); gap: clamp(2rem, 6vw, 5rem); }
}
.help-journey { padding-bottom: var(--doc-gap); }
.help-journey ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: journey;
}
.help-journey li {
  display: grid;
  gap: 0.4rem;
  align-content: start;
  padding: 1.1rem 1.25rem 1.25rem;
  border: 1.5px solid var(--doc-rule);
  border-radius: var(--radius);
  counter-increment: journey;
}
.help-journey li::before {
  content: counter(journey);
  font: var(--display-weight) 2.1rem/1 var(--display);
  font-stretch: var(--size-stretch);
  color: var(--logo-red);
}
.help-journey h3 { margin: 0; font: var(--display-weight) 1.25rem/1.15 var(--display); font-stretch: var(--display-stretch); }
.help-journey p { margin: 0; color: var(--on-soft); line-height: 1.5; }
@media (max-width: 30rem) {
  .help-journey li { grid-template-columns: 2rem 1fr; column-gap: 0.75rem; padding: 0.9rem 1rem; }
  .help-journey li::before { grid-row: span 2; font-size: 1.75rem; }
}
.help > .doc-text { max-width: 40rem; }
[rst-page] a:not([rst-btn]):not(.rst-nm):not(.make-card) { color: inherit; text-underline-offset: 0.15em; }
/* The ordering steps' own colours, and no underline. */
[rst-page] .card-steps a { color: var(--on); text-decoration: none; }
[rst-page] .card-steps a[aria-current] { color: var(--chosen-ink); }
[rst-page] :focus-visible, [rst-skip]:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Buttons as the card page's: ruled, and solid green when they are the
   one to press: the way on towards an order. */
[rst-btn] { min-height: 2.75rem; padding: 0.5rem 1rem; border-width: 1.5px; border-color: var(--rule); background: transparent; font-weight: 650; }
[rst-btn]:hover { border-color: var(--on); background: var(--hover); color: var(--on); }
[rst-btn~="primary"] { background: var(--go); border-color: var(--go); color: var(--go-ink); }
[rst-btn~="primary"]:hover { background: var(--go); color: var(--go-ink); opacity: 0.88; }
/* Danger is restated after the transparent rule above, which would
   otherwise take its fill and leave a pale label on a pale page. It is
   the card page's crimson (looks.css --danger), brighter than the
   theme's negative tone and kept clear of the vermilion. */
[rst-btn~="danger"], [rst-btn~="danger"]:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--danger-ink);
}
[rst-btn~="danger"]:hover { filter: brightness(0.9); }

/* Fields are white labels on the wrapper, as the words box is. */
[rst-input], [rst-textarea], [rst-page] select {
  background: var(--field);
  color: var(--field-ink);
  border-color: var(--rule);
  min-height: 2.75rem;
}

/* The admin pages: its own navigation at the top of the sheet, read as
   a row of places, not buttons: the words in soft ink on a ruled line,
   the page you are on in full ink, bold, and underlined on the rule. */
[rst-seg-tabs] {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.75rem;
  width: auto;
  margin: 0 0 1.75rem;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
}
[rst-seg-tabs] a {
  margin-bottom: -1px;
  padding: 0.6rem 0 0.7rem;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: var(--on-soft);
  font-size: 1rem;
  font-weight: 600;
}
[rst-seg-tabs] a:hover { background: none; color: var(--on); border-bottom-color: var(--rule); }
[rst-seg-tabs] a[aria-current] { color: var(--on); font-weight: 750; border-bottom-color: var(--on); box-shadow: none; }
/* On a phone they wrap onto as many lines as they need, never scrolling
   sideways. A rule under several lines would sit under the last alone,
   so it goes, and the page you are on keeps its underline. The sheet
   starts closer to them, too. */
@media (max-width: 40rem) {
  [rst-page].admin { padding-top: 0.75rem; }
  [rst-seg-tabs] { gap: 0 1.25rem; margin-bottom: 1.25rem; border-bottom: 0; }
  [rst-seg-tabs] a { margin-bottom: 0; padding: 0.4rem 0; white-space: nowrap; }
}
/* The admin's sentences keep to a line a person can read, about 75
   characters, though the sheet is wide for its lists. */
[rst-page].admin :is([rst-page-header] p, .admin-search-hint, [rst-box] > p) { max-width: 34rem; }
[rst-page].admin p { text-wrap: pretty; }
/* The admin's search, over its lists: the box, what it understands,
   and what it understood. */
.admin-search { display: grid; gap: 0.5rem; margin: 0 0 1.25rem; }
.admin-search [rst-search] { max-width: 32rem; }
.admin-search-hint { margin: 0; max-width: 46rem; color: var(--on-soft); font-size: 0.875rem; }
.admin-search-hint i { font-style: normal; font-weight: 650; color: var(--on); }
.admin-search-said, .admin-search-hidden { margin: 0.25rem 0 0; }
.admin-search-hidden { color: var(--on-soft); font-size: 0.875rem; }
/* The column starts at the masthead's gutter, as the card page's does. */
main[rst-page] { flex: 1; width: 100%; margin: 0; padding: 1.75rem clamp(1rem, 4vw, 3rem) 3rem; }
/* The Christmas banner, first on the sheet, sits close under its top. */
#christmas { margin-top: -0.75rem; }
[rst-page].admin {
  --rst-fs-base: 1rem;
  --rst-fs-sm: 0.875rem;
  --rst-fs-xs: 0.78125rem;
  max-width: 86rem;
  font-size: var(--rst-fs-base);
}

/* A list row's name is often an email, one word with nowhere to break:
   on a phone it ran on under the balance beside it. */
[rst-lrow] > .rst-nm { overflow-wrap: anywhere; }
/* On a phone the name is a grid, which would stretch its status pills
   across the cell: they keep to the width of their words. */
[rst-lrow] > .rst-nm > [rst-status] { justify-self: start; }
/* The same for an account's page, whose heading and details are its
   email: the details' value column may shrink below that word. */
[rst-page-header] h1, [rst-detail] dd { overflow-wrap: anywhere; }
[rst-detail] { grid-template-columns: max-content minmax(0, 1fr); }
.accounts { --rst-cols: 2fr 1fr 1fr 1fr; }
.entries { --rst-cols: 1fr 1fr 2fr 1.5fr; }
.payments { --rst-cols: 1.2fr 1fr 1fr 2fr; }
.payments small { color: var(--rst-text-muted); display: block; font-size: var(--rst-fs-xs); }
.prices { --rst-cols: 1.2fr 1fr 1fr 1.4fr 1fr 1fr; }
.areas { --rst-cols: 1fr 1fr 2fr; }
/* tokens.css lays out [rst-form-foot] as flex, which outranks the
   hidden attribute; calculator.js hides the button row with it. */
[rst-form-foot][hidden] { display: none; }
.price-usual { margin-top: 0.5rem; }
.book { --rst-cols: 2fr 1fr 0.8fr 0.8fr 0.9fr 1.2fr; }
.postal { font-style: normal; line-height: 1.5; }
.orders { --rst-cols: 1.6fr 2fr 0.9fr 1fr 0.8fr 0.8fr; }
.admin-cards { --rst-cols: 2.4fr 1.8fr 0.6fr 1.1fr 1.1fr; }
.admin-card-name { display: flex; gap: 0.75rem; align-items: center; min-width: 0; }
.admin-card-name > span { min-width: 0; overflow-wrap: anywhere; }
.admin-card-name small { display: block; color: var(--rst-text-muted); font-size: var(--rst-fs-xs); }
.admin-card-name .card-preview.portrait { width: 2.5rem; flex: none; }
.admin-card-name .card-preview.landscape { width: 3.5rem; flex: none; }
.card-print-file { display: block; width: 100%; height: auto; box-shadow: 0 1px 4px rgb(0 0 0 / 0.25); }
.card-words-side { font-size: var(--rst-fs-sm); margin: 1rem 0 0.25rem; }
.card-words-side:first-child { margin-top: 0; }
/* A side's words, as typed: one click takes them all, to copy. */
.card-words { white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; line-height: 1.5; margin: 0; padding: 0.5rem 0.75rem; border: 1px solid var(--rule); border-radius: 6px; user-select: all; -webkit-user-select: all; }
.emails { --rst-cols: 1.2fr 1.2fr 0.8fr 3fr; }
.email-kinds { --rst-cols: 1.2fr 2fr 2fr; }
.email-kinds small { color: var(--rst-text-muted); display: block; font-size: var(--rst-fs-xs); }
/* On a phone the list keeps the name and when it is sent, and the
   sentence about when would not wrap, squeezing the name to a word a
   line. Stack them: the name, then when, wrapping under it. */
@media (max-width: 800px) {
  .email-kinds [rst-lrow] { gap: 0.2rem; grid-template-columns: minmax(0, 1fr); }
  .email-kinds .rst-cell-mut { white-space: normal; }
}
/* An email's HTML version, framed as a mail client would show it: as
   wide as its sheet, and tall enough for most of one at a time. */
.email-frame { display: block; width: 100%; height: 70vh; min-height: 32rem; margin: 1rem 0 0.5rem; border: 1px solid var(--rule); border-radius: 6px; background: #fff; }
.email-body { white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; line-height: 1.5; max-width: 40rem; margin: 1rem 0; }
.emails small { color: var(--rst-text-muted); display: block; font-size: var(--rst-fs-xs); }
.card-list { display: grid; gap: 1rem; }
.card-preview { display: block; max-width: 100%; height: auto; box-shadow: 0 1px 4px rgb(0 0 0 / 0.25); }
.card-preview.portrait { width: 9rem; }
.card-preview.landscape { width: 12rem; }
.order-card { display: flex; gap: 1.25rem; align-items: center; }
.order-card .card-preview.portrait { width: 8rem; }
.order-card .card-preview.landscape { width: 11rem; }
.account-orders { --rst-cols: 1.5fr 1fr 0.8fr 1fr; }

/* On the sheet, a page's heading has no rule under it, and a form has
   no box round it, nor has anything on a narrow sheet, which holds one
   thing: the sheet is the box. */
[rst-page-header] { border-bottom: 0; padding-bottom: 0; }
[rst-box]:has(> [rst-form]),
body[data-sheet="narrow"] [rst-box] { border: 0; padding: 0; background: none; }
/* A confirm page's buttons stand clear of what they confirm. */
[rst-form-actions] { margin-top: 1.5rem; }

/* A form's buttons, as macOS lays out a dialog's: together at its foot,
   aligned right, the primary button on the far right and the others to
   its left (DESIGN.md, Buttons). rastrillo's form foot puts the primary
   first, so it comes first to the keyboard; laid out from the right, it
   is the rightmost. Its confirm form does this already. */
[rst-form-foot] { flex-direction: row-reverse; justify-content: flex-start; flex-wrap: wrap; }

/* The account page: a row for each thing about the account, ruled off
   from the next, its label, what it is, and what to do about it at the
   right; then the orders; then signing out and deleting it, quietly. */
.account-rows { margin: 0 0 2rem; }
.account-rows > div {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr) auto;
  gap: 0.25rem 1.5rem;
  align-items: baseline;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
}
.account-rows > div:last-child { border-bottom: 1px solid var(--rule); }
.account-rows dt { color: var(--on-soft); font-size: 0.9375rem; }
.account-rows dd { margin: 0; }
.account-rows dd small { display: block; color: var(--on-soft); font-size: 0.875rem; margin-top: 0.15rem; }
.account-rows .postal { font-style: normal; }
.account-act { display: flex; flex-direction: column; align-items: flex-end; gap: 0 1rem; text-align: right; }
/* The account's links read as links, but each is a whole target, 44px
   tall, for a finger or an unsteady hand. */
.account-act a, .account-orders-head > a, .account-foot a, .account-link { display: inline-flex; align-items: center; min-height: 2.75rem; }
.account-orders-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 0 0 0.25rem; }
.account-orders-head h2 { margin: 0; font-size: 1.125rem; }
.account-foot { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 2.5rem; padding-top: 0.25rem; border-top: 1px solid var(--rule); font-size: 0.9375rem; }
.account-foot form { display: contents; }
.account-link { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 0.15em; cursor: pointer; }
@media (max-width: 34rem) {
  .account-rows > div { grid-template-columns: minmax(0, 1fr); }
  .account-act { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0 1.5rem; text-align: left; }
}
.account-none { margin: 0; color: var(--on-soft); }

/* Your cards: each card a box, its front centred in a square so tall
   and wide cards line up, its name, its reference and the date it was
   saved, and its actions: Add to cart (with the cart's own icon, solid
   green only for the card just saved), Open, and Delete, quiet. The card
   just saved comes first, the save's notice a green strip in its box.
   On a phone, Add to cart takes the box's width, with Delete and Open
   side by side under it. */
.cards-intro { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin: 0 0 1rem; }
.card-list { display: grid; gap: 1rem; }
.saved-card {
  display: grid;
  grid-template-columns: 9rem 1fr;
  grid-template-areas: "notice notice" "look text" "look actions";
  grid-template-rows: auto auto 1fr;
  gap: 0.75rem 1.25rem;
  align-items: start;
}
.saved-card-notice {
  grid-area: notice;
  display: flex; gap: 0.5rem; align-items: center;
  margin: 0; padding: 0.6rem 0.85rem;
  border-radius: var(--rst-radius);
  background: var(--rst-tone-positive-bg);
  color: var(--rst-tone-positive-fg);
  font-weight: 600;
}
.saved-card-notice .icon { width: 1.25rem; height: 1.25rem; flex: none; }
.saved-card-look {
  grid-area: look;
  display: grid; place-items: center;
  aspect-ratio: 1;
  background: var(--rst-surface-2);
  border-radius: var(--rst-radius);
}
.saved-card-look .card-preview { width: auto; height: auto; max-width: 82%; max-height: 82%; }
/* The button that turns the card in a dialog (card-turn.js) fills the
   square, so the front sits in it as before. */
.saved-card-look .card-turn-open { width: 100%; height: 100%; display: grid; place-items: center; }
.saved-card-text { grid-area: text; min-width: 0; }
.saved-card h2 { margin: 0 0 0.25rem; font-size: 1.125rem; }
.saved-card-meta { margin: 0; color: var(--rst-text-muted); font-size: 0.9375rem; line-height: 1.45; }
.saved-card-actions { grid-area: actions; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.saved-card-actions form { display: contents; }
.saved-card-actions [rst-btn] .icon { width: 1.125rem; height: 1.125rem; }
/* Delete is quiet: no outline until the pointer is on it. */
.saved-card-delete[rst-btn] { border-color: transparent; background: none; color: var(--rst-text-muted); }
.saved-card-delete[rst-btn]:hover { border-color: var(--rst-line-strong); color: var(--rst-text); }
.card-list > [rst-box] { margin: 0; }
/* A page header's one action stands beside the heading, at its top. */
[rst-page-header]:has(> [rst-btn]) { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.75rem 1.5rem; align-items: start; }
@media (max-width: 40rem) {
  /* Make another card, full width under the intro. */
  [rst-page-header]:has(> [rst-btn]) { grid-template-columns: 1fr; }
  [rst-page-header] > [rst-btn] { justify-content: center; }
  .saved-card { grid-template-columns: 6rem 1fr; grid-template-areas: "notice notice" "look text" "actions actions"; grid-template-rows: auto; }
  .saved-card-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .saved-card-add, .saved-card-add > [rst-btn] { grid-column: 1 / -1; }
  .saved-card-add > [rst-btn], .saved-card-actions > [rst-btn] { width: 100%; justify-content: center; }
  .saved-card-delete { order: 1; }
  .saved-card-open { order: 2; }
}

/* The order's postmark, beside its heading, at the angle a hand strikes
   one: the ring and the franking in the chosen vermilion, light and
   dark. Come straight from placing the order, it is pressed down: it
   comes down large and a little turned, lands a touch under its size and
   settles, as a rubber stamp does. With reduced motion it fades in. */
.order-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem 1.5rem; align-items: center; }
.postmark {
  width: 12rem; height: auto;
  margin-inline-end: -0.5rem;
  color: var(--chosen);
  opacity: 0.9;
  rotate: -8deg;
  overflow: visible;
}
.postmark text { fill: currentColor; font-family: var(--sans); font-weight: 750; }
.postmark-ring { font-size: 13px; letter-spacing: 0.16em; }
.postmark-day { font-size: 17px; font-stretch: 78%; letter-spacing: 0.02em; }
.postmark-year { font-size: 13px; font-stretch: 78%; letter-spacing: 0.08em; }
.postmark.stamping { animation: postmark-strike 0.5s cubic-bezier(0.3, 0, 0.2, 1) 0.35s both; }
@keyframes postmark-strike {
  0% { opacity: 0; scale: 1.7; rotate: -15deg; filter: blur(3px); }
  55% { opacity: 0.9; scale: 0.96; rotate: -8deg; filter: none; }
  75% { scale: 1.015; }
  100% { scale: 1; }
}
@media (max-width: 30rem) {
  .postmark { width: 8.5rem; margin-inline-end: -0.25rem; }
}

/* The card just made is laid down in its box, as a sheet laid on a
   table: it comes down a little turned with its shadow wide under it,
   straightens and settles flat. */
.saved-card.laid .card-preview { animation: lay-down 0.65s var(--ease-out) 0.2s both; }
@keyframes lay-down {
  from { translate: 0 -1.1rem; rotate: -5deg; scale: 1.06; box-shadow: 0 1.4rem 1.6rem -0.6rem rgb(0 0 0 / 0.3); }
}

/* A page that is not there: a blank card standing folded, over the
   words. Its front says so in the card's italic, faded, as the card
   page says it of a side with nothing on it. */
@font-face {
  font-family: "EB Garamond";
  src: url(/fonts/eb-garamond-latin-400-italic.woff2) format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}
.blank-card { display: block; width: 12rem; height: auto; margin: 2rem auto -2.5rem; }
.blank-card-ground { fill: rgb(0 0 0 / 0.28); }
.blank-card-word { fill: #23211f; fill-opacity: 0.38; font: italic 400 19px var(--serif); }

@media (prefers-reduced-motion: reduce) {
  .postmark.stamping { animation: fade-in 0.2s ease-out 0.2s both; }
  .saved-card.laid .card-preview { animation: none; }
}
@keyframes fade-in { from { opacity: 0; } }

/* An account, for the admin (admin-account.html): a way back to the
   list, the address as its title and when it joined; its balance, credit
   limit and what is left to spend, side by side in ruled cells; how it
   pays, a ruled row for each thing with what to change at the right;
   then its newest cards, balance entries and emails, each a ruled table
   with a link to the rest; and locking it, last, set off by a rule. */
.acct-back { display: inline-flex; align-items: center; gap: 0.375rem; color: var(--on-soft); font-size: 0.9375rem; }
[rst-page] a.acct-back { color: var(--on-soft); }
[rst-page] a.acct-back:hover { color: var(--on); }
.acct-back .icon, .acct-more .icon { width: 1.125rem; height: 1.125rem; flex: none; }
.acct-head { margin-top: 0.5rem; }
.acct-head [rst-page-header-sub] { margin-top: 0.375rem; color: var(--on-soft); font-size: 0.9375rem; }
.acct-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1px;
  margin: 2rem 0 0;
  padding: 0;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}
.acct-stats [rst-stat] { margin: 0; padding: 1rem 1.25rem; border: 0; background: var(--ground); }
.acct-stats [rst-stat-label] { color: var(--on-soft); font-size: 0.9375rem; text-transform: none; letter-spacing: 0; font-weight: 400; }
.acct-stats [rst-stat-num] {
  margin-top: 0.375rem;
  font: var(--display-weight) 2.1rem/1 var(--display);
  font-stretch: var(--size-stretch);
  font-variant-numeric: tabular-nums;
}
.acct-section { margin-top: 2.75rem; }
.acct-section h2 { margin: 0 0 0.75rem; font: var(--display-weight) 1.375rem/1.2 var(--display); font-stretch: var(--display-stretch); letter-spacing: -0.015em; }
.acct-section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: 0.75rem; }
.acct-section-head h2 { margin: 0; }
.acct-section-head p { margin: 0; color: var(--on-soft); font-size: 0.9375rem; }
.acct-section-head [rst-btn] { gap: 0.5rem; }
.acct-section-head [rst-btn] .icon { width: 1.125rem; height: 1.125rem; }
.acct-count { color: var(--on-soft); font-weight: 400; }
.acct-rows { margin: 0; border-top: 1px solid var(--rule); }
.acct-rows > div {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr) auto;
  gap: 0 1.5rem;
  align-items: baseline;
  align-content: center;
  min-height: 3.25rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--rule);
}
.acct-rows dt { font-weight: 650; }
.acct-rows dd { margin: 0; }
.acct-rows dd small { color: var(--on-soft); font-size: 0.9375rem; }
.acct-rows dd small::before { content: " · "; }
.acct-rows > div > :is(a, .acct-link) { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 650; white-space: nowrap; }
.acct-table { position: relative; overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); }
.acct-table table { width: 100%; min-width: 34rem; border-collapse: collapse; }
.acct-table th { padding: 0.625rem 1rem; color: var(--on-soft); font-size: 0.9375rem; font-weight: 650; text-align: left; }
.acct-table td { padding: 0.625rem 1rem; border-top: 1px solid var(--rule); vertical-align: middle; }
.acct-table td small { display: block; color: var(--on-soft); font-size: 0.875rem; }
.acct-table .admin-card-name small { font-size: 0.875rem; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.acct-table .admin-card-name .card-preview.portrait { width: 2.125rem; }
.acct-table .admin-card-name .card-preview.landscape { width: 3rem; }
.acct-table .acct-date { width: 9rem; }
.acct-num { text-align: right !important; font-variant-numeric: tabular-nums; }
.acct-nowrap { white-space: nowrap; }
.acct-mut { color: var(--on-soft); }
.acct-act { text-align: right; white-space: nowrap; }
.acct-more { display: inline-flex; align-items: center; gap: 0.375rem; margin-top: 0.875rem; font-weight: 650; }
.acct-section [rst-empty] { margin: 0; padding: 1.25rem 1.5rem; border: 1.5px dashed var(--rule); border-radius: 6px; text-align: left; }
.acct-section [rst-empty-body] { margin: 0; color: var(--on-soft); font-size: 0.9375rem; }
.acct-lock {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
}
.acct-lock > div { flex: 1 1 22rem; }
.acct-lock h2 { margin: 0; font-size: 1rem; line-height: 1.2; font-weight: 650; }
.acct-lock p { margin: 0.375rem 0 0; max-width: 32rem; color: var(--on-soft); font-size: 0.9375rem; }
[rst-page] .acct-lock-btn { gap: 0.5rem; border-color: var(--danger); color: var(--danger); }
[rst-page] .acct-lock-btn:hover { border-color: var(--danger); color: var(--danger); }
.acct-lock-btn .icon { width: 1.125rem; height: 1.125rem; }
/* What changes the account opens in a dialog, with no script: the
   buttons that open them read as links, but for Add credit and Lock.
   The dialog rises a little as it opens, and is still with reduced
   motion. Markup's own percentage shows only when Less is picked. */
.acct-link { padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 650; white-space: nowrap; text-decoration: underline; text-underline-offset: 0.15em; cursor: pointer; }
.acct-link:hover { color: var(--chosen); }
.acct-section-head [rst-btn], .acct-lock [rst-btn] { cursor: pointer; }
.acct-dialog {
  width: min(34rem, calc(100% - 2rem));
  max-height: calc(100% - 4rem);
  margin: 8vh auto auto;
  padding: 1.75rem 2rem 2rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--ground);
  color: var(--on);
  box-shadow: 0 1.5rem 3rem rgb(35 33 31 / 0.3);
  font-size: 1.0625rem;
  line-height: 1.5;
}
.acct-dialog::backdrop { background: rgb(23 22 20 / 0.55); }
.acct-dialog[open] { animation: acct-rise 200ms cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes acct-rise { from { opacity: 0; translate: 0 0.75rem; } }
.acct-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.acct-dialog-head h2 { margin: 0.375rem 0; font: var(--display-weight) 1.75rem/1.1 var(--display); font-stretch: var(--display-stretch); letter-spacing: -0.025em; }
.acct-dialog-head p { margin: 0; color: var(--on-soft); font-size: 0.9375rem; }
.acct-dialog-close { flex: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; margin: -0.25rem -0.75rem 0 0; padding: 0; border: 0; border-radius: var(--radius); background: none; color: var(--on); cursor: pointer; }
.acct-dialog-close:hover { background: var(--hover); }
.acct-dialog-close .icon { width: 1.25rem; height: 1.25rem; }
.acct-dialog [rst-field], .acct-dialog [rst-choice] { margin: 1.5rem 0 0; }
.acct-dialog .acct-own [rst-field] { margin-top: 1.25rem; }
.acct-dialog form:not(:has(input[name="use"][value="own"]:checked)) .acct-own { display: none; }
.acct-dialog-points { display: grid; gap: 0.375rem; margin: 1.25rem 0 0; padding-left: 1.25rem; }
.acct-dialog [rst-form-foot] { margin-top: 2rem; }
.acct-dialog [rst-btn~="danger"] { gap: 0.5rem; }
.acct-dialog [rst-btn] .icon { width: 1.125rem; height: 1.125rem; }
@media (max-width: 40rem) {
  .acct-dialog { margin-top: 1rem; padding: 1.25rem 1.25rem 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .acct-dialog[open] { animation: none; }
}

/* On a phone each row of a table is a card of its own: what it is
   across the top, the figures under it in pairs, each with its label,
   and what to do with it last. */
@media (max-width: 40rem) {
  .acct-rows > div { grid-template-columns: minmax(0, 1fr) auto; padding-top: 0.625rem; }
  .acct-rows dt { grid-column: 1 / -1; }
  .acct-table table { min-width: 0; }
  .acct-table thead { display: none; }
  .acct-table table, .acct-table tbody { display: block; }
  .acct-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1rem; padding: 0.875rem 1rem; }
  .acct-table tr + tr { border-top: 1px solid var(--rule); }
  .acct-table td { display: block; padding: 0; border: 0; text-align: left !important; }
  .acct-table td[data-label]::before { content: attr(data-label); display: block; color: var(--on-soft); font-size: 0.8125rem; font-weight: 650; }
  .acct-table .acct-wide { grid-column: 1 / -1; }
  .acct-table td.acct-wide:not(.acct-act) { order: -1; }
}

/* The admin's order page (admin-order.html), on the account page's
   bones (acct-): where the order is, as four steps joined by a line,
   solid as far as it has got, with Prodigi's own steps set in under
   printing; its cards, a tile each; its money in three figures; where
   it went beside its details; what happened, a ruled row an event; and
   its emails. What's long, the money's breakdown, Prodigi's details and
   each event's, opens in a dialog, as do withholding and refusing. */
.ord-title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.875rem; }
.ord-title h1 { margin: 0; }
.ord-ref { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.ord-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 1.25rem; }
.ord-head [rst-btn] { cursor: pointer; }
.ord-head-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ord-head [rst-page-header-sub] a { color: inherit; }
.ord-head [rst-status], .ord-section [rst-status] { min-height: 1.75rem; padding: 0 0.75rem; font-size: 0.875rem; font-weight: 650; }
.ord-head [rst-status][rst-tone~="warning"] { background: var(--chosen); color: var(--chosen-ink); }
.ord-head [rst-status][rst-tone~="positive"] { background: var(--go); color: var(--go-ink); }
.ord-section { padding-top: 1.75rem; border-top: 1px solid var(--rule); }
.ord-section h3 { margin: 0; font-size: 1.0625rem; font-weight: 750; }

.ord-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 1.25rem 0 0; padding: 0; list-style: none; }
.ord-step { position: relative; display: grid; gap: 0.5rem; align-content: start; padding-right: 0.5rem; line-height: 1.25; }
.ord-step:not(:last-child)::after { content: ""; position: absolute; left: 2.5rem; right: 0.5rem; top: calc(1rem - 1px); border-top: 2px dashed var(--rule); }
.ord-step[data-tone="positive"]:not(:last-child)::after { border-top-style: solid; border-top-color: var(--on); }
.ord-mark { display: inline-grid; place-items: center; width: 2rem; height: 2rem; box-sizing: border-box; border: 2px dashed var(--rule); border-radius: 50%; color: var(--on-soft); }
.ord-mark .icon { width: 1.125rem; height: 1.125rem; stroke-width: 3; }
.ord-step[data-tone="positive"] .ord-mark { border: 0; background: var(--on); color: var(--ground); }
.ord-step[data-tone="warning"] .ord-mark { border: 0; background: var(--chosen); }
.ord-step[data-tone="warning"] .ord-mark::before { content: ""; width: 0.625rem; height: 0.625rem; border-radius: 50%; background: var(--chosen-ink); }
.ord-step[data-tone="negative"] .ord-mark { border: 0; background: var(--danger); color: #fff; }
.ord-step-name { font-size: 1.0625rem; font-weight: 650; }
.ord-step-name span, .ord-step-when { color: var(--on-soft); font-size: 0.875rem; font-weight: 400; }
.ord-step[data-tone="warning"] .ord-step-name { color: var(--chosen); }

/* Prodigi's steps, in a box hung from printing's mark by a short line. */
.ord-within { position: relative; display: grid; gap: 0.875rem; margin: 1.75rem 0 0 calc(25% + 0px); padding: 1.125rem 1.25rem; border: 1.5px solid var(--chosen); border-radius: var(--radius); }
.ord-within::before { content: ""; position: absolute; left: calc(1rem - 1px); top: calc(-1.25rem - 1.5px); height: 1.25rem; border-left: 2px solid var(--chosen); }
.ord-within-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 0.75rem; }
.ord-within-head h3 { font-size: 1rem; font-weight: 650; }
.ord-within-head h3 span, .ord-within-head p { color: var(--on-soft); font-size: 0.875rem; font-weight: 400; }
.ord-within-head p { margin: 0; }
.ord-within ul { display: flex; flex-wrap: wrap; gap: 0.625rem 1rem; margin: 0; padding: 0; list-style: none; }
.ord-within li { display: grid; gap: 0.25rem; justify-items: start; min-width: 9rem; }
.ord-within li > span { padding-left: 0.25rem; color: var(--on-soft); font-size: 0.8125rem; }

.ord-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.ord-cards > li { display: flex; flex-direction: column; gap: 0.875rem; padding: 1.25rem; border: 1px solid var(--rule); border-radius: var(--radius); }
.ord-cards > li > [rst-status] { align-self: flex-start; }
.ord-card-look { display: grid; place-items: center; min-height: 10.5rem; padding: 0.75rem 0 0.25rem; }
.ord-card-look .card-preview.portrait { width: 7.5rem; }
.ord-card-look .card-preview.landscape { width: 10.5rem; }
.ord-card-look span { color: var(--on-soft); font-size: 0.875rem; text-align: center; }
.ord-card-name { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 0.5rem; }
.ord-card-name h3 { font-size: 1.125rem; }
.ord-card-name span { color: var(--on-soft); font-size: 0.875rem; }
.ord-card-facts, .ord-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.25rem 0.75rem; margin: 0; font-size: 0.875rem; }
.ord-card-facts dt, .ord-facts dt { color: var(--on-soft); }
.ord-card-facts dd, .ord-facts dd { margin: 0; overflow-wrap: anywhere; }
.ord-card-acts { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: auto; }
.ord-card-acts [rst-btn] { cursor: pointer; }
.ord-refuse { margin: 1rem 0 0; color: var(--on-soft); font-size: 0.9375rem; }
.ord-refuse .acct-link { color: var(--danger); font-weight: 650; }
.ord-refuse .acct-link:hover { color: var(--danger); }

.ord-money.acct-stats { margin-top: 0; }
.ord-money [rst-stat-note] { display: block; margin-top: 0.375rem; color: var(--on-soft); font-size: 0.875rem; }

.ord-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3rem; }
.ord-two [rst-detail] { margin: 0; }

.ord-section .acct-section-head form { margin: 0; }
.ord-section .acct-section-head [rst-btn] { cursor: pointer; }
.ord-events, .ord-emails { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--rule); }
.ord-event { display: grid; grid-template-columns: 11.5rem 10rem minmax(0, 1fr) auto; gap: 0.375rem 1.25rem; align-items: center; padding: 0.75rem 0 0.75rem 0.75rem; border-top: 1px solid var(--rule); }
.ord-event > time, .ord-emails time { color: var(--on-soft); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.ord-event .event-kind { display: flex; flex-wrap: wrap; gap: 0.35rem 0.5rem; align-items: center; }
/* What went to Prodigi and what it answered, set apart from the app's
   own events by a rule down its left as well as its badge. */
.ord-event.event-from-prodigi, .ord-event.event-to-prodigi { box-shadow: inset 3px 0 0 var(--rule); }
.ord-event-sum { min-width: 0; font-size: 0.9375rem; overflow-wrap: anywhere; }
.ord-event-act [rst-btn] { cursor: pointer; }
.ord-emails li { display: grid; grid-template-columns: 11.5rem minmax(0, 1fr) auto; gap: 0.375rem 1.25rem; align-items: baseline; padding: 0.75rem 0; border-top: 1px solid var(--rule); font-size: 0.9375rem; }
.ord-emails li > span { min-width: 0; overflow-wrap: anywhere; }

/* The dialogs: the wide ones hold Prodigi's details and an event's,
   JSON and all, scrolled within. */
.acct-dialog.ord-dialog-wide { width: min(46rem, calc(100% - 2rem)); }
.ord-dialog-sub { margin: 1.5rem 0 0.5rem; font-size: 1rem; font-weight: 750; }
.acct-dialog [rst-detail] { margin: 0; font-size: 0.9375rem; }
/* The money's breakdown: a ruled row a figure, the figures to the right. */
#dlg-money [rst-detail] { grid-template-columns: minmax(0, 1fr) auto; gap: 0; }
#dlg-money [rst-detail] dt, #dlg-money [rst-detail] dd { padding: 0.45rem 0; border-top: 1px solid var(--rule); font-size: 0.9375rem; font-weight: 400; }
#dlg-money [rst-detail] dt { padding-right: 1rem; }
#dlg-money [rst-detail] dd { text-align: right; font-variant-numeric: tabular-nums; }
.acct-dialog .ord-facts { margin-top: 1.25rem; font-size: 0.9375rem; gap: 0.5rem 1rem; }
.ord-dialog-note { margin: 1rem 0 0; color: var(--on-soft); font-size: 0.9375rem; }
.ord-json { max-height: 22rem; margin: 0; padding: 0.875rem 1rem; overflow: auto; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--rst-surface); font: 0.8125rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; tab-size: 2; }
.ord-warn { display: flex; gap: 0.5rem; align-items: flex-start; margin: 1.25rem 0 0; font-size: 0.9375rem; font-weight: 650; }
.ord-warn .icon { flex: none; width: 1.125rem; height: 1.125rem; margin-top: 0.125rem; }

@media (max-width: 52rem) {
  .ord-two { grid-template-columns: 1fr; }
  .ord-event { grid-template-columns: minmax(0, 1fr) auto; }
  .ord-event .ord-event-sum { grid-column: 1 / -1; }
  .ord-event .ord-event-act { grid-column: 2; grid-row: 1 / span 2; }
}
@media (max-width: 40rem) {
  .ord-steps { grid-template-columns: 1fr; gap: 1rem; }
  .ord-step { grid-template-columns: 2rem 1fr; column-gap: 0.75rem; row-gap: 0.1rem; padding: 0; }
  .ord-mark { grid-row: span 2; }
  .ord-step:not(:last-child)::after { left: calc(1rem - 1px); right: auto; top: 2rem; bottom: -1rem; border-top: 0; border-left: 2px dashed var(--rule); }
  .ord-step[data-tone="positive"]:not(:last-child)::after { border-left-style: solid; border-left-color: var(--on); }
  .ord-within { margin-left: 0; }
  .ord-within::before { display: none; }
  .ord-emails li { grid-template-columns: minmax(0, 1fr) auto; }
  .ord-emails li > span { grid-column: 1 / -1; grid-row: 2; }
}

/* The discount codes (admin-discounts.html): a notice with the link of
   a code just made; search and a filter of states; and the codes as a
   table, each with its link to copy, its uses on a meter, and how long
   it has left. On a narrow screen each code is a card of its own. */
.made-notice { align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; }
.made-notice [rst-callout-body] { flex: 1 1 0; min-width: 0; }
.made-notice [rst-callout-body] p { margin: 0; }
.made-notice .copy-link { background: var(--ground); }
.made-dismiss { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: var(--radius); color: var(--on); }
.made-dismiss:hover { background: var(--hover); }
.made-dismiss .icon { width: 1.375rem; height: 1.375rem; }
.copy-link { gap: 0.5rem; white-space: nowrap; }
.copy-link .icon { width: 1.125rem; height: 1.125rem; }
.code-url { color: var(--on-soft); font-size: var(--rst-fs-xs); font-weight: 400; overflow-wrap: anywhere; }
.code-url[hidden] { display: none; }
/* Making a code (admin-discount.html): Regenerate sits on the code's
   own line, after its input, with the label above and the hint below
   both running the width of the two. */
.code-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 0.75rem; align-items: center; margin: var(--rst-sp-4) 0; }
.code-field > [rst-field] { display: contents; }
.code-field [rst-field-label], .code-field [rst-field-hint], .code-field [rst-field-error] { grid-column: 1 / -1; }
.code-field [rst-input] { grid-column: 1; }
.code-regenerate { grid-column: 2; grid-row: 2; align-self: stretch; gap: 0.5rem; white-space: nowrap; }
.code-regenerate .icon { width: 1.125rem; height: 1.125rem; }
/* The page's primary action, as the card page's: ink, not green. */
[rst-page-header] > [rst-btn~="primary"][href="/admin/discounts/new"] { background: var(--action); border-color: var(--action); color: var(--action-ink); }
[rst-page-header] > [rst-btn~="primary"][href="/admin/discounts/new"]:hover { background: var(--action-hover); border-color: var(--action-hover); opacity: 1; }
[rst-page-header]:has(> [href="/admin/discounts/new"]) { padding-bottom: 1.75rem; margin-bottom: 2rem; border-bottom: 1px solid var(--rule); }

.code-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 2.75rem; align-items: end; margin-bottom: 1.25rem; }
.tool-label { display: block; margin: 0 0 0.6rem; font-weight: 700; }
.code-search form { margin: 0; }
.code-search-box { position: relative; display: flex; align-items: center; }
.code-search-box > .icon { position: absolute; left: 1rem; width: 1.25rem; height: 1.25rem; color: var(--on-soft); pointer-events: none; }
.code-search-box input { width: 100%; min-height: 2.9rem; padding-left: 2.85rem; padding-right: 2.75rem; }
.code-search-clear { position: absolute; right: 0.4rem; display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: var(--radius); color: var(--on-soft); }
.code-search-clear:hover { background: var(--hover); color: var(--on); }
.code-search-clear .icon { width: 1.1rem; height: 1.1rem; }
.code-show { margin: 0; }
.code-show ul { display: flex; margin: 0; padding: 0; list-style: none; border: 1.5px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.code-show li + li { border-left: 1.5px solid var(--rule); }
.code-show a { display: flex; align-items: center; gap: 0.45rem; min-height: 2.75rem; padding: 0 1.1rem; color: var(--on); font-weight: 700; text-decoration: none; white-space: nowrap; }
.code-show a:hover { background: var(--hover); }
.code-show a[aria-current] { background: var(--chosen); color: var(--chosen-ink); }
.code-show a .icon { width: 1.1rem; height: 1.1rem; }
.code-show-count { color: var(--on-soft); font-weight: 600; font-variant-numeric: tabular-nums; }
.code-show a[aria-current] .code-show-count { color: inherit; opacity: 0.8; }

.codes-card { border: 1.5px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.codes { width: 100%; border-collapse: collapse; }
.codes thead th { padding: 1rem 1.5rem; background: var(--rst-surface-2); border-bottom: 1px solid var(--rst-line); color: var(--on-soft); font-size: var(--rst-fs-sm); font-weight: 650; text-align: left; }
.codes tbody tr + tr > * { border-top: 1px solid var(--rst-line); }
.codes tbody th, .codes td { padding: 1.5rem 1rem; text-align: left; vertical-align: middle; font-weight: 400; }
.codes thead th { padding-inline: 1rem; }
.codes tr > :first-child { padding-left: 1.5rem; }
.codes tr > :last-child { padding-right: 1.5rem; }
.codes td small { display: block; margin-top: 0.15rem; color: var(--on-soft); font-size: var(--rst-fs-sm); }
.code-name { display: grid; justify-items: start; gap: 0.75rem; }
.code { font-weight: 800; font-size: 1.125rem; letter-spacing: 0.04em; white-space: nowrap; }
.codes td:not([data-label="Last day"]), .code-actions [rst-btn] { white-space: nowrap; }
.code-used [rst-meter] { display: flex; flex-direction: column-reverse; align-items: stretch; gap: 0.6rem; width: 7.5rem; color: var(--on); font-size: inherit; }
.code-used [rst-meter-bar], .code-used [rst-meter-bar]::-webkit-meter-bar { block-size: 5px; background: var(--stack-2); }
.code-used [rst-meter-bar]::-webkit-meter-optimum-value, .code-used [rst-meter-bar]::-moz-meter-bar { background: var(--on); }
.code-actions { text-align: right !important; }
.codes-count { margin: 1rem 0 0; color: var(--on-soft); }

@media (max-width: 800px) {
  .code-tools { grid-template-columns: minmax(0, 1fr); }
  .code-show ul { display: grid; grid-template-columns: 1fr 1fr; }
  .code-show li + li { border-left: 0; }
  .code-show li:nth-child(even) { border-left: 1.5px solid var(--rule); }
  .code-show li:nth-child(n + 3) { border-top: 1.5px solid var(--rule); }
  .code { white-space: normal; overflow-wrap: anywhere; }
  .codes thead { display: none; }
  .codes, .codes tbody, .codes tr { display: block; }
  .codes tr { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; padding: 1.25rem; }
  .codes tbody tr + tr { border-top: 1px solid var(--rst-line); }
  .codes tbody tr + tr > * { border-top: 0; }
  .codes tbody th, .codes td { display: block; padding: 0; }
  .codes tbody th, .codes .code-actions { grid-column: 1 / -1; }
  .codes tr > :first-child, .codes tr > :last-child { padding-inline: 0; }
  .codes td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 0.25rem; color: var(--on-soft); font-size: var(--rst-fs-xs); font-weight: 650; }
  .code-actions { text-align: left !important; }
  .code-actions:empty { display: none; }
  /* The words first, beside the ✕; the button under them. */
  .made-notice { flex-wrap: wrap; }
  .made-notice [rst-callout-body] { flex-basis: calc(100% - 5.5rem); }
  .made-dismiss { order: 3; }
  .made-notice .copy-link { order: 4; margin-left: 1.85rem; }
}

/* Sharing a card (share.go). Its share page: the card's front beside its
   link, or the form to make one. */
.share-card { display: flex; gap: 1.5rem; align-items: flex-start; }
.share-card .card-preview { flex: 0 0 auto; width: 8rem; height: auto; }
.share-card .card-preview.landscape { width: 11rem; }
.share-card-text { flex: 1 1 0; min-width: 0; }
.share-card-text > p:first-child { margin-top: 0; }
.share-url { font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 40rem) {
  .share-card { flex-direction: column; }
}
/* A shared card's page: the card standing, as the home page's sample
   stands (home.css), and under it, saving a copy. A wide card's sheet,
   opened out, is taller than it is wide. */
/* Doubled, to win over home.css's own margin for the sample, which
   comes after this. */
.home-sample.shared-card { margin: 0 auto 1.5rem; }
/* Standing, a wide card fills the middle of it: the rest is drawn
   over by what is round it. */
.shared-card .sheet[data-shape="landscape"] { aspect-ratio: 0.7; width: 70%; margin-block: -12%; }
.shared-card .sheet[data-size="6x4"][data-shape="portrait"] { aspect-ratio: 1.3333; }
.shared-card .sheet[data-size="6x4"][data-shape="landscape"] { aspect-ratio: 0.75; }
.shared-card .sheet[data-size="square"] { aspect-ratio: 2; }
.shared-save { max-width: 36rem; margin-inline: auto; text-align: center; }
.shared-save p { margin-block: 0 0.75rem; }
.shared-save-note, .share-note { color: var(--on-soft); font-size: var(--rst-fs-sm); }
