/* =========================================================
   NAMECARD — design tokens and shared styles
   Dark by design: black as a stage, steel as the material,
   one accent (Corten) for live signals only.
   ========================================================= */

:root {
  color-scheme: dark;

  --bg: #0b0b0c;
  --surface: #121213;
  --surface-2: #1a1a1b;
  --line: #232220;
  --line-soft: #1c1b1a;
  --line-strong: #2e2d2b;

  --text: #edebe6;
  --text-2: #c9c7c1;
  --muted: #9a9893;
  --faint: #8e8c87;
  --accent: #c4622d;

  /* One family, two voices: Jost light for display, Jost regular for text. */
  --display: "Jost", "Futura", "Avenir Next", system-ui, sans-serif;
  --sans: "Jost", "Futura", "Avenir Next", system-ui, sans-serif;
  /* Titles: a corporate grotesque (Franklin Gothic lineage) */
  --title: "Libre Franklin", "Franklin Gothic Medium", "Helvetica Neue", Arial, sans-serif;

  --radius-s: 10px;
  --radius-m: 14px;
  --radius-pill: 999px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--text);
}

a:hover {
  color: #fff;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.icon {
  display: inline-flex;
  flex-shrink: 0;
}

/* ---------- Type helpers ---------- */

.wordmark {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
}

.serif {
  font-family: var(--display);
}

