/*
 * The account console.
 *
 * Bright, light and colourful — a different room from the shop, which is dark
 * and quiet and about looking at watches. This is where somebody does things:
 * fills a form in, checks where a watch has got to, changes a password. It
 * should feel quick and open rather than reverent.
 *
 * Written by hand rather than assembled from Tailwind utilities, for a reason
 * that is not taste: Tailwind scans src/, not php/, so a utility used only in a
 * PHP file does not exist — it fails silently and leaves an element with no
 * background. A stylesheet of our own is not subject to that, and it lets these
 * screens be designed rather than approximated.
 *
 * The house's gold, ivory and onyx stay for what is the house's: the monogram,
 * the name, the serif headings. Everything else here is its own palette,
 * because a console painted entirely in a luxury brand's colours reads as a
 * brochure, and nobody wants to do their admin in a brochure.
 */

/* ------------------------------------------------------------------ paint */

.console-page {
  --ink: #101828;
  --ink-soft: #667085;
  --ink-faint: #98a2b3;

  --pane: #fff;
  --ground: #f6f8fb;
  --sunken: #f2f5f9;
  --line: #e6ebf2;
  --line-soft: #eef2f7;

  /* The accent: a fresh green that goes teal. Everything primary uses it. */
  --go: #12b981;
  --go-deep: #059669;
  --go-lift: #34d399;
  --go-wash: #e7f9f1;

  /* The category colours. Far enough apart to tell at a glance, pale enough
     that six of them on one screen is cheerful rather than loud. */
  --sky: #0ea5e9;      --sky-wash: #e4f4fe;
  --violet: #7c5cfc;   --violet-wash: #eeeaff;
  --coral: #f97316;    --coral-wash: #fff0e3;
  --rose: #f43f5e;     --rose-wash: #ffe9ed;
  --lemon: #eab308;    --lemon-wash: #fdf5da;

  --radius: 24px;
  --radius-sm: 16px;
  --radius-xs: 12px;

  /* Shadows are tinted, not grey. Grey shadows on a coloured ground look like
     dirt under the card. */
  --lift: 0 10px 30px -12px rgb(16 24 40 / 0.1), 0 2px 6px -2px rgb(16 24 40 / 0.05);
  --lift-high: 0 22px 48px -20px rgb(16 24 40 / 0.18), 0 4px 10px -4px rgb(16 24 40 / 0.06);

  font-family: var(--font-sans, ui-sans-serif, system-ui, sans-serif);
  color: var(--ink);
  background: var(--ground);
  min-height: 100vh;
  position: relative;
  isolation: isolate;
}

/*
 * Two washes of colour behind everything.
 *
 * The reference's blobs, at a volume a form can be read on top of. They are
 * fixed rather than scrolled: a gradient that slides up the page turns a long
 * form into a fairground.
 */
.console-page::before,
.console-page::after {
  content: '';
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}

.console-page::before {
  top: -14rem;
  right: -10rem;
  width: 44rem;
  height: 34rem;
  background: radial-gradient(circle at 30% 30%, rgb(52 211 153 / 0.5), rgb(14 165 233 / 0.22) 55%, transparent 72%);
}

.console-page::after {
  bottom: -18rem;
  left: -12rem;
  width: 40rem;
  height: 32rem;
  /* Green, like the one at the top right, but paler and cooler so the two are
     not one flat field of colour across the whole page. */
  background: radial-gradient(circle at 60% 40%, rgb(134 239 172 / 0.42), rgb(45 212 191 / 0.2) 55%, transparent 72%);
}

@media (prefers-reduced-motion: no-preference) {
  .console-page::before { animation: drift 22s ease-in-out infinite alternate; }
  .console-page::after  { animation: drift 28s ease-in-out infinite alternate-reverse; }
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-3rem, 2rem, 0) scale(1.08); }
}

/* ------------------------------------------------------------------ shell */

.console-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 88rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 4rem;
}

@media (min-width: 64rem) {
  .console-shell {
    flex-direction: row;
    gap: 1.75rem;
    padding: 1.75rem 2rem 5rem;
  }
}

.console-main { min-width: 0; flex: 1; }

/* ------------------------------------------------------------------- rail */

.rail {
  flex-shrink: 0;
  padding: 1.1rem;
  border-radius: var(--radius);
  background: rgb(255 255 255 / 0.78);
  backdrop-filter: blur(18px);
  border: 1px solid rgb(255 255 255 / 0.9);
  box-shadow: var(--lift);
}

