/*
 * Mohair Connect — layout and components on top of the borrowed tokens.css
 * (borrowed unchanged, plan C3). Colours only via tokens. Phase 0a is the
 * shell: login, icon column, tab bar, top bar, cards and Settings. The full
 * component set and its exact values arrive with the gallery in phase 0b.
 *
 * Glass budget (plan 10.1): blur only on the shell — the column, the top bar,
 * the tab bar and the login card. Cards inside are opaque blends, so an old
 * phone or a laptop without a graphics card still scrolls smoothly.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  font-variant-numeric: tabular-nums;
}

/* Three soft colour clouds and a faint fibre texture behind everything. */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vw 50vh at 12% 8%, var(--bg-tone-1), transparent 70%),
    radial-gradient(50vw 45vh at 92% 18%, var(--bg-tone-2), transparent 70%),
    radial-gradient(70vw 55vh at 60% 100%, var(--bg-tone-3), transparent 70%),
    var(--bg);
}
.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--fiber);
  -webkit-mask: url("../icons/fibre.svg") 0 0 / 640px 640px repeat;
  mask: url("../icons/fibre.svg") 0 0 / 640px 640px repeat;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

[hidden] {
  display: none !important;
}

.muted {
  color: var(--ink-3);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: -0.015em;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
  background: var(--glass-strong);
  box-shadow: var(--shadow-s), inset 0 0 0 1px var(--glass-line);
  transition: transform var(--fast) var(--spring), box-shadow var(--fast) var(--ease), background var(--fast) var(--ease);
  white-space: nowrap;
  text-decoration: none;
}
.button:hover {
  text-decoration: none;
  box-shadow: var(--shadow), inset 0 0 0 1px var(--glass-line);
}
.button:active {
  transform: scale(0.96);
}
.button:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
}
.button.primary {
  color: var(--paa-accent);
  background: linear-gradient(180deg, var(--knap-fra), var(--knap-til));
  box-shadow: 0 6px 18px var(--accent-gloed), inset 0 1px 0 var(--hvid-kant);
}
.button.primary:hover {
  background: linear-gradient(180deg, var(--knap-fra-hover), var(--knap-til-hover));
}
.button.small {
  min-height: 32px;
  padding: 0 12px;
  font-size: 13px;
}
.button.quiet {
  background: transparent;
  box-shadow: none;
  color: var(--ink-2);
}
.button.quiet:hover {
  background: var(--accent-softer);
}
.button.danger {
  color: var(--bad);
}
.button.wide {
  width: 100%;
}
.button svg {
  flex: none;
}

.link-button {
  border: 0;
  background: none;
  padding: 6px 4px;
  font: inherit;
  font-size: 14px;
  color: var(--accent);
  cursor: pointer;
}
.link-button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- login ---------- */

.login {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  position: relative;
}
.switch-user {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: 16px;
}
.login-card {
  width: min(460px, 100%);
  padding: 32px 28px 28px;
  border-radius: var(--r-xl);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow-l), inset 0 0 0 1px var(--glass-edge), 0 0 0 6px var(--halo);
  text-align: center;
}
.login-card.privacy {
  width: min(640px, 100%);
  text-align: left;
}
.login-card.privacy h2 {
  font-size: 17px;
  margin: 20px 0 4px;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
}
.brand-mark.large img {
  border-radius: 16px;
  box-shadow: 0 8px 24px var(--accent-gloed);
}
.login-app {
  margin: 10px 0 2px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.login-card h1 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 650;
}
.login-lead {
  margin: 0 0 18px;
  color: var(--ink-2);
}
/* "This browser is still signed in as Annette." — after a one-click arrival that went wrong */
.signed-in-as {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 6px;
  text-align: left;
}
/* "Nothing after 2 minutes? Check spam…" and "This computer is shared." (review 0a round 3) */
.login-help {
  margin: -8px 0 14px;
  font-size: 13px;
  color: var(--ink-3);
}
.login-note {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--ink-2);
}
/* "Do people outside your team use this computer?" — the two answers are the buttons that go on (round 4) */
.shared-question {
  margin: 6px 0 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 6px;
  min-width: 0;
}
.shared-question legend {
  padding: 0;
  margin-bottom: 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.question-hint {
  font-size: 12.5px;
  color: var(--ink-3);
}
.choices {
  display: grid;
  gap: 8px;
  margin: 4px 0 2px;
}
/* A PIN shown as dots without being a password field, so the browser never offers to save it on a shared PC */
.pin-field {
  -webkit-text-security: disc;
}
.login-form {
  display: grid;
  gap: 10px;
  text-align: left;
  margin-top: 8px;
}
.login-form label:not(.check) {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.login-form input:not([type="checkbox"]) {
  width: 100%;
  min-height: 48px;
  padding: 10px 16px;
  border-radius: var(--r-s);
  border: 1px solid var(--line);
  background: var(--glass-strong);
  color: var(--ink);
  font: inherit;
  font-size: 17px;
}
.login-form input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}
.login-form input[autocomplete="one-time-code"] {
  font-size: 24px;
  letter-spacing: 0.35em;
  text-align: center;
}
.login-form .check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  cursor: pointer;
}
.login-form .check input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}
.login-form .check small {
  display: block;
  color: var(--ink-3);
  font-size: 12.5px;
}
.form-error {
  margin: 0;
  padding: 8px 12px;
  border-radius: var(--r-s);
  background: var(--bad-soft);
  color: var(--bad);
  font-size: 14px;
}
.login-foot {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-3);
  text-align: center;
}
.demo-note,
.demo-code {
  width: min(460px, 100%);
  margin: 0;
  padding: 10px 14px;
  border-radius: var(--r-m);
  background: var(--warn-soft);
  color: var(--ink-2);
  font-size: 13px;
}
.demo-code {
  width: auto;
  margin-bottom: 4px;
  font-size: 15px;
}