.eyebrow {
  margin: 0;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.section-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.section-head .aside {
  order: 2;
  font-size: 12px;
  color: var(--faint);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  border-color: var(--faint);
}

.btn--primary {
  border-color: transparent;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
}

.btn--primary:hover {
  background: #fff;
  color: var(--bg);
}

.btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.btn--primary:disabled:hover {
  background: var(--text);
}

.btn--block {
  width: 100%;
  min-height: 56px;
  font-size: 15px;
}

.btn--small {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

/* =========================================================
   PUBLIC PROFILE (index.html)
   ========================================================= */

.profile {
  max-width: 460px;
  margin: 0 auto;
  padding: 22px 24px 48px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar .number {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

/* ---------- The steel card ----------
   Two faces in 3D. On load the card turns in from its back (QR side)
   and settles tilted: top-left lifted toward you, bottom-right down.
   Tap / click / Enter turns it over.
   Engraving = the card's own colour, a little darker (--ink),
   with a hairline highlight underneath so it reads as cut into metal. */

.hero {
  padding-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}

.card-stage {
  width: 100%;
  max-width: 330px;
  aspect-ratio: 85.6 / 54;
  perspective: 1400px;
  margin: 18px 0 10px;
}

.namecard {
  --tilt-z: 6deg;
  --tilt-x: -16deg;
  --tilt-y: 20deg;
  --flip: 0deg;
  --ink: rgba(0, 0, 0, 0.5);
  --ink-light: rgba(255, 255, 255, 0.1);
  --metal: linear-gradient(135deg, #46484c 0%, #26272a 34%, #4c4e53 58%, #222326 100%);

  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transform-style: preserve-3d;
  transform: rotateZ(var(--tilt-z)) rotateX(var(--tilt-x)) rotateY(calc(var(--tilt-y) + var(--flip)));
  transition: transform 0.9s cubic-bezier(0.2, 0.75, 0.2, 1);
  animation: card-in 1.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s backwards;
  -webkit-tap-highlight-color: transparent;
}

.namecard[aria-pressed="true"] {
  --flip: 180deg;
}

.namecard:focus-visible {
  outline: none;
}

.namecard:focus-visible .namecard__face {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(-24px) rotateZ(0deg) rotateX(8deg) rotateY(-200deg) scale(0.9);
  }
  35% {
    opacity: 1;
  }
  to {
    opacity: 1;
    transform: translateY(0) rotateZ(var(--tilt-z)) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) scale(1);
  }
}

.namecard[data-finish="mirror"] {
  --ink: rgba(0, 0, 0, 0.34);
  --ink-light: rgba(255, 255, 255, 0.55);
  --metal: linear-gradient(135deg, #f4f4f5 0%, #b3b5b9 28%, #ebecee 50%, #9a9da2 74%, #dcdde0 100%);
}

.namecard[data-finish="corten"] {
  --ink: rgba(30, 10, 2, 0.5);
  --ink-light: rgba(255, 200, 160, 0.12);
  --metal: linear-gradient(135deg, #85421f 0%, #5a2a14 40%, #93502c 64%, #4a2210 100%);
}

.namecard__face {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--metal);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 34px 60px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.09);
}

/* Brushed-metal grain */
.namecard__face::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px);
  pointer-events: none;
}

.namecard__face--back {
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Everything engraved shares this treatment */
.engraved {
  color: var(--ink);
  text-shadow: 0 1px 0 var(--ink-light);
}

.namecard__brand {
  position: absolute;
  top: 9%;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.55em;
  text-indent: 0.55em; /* keeps tracked text optically centred */
}

.namecard__logo {
  position: absolute;
  top: 47%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.namecard__logo:has(.namecard__logo-mark),
.namecard__logo:has(.namecard__logo-svg) {
  width: 24%;
  aspect-ratio: 696 / 1046; /* proportions of assets/algiva-logo.svg */
}

.namecard__logo-text {
  font-size: 19px;
  font-weight: 400;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Inline SVG logo: painted in the engraving colour via currentColor */
.namecard__logo-svg {
  display: block;
  width: 100%;
  height: 100%;
  color: var(--ink);
  filter: drop-shadow(0 1px 0 var(--ink-light));
}

/* An uploaded logo (SVG/PNG with transparency) is used as a mask,
   so it is "engraved" in the card colour like the text. */
.namecard__logo-mark {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--ink);
  -webkit-mask: var(--logo) center / contain no-repeat;
  mask: var(--logo) center / contain no-repeat;
  filter: drop-shadow(0 1px 0 var(--ink-light));
}

.namecard__name {
  position: absolute;
  right: 7%;
  bottom: 10%;
  max-width: 70%;
  text-align: right;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  line-height: 1.3;
}

.namecard__qr {
  width: 46%;
  aspect-ratio: 1;
  color: var(--ink);
  filter: drop-shadow(0 1px 0 var(--ink-light));
}

.namecard__qr svg {
  display: block;
  width: 100%;
  height: 100%;
}

.hero__caption {
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--faint);
}

@media (prefers-reduced-motion: reduce) {
  .namecard {
    animation: none;
    transition: none;
  }
}

/* ---------- Identity ---------- */

.identity {
  padding-top: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}

.identity__photo {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
}

.identity__name {
  margin: 0;
  font-family: var(--title);
  font-weight: 500;
  font-size: clamp(34px, 10vw, 42px);
  line-height: 1.06;
  letter-spacing: -0.025em;
}

.identity__rule {
  width: 28px;
  height: 1px;
  background: #3a3936;
}

.identity__role {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}

.identity__tagline {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Actions ---------- */

.actions {
  padding-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.actions__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.round-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.round-action__circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease;
}

.round-action:hover .round-action__circle {
  border-color: var(--faint);
}

.round-action__label {
  color: var(--muted);
}

.round-action[aria-disabled="true"] {
  opacity: 0.35;
  pointer-events: none;
}

/* ---------- Sections ---------- */

.section {
  padding-top: 60px;
  display: flex;
  flex-direction: column;
}

.section > .section-head {
  padding-bottom: 6px;
}

.about {
  margin: 14px 0 0;
  font-family: var(--display);
  font-weight: 300;
  font-size: 19px;
  line-height: 1.55;
}

.spec {
  margin: 12px 0 0;
}

.spec__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}

.spec__row:last-child {
  border-bottom: none;
}

.spec dt {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--faint);
  flex-shrink: 0;
}

.spec dd {
  margin: 0;
  font-family: var(--display);
  font-weight: 300;
  font-size: 17px;
  text-align: right;
}

.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.live-dot--off {
  background: #5e5c58;
}

.status-value {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans) !important;
  font-size: 13px !important;
  letter-spacing: 0.1em;
}