@media (min-width: 64rem) {
  .rail {
    width: 16.5rem;
    position: sticky;
    top: 1.75rem;
    align-self: flex-start;
  }
}

.rail-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.25rem 0.35rem 0;
  text-decoration: none;
  color: inherit;
}

.rail-brand span {
  font-family: var(--font-label, inherit);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Who you are, at the top of the rail. */
.rail-who {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0.7rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--go-wash), var(--sky-wash));
}

.rail-who .who-name {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
}

.rail-who .who-mail {
  margin: 0.1rem 0 0;
  font-size: 0.74rem;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-who > div { min-width: 0; }

/* The initial, on a gradient disc. */
.avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 14px;
  background: linear-gradient(140deg, var(--go-lift), var(--go-deep));
  color: #fff;
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.25rem;
  line-height: 1;
  box-shadow: 0 8px 18px -8px rgb(5 150 105 / 0.75);
}

.avatar.big {
  width: 4rem;
  height: 4rem;
  border-radius: 20px;
  font-size: 1.75rem;
}

.rail-nav {
  display: flex;
  gap: 0.25rem;
  margin-top: 1rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.rail-nav::-webkit-scrollbar { display: none; }

@media (min-width: 64rem) {
  .rail-nav { flex-direction: column; overflow: visible; }
}

.rail-nav a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-xs);
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.rail-nav a:hover { background: var(--sunken); color: var(--ink); }

.rail-nav a[aria-current] {
  background: linear-gradient(120deg, var(--go-wash), var(--sky-wash));
  color: var(--ink);
  font-weight: 600;
}

.rail-nav a[aria-current] svg { color: var(--go-deep); }
.rail-nav svg { flex-shrink: 0; color: var(--ink-faint); transition: color 0.2s; }
.rail-nav a:hover svg { color: var(--ink); }

.rail-foot {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line-soft);
  display: grid;
  gap: 0.15rem;
}

.rail-foot a,
.rail-foot button {
  display: block;
  width: 100%;
  padding: 0.5rem 0.8rem;
  border: 0;
  border-radius: var(--radius-xs);
  background: none;
  font: inherit;
  font-size: 0.78rem;
  text-align: left;
  color: var(--ink-soft);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.rail-foot a:hover { background: var(--sunken); color: var(--ink); }
.rail-foot button:hover { background: var(--rose-wash); color: #be123c; }

/* ------------------------------------------------------------------- page */

.console { display: grid; gap: 1.25rem; }

.page-head { display: grid; gap: 0.4rem; }

.page-head h1 {
  margin: 0;
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(1.7rem, 1.3rem + 1.5vw, 2.2rem);
  line-height: 1.1;
}

.page-head p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------------- hero */

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  background:
    linear-gradient(120deg, rgb(255 255 255 / 0.92), rgb(255 255 255 / 0.7)),
    linear-gradient(120deg, var(--go-wash) 0%, var(--sky-wash) 45%, var(--violet-wash) 100%);
  border: 1px solid #fff;
  box-shadow: var(--lift);
}

.hero-who { flex: 1 1 15rem; min-width: 0; }

.hero-who h1 {
  margin: 0;
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2rem);
  line-height: 1.15;
}

.hero-who p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

/* A small rounded label — "Member since August 2026". */
.pill {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.85);
  font-size: 0.72rem;
  color: var(--ink-soft);
}

/*
 * How complete the account is, as a ring.
 *
 * A number on its own ("60%") invites the question "of what?", so the ring is
 * paired with the count it came from.
 */
