/* Keyframe Account — independent of a74 / lv-prism / ambe traders chrome */
:root {
  --kf-ink: #111827;
  --kf-mute: #6b7280;
  --kf-paper: #eef2f6;
  --kf-sheet: #ffffff;
  --kf-line: rgba(17, 24, 39, 0.1);
  --kf-teal: #0f766e;
  --kf-coral: #e11d48;
  --kf-amber: #d97706;
  --kf-sky: #0284c7;
  --kf-display: "Red Hat Display", "Segoe UI", sans-serif;
  --kf-sans: "Red Hat Text", "Segoe UI", sans-serif;
  --kf-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --kf-max: 1080px;
  --kf-radius: 1.1rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body.kf-account {
  margin: 0;
  min-height: 100vh;
  color: var(--kf-ink);
  font-family: var(--kf-sans);
  background:
    radial-gradient(80% 50% at 0% 0%, rgba(15, 118, 110, 0.12), transparent 50%),
    radial-gradient(70% 45% at 100% 10%, rgba(225, 29, 72, 0.08), transparent 48%),
    linear-gradient(165deg, #e7edf3 0%, var(--kf-paper) 55%, #e9eef4 100%);
  -webkit-font-smoothing: antialiased;
}

.a74-bare-main { min-height: 100vh; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
}

.kf-shell {
  position: relative;
  width: min(var(--kf-max), calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 1rem 0 2.5rem;
  z-index: 1;
}
.kf-mesh {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(17, 24, 39, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 39, 0.035) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse at center, #000 35%, transparent 80%);
}

.kf-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
  padding: 0.65rem 0.75rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--kf-line);
  border-radius: 999px;
  backdrop-filter: blur(10px);
}
.kf-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.kf-brand-mark {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: 0.7rem;
  background: linear-gradient(135deg, var(--kf-teal), #115e59);
  color: #fff;
  font-family: var(--kf-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.kf-brand-text {
  display: grid;
  line-height: 1.1;
  min-width: 0;
}
.kf-brand-text strong {
  font-family: var(--kf-display);
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kf-brand-text em {
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--kf-mute);
  font-weight: 600;
}
.kf-top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.kf-top-nav a {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--kf-mute);
  transition: color 0.2s, background 0.2s, transform 0.2s var(--kf-ease);
}
.kf-top-nav a:hover {
  color: var(--kf-ink);
  background: rgba(17, 24, 39, 0.05);
  transform: translateY(-1px);
}
.kf-top-cart {
  background: var(--kf-ink) !important;
  color: #fff !important;
}
.kf-top-cart:hover { background: var(--kf-coral) !important; }

.kf-hero {
  margin-bottom: 1.35rem;
  max-width: 36rem;
}
.kf-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--kf-teal);
}
.kf-hero h1 {
  margin: 0;
  font-family: var(--kf-display);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.kf-lede {
  margin: 0.7rem 0 0;
  color: var(--kf-mute);
  font-size: 1.02rem;
  line-height: 1.55;
}

.kf-stage { position: relative; }

.kf-loading,
.notice {
  margin-bottom: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: var(--kf-radius);
  border: 1px solid var(--kf-line);
  background: #fff;
  font-size: 0.92rem;
}
.notice.success {
  border-color: rgba(15, 118, 110, 0.35);
  background: #ecfdf5;
  color: #065f46;
}
.notice.warning {
  border-color: rgba(217, 119, 6, 0.35);
  background: #fffbeb;
  color: #92400e;
}

/* Logged-in board */
.kf-board {
  display: grid;
  grid-template-columns: 15.5rem minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
}
.kf-rail {
  position: sticky;
  top: 0.85rem;
  padding: 1rem;
  background: var(--kf-sheet);
  border: 1px solid var(--kf-line);
  border-radius: calc(var(--kf-radius) + 0.15rem);
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.06);
}
.kf-rail-label {
  margin: 0 0 0.25rem;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--kf-teal);
}
.kf-rail-head h2 {
  margin: 0;
  font-family: var(--kf-display);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.kf-rail-actions {
  display: grid;
  gap: 0.4rem;
  margin: 0.9rem 0 1rem;
}
.kf-switch {
  position: relative;
  display: grid;
  gap: 0.3rem;
}
.kf-switch-thumb {
  position: absolute;
  left: 0;
  right: 0;
  border-radius: 0.8rem;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(2, 132, 199, 0.1));
  border: 1px solid rgba(15, 118, 110, 0.28);
  transition: top 0.35s var(--kf-ease), height 0.35s var(--kf-ease);
  pointer-events: none;
  z-index: 0;
}
.kf-switch-btn {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.7rem 0.75rem;
  border-radius: 0.8rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--kf-mute);
  transition: color 0.2s, transform 0.2s var(--kf-ease);
}
.kf-switch-btn:hover {
  color: var(--kf-ink);
  transform: translateX(2px);
}
.kf-switch-btn.is-active { color: var(--kf-ink); }
.kf-switch-ico {
  font-family: var(--kf-display);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--kf-coral);
  opacity: 0.75;
}
.kf-rail-links {
  display: grid;
  gap: 0.35rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--kf-line);
}
.kf-rail-links a {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--kf-sky);
  transition: color 0.2s, transform 0.2s;
}
.kf-rail-links a:hover {
  color: var(--kf-coral);
  transform: translateX(3px);
}