.currently {
  margin-top: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.currently__label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.currently__place {
  font-family: var(--title);
  font-weight: 500;
  font-size: 21px;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.currently__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.venture {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
  text-decoration: none;
  color: var(--text);
}

.venture__mark {
  font-weight: 300;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #161616;
  border: 1px solid #262523;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 24px;
  flex-shrink: 0;
}

.venture__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.venture__name {
  font-family: var(--title);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.venture__text {
  font-size: 13px;
  color: var(--faint);
}

.venture .icon {
  color: var(--faint);
}

.entry {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-soft);
}

.entry:last-child {
  border-bottom: none;
}

.entry__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.entry__title {
  margin: 0;
  font-family: var(--title);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.entry--compact .entry__title {
  font-size: 15px;
}

.entry__period {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}

.entry__org {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}

.entry__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.tags li {
  font-size: 13px;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
}

.contact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
  text-decoration: none;
  color: var(--text);
}

.contact-row:last-child {
  border-bottom: none;
}

.contact-row__label {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--faint);
}

.contact-row__value {
  font-size: 15px;
  text-align: right;
  overflow-wrap: anywhere;
}

.site-footer {
  padding-top: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.site-footer__line {
  font-family: var(--display);
  font-weight: 300;
  font-size: 17px;
  color: var(--muted);
}

.site-footer a {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-underline-offset: 4px;
}

/* =========================================================
   MANAGE (manage.html)
   ========================================================= */

.app {
  display: flex;
  flex-wrap: wrap;
  min-height: 100vh;
}

.sidebar {
  flex: 1 1 240px;
  padding: 32px 24px;
  border-right: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.sidebar__user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar__user img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
}

.sidebar__user-name {
  display: block;
  font-size: 14px;
  font-weight: 500;
}

.sidebar__user-number {
  display: block;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-s);
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.nav__item:hover {
  color: var(--text);
  background: var(--surface);
}

.nav__item[aria-current="page"] {
  color: var(--text);
  background: var(--surface-2);
  font-weight: 500;
}

.nav__count {
  font-size: 12px;
  color: var(--muted);
}

.sidebar__foot {
  margin-top: auto;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-underline-offset: 4px;
}

.main {
  flex: 999 1 560px;
  min-width: 0;
  padding: 48px clamp(20px, 4vw, 56px) 72px;
}

.main__inner {
  max-width: 1080px;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 40px;
}

.page-head h1 {
  margin: 8px 0;
  font-family: var(--title);
  font-weight: 500;
  font-size: clamp(32px, 4.2vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.page-head p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.page-head__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.save-status {
  font-size: 13px;
  color: var(--muted);
  min-height: 1em;
}

.save-status[data-state="dirty"] {
  color: var(--text-2);
}

.save-status[data-state="dirty"]::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}

/* ---------- Editor layout ---------- */

.editor {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: flex-start;
}

.editor__form {
  flex: 999 1 440px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.editor__preview {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 24px;
}

.fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field--full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.input,
.textarea,
.select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: var(--radius-s);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 15px;
  transition: border-color 0.15s ease;
}

.input:hover,
.textarea:hover,
.select:hover {
  border-color: #3a3936;
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--faint);
}

.textarea {
  padding: 12px 14px;
  line-height: 1.5;
  resize: vertical;
}

.textarea--display {
  font-family: var(--display);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.45;
}

.hint {
  font-size: 12px;
  color: var(--faint);
}

.setting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.setting__title {
  display: block;
  font-size: 15px;
  font-weight: 500;
}

.setting__desc {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

/* Switch */
.switch {
  position: relative;
  width: 52px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 15px;
  border: 1px solid #3a3936;
  background: var(--surface-2);
  cursor: pointer;
  padding: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--faint);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.switch[aria-checked="true"] {
  background: var(--accent);
  border-color: var(--accent);
}

.switch[aria-checked="true"]::after {
  transform: translateX(22px);
  background: #fff;
}

/* Finish picker */
.field-label {
  margin: 24px 0 0;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.finishes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.finish {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px 0 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: none;
  font-size: 13px;
  cursor: pointer;
}

.finish[aria-checked="true"] {
  border-color: var(--text);
}

.finish__swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid #3a3936;
}

.finish__swatch--graphite { background: linear-gradient(135deg, #46484d, #1c1d20); }
.finish__swatch--mirror { background: linear-gradient(135deg, #f5f5f6, #8a8d92); }
.finish__swatch--corten { background: linear-gradient(135deg, #8c4727, #3b1b0e); }

/* Section manager */
.section-list {
  margin-top: 6px;
}

.section-item {
  border-bottom: 1px solid var(--line-soft);
}

.section-item__row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
}

.section-item__row .icon {
  color: #5e5c58;
}

.section-item__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.section-item__label {
  font-size: 15px;
  font-weight: 500;
}

.section-item__summary {
  font-size: 12px;
  color: var(--faint);
}

.visibility {
  min-width: 88px;
}

.visibility[aria-pressed="true"] {
  border-color: transparent;
  background: var(--text);
  color: var(--bg);
}

.visibility[aria-pressed="false"] {
  border-style: dashed;
  color: var(--faint);
}

.section-editor {
  padding: 4px 0 24px 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.item-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.item-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.item-card__title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}

.item-card__tools {
  display: flex;
  gap: 6px;
}

.icon-btn {
  min-width: 36px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: none;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--faint);
}

.icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.item-card .fields {
  margin-top: 0;
}

/* Live preview */
.preview-frame {
  width: 100%;
  height: 720px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--bg);
  overflow: hidden;
}

.preview-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.preview-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Connections ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 36px;
}

.stat {
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat__label {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.stat__value {
  font-family: var(--title);
  font-weight: 500;
  font-size: 38px;
  letter-spacing: -0.02em;
  line-height: 1;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.search {
  flex: 1 1 300px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  color: var(--muted);
}

.search:focus-within {
  border-color: var(--faint);
}

.search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: none;
  font-size: 14px;
  color: var(--text);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: none;
  font-size: 13px;
  cursor: pointer;
}

.chip[aria-pressed="true"] {
  border-color: transparent;
  background: var(--text);
  color: var(--bg);
  font-weight: 500;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
}

.table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.table th {
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-align: left;
  color: var(--muted);
}

.table th button {
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  cursor: pointer;
}

.table th button:hover,
.table th[aria-sort] button {
  color: var(--text);
}

.table td {
  padding: 14px 22px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
  color: var(--text-2);
  vertical-align: middle;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover td {
  background: #0f0f10;
}

.person {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  font-weight: 300;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 15px;
  color: var(--text);
  flex-shrink: 0;
}

.person__name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.via {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.muted {
  color: var(--muted) !important;
}

.empty {
  padding: 48px 22px;
  text-align: center;
}

.empty strong {
  display: block;
  font-family: var(--title);
  font-weight: 500;
  font-size: 20px;
}

.empty span {
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Small screens ---------- */

@media (max-width: 820px) {
  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--line-soft);
    padding: 20px;
    gap: 20px;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .sidebar__user {
    margin-left: auto;
  }

  .nav {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
  }

  .nav__item {
    gap: 8px;
  }

  .sidebar__foot {
    margin-top: 0;
  }

  .main {
    padding-top: 32px;
  }

  .editor__preview {
    position: static;
  }

  .section-editor {
    padding-left: 0;
  }
}

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

/* =========================================================
   Intro video
   ========================================================= */

.intro-frame {
  margin-top: 16px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
}

.intro-video {
  display: block;
  width: 100%;
  max-height: 78vh;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  background: #000;
}

/* Manage: video tools */
.video-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}

.video-stage {
  flex: 0 0 auto;
  width: 180px;
  aspect-ratio: 9 / 16;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--faint);
  font-size: 12px;
  text-align: center;
  padding: 0;
}

.video-stage video,
.video-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-panel {
  flex: 1 1 260px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.video-panel__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.progress {
  height: 4px;
  border-radius: 2px;
  background: var(--surface-2);
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  width: 0;
  background: var(--text);
  transition: width 0.2s linear;
}

.notice {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.notice[data-tone="error"] {
  color: #e8a38a;
}

.wallet-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
}

.btn--wallet {
  background: #000;
  border-color: #3a3936;
  color: #fff;
}

.btn--wallet .icon {
  color: #fff;
}


/* =========================================================
   Platform: page states, sign in, landing, onboarding
   ========================================================= */

[hidden] {
  display: none !important;
}

.page-state {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
  text-align: center;
}

.page-state__text {
  margin: 0;
  max-width: 420px;
  font-family: var(--title);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.page-state__link {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-underline-offset: 4px;
}

.auth {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 48px 20px;
}

.auth__brand {
  text-decoration: none;
}

.auth__panel {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth__title {
  margin: 0;
  font-family: var(--title);
  font-weight: 500;
  font-size: 30px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.auth__lead {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.55;
}

.auth__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth__form .notice:empty {
  display: none;
}

.auth__links {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--faint);
}

.auth__links a,
.linklike {
  color: var(--text-2);
  text-underline-offset: 4px;
}

.linklike {
  padding: 0;
  border: none;
  background: none;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}

.hint[data-tone="ok"] {
  color: #9fc5a4;
}

.hint[data-tone="error"] {
  color: #e8a38a;
}

.slug-input {
  display: flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  background: var(--surface);
  overflow: hidden;
}

.slug-input:focus-within {
  border-color: var(--faint);
}

.slug-input__prefix {
  padding: 0 0 0 14px;
  font-size: 15px;
  color: var(--faint);
  white-space: nowrap;
}

.slug-input .input {
  border: none;
  background: none;
  padding-left: 2px;
}

/* Landing */
.landing {
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 24px 72px;
}

.landing__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.landing__signin {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-underline-offset: 4px;
}

.landing__hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 28px;
  padding-top: 64px;
}

.landing__title {
  margin: 24px 0 0;
  font-family: var(--title);
  font-weight: 500;
  font-size: clamp(38px, 8vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.landing__lead {
  margin: 0;
  max-width: 520px;
  font-size: 17px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--muted);
}

.landing__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* Public page: save to connections */
.connect:empty {
  display: none;
}

.connect__note {
  margin: 0;
  text-align: center;
  font-size: 13px;
  color: var(--faint);
}

.connect__note a {
  color: var(--text-2);
  text-underline-offset: 4px;
}

/* Manage: link, photo, logo */
.link-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.link-box__label {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.link-box__url {
  flex: 1;
  min-width: 0;
  font-family: var(--title);
  font-weight: 500;
  font-size: 16px;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.cv-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 12px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(196, 98, 45, 0.06), transparent 60%);
}

.cv-box__text {
  flex: 1;
  min-width: 220px;
  display: grid;
  gap: 4px;
}

.cv-box__title {
  font-family: var(--title);
  font-weight: 500;
  font-size: 15px;
}

.cv-box[data-busy="true"] .btn {
  opacity: 0.6;
  pointer-events: none;
}

.photo-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 20px;
}

.photo-row__img,
.photo-row__empty {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  object-fit: cover;
  flex-shrink: 0;
}

.photo-row__empty {
  display: block;
  background: var(--surface);
}

.photo-row__actions,
.logo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.field-label-inline {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.progress__bar--busy {
  width: 40% !important;
  animation: busy 1.1s ease-in-out infinite alternate;
}

@keyframes busy {
  from { transform: translateX(-60%); }
  to { transform: translateX(210%); }
}

.person-link {
  text-decoration: none;
  color: inherit;
}

.person-link:hover .person__name {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Settings */
.settings {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 720px;
}

.settings .setting {
  margin-top: 0;
}

.settings__block {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}

.settings__title {
  margin: 0;
  font-family: var(--title);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.settings__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.settings .fields {
  margin-top: 0;
}

code {
  font-size: 0.92em;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--surface-2);
}

.save-status[data-state="error"] {
  color: #e8a38a;
}

@media (prefers-reduced-motion: reduce) {
  .progress__bar--busy {
    animation: none;
  }
}

a.wordmark {
  color: var(--text);
  text-decoration: none;
}