.card-group {
  margin-top: 18px;
  text-align: left;
}
.card-group h2 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.person-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.person-cards.two {
  grid-template-columns: 1fr 1fr;
  margin-top: 12px;
}
.person-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 10px 12px;
  border: 0;
  border-radius: var(--r-l);
  background: color-mix(in srgb, var(--surface) 92%, var(--accent));
  box-shadow: var(--shadow-s), inset 0 0 0 1px var(--glass-line);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: transform var(--fast) var(--spring), box-shadow var(--fast) var(--ease);
}
.person-card:hover {
  box-shadow: var(--shadow), inset 0 0 0 1px var(--glass-line);
  transform: translateY(-1px);
}
.person-card:active {
  transform: scale(0.97);
}
.person-name {
  font-weight: 600;
}
.person-note {
  font-size: 12px;
  color: var(--ink-3);
}

/* ---------- people ---------- */

.avatar {
  flex: none;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: var(--paa-accent);
  font-weight: 650;
  background: var(--avatar-0);
  box-shadow: inset 0 0 0 1px var(--hvid-kant);
}
.avatar.a1 { background: var(--avatar-1); }
.avatar.a2 { background: var(--avatar-2); }
.avatar.a3 { background: var(--avatar-3); }
.avatar.a4 { background: var(--avatar-4); }
.avatar.a5 { background: var(--avatar-5); }

.avatar-button {
  border: 0;
  padding: 2px;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

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

.shell {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0 12px;
  gap: 10px;
  background: var(--glass-soft);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-right: 1px solid var(--glass-line);
  z-index: 20;
}
.rail-brand img {
  display: block;
  border-radius: 12px;
  box-shadow: 0 6px 18px var(--accent-gloed);
}
.rail-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
}
.rail-link {
  width: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 0 6px;
  border-radius: var(--r-m);
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 560;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.rail-link:hover {
  text-decoration: none;
  color: var(--ink);
  background: var(--accent-softer);
}
.rail-link[aria-current="page"] {
  color: var(--accent);
  background: var(--glass-strong);
  box-shadow: var(--shadow-s), inset 0 0 0 1px var(--glass-line);
}
.rail-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-3);
  opacity: 0.6;
}
.live-dot.on {
  background: var(--good);
  opacity: 1;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.top-bar {
  position: sticky;
  top: 0;
  z-index: 15;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 clamp(16px, 3vw, 36px);
  background: var(--glass-soft);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--glass-line);
}
.top-title {
  margin: 0;
  font-size: 22px;
  font-weight: 650;
}
.top-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.switch-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.avatar-button.in-top {
  display: none;
}

.demo-ribbon {
  margin: 14px clamp(16px, 3vw, 36px) 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--warn-soft);
  color: var(--ink-2);
  font-size: 13px;
  text-align: center;
}
.viewing-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  margin: 12px clamp(16px, 3vw, 36px) 0;
  padding: 4px 6px 4px 14px;
  border-radius: 999px;
  background: var(--warn-soft);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: inset 0 0 0 1px var(--glass-line);
  font-size: 14px;
  font-weight: 560;
}
.viewing-banner span {
  flex: 1;
}