.kf-canvas {
  min-width: 0;
  padding: 1.15rem 1.2rem 1.35rem;
  background: var(--kf-sheet);
  border: 1px solid var(--kf-line);
  border-radius: calc(var(--kf-radius) + 0.15rem);
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.06);
  animation: kf-rise 0.55s var(--kf-ease) both;
}
.dash-panel { display: none; }
.dash-panel.is-active {
  display: block;
  animation: kf-panel 0.4s var(--kf-ease) both;
}
@keyframes kf-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes kf-panel {
  from { opacity: 0; transform: translateY(8px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

.kf-panel-head { margin-bottom: 1rem; }
.kf-panel-head h3 {
  margin: 0;
  font-family: var(--kf-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.kf-panel-head p {
  margin: 0.3rem 0 0;
  color: var(--kf-mute);
  font-size: 0.92rem;
}
.kf-panel-head-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.kf-profile.profile-grid,
.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}
.profile-item {
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--kf-line);
  border-radius: 0.85rem;
  background: linear-gradient(180deg, #fff, #f8fafc);
  transition: transform 0.25s var(--kf-ease), border-color 0.2s, box-shadow 0.25s;
}
.profile-item:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 118, 110, 0.35);
  box-shadow: 0 10px 20px rgba(17, 24, 39, 0.05);
}
.profile-item .k {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--kf-mute);
}
.profile-item .v {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  word-break: break-word;
}
.profile-item .v.mono {
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
}

.kf-orders .order-row,
.order-list .order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.85rem 0.9rem;
  margin-bottom: 0.55rem;
  border: 1px solid var(--kf-line);
  border-radius: 0.85rem;
  background: #fff;
  transition: transform 0.25s var(--kf-ease), border-color 0.2s;
}
.order-list .order-row:hover {
  transform: translateX(3px);
  border-color: rgba(225, 29, 72, 0.35);
}
.mini-copy {
  color: var(--kf-mute);
  font-size: 0.82rem;
  margin-top: 0.2rem;
}

/* Forms */
.kf-form {
  display: grid;
  gap: 0.85rem;
  max-width: 26rem;
}
.kf-field {
  display: grid;
  gap: 0.35rem;
}
.kf-field > span:first-child {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--kf-mute);
}
.kf-field input {
  width: 100%;
  min-height: 2.85rem;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--kf-line);
  border-radius: 0.8rem;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.25s, transform 0.2s;
}
.kf-field input:focus {
  outline: none;
  border-color: var(--kf-teal);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
  transform: translateY(-1px);
}
.kf-meter {
  display: block;
  height: 4px;
  margin-top: 0.45rem;
  background: rgba(17, 24, 39, 0.08);
  border-radius: 999px;
  overflow: hidden;
}
.kf-meter i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--kf-coral);
  transition: width 0.3s var(--kf-ease), background 0.3s;
}
.kf-meter-label {
  font-size: 0.72rem;
  color: var(--kf-mute);
  font-weight: 600;
}

.kf-toggle {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--kf-mute);
  cursor: pointer;
  user-select: none;
}
.kf-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.kf-toggle-ui {
  width: 2.55rem;
  height: 1.45rem;
  border-radius: 999px;
  background: #d1d5db;
  position: relative;
  transition: background 0.25s;
  flex-shrink: 0;
}
.kf-toggle-ui::after {
  content: "";
  position: absolute;
  top: 0.18rem;
  left: 0.18rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(17, 24, 39, 0.18);
  transition: transform 0.3s var(--kf-ease);
}
.kf-toggle input:checked + .kf-toggle-ui { background: var(--kf-teal); }
.kf-toggle input:checked + .kf-toggle-ui::after { transform: translateX(1.1rem); }
.kf-toggle:hover .kf-toggle-ui { filter: brightness(0.97); }