.meter {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.meter figure {
  position: relative;
  display: grid;
  place-items: center;
  width: 4.6rem;
  height: 4.6rem;
  margin: 0;
  border-radius: 50%;
  background: conic-gradient(var(--go) calc(var(--done, 0) * 1%), rgb(255 255 255 / 0.7) 0);
}

.meter figure::after {
  content: '';
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #fff;
}

.meter figure b {
  position: relative;
  z-index: 1;
  font-size: 1rem;
  font-weight: 600;
  color: var(--go-deep);
}

.meter div {
  max-width: 9rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------------ tiles */

.tiles {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.tile {
  display: block;
  padding: 1.25rem;
  border-radius: var(--radius);
  background: var(--pane);
  border: 1px solid var(--line-soft);
  box-shadow: var(--lift);
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s, box-shadow 0.3s;
}

a.tile:hover { transform: translateY(-3px); box-shadow: var(--lift-high); }

.tile b {
  display: block;
  margin-top: 1rem;
  font-family: var(--font-display, Georgia, serif);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.tile span {
  display: block;
  margin-top: 0.45rem;
  font-family: var(--font-label, inherit);
  font-size: 0.64rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* The coloured square an icon sits in. */
.chip {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 14px;
}

.chip.go     { background: var(--go-wash);     color: var(--go-deep); }
.chip.sky    { background: var(--sky-wash);    color: var(--sky); }
.chip.violet { background: var(--violet-wash); color: var(--violet); }
.chip.coral  { background: var(--coral-wash);  color: var(--coral); }
.chip.rose   { background: var(--rose-wash);   color: var(--rose); }
.chip.lemon  { background: var(--lemon-wash);  color: #a16207; }

/* A tile can carry its colour on the whole card rather than just the chip. */
.tile.tinted.go     { background: linear-gradient(150deg, var(--go-wash), #fff 78%); }
.tile.tinted.sky    { background: linear-gradient(150deg, var(--sky-wash), #fff 78%); }
.tile.tinted.violet { background: linear-gradient(150deg, var(--violet-wash), #fff 78%); }
.tile.tinted.coral  { background: linear-gradient(150deg, var(--coral-wash), #fff 78%); }

/* ------------------------------------------------------------------ cards */

.card {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--pane);
  border: 1px solid var(--line-soft);
  box-shadow: var(--lift);
}

.card > h2,
.panel h2 {
  margin: 0;
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.3rem;
  line-height: 1.2;
}

.card > h2 + p,
.panel h2 + p {
  margin: 0.45rem 0 0;
  max-width: 46rem;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.card h3 { margin: 0; font-size: 0.95rem; font-weight: 600; }

.card h3 + p {
  margin: 0.35rem 0 0;
  max-width: 46rem;
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.card h3.spaced { margin-top: 1.5rem; }

.card .fine {
  margin: 0.85rem 0 0;
  max-width: 46rem;
  font-size: 0.79rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.card hr {
  border: 0;
  border-top: 1px solid var(--line-soft);
  margin: 1.5rem 0;
}

/* A card with its heading beside an icon. */
.card-lead {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.card-lead > div { min-width: 0; }

.pair {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
}

.split {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.5fr 1fr;
}

@media (max-width: 60rem) { .split { grid-template-columns: 1fr; } }

.card.danger {
  border-color: #fecdd3;
  background: linear-gradient(150deg, var(--rose-wash), #fff 70%);
}

.card.danger > h2 { color: #be123c; }

/* --------------------------------------------------------- a dark panel */

/*
 * One dark thing per screen at most.
 *
 * It marks the panel whose subject is the account itself rather than the
 * watches — the change of ground says so without a caption.
 */
.panel-dark {
  position: relative;
  overflow: hidden;
  padding: 1.5rem;
  border-radius: var(--radius);
  background:
    radial-gradient(110% 130% at 100% 0%, rgb(52 211 153 / 0.3) 0%, transparent 55%),
    radial-gradient(90% 120% at 0% 100%, rgb(124 92 252 / 0.28) 0%, transparent 55%),
    #16203a;
  color: #eef2f7;
  box-shadow: var(--lift-high);
}

.panel-dark h2 { color: #fff; }

.panel-dark dl { margin: 1.15rem 0 0; display: grid; }

.panel-dark dl > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.62rem 0;
  border-bottom: 1px solid rgb(238 242 247 / 0.12);
  font-size: 0.85rem;
}

.panel-dark dl > div:last-child { border-bottom: 0; }
.panel-dark dt { color: rgb(238 242 247 / 0.6); }
.panel-dark dd { margin: 0; text-align: right; overflow-wrap: anywhere; }

.panel-dark .hint {
  margin: 1rem 0 0;
  font-size: 0.76rem;
  line-height: 1.6;
  color: rgb(238 242 247 / 0.55);
}

/* -------------------------------------------------------------- the bars */

.panel {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--pane);
  border: 1px solid var(--line-soft);
  box-shadow: var(--lift);
}

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

.bars li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem 0.75rem;
  align-items: center;
  font-size: 0.85rem;
}

.bars b { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-soft); }

.bars i {
  grid-column: 1 / -1;
  height: 8px;
  border-radius: 999px;
  background: var(--sunken);
  overflow: hidden;
}

.bars i::before {
  content: '';
  display: block;
  height: 100%;
  width: calc(var(--at, 0) * 1%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sky), var(--violet));
  transition: width 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.bars li.done i::before { background: linear-gradient(90deg, var(--go-lift), var(--go-deep)); }

/* ------------------------------------------------------------------ forms */

.fields {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin-top: 1.3rem;
}

.fields.wide { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.fields.one  { grid-template-columns: 1fr; }

.field { display: block; min-width: 0; }

.field > span {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink);
}

.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  margin-top: 0.45rem;
  padding: 0 0.9rem;
  height: 2.85rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--line);
  background: var(--sunken);
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.field textarea { height: auto; padding: 0.7rem 0.9rem; line-height: 1.6; resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--go);
  background: #fff;
  /* A ring rather than a heavier border, so the field does not shift by a pixel
     when it takes focus. */
  box-shadow: 0 0 0 4px rgb(18 185 129 / 0.14);
}

.field input::placeholder { color: var(--ink-faint); }

.field em {
  display: block;
  margin-top: 0.4rem;
  font-style: normal;
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.check {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-top: 1.3rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-xs);
  background: var(--sunken);
  font-size: 0.9rem;
  line-height: 1.6;
  cursor: pointer;
}

.check input {
  margin-top: 0.15rem;
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  accent-color: var(--go-deep);
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding: 0 1.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--go-lift), var(--go-deep));
  color: #fff;
  font-family: var(--font-label, inherit);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 22px -12px rgb(5 150 105 / 0.9);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
}

.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 26px -12px rgb(5 150 105 / 0.95); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; box-shadow: none; }

.btn.ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
  box-shadow: none;
}

.btn.ghost:hover { border-color: var(--ink-faint); background: var(--sunken); transform: none; }

.btn.on-dark {
  background: rgb(255 255 255 / 0.1);
  color: #fff;
  border-color: rgb(255 255 255 / 0.28);
  box-shadow: none;
}

.btn.on-dark:hover { background: rgb(255 255 255 / 0.18); transform: none; }

.btn.warn {
  background: #fff;
  color: #be123c;
  border-color: #fecdd3;
  box-shadow: none;
}

.btn.warn:hover { background: #e11d48; color: #fff; border-color: #e11d48; transform: none; }

.btn.small { height: 2.3rem; padding: 0 1rem; font-size: 0.62rem; }

.actions { margin-top: 1.3rem; display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* -------------------------------------------------------------- responses */

.said {
  margin: 1.1rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-xs);
  font-size: 0.86rem;
  line-height: 1.6;
}

.said.good { background: var(--go-wash); color: var(--go-deep); }
.said.bad  { background: var(--rose-wash); color: #be123c; }

/* ----------------------------------------------------------------- lists */

.rows { list-style: none; margin: 1.3rem 0 0; padding: 0; display: grid; gap: 0.7rem; }

.rows > li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft);
  background: var(--pane);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.rows > li:hover { border-color: var(--line); box-shadow: var(--lift); }
.rows > li.off { opacity: 0.6; }
.rows .what { min-width: 0; flex: 1 1 14rem; }

.rows .ref {
  margin: 0;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.68rem;
  color: var(--ink-faint);
}

.rows .name { margin: 0.15rem 0 0.45rem; font-size: 0.95rem; font-weight: 500; }
.rows .meta { margin: 0.2rem 0 0; font-size: 0.79rem; color: var(--ink-soft); }
.rows form { margin: 0; }

/* A whole row that is a link. */
a.row-link { text-decoration: none; color: inherit; display: block; }

.state {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-family: var(--font-label, inherit);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--sunken);
  color: var(--ink-soft);
}

.state.live { background: var(--lemon-wash); color: #a16207; }
.state.won  { background: var(--go-wash);    color: var(--go-deep); }
.state.no   { background: var(--rose-wash);  color: #be123c; }
.state.sky  { background: var(--sky-wash);   color: #0369a1; }

.note-quiet {
  max-width: 15rem;
  text-align: right;
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--ink-faint);
}

/* ------------------------------------------------------------ empty state */

.empty {
  margin-top: 1.3rem;
  padding: 2.5rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line);
  background: var(--sunken);
  text-align: center;
}

.empty h3 {
  margin: 0;
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.15rem;
  font-weight: 400;
}

.empty p {
  margin: 0.5rem auto 0;
  max-width: 28rem;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.empty .actions { justify-content: center; }

/* ----------------------------------------------------------------- steps */

.steps { list-style: none; margin: 1.3rem 0 0; padding: 0; }

.steps li {
  position: relative;
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 1rem;
  padding-bottom: 1.5rem;
}

.steps li:last-child { padding-bottom: 0; }

.steps li::before {
  content: '';
  position: absolute;
  top: 2.1rem;
  bottom: 0;
  left: 0.94rem;
  width: 2px;
  background: var(--line);
}

.steps li:last-child::before { display: none; }
.steps li.done::before { background: var(--go-lift); }

.steps .dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-faint);
}

.steps li.done .dot { border-color: var(--go); background: var(--go); color: #fff; }
.steps li.now .dot  { border-color: var(--go); color: var(--go-deep); box-shadow: 0 0 0 5px rgb(18 185 129 / 0.15); }

.steps .title { margin: 0.2rem 0 0; font-size: 0.95rem; color: var(--ink-faint); }
.steps li.done .title, .steps li.now .title { color: var(--ink); }
.steps li.now .title { font-weight: 600; }

.steps .say {
  margin: 0.3rem 0 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.steps .badge {
  margin-left: 0.5rem;
  font-family: var(--font-label, inherit);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--go-deep);
}

/* A seven-segment bar, for a row that only needs the gist. */
.segments { display: flex; gap: 4px; margin-top: 1rem; }

.segments span {
  height: 5px;
  flex: 1;
  border-radius: 999px;
  background: var(--line);
}

.segments span.on   { background: linear-gradient(90deg, var(--go-lift), var(--go)); }
.segments span.here { background: rgb(18 185 129 / 0.45); }

/* ------------------------------------------------------------------- misc */

.rowset { display: grid; gap: 0; }

.rowset > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.875rem;
}

.rowset > div:last-child { border-bottom: 0; }
.rowset dt, .rowset .k { color: var(--ink-soft); margin: 0; }
.rowset dd, .rowset .v { margin: 0; text-align: right; overflow-wrap: anywhere; }

.console a:not(.btn):not(.tile):not(.row-link) {
  color: var(--go-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgb(18 185 129 / 0.4);
}

.console a:not(.btn):not(.tile):not(.row-link):hover { text-decoration-color: currentColor; }

.back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
}

@media (max-width: 40rem) {
  .hero, .card, .panel, .panel-dark { padding: 1.15rem; }
  .note-quiet { max-width: none; text-align: left; }
  .meter { width: 100%; }
}

/* The page itself, under the console. The export's body styling is written for
   the shop, which is dark and centred; this is neither. */
body.account-body {
  margin: 0;
  background: #f6f8fb;
  -webkit-font-smoothing: antialiased;
}

/* A column of cards inside one form, spaced like the console's own sections. */
.stack { display: grid; gap: 1.25rem; }

/* ------------------------------------------------------ a group of rows */

/*
 * A heading over a list, rather than a card around one.
 *
 * The rows are already cards. Wrapping them in another card to give the group
 * a title puts a box inside a box, and the page starts to look like a filing
 * cabinet. A heading and a count is enough to say where one list ends.
 */
.list-head {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin: 0.5rem 0 0;
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.15rem;
  font-weight: 400;
}

.list-head span:empty { display: none; }

.list-head span {
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--sunken);
  font-family: var(--font-sans, inherit);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.list-note {
  margin: 0.35rem 0 0;
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.console > section { display: grid; gap: 0; }
.console > section > .rows { margin-top: 0.9rem; }
.console > section > .card { margin-top: 0.9rem; }

/* --------------------------------------------------------- saved pieces */

.pieces {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  margin-top: 1rem;
}

.piece {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--pane);
  border: 1px solid var(--line-soft);
  box-shadow: var(--lift);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.piece:hover { transform: translateY(-3px); box-shadow: var(--lift-high); }

/* The photograph sits on the sunken grey rather than white: a watch cut out on
   a white ground on a white card has no edges at all. */
.piece-shot {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  background: var(--sunken);
  text-decoration: none;
}

.piece-shot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.75rem;
}

.piece-shot .none {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.7rem;
  color: var(--ink-faint);
}

.piece-body { padding: 1rem; display: flex; flex-direction: column; gap: 0.15rem; flex: 1; }

.piece-body .maison {
  font-family: var(--font-label, inherit);
  font-size: 0.6rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.piece-body .model {
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.02rem;
  line-height: 1.25;
  color: inherit;
  text-decoration: none;
}

.piece-body .model:hover { text-decoration: underline; }

.piece-body .ref {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.68rem;
  color: var(--ink-faint);
}

.piece-body .cost { margin-top: 0.5rem; font-weight: 600; font-variant-numeric: tabular-nums; }

.piece-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

/* Removing something is not the main thing this card is for. */
.drop {
  border: 0;
  background: none;
  padding: 0.25rem;
  font: inherit;
  font-size: 0.75rem;
  color: var(--ink-faint);
  cursor: pointer;
  transition: color 0.2s;
}

.drop:hover { color: #e11d48; }

.loading {
  margin-top: 1.3rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