.view {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px clamp(16px, 3vw, 36px) 64px;
}
.view.enter {
  animation: enter var(--mid) var(--ease) backwards;
}
@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.tab-bar {
  display: none;
}

/* Below 900 px: the column becomes a tab bar at the bottom (plan 10.2). */
@media (max-width: 899px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .rail {
    display: none;
  }
  .avatar-button.in-top {
    display: inline-grid;
  }
  .switch-top {
    display: none;
  }
  /* On a computer marked shared, "Sign out" stays in sight on a phone-wide screen too (review 0a round 3). */
  .switch-top.always {
    display: inline-flex;
  }
  .view {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }
  .tab-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    justify-content: space-around;
    padding: 4px 4px max(4px, env(safe-area-inset-bottom));
    min-height: 56px;
    background: var(--glass-strong);
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    border-top: 1px solid var(--glass-line);
  }
  .tab {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 0 4px;
    border-radius: var(--r-m);
    font-size: 10.5px;
    font-weight: 560;
    color: var(--ink-3);
  }
  .tab span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .tab:hover {
    text-decoration: none;
  }
  .tab[aria-current="page"] {
    color: var(--accent);
    background: var(--accent-soft);
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  .top-title {
    font-size: 19px;
  }
  .login-card {
    padding: 26px 18px 20px;
  }
}

/* ---------- content ---------- */

.hero h2 {
  margin: 0 0 4px;
  font-size: clamp(26px, 3.2vw, 34px);
  font-weight: 650;
}
.hero p {
  margin: 0 0 20px;
  color: var(--ink-2);
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  align-items: start;
}
.card {
  padding: 20px 22px;
  border-radius: var(--r-l);
  background: color-mix(in srgb, var(--surface) 92%, var(--accent));
  box-shadow: var(--shadow-s), inset 0 0 0 1px var(--glass-line);
}
.card h2,
.card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 650;
}
.card h2 svg,
.card h3 svg {
  color: var(--accent);
}
.steps {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--ink-2);
}
.price-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 14px;
}
.price-table caption {
  text-align: left;
  font-size: 12.5px;
  color: var(--ink-3);
  padding-bottom: 6px;
}
.price-table th,
.price-table td {
  padding: 6px 8px 6px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.price-table th {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
}
.price-table .num,
.price-table .since {
  text-align: right;
  white-space: nowrap;
}
.price-table .since {
  text-align: left;
  padding-left: 12px;
}
.price-table small {
  color: var(--ink-3);
}

.empty {
  max-width: 460px;
  margin: 8vh auto 0;
  text-align: center;
}
.empty-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 8px var(--halo);
}
.empty h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 650;
}
.empty p {
  margin: 0;
  color: var(--ink-2);
}

/* ---------- Settings ---------- */

.settings-section {
  margin-bottom: 16px;
}
.settings-section > p {
  margin: 0 0 12px;
}
.theme-choices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}
.theme-choice {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: var(--r-m);
  background: var(--glass-strong);
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
}
.theme-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.theme-choice:has(input:checked) {
  box-shadow: inset 0 0 0 2px var(--accent);
  background: var(--accent-soft);
}
.theme-choice:has(input:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.theme-swatch {
  grid-row: span 2;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-softer);
}
.theme-name {
  font-weight: 600;
}
.theme-choice small {
  color: var(--ink-3);
  font-size: 12.5px;
}

.device-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.device-line {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--r-s);
  background: var(--glass-soft);
  box-shadow: inset 0 0 0 1px var(--line);
}
.device-line > svg {
  color: var(--ink-3);
}
.device-line small {
  display: block;
  color: var(--ink-3);
  font-size: 12.5px;
}
@media (max-width: 640px) {
  .device-line {
    grid-template-columns: auto 1fr;
  }
  .device-line > .button {
    grid-column: 2;
    justify-self: start;
  }
  .price-table .since {
    display: none;
  }
}
.tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 600;
  vertical-align: 1px;
}
.people {
  display: grid;
  gap: 12px;
}
.person-row {
  padding: 12px;
  border-radius: var(--r-m);
  box-shadow: inset 0 0 0 1px var(--line);
}
.person-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.person-head > div:nth-child(2) {
  flex: 1;
  min-width: 140px;
}
.person-head small {
  display: block;
  color: var(--ink-3);
  font-size: 12.5px;
}
.person-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.activity {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
  font-size: 14px;
}
.activity li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
}
.activity .when {
  color: var(--ink-3);
}