.kf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  padding: 0.55rem 1.1rem;
  border-radius: 0.8rem;
  font-weight: 700;
  font-size: 0.9rem;
  border: 1.5px solid transparent;
  transition: transform 0.22s var(--kf-ease), background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.22s;
}
.kf-btn:hover { transform: translateY(-2px); }
.kf-btn:active { transform: translateY(0); }
.kf-btn-hot {
  background: linear-gradient(135deg, var(--kf-coral), #be123c);
  color: #fff;
  box-shadow: 0 10px 22px rgba(225, 29, 72, 0.22);
}
.kf-btn-hot:hover { box-shadow: 0 14px 28px rgba(225, 29, 72, 0.28); }
.kf-btn-ghost {
  background: rgba(15, 118, 110, 0.08);
  color: var(--kf-teal);
  border-color: rgba(15, 118, 110, 0.18);
}
.kf-btn-ghost:hover {
  background: rgba(15, 118, 110, 0.14);
  color: #0f766e;
}
.kf-btn-line {
  border-color: var(--kf-line);
  background: #fff;
  color: var(--kf-ink);
}
.kf-btn-line:hover { border-color: var(--kf-ink); }

/* Logged-out gate */
.kf-gate {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 0.85rem;
  align-items: start;
}
.kf-gate-main {
  padding: 1.15rem;
  background: var(--kf-sheet);
  border: 1px solid var(--kf-line);
  border-radius: calc(var(--kf-radius) + 0.2rem);
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.07);
}
.kf-mode {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  padding: 0.25rem;
  margin-bottom: 1.1rem;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px solid var(--kf-line);
}
.kf-mode-ink {
  position: absolute;
  top: 0.25rem;
  bottom: 0.25rem;
  left: 0.25rem;
  width: calc(50% - 0.25rem);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.08);
  transition: transform 0.35s var(--kf-ease);
  z-index: 0;
}
.kf-mode-btn {
  position: relative;
  z-index: 1;
  min-height: 2.55rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--kf-mute);
  transition: color 0.2s;
}
.kf-mode-btn.is-active { color: var(--kf-ink); }

.kf-flip { position: relative; }
.kf-card {
  animation: kf-panel 0.4s var(--kf-ease) both;
}
.kf-card h2 {
  margin: 0 0 0.35rem;
  font-family: var(--kf-display);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.kf-card .lead {
  margin: 0 0 1rem;
  color: var(--kf-mute);
  font-size: 0.95rem;
}

.kf-details {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--kf-line);
}
.kf-details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--kf-sky);
  list-style: none;
  transition: color 0.2s;
}
.kf-details summary::-webkit-details-marker { display: none; }
.kf-details summary::after {
  content: "+";
  margin-left: 0.4rem;
  font-weight: 800;
}
.kf-details[open] summary::after { content: "-"; }
.kf-details summary:hover { color: var(--kf-coral); }
.kf-details .kf-form { margin-top: 0.75rem; }
.kf-reset { margin-top: 1rem; }
.form-subhead {
  margin: 0 0 0.55rem;
  font-family: var(--kf-display);
  font-size: 1.1rem;
  font-weight: 700;
}

.kf-perks {
  padding: 1.15rem;
  background: linear-gradient(160deg, #0f766e 0%, #115e59 55%, #134e4a 100%);
  color: #ecfdf5;
  border-radius: calc(var(--kf-radius) + 0.2rem);
  box-shadow: 0 18px 40px rgba(15, 118, 110, 0.25);
}
.kf-perks h3 {
  margin: 0 0 0.85rem;
  font-family: var(--kf-display);
  font-size: 1.45rem;
  font-weight: 800;
}
.kf-perks ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.kf-perks li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: start;
  padding: 0.7rem 0.75rem;
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  animation: kf-rise 0.55s var(--kf-ease) both;
  animation-delay: calc(var(--kf-i, 0) * 0.06s);
  transition: transform 0.25s var(--kf-ease), background 0.2s;
}
.kf-perks li:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.14);
}
.kf-perk-num {
  font-family: var(--kf-display);
  font-weight: 800;
  color: #fda4af;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  max-width: min(22rem, calc(100vw - 2rem));
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  background: var(--kf-ink);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.25);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s var(--kf-ease);
}
.toast.visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.toast.success { background: #0f766e; }
.toast.error,
.toast.danger { background: #be123c; }

.kf-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  justify-content: center;
  margin-top: 1.75rem;
  padding-top: 1rem;
  color: var(--kf-mute);
  font-size: 0.86rem;
  font-weight: 600;
}
.kf-foot a:hover { color: var(--kf-coral); }

@media (max-width: 900px) {
  .kf-board,
  .kf-gate { grid-template-columns: 1fr; }
  .kf-rail { position: static; }
  .kf-switch {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
  }
  .kf-switch-thumb { display: none; }
  .kf-switch-btn {
    justify-content: center;
    flex-direction: column;
    gap: 0.2rem;
    text-align: center;
    background: #f3f4f6;
    border: 1px solid var(--kf-line);
  }
  .kf-switch-btn.is-active {
    background: rgba(15, 118, 110, 0.12);
    border-color: rgba(15, 118, 110, 0.3);
  }
  .kf-profile.profile-grid,
  .profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .kf-top { border-radius: 1rem; }
  .kf-top-nav a { padding: 0.4rem 0.55rem; font-size: 0.78rem; }
  .kf-shell { width: calc(100% - 1rem); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