/* ---------- floating things ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 200;
  transform: translate(-50%, 20px);
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(560px, calc(100vw - 32px));
  padding: 10px 8px 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--surface);
  font-size: 14px;
  font-weight: 560;
  box-shadow: var(--shadow-l);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--mid) var(--ease), transform var(--mid) var(--spring);
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.toast-close {
  flex: none;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
@media (max-width: 899px) {
  .toast {
    bottom: calc(76px + env(safe-area-inset-bottom));
  }
}

.tip {
  position: fixed;
  z-index: 300;
  max-width: 280px;
  padding: 6px 10px;
  border-radius: var(--r-xs);
  background: var(--ink);
  color: var(--surface);
  font-size: 12.5px;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--fast) var(--ease);
}
.tip.show {
  opacity: 1;
}

.float-menu {
  position: fixed;
  z-index: 250;
  min-width: 220px;
  padding: 6px;
  border-radius: var(--r-m);
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow-l), inset 0 0 0 1px var(--glass-edge);
}
.menu-list {
  display: grid;
  gap: 2px;
}
.menu-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.menu-head small {
  display: block;
  color: var(--ink-3);
  font-size: 12px;
}
.menu-list a,
.menu-list button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--r-s);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.menu-list a:hover,
.menu-list button:hover {
  text-decoration: none;
  background: var(--accent-softer);
}

/* ---------- touch, motion, transparency, forced colours (plan 10.6) ---------- */

@media (pointer: coarse) {
  .button {
    min-height: 44px;
  }
  .button.small {
    min-height: 40px;
  }
  .link-button {
    min-height: 44px;
  }
  .tab {
    min-height: 48px;
  }
  /* "Not you? Switch user" on a phone sits behind the avatar: both steps a full 44 px (review 0a #22). */
  .avatar-button {
    min-width: 44px;
    min-height: 44px;
  }
  .menu-list a,
  .menu-list button {
    min-height: 44px;
  }
  .toast-close {
    width: 44px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .rail,
  .top-bar,
  .tab-bar,
  .login-card,
  .float-menu,
  .viewing-banner {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: var(--glass-strong);
  }
}

@media (forced-colors: active) {
  .rail-link[aria-current="page"],
  .tab[aria-current="page"],
  .theme-choice:has(input:checked) {
    outline: 2px solid CanvasText;
  }
  .live-dot {
    border: 1px solid CanvasText;
  }
}

/* ---------- phase 1b: Home "To do", open orders, order list filters ---------- */

/* Home: the greeting, "To do", then the open orders, each a section of its own. */
.home > section + section,
.home > .home-demo {
  margin-top: 28px;
}
.home-todo .empty-state {
  margin-top: 4px;
}
.home-open .attention-head {
  margin-bottom: 12px;
}

/* On a card (Home and the list): kilos per yarn, then one compact line per shipment. */
.order-card-yarns {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.order-card-ships {
  display: grid;
  gap: 4px;
}
.order-card-ships .shipment {
  padding: 6px 10px;
  font-size: 13px;
  background: var(--glass-soft);
}
.order-card-ships .shipment-text {
  min-width: 140px;
}

/* The list's filter: Open · Shipped · Delivered · All, the same pressed pills as "Kg | Balls". */
.order-filter {
  margin: 0 0 14px;
}
.order-filter-none {
  margin: 8px 2px;
}

/* ---------- Settings → Notifications (phase 2c): one switch for mail and pop-ups ---------- */

.notify-state {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: var(--r-s);
  background: var(--glass-soft);
  box-shadow: inset 0 0 0 1px var(--line);
}
.notify-state > svg {
  color: var(--accent);
}
.notify-state.off > svg {
  color: var(--ink-3);
}
.notify-state small {
  display: block;
  color: var(--ink-3);
  font-size: 12.5px;
}
.notify-here {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 10px 0 0;
  font-size: 13.5px;
  color: var(--ink-2);
}
@media (max-width: 640px) {
  .notify-state {
    grid-template-columns: auto 1fr;
  }
  .notify-state > .button {
    grid-column: 1 / -1;
    justify-self: start;
  }
}
