/* 0t.link trust layer — Scandinavian minimal */

:root {
  --t-bg: #f8f7f4;
  --t-card: #ffffff;
  --t-ink: #1a1a1a;
  --t-muted: #6b7280;
  --t-border: #e8e6e1;
  --t-accent: #2563eb;
  --t-accent-hover: #1d4ed8;
  --t-green: #059669;
  --t-radius: 16px;
  --t-font: "DM Sans", system-ui, -apple-system, sans-serif;
}

html[data-theme="dark"] {
  --t-bg: #0b1017;
  --t-card: #121923;
  --t-ink: #eef2ff;
  --t-muted: #bcc7d6;
  --t-border: #243041;
  --t-accent: #60a5fa;
  --t-accent-hover: #3b82f6;
  --t-green: #34d399;
}

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

body.t-site {
  margin: 0;
  min-height: 100vh;
  font-family: var(--t-font);
  color: var(--t-ink);
  background: var(--t-bg);
  -webkit-font-smoothing: antialiased;
}

.t-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  max-width: 720px;
  margin: 0 auto;
}

.t-logo img {
  display: block;
  height: 28px;
  width: auto;
}

.t-badge {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--t-muted);
  border: 1px solid var(--t-border);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  background: var(--t-card);
}

.t-header-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.t-visibility-badge.public {
  color: var(--t-accent);
  border-color: #bfdbfe;
  background: #eff6ff;
}

.t-visibility-badge.private {
  color: var(--t-muted);
}

.t-main {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

body.t-error-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

body.t-error-screen .t-main {
  width: 100%;
  padding: 1.25rem;
}

.t-card {
  background: var(--t-card);
  border: 1px solid var(--t-border);
  border-radius: var(--t-radius);
  padding: 2rem 1.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.t-profile {
  text-align: center;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--t-border);
  overflow: visible;
}

.t-avatar {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.14), rgba(96, 165, 250, 0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 600;
  color: #44403c;
  border: 1px solid var(--t-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.t-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.t-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.t-avatar-seal {
  width: 2.75rem;
  height: 2.75rem;
  display: block;
}

.t-name-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  overflow: visible;
}

.t-name {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.t-verified-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  cursor: help;
  transform: translateY(-0.08rem);
}

.t-verified-badge-icon,
.t-verified-badge svg {
  display: block;
  width: 100%;
  height: 100%;
}

.t-verified-badge::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.5rem);
  transform: translateX(-50%);
  width: max-content;
  max-width: min(260px, 72vw);
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--t-border);
  background: var(--t-card);
  color: var(--t-ink);
  font-family: var(--t-font);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
  text-align: left;
  white-space: pre-line;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 30;
}

.t-verified-badge:hover::after,
.t-verified-badge:focus::after,
.t-verified-badge:focus-visible::after {
  opacity: 1;
  visibility: visible;
}

.t-verified-badge:focus-visible {
  outline: 2px solid var(--t-accent);
  outline-offset: 3px;
  border-radius: 999px;
}

.t-trust-strip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.9rem auto 0;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--t-border);
  background: rgba(37, 99, 235, 0.06);
  color: var(--t-muted);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.t-trust-dot {
  opacity: 0.75;
}

.t-trust-chip {
  position: relative;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: help;
  border-bottom: 1px dotted currentColor;
}

.t-trust-chip:focus-visible {
  outline: 2px solid var(--t-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.t-trust-chip::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.55rem);
  transform: translateX(-50%);
  width: max-content;
  max-width: min(240px, 70vw);
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--t-border);
  background: var(--t-card);
  color: var(--t-ink);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
  text-align: left;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 20;
}

.t-trust-chip:hover::after,
.t-trust-chip:focus-visible::after {
  opacity: 1;
  visibility: visible;
}

.t-trust-tip {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.t-verify-note {
  margin: 0.65rem auto 0;
  max-width: 22rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--t-muted);
}

.t-org {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: var(--t-ink);
}

.t-meta,
.t-scan-meta {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--t-muted);
}

.t-email-domain {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--t-ink);
}

.t-email-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 999px;
  background: var(--t-accent);
  color: #fff;
  font-size: 0.62rem;
  line-height: 1;
  font-weight: 700;
}

.t-destination {
  padding: 1.1rem 0 0.5rem;
  text-align: center;
  min-width: 0;
}

.t-destination .t-scan-meta {
  margin: 0.65rem 0 0;
}

.t-dest-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.t-dest-preview-link {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0.75rem auto 0.5rem;
  text-decoration: none;
  color: inherit;
}

.t-dest-preview-link:hover .t-dest-preview {
  border-color: var(--t-accent);
  box-shadow: 0 4px 24px rgba(37, 99, 235, 0.12);
}

.t-dest-preview {
  margin: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--t-border);
  background: var(--t-border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.t-dest-preview img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.t-dest-preview-embed {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #111;
}

.t-dest-preview-embed iframe {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
  display: block;
}

html.t-embed-root,
html.t-gate-embed-root {
  height: 100%;
}

html.t-embed-root body,
body.t-embed-page {
  margin: 0;
  height: 100%;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #0b1017;
  color: #eef2ff;
  font-family: var(--t-font);
}

.t-embed-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 44px;
  padding: 0.35rem 0.85rem;
  border-bottom: 1px solid #243041;
  background: #121923;
}

.t-embed-bar .t-logo img {
  height: 22px;
}

.t-embed-bar-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: #bcc7d6;
}

.t-embed-bar-meta a {
  color: #93c5fd;
  text-decoration: none;
  font-weight: 600;
}

.t-embed-bar-meta a:hover {
  text-decoration: underline;
}

.t-embed-stage {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  background: #000;
}

.t-embed-stage iframe {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
  display: block;
}

html.t-gate-embed-root,
body.t-gate-embed {
  height: 100%;
  min-height: 100dvh;
}

body.t-gate-embed {
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--t-bg);
}

body.t-gate-embed .t-embed-bar {
  background: var(--t-card);
  border-bottom: 1px solid var(--t-border);
  color: var(--t-ink);
  min-height: 52px;
  padding: 0.4rem 0.85rem;
  gap: 0.75rem;
}

body.t-gate-embed .t-embed-bar .t-logo img {
  height: 22px;
}

.t-embed-who {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  flex: 1;
}

.t-embed-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.14), rgba(96, 165, 250, 0.08));
  border: 1px solid var(--t-border);
}

.t-embed-avatar .t-avatar-img,
.t-embed-avatar .t-avatar-fallback,
.t-embed-avatar .t-avatar-seal {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.t-embed-avatar .t-avatar-seal {
  width: 18px;
  height: 18px;
  margin: 7px auto;
}

.t-embed-who-text {
  min-width: 0;
  text-align: left;
}

body.t-gate-embed .t-name-row {
  margin: 0;
  justify-content: flex-start;
}

body.t-gate-embed .t-name {
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.t-gate-embed .t-verified-badge {
  width: 1rem;
  height: 1rem;
  transform: none;
}

body.t-gate-embed .t-verified-badge::after {
  bottom: auto;
  top: calc(100% + 0.45rem);
}

body.t-gate-embed .t-meta {
  margin: 0;
  font-size: 0.72rem;
  color: var(--t-muted);
  white-space: nowrap;
}

.t-embed-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

body.t-gate-embed .t-badge {
  background: transparent;
}

.t-embed-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.35rem 0.8rem;
  border-radius: 8px;
  background: var(--t-accent);
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.t-embed-open:hover {
  background: var(--t-accent-hover);
}

body.t-gate-embed .t-share-btn {
  width: auto;
  min-height: 2rem;
  padding: 0.35rem 0.8rem;
  font-size: 0.82rem;
}

body.t-gate-embed .t-embed-stage {
  flex: 1 1 auto;
  min-height: 0;
}

body.t-gate-embed .t-footer {
  display: none;
}

@media (max-width: 720px) {
  body.t-gate-embed .t-embed-bar {
    flex-wrap: wrap;
  }

  body.t-gate-embed .t-badge {
    display: none;
  }

  .t-embed-bar-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

.t-link-preview-html {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111827;
  color: #93c5fd;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.t-dest-label {
  margin: 0;
  font-size: 0.82rem;
  color: var(--t-muted);
}

.t-dest-title {
  margin: 0.25rem 0 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.t-dest-url {
  margin: 0.15rem 0 1rem;
  font-size: 0.88rem;
  color: var(--t-muted);
}

.t-scan-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 220px;
  text-align: left;
  font-size: 0.82rem;
}

.t-scan-list li {
  padding: 0.2rem 0;
  color: var(--t-muted);
}

.t-scan-list li.ok {
  color: var(--t-green);
}

.t-scan-list li.warn {
  color: #d97706;
}

.t-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.t-gate-actions .t-continue {
  margin: 0;
}

.t-share-btn {
  width: 100%;
  padding: 0.85rem 1.25rem;
  border: 1px solid var(--t-border);
  border-radius: 10px;
  background: var(--t-card);
  color: var(--t-ink);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.t-share-btn:hover {
  border-color: #c4c0b8;
}

.t-share-dialog {
  width: min(520px, calc(100vw - 2rem));
  max-width: 100%;
  border: none;
  border-radius: 18px;
  padding: 0;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
}

.t-share-dialog::backdrop {
  background: rgba(26, 26, 26, 0.38);
}

.t-share-form {
  padding: 1.2rem;
}

.t-share-form .t-result-tabs {
  margin-top: 0.25rem;
}

.t-continue {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.9rem 1.25rem;
  background: var(--t-accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

.t-continue:hover {
  background: var(--t-accent-hover);
}

.t-note {
  margin-top: 1.25rem;
  padding: 1rem;
  background: #f8f7f4;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.t-note-label {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--t-muted);
}

.t-note p:last-child {
  margin: 0;
}

.t-comments {
  text-align: left;
}

.t-comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.t-comment {
  padding-top: 0.85rem;
  border-top: 1px solid var(--t-border);
}

.t-comment:first-child {
  padding-top: 0;
  border-top: none;
}

.t-comment-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.t-comment-author {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--t-ink);
}

.t-comment-time {
  font-size: 0.72rem;
  color: var(--t-muted);
  white-space: nowrap;
}

.t-comment-body {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
}

.t-comments-empty p:last-child {
  color: var(--t-muted);
  font-size: 0.85rem;
}

.t-footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.8rem;
  color: var(--t-muted);
}

.t-footer-links,
.t-footer-meta {
  display: block;
}

.t-footer-links {
  line-height: 1.7;
}

.t-footer-meta {
  margin-top: 0.35rem;
}

.t-footer-stats {
  margin-top: 0.55rem;
  font-size: 0.78rem;
  color: var(--t-muted);
  line-height: 1.5;
}

.t-footer-stats strong {
  color: var(--t-ink);
  font-weight: 700;
}

.t-footer a,
.t-home-footer a {
  color: inherit;
}

/* Homepage */

body.t-home {
  margin: 0;
  min-height: 100vh;
  font-family: var(--t-font);
  color: var(--t-ink);
  background: var(--t-bg);
  display: flex;
  flex-direction: column;
}

.t-home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.t-user-menu-slot {
  flex-shrink: 0;
}

.t-header-login {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--t-ink);
  text-decoration: none;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--t-border);
  border-radius: 999px;
  background: var(--t-card);
}

.t-header-login:hover {
  border-color: #c4c0b8;
}

.t-user-menu {
  position: relative;
}

.t-user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem 0.35rem 0.35rem;
  border: 1px solid var(--t-border);
  border-radius: 999px;
  background: var(--t-card);
  cursor: pointer;
  font: inherit;
  color: var(--t-ink);
  max-width: min(220px, 42vw);
}

.t-user-trigger:hover {
  border-color: #c4c0b8;
}

.t-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(145deg, #e8e6e1, #f3f2ef);
  flex-shrink: 0;
}

.t-user-avatar-lg {
  width: 2.5rem;
  height: 2.5rem;
}

.t-user-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.t-user-avatar-init {
  font-size: 0.72rem;
  font-weight: 700;
  color: #44403c;
}

.t-user-name {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.t-user-chevron {
  flex-shrink: 0;
  color: var(--t-muted);
  margin-right: 0.15rem;
}

.t-user-dropdown {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  min-width: 240px;
  background: var(--t-card);
  border: 1px solid var(--t-border);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
  padding: 0.5rem;
  z-index: 50;
}

.t-user-dropdown-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--t-border);
  margin-bottom: 0.35rem;
}

.t-user-profile-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.5rem;
  margin: -0.5rem -0.5rem 0.35rem;
  border-bottom: 1px solid var(--t-border);
  text-decoration: none;
  color: var(--t-ink);
  border-radius: 8px 8px 0 0;
  cursor: pointer;
}

.t-user-profile-link:visited {
  color: var(--t-ink);
}

.t-user-profile-link:hover {
  background: var(--t-bg);
}

.t-user-profile-link strong {
  color: var(--t-ink);
  font-weight: 600;
  text-decoration: none;
}

.t-user-profile-link span {
  color: var(--t-muted);
  text-decoration: none;
}

.t-user-dropdown-head-static {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--t-border);
  margin-bottom: 0.35rem;
}

.t-user-prefix-link {
  color: var(--t-muted);
  text-decoration: none;
  cursor: pointer;
}

.t-user-prefix-link:visited {
  color: var(--t-muted);
}

.t-user-prefix-link strong {
  color: var(--t-ink);
  font-weight: 600;
}

.t-user-prefix-link:hover {
  opacity: 0.85;
}

.t-public-link-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.t-public-link-actions {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
}

.t-link-remove {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--t-border);
  border-radius: 999px;
  padding: 0.35rem 0.6rem;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--t-muted);
  cursor: pointer;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

.t-link-remove:hover:not(:disabled) {
  border-color: #c4c0b8;
  color: var(--t-ink);
}

.t-link-remove:disabled {
  opacity: 0.6;
  cursor: wait;
}

.t-link-vis {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--t-border);
}

.t-link-vis.public {
  color: var(--t-accent);
  border-color: #bfdbfe;
  background: #eff6ff;
}

.t-link-vis.private {
  color: var(--t-muted);
}

.t-user-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.t-user-meta strong {
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.t-user-meta span {
  font-size: 0.78rem;
  color: var(--t-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.t-user-prefix {
  margin: 0.35rem 0.5rem 0.5rem;
  font-size: 0.78rem;
  color: var(--t-muted);
}

.t-user-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--t-ink);
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.t-user-item:hover {
  background: #f8f7f4;
}

.t-user-item-accent {
  color: var(--t-accent);
  font-weight: 600;
}

.t-user-item-btn {
  text-align: left;
}

.t-user-item-danger {
  color: #b91c1c;
  border-top: 1px solid var(--t-border);
  margin-top: 0.25rem;
  padding-top: 0.75rem;
  border-radius: 0 0 8px 8px;
}

.t-home-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0 0 3rem;
  text-align: center;
}

.t-home-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: min(72vh, 40rem);
  padding: 1.5rem 1.25rem 3.5rem;
  background:
    radial-gradient(ellipse 80% 55% at 50% -10%, rgba(37, 99, 235, 0.08), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, transparent 55%);
}

.t-home-tagline {
  margin: 0.5rem 0 0.75rem;
  font-size: clamp(1.85rem, 5.2vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  max-width: 22ch;
  animation: t-home-rise 0.65s ease both;
}

.t-home-sub {
  margin: 0 0 2rem;
  font-size: clamp(1rem, 2.4vw, 1.12rem);
  color: var(--t-muted);
  max-width: 34rem;
  line-height: 1.55;
  animation: t-home-rise 0.65s ease 0.08s both;
}

.t-search-wrap {
  width: 100%;
  max-width: 584px;
  animation: t-home-rise 0.65s ease 0.16s both;
}

.t-home-advanced {
  text-align: left;
}

.t-home-advanced-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.2rem 0;
  border: none;
  background: none;
  color: var(--t-muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.t-home-advanced-toggle:hover {
  color: var(--t-ink);
}

.t-home-advanced-chevron {
  display: inline-block;
  transition: transform 0.18s ease;
}

.t-home-advanced-toggle[aria-expanded="true"] .t-home-advanced-chevron {
  transform: rotate(180deg);
}

.t-home-advanced-panel {
  margin-top: 0.55rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--t-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  text-align: left;
}

.t-home-advanced-help {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--t-muted);
}

.t-home-advanced-help code {
  font-size: 0.8em;
  color: var(--t-ink);
  word-break: break-word;
}

.t-home-mode-note {
  margin: 0.55rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--t-muted);
  text-align: left;
}

.t-home-mode-note strong {
  color: var(--t-ink);
  font-weight: 600;
}

.t-home-section {
  width: min(920px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 3.25rem 0 0.5rem;
  text-align: left;
}

.t-home-section-title {
  margin: 0 0 0.85rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  max-width: 22ch;
}

.t-home-section-sub {
  margin: 0 0 1.5rem;
  font-size: 1rem;
  color: var(--t-muted);
  max-width: 36rem;
  line-height: 1.5;
}

.t-home-pain {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
  max-width: 40rem;
}

.t-home-pain li {
  position: relative;
  padding-left: 1.15rem;
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--t-ink);
}

.t-home-pain li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--t-accent);
}

.t-home-recipient {
  text-align: center;
}

.t-home-recipient .t-home-section-title,
.t-home-recipient .t-home-section-sub {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.t-home-recipient .t-home-section-title {
  max-width: 18ch;
}

.t-home-gate-stage {
  margin: 1.75rem auto 0;
  width: min(520px, 100%);
  padding: 1.25rem;
  border-radius: 24px;
  background:
    radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.12), transparent 45%),
    radial-gradient(circle at 80% 100%, rgba(5, 150, 105, 0.1), transparent 40%),
    linear-gradient(160deg, #eef2ff 0%, #f8f7f4 45%, #ecfdf5 100%);
  animation: t-home-rise 0.8s ease 0.1s both;
}

.t-home-gate-embed {
  width: min(640px, 100%);
  text-align: left;
}

.t-home-gate-embed > a,
.t-home-gate-embed > div {
  margin: 0 auto;
}

.t-home-gate-mock {
  background: var(--t-card);
  border: 1px solid var(--t-border);
  border-radius: 18px;
  padding: 1rem 1rem 1.15rem;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.1);
  text-align: left;
}

.t-home-gate-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.t-home-gate-logo {
  height: 20px;
  width: auto;
  display: block;
}

.t-home-gate-profile {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.2rem;
  margin-bottom: 0.9rem;
}

.t-home-gate-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: #eff6ff;
  color: var(--t-accent);
  margin-bottom: 0.35rem;
}

.t-home-gate-name-row {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.t-home-gate-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.t-home-gate-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--t-accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
}

.t-home-gate-meta,
.t-home-gate-scan {
  margin: 0;
  font-size: 0.78rem;
  color: var(--t-muted);
}

.t-home-gate-preview {
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--t-border);
  background: #f3f4f6;
  aspect-ratio: 16 / 10;
}

.t-home-gate-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.t-home-gate-scan {
  margin: 0.55rem 0 0.85rem;
  text-align: center;
}

.t-home-gate-continue {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  background: var(--t-accent);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
}

.t-home-product-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1rem;
  margin-top: 1.25rem;
  align-items: stretch;
}

.t-home-product {
  padding: 1.25rem 1.2rem 1.35rem;
  border-top: 2px solid var(--t-border);
  background: transparent;
  text-align: left;
}

.t-home-product-primary {
  padding: 1.45rem 1.35rem 1.5rem;
  border-top-color: var(--t-accent);
  border: 1px solid var(--t-border);
  border-top-width: 3px;
  border-radius: 0 0 14px 14px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.t-home-product-secondary {
  opacity: 0.92;
}

.t-home-product-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--t-accent);
}

.t-home-product-secondary .t-home-product-eyebrow {
  color: var(--t-muted);
}

.t-home-product-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--t-accent);
}

.t-home-product-title {
  margin: 0 0 0.55rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.t-home-product-primary .t-home-product-title {
  font-size: 1.28rem;
}

.t-home-product-body {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--t-muted);
}

.t-home-product-note {
  margin: 0.85rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--t-ink);
}

.t-home-qr-callout {
  padding-top: 2.75rem;
}

.t-home-qr-inner {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--t-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
  text-align: left;
}

.t-home-qr-icon {
  flex-shrink: 0;
  color: var(--t-ink);
  margin-top: 0.1rem;
}

.t-home-qr-title {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.t-home-qr-body {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--t-muted);
  max-width: 36rem;
}

.t-home-industries {
  padding-bottom: 1rem;
}

.t-home-industry-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem 2rem;
  margin-top: 1.5rem;
}

.t-home-industry-group {
  text-align: left;
  padding-top: 0.85rem;
  border-top: 1px solid var(--t-border);
}

.t-home-industry-label {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--t-accent);
}

.t-home-industry-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.t-home-industry-list li {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--t-muted);
}

.t-home-industry-list strong {
  color: var(--t-ink);
  font-weight: 600;
}

.t-home-trust {
  padding-bottom: 1.5rem;
}

.t-home-usage {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.35rem 0 1.5rem;
  text-align: left;
}

.t-home-usage-item {
  display: grid;
  gap: 0.35rem;
  padding-top: 0.85rem;
  border-top: 2px solid var(--t-accent);
}

.t-home-usage-item strong {
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--t-ink);
  line-height: 1.1;
}

.t-home-usage-item span {
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--t-muted);
}

.t-home-compliance {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
  text-align: left;
  max-width: 40rem;
}

.t-home-compliance li {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--t-muted);
}

.t-home-compliance strong {
  color: var(--t-ink);
  font-weight: 600;
}

.t-home-compliance a {
  color: var(--t-accent);
  text-decoration: none;
  font-weight: 600;
}

.t-home-compliance a:hover {
  text-decoration: underline;
}

.t-status-list {
  display: grid;
  gap: 0.65rem;
}

.t-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--t-border);
  border-radius: 12px;
  background: var(--t-card);
}

.t-status-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--t-ink);
}

.t-status-pill {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--t-border);
  color: var(--t-muted);
}

.t-status-pill.is-up {
  color: var(--t-green);
  border-color: rgba(5, 150, 105, 0.35);
  background: rgba(5, 150, 105, 0.08);
}

@keyframes t-home-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .t-home-tagline,
  .t-home-sub,
  .t-search-wrap,
  .t-home-gate-stage {
    animation: none;
  }
}

.t-search-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.t-search-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--t-card);
  border: 1px solid var(--t-border);
  border-radius: 16px;
  padding: 0.5rem 0.5rem 0.5rem 1rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.15s, border-color 0.15s;
}

.t-search-row:focus-within {
  border-color: #c4c0b8;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.t-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  padding: 0.7rem 0;
  outline: none;
  min-width: 0;
  resize: none;
  overflow: hidden;
  line-height: 1.2;
}

.t-url-input {
  min-height: 2.5rem;
  height: 2.5rem;
  max-height: 12rem;
  overflow-y: auto !important;
  box-sizing: border-box;
}

.t-auth-screen {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--t-font);
  color: var(--t-muted);
  background: var(--t-bg);
}

.t-auth-message {
  margin: 0;
  font-size: 1rem;
}

.t-search-btn {
  flex-shrink: 0;
  border: none;
  background: var(--t-accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.2;
  height: 2.5rem;
  padding: 0 1.35rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s;
}

.t-search-btn:hover:not(:disabled) {
  background: var(--t-accent-hover);
}

.t-search-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.t-note-input {
  width: 100%;
  border: 1px solid var(--t-border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font: inherit;
  font-size: 0.88rem;
  background: var(--t-card);
  resize: vertical;
  min-height: 2.5rem;
}

.t-note-input:focus {
  outline: none;
  border-color: #c4c0b8;
}

.t-visibility-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.t-visibility-label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--t-muted);
  transition: color 0.15s;
}

.t-visibility-row:has(#t-visibility:not(:checked)) #t-visibility-private,
.t-visibility-row:has(#t-visibility:checked) #t-visibility-public {
  color: var(--t-ink);
  font-weight: 600;
}

.t-switch {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  cursor: pointer;
}

.t-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.t-switch-track {
  display: block;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #d6d3cd;
  transition: background 0.2s;
  position: relative;
}

.t-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s;
}

.t-switch input:checked + .t-switch-track {
  background: var(--t-accent);
}

.t-switch input:checked + .t-switch-track .t-switch-thumb {
  transform: translateX(18px);
}

.t-switch input:focus-visible + .t-switch-track {
  outline: 2px solid var(--t-accent);
  outline-offset: 2px;
}

.t-result {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--t-card);
  border: 1px solid var(--t-border);
  border-radius: 12px;
  text-align: left;
  max-width: 584px;
  width: 100%;
}

.t-result-label {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--t-muted);
}

.t-result-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
}

.t-result-tab {
  border: 1px solid var(--t-border);
  background: #fff;
  color: var(--t-muted);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.t-result-tab.is-active {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: var(--t-accent);
}

.t-result-url {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.t-result-url textarea {
  flex: 1;
  border: 1px solid var(--t-border);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font: inherit;
  font-size: 0.88rem;
  background: #fafaf9;
  resize: none;
  min-height: 2.9rem;
  line-height: 1.45;
}

.t-result-routing,
.t-routing-hint {
  margin: 0.65rem 0 0;
  font-size: 0.82rem;
  color: var(--t-muted);
}

.t-result-help {
  margin: 0.65rem 0 0;
  font-size: 0.82rem;
  color: var(--t-muted);
}

.t-qr-panel {
  display: grid;
  gap: 0.75rem;
  justify-items: center;
  text-align: center;
}

.t-qr-panel[hidden] {
  display: none !important;
}

.t-qr-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 236px;
  height: 236px;
  padding: 0.5rem;
  border: 1px solid var(--t-border);
  border-radius: 14px;
  background: #fff;
  box-sizing: border-box;
}

.t-qr-frame img {
  display: block;
  width: 220px;
  height: 220px;
  max-width: 100%;
  background: #fff;
}

.t-qr-encoded {
  margin: 0;
  max-width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--t-border);
  border-radius: 8px;
  background: #fafaf9;
  color: var(--t-ink);
  font-size: 0.82rem;
  line-height: 1.45;
  word-break: break-all;
  text-align: left;
  box-sizing: border-box;
}

.t-qr-dynamic-note {
  margin: 0;
  max-width: 100%;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--t-muted);
  text-align: left;
}

.t-qr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  width: 100%;
}

.t-qr-actions .t-copy-btn,
.t-qr-actions .t-qr-secondary-btn {
  width: auto;
  min-width: 9rem;
}

.t-qr-secondary-btn {
  padding: 0.55rem 0.9rem;
  font-size: 0.88rem;
}

.t-copy-btn {
  border: 1px solid var(--t-border);
  background: #fff;
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.t-error {
  margin-top: 0.75rem;
  color: #b91c1c;
  font-size: 0.85rem;
}

.t-home-footer {
  padding: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--t-muted);
}

.t-home-footer .t-footer-links {
  line-height: 1.7;
}

.t-home-footer .t-footer-meta {
  margin-top: 0.35rem;
}

.t-home-footer .t-footer-stats {
  margin-top: 0.55rem;
}

/* Join / onboarding */

.t-join {
  max-width: 480px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.t-steps {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.t-step-dot {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--t-border);
}

.t-step-dot.done {
  background: var(--t-green);
}

.t-step-dot.active {
  background: var(--t-accent);
}

.t-join h1 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.t-join-lead {
  margin: 0 0 1.5rem;
  color: var(--t-muted);
  font-size: 0.92rem;
}

.t-field {
  margin-bottom: 1rem;
  text-align: left;
}

.t-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.t-field input,
.t-field textarea,
.t-field select {
  width: 100%;
  border: 1px solid var(--t-border);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font: inherit;
  font-size: 0.95rem;
  background: var(--t-card);
}

.t-field input:focus,
.t-field textarea:focus,
.t-field select:focus {
  outline: none;
  border-color: #c4c0b8;
}

.t-field input[readonly] {
  color: var(--t-muted);
  cursor: default;
}

.t-slug-preview {
  font-size: 0.82rem;
  color: var(--t-muted);
  margin-top: 0.35rem;
}

.t-slug-preview strong {
  color: var(--t-ink);
}

.t-join-btn {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.85rem;
  border: none;
  border-radius: 10px;
  background: var(--t-accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

.t-join-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.t-join-btn.secondary {
  background: var(--t-card);
  color: var(--t-ink);
  border: 1px solid var(--t-border);
}

.t-kyc-box {
  padding: 1.25rem;
  background: #f8f7f4;
  border-radius: 12px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--t-muted);
}

/* Account settings */

.t-settings {
  text-align: left;
}

.t-settings-title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.t-settings-lead {
  margin: 0 0 1.5rem;
  color: var(--t-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.t-settings-photo-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--t-border);
}

.t-settings-photo-wrap {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(145deg, #e8e6e1, #f3f2ef);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.t-settings-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.t-settings-photo-init {
  font-size: 1.5rem;
  font-weight: 600;
  color: #44403c;
}

.t-settings-upload-btn {
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--t-border);
  background: var(--t-card);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s;
}

.t-settings-upload-btn:hover {
  border-color: #c4c0b8;
}

.t-settings-hint {
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  color: var(--t-muted);
}

.t-settings-form {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.t-settings-email {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
  color: var(--t-muted);
}

.t-settings-success {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  color: var(--t-green);
  font-weight: 500;
}

html[data-theme="dark"] .t-note,
html[data-theme="dark"] .t-kyc-box,
html[data-theme="dark"] .t-result-tab,
html[data-theme="dark"] .t-edit-dialog,
html[data-theme="dark"] .t-share-dialog,
html[data-theme="dark"] .t-edit-input,
html[data-theme="dark"] .t-search-input,
html[data-theme="dark"] .t-url-input,
html[data-theme="dark"] .t-note-input,
html[data-theme="dark"] .t-qr-encoded {
  background: rgba(255, 255, 255, 0.03);
}

html[data-theme="dark"] .t-home-hero {
  background:
    radial-gradient(ellipse 80% 55% at 50% -10%, rgba(96, 165, 250, 0.14), transparent 60%),
    linear-gradient(180deg, rgba(18, 25, 35, 0.9) 0%, transparent 55%);
}

html[data-theme="dark"] .t-home-advanced-panel,
html[data-theme="dark"] .t-home-qr-inner {
  background: rgba(255, 255, 255, 0.03);
}

html[data-theme="dark"] .t-home-gate-stage {
  background:
    radial-gradient(circle at 20% 0%, rgba(96, 165, 250, 0.18), transparent 45%),
    radial-gradient(circle at 80% 100%, rgba(52, 211, 153, 0.12), transparent 40%),
    linear-gradient(160deg, #121923 0%, #0b1017 100%);
}

html[data-theme="dark"] .t-home-gate-avatar {
  background: rgba(96, 165, 250, 0.16);
}

html[data-theme="dark"] .t-home-product {
  border-top-color: var(--t-border);
}

html[data-theme="dark"] .t-home-product-primary {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--t-border);
  border-top-color: var(--t-accent);
}

html[data-theme="dark"] .t-header-login,
html[data-theme="dark"] .t-link-edit,
html[data-theme="dark"] .t-result-tab.is-active,
html[data-theme="dark"] .t-join-btn.secondary {
  background: var(--t-card);
  border-color: var(--t-border);
  color: var(--t-ink);
}

html[data-theme="dark"] .t-edit-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.t-public-links-wrap {
  margin-top: 1rem;
  padding-top: 0.4rem;
  text-align: left;
}

.t-profile-create {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--t-border);
  text-align: left;
}

.t-profile-create .t-result {
  max-width: none;
}

.t-profile-links-toolbar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.t-profile-links-toolbar[hidden] {
  display: none;
}

.t-profile-search {
  flex: 1;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--t-border);
  border-radius: 12px;
  padding: 0.65rem 0.85rem;
  font: inherit;
  font-size: 0.92rem;
  color: var(--t-ink);
  background: var(--t-card);
}

.t-create-link-btn {
  flex-shrink: 0;
  border: none;
  background: var(--t-accent);
  color: #fff;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  min-height: 2.5rem;
  padding: 0.55rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.t-create-link-btn:hover {
  background: var(--t-accent-hover);
}

.t-create-dialog {
  width: min(560px, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow: auto;
}

.t-create-dialog .t-result {
  margin-top: 1rem;
  max-width: none;
}

.t-create-dialog .t-home-mode-note {
  margin: 0;
}

.t-profile-search:focus {
  outline: none;
  border-color: var(--t-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.t-public-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: block;
}

.t-public-link {
  padding: 0.85rem 0;
  border-top: 1px solid var(--t-border);
}

.t-public-link:first-child {
  border-top: none;
  padding-top: 0;
}

.t-public-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

a.t-public-link-row,
a.t-public-link-main {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.t-link-preview {
  flex-shrink: 0;
  width: 120px;
  height: 75px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--t-border);
  border: 1px solid var(--t-border);
}

.t-link-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.t-public-link-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.t-public-link-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--t-ink);
  line-height: 1.35;
}

a.t-public-link-row:hover .t-public-link-title,
a.t-public-link-main:hover .t-public-link-title {
  color: var(--t-accent);
}

.t-public-link-host {
  font-size: 0.82rem;
  color: var(--t-muted);
  line-height: 1.4;
}

.t-public-link-note {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--t-ink);
}

.t-public-link-empty {
  padding: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--t-muted);
  list-style: none;
}

.t-demo-page {
  text-align: left;
}

.t-demo-embed-wrap {
  margin: 1.25rem 0 1.5rem;
  max-width: 100%;
}

.t-demo-code-label {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--t-muted);
}

.t-demo-code {
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--t-border);
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.04);
  font-size: 0.78rem;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--t-ink);
}

.t-public-link-actions {
  position: static;
  top: auto;
  right: auto;
  z-index: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-left: auto;
}

.t-link-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--t-border);
  background: var(--t-card);
  padding: 0;
  font: inherit;
  color: var(--t-muted);
  cursor: pointer;
  border-radius: 8px;
  box-shadow: none;
}

.t-link-edit svg {
  width: 15px;
  height: 15px;
  display: block;
}

.t-link-edit:hover:not(:disabled) {
  color: var(--t-ink);
  border-color: #c4c0b8;
  background: #fafaf9;
}

.t-edit-dialog {
  width: min(520px, calc(100vw - 2rem));
  max-width: 100%;
  border: none;
  border-radius: 18px;
  padding: 0;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
}

.t-edit-dialog::backdrop {
  background: rgba(26, 26, 26, 0.38);
}

.t-edit-form {
  padding: 1.2rem;
}

.t-edit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.t-edit-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.t-edit-close {
  border: none;
  background: none;
  padding: 0.1rem 0.3rem;
  font: inherit;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--t-muted);
  cursor: pointer;
}

.t-edit-label {
  display: block;
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--t-ink);
}

.t-edit-input {
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 0.9rem;
  border: 1px solid var(--t-border);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  font: inherit;
  font-size: 0.92rem;
  color: var(--t-ink);
  background: var(--t-card);
  resize: vertical;
}

.t-edit-input:focus {
  outline: none;
  border-color: var(--t-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.t-edit-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
}

.t-edit-actions-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.t-edit-btn {
  border: 1px solid var(--t-border);
  background: var(--t-card);
  color: var(--t-ink);
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.t-edit-btn.primary {
  border-color: var(--t-accent);
  background: var(--t-accent);
  color: #fff;
}

.t-edit-btn.secondary {
  color: var(--t-muted);
}

.t-edit-btn-danger {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fff;
}

.t-edit-btn:disabled,
.t-link-edit:disabled {
  opacity: 0.6;
  cursor: wait;
}

@media (max-width: 520px) {
  .t-link-preview {
    width: 88px;
    height: 55px;
  }

  .t-public-link-title {
    font-size: 0.92rem;
  }

  .t-search-row {
    flex-direction: column;
    align-items: stretch;
    border-radius: 16px;
    padding: 0.75rem;
    gap: 0.5rem;
  }

  .t-search-input {
    width: 100%;
    text-align: left;
  }

  .t-search-btn {
    width: 100%;
    height: 2.75rem;
  }

  .t-url-input {
    height: auto;
    min-height: 2.75rem;
  }

  .t-result-url {
    flex-direction: column;
  }

  .t-copy-btn {
    width: 100%;
  }

  .t-edit-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .t-edit-actions-right {
    width: 100%;
    flex-direction: column;
  }

  .t-edit-btn {
    width: 100%;
  }

  .t-home-product-grid {
    grid-template-columns: 1fr;
  }

  .t-home-industry-groups {
    grid-template-columns: 1fr;
    gap: 1.35rem;
  }

  .t-home-usage {
    grid-template-columns: 1fr;
  }

  .t-home-hero {
    min-height: auto;
    padding-top: 2rem;
    padding-bottom: 2.5rem;
  }

  .t-home-tagline {
    max-width: none;
  }

  .t-home-qr-inner {
    flex-direction: column;
    gap: 0.75rem;
  }

  .t-ai-feature-grid {
    grid-template-columns: 1fr;
  }

  .t-ai-trust-grid {
    grid-template-columns: 1fr;
  }

  .t-ai-split {
    gap: 1rem;
  }

  .t-ai-cta-row {
    width: 100%;
  }

  .t-ai-cta-primary,
  .t-ai-cta-secondary {
    flex: 1;
    text-align: center;
  }
}

/* —— AI Content Routing homepage (Phase 1) —— */

.t-home-ai {
  --t-mono: "IBM Plex Mono", ui-monospace, monospace;
  background:
    radial-gradient(ellipse 90% 50% at 50% -5%, rgba(37, 99, 235, 0.07), transparent 55%),
    var(--t-bg);
}

.t-home-ai .t-home-section {
  width: min(880px, calc(100% - 2.5rem));
}

.t-ai-hero {
  min-height: min(88vh, 46rem);
  padding-bottom: 4rem;
  background: transparent;
}

.t-ai-eyebrow {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--t-accent);
  animation: t-home-rise 0.55s ease both;
}

.t-ai-headline {
  max-width: 14ch;
  margin-bottom: 1rem;
}

.t-ai-sub {
  max-width: 36rem;
  margin-bottom: 1.75rem;
}

.t-ai-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 2.75rem;
  animation: t-home-rise 0.65s ease 0.16s both;
}

.t-ai-cta-primary,
.t-ai-cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.7rem 1.35rem;
  border-radius: 10px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.t-ai-cta-primary {
  background: var(--t-accent);
  color: #fff;
  border: 1px solid transparent;
}

.t-ai-cta-primary:hover {
  background: var(--t-accent-hover);
}

.t-ai-cta-secondary {
  background: var(--t-card);
  color: var(--t-ink);
  border: 1px solid var(--t-border);
}

.t-ai-cta-secondary:hover {
  border-color: #c4c0b8;
}

.t-ai-diagram {
  width: min(420px, 100%);
  margin: 0 auto;
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  animation: t-home-rise 0.75s ease 0.22s both;
}

.t-ai-node {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 7.5rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--t-border);
  background: var(--t-card);
  color: var(--t-ink);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.t-ai-node-core {
  min-width: 8.5rem;
  background: var(--t-ink);
  color: #fff;
  border-color: var(--t-ink);
  animation: t-ai-pulse 2.8s ease-in-out infinite;
}

.t-ai-node-out {
  font-family: var(--t-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.t-ai-node-md {
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--t-accent);
  background: rgba(37, 99, 235, 0.06);
}

.t-ai-flow {
  width: 2px;
  height: 1.35rem;
  background: linear-gradient(180deg, transparent, var(--t-border) 20%, var(--t-border) 80%, transparent);
  position: relative;
}

.t-ai-flow::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--t-muted);
  border-bottom: 1.5px solid var(--t-muted);
  transform: translateX(-50%) rotate(45deg);
  opacity: 0.7;
}

.t-ai-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  width: 100%;
  margin-top: 0.15rem;
}

.t-ai-branch {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
}

.t-ai-branch:first-child {
  animation: t-ai-branch-in 0.9s ease 0.35s both;
}

.t-ai-branch:last-child {
  animation: t-ai-branch-in 0.9s ease 0.5s both;
}

.t-ai-why .t-home-section-sub,
.t-ai-discover .t-home-section-sub {
  max-width: 34rem;
  font-size: 1.05rem;
}

.t-ai-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
  text-align: left;
}

.t-ai-feature {
  padding-top: 1rem;
  border-top: 2px solid var(--t-ink);
}

.t-ai-feature-step {
  margin: 0 0 0.55rem;
  font-family: var(--t-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--t-muted);
}

.t-ai-feature-title {
  margin: 0 0 0.45rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.t-ai-feature-body {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.5;
  color: var(--t-muted);
}

.t-ai-workflow-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  justify-items: center;
}

.t-ai-workflow-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 14rem;
  padding: 0.85rem 1.25rem;
  border: 1px solid var(--t-border);
  border-radius: 12px;
  background: var(--t-card);
  font-size: 1rem;
  font-weight: 600;
}

.t-ai-workflow-arrow {
  display: block;
  color: var(--t-muted);
  font-size: 1.1rem;
  line-height: 1.4;
}

.t-ai-pillars {
  list-style: none;
  margin: 1.35rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-start;
}

.t-ai-pillars li {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--t-border);
  background: rgba(255, 255, 255, 0.55);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--t-ink);
}

.t-ai-code,
.t-ai-rule-code {
  margin: 1.25rem 0 0;
  padding: 1rem 1.15rem;
  border-radius: 12px;
  border: 1px solid var(--t-border);
  background: #111827;
  color: #e5e7eb;
  font-family: var(--t-mono);
  font-size: 0.86rem;
  line-height: 1.55;
  text-align: left;
  overflow-x: auto;
}

.t-ai-code code,
.t-ai-rule-code code {
  font: inherit;
  color: inherit;
  white-space: pre;
}

.t-ai-config-panel {
  margin-top: 1.35rem;
  border: 1px solid var(--t-border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--t-card);
  text-align: left;
}

.t-ai-config-row {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.95rem 1.1rem;
  border-top: 1px solid var(--t-border);
}

.t-ai-config-row:first-child {
  border-top: none;
}

.t-ai-config-label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--t-muted);
}

.t-ai-config-value {
  font-family: var(--t-mono);
  font-size: 0.86rem;
  color: var(--t-ink);
  overflow-wrap: anywhere;
}

.t-ai-rule {
  margin-top: 1rem;
  text-align: left;
}

.t-ai-rule-label {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--t-muted);
}

.t-ai-trust-grid {
  list-style: none;
  margin: 1.35rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.25rem;
  text-align: left;
}

.t-ai-trust-grid li {
  font-size: 0.94rem;
  line-height: 1.5;
  color: var(--t-muted);
}

.t-ai-trust-grid strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--t-ink);
  font-weight: 700;
}

.t-ai-trust .t-home-usage {
  margin-top: 1.75rem;
}

.t-ai-roadmap-list {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-start;
}

.t-ai-roadmap-list li {
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  border: 1px dashed var(--t-border);
  background: transparent;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--t-muted);
}

@keyframes t-ai-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(26, 26, 26, 0); }
  50% { transform: scale(1.02); box-shadow: 0 0 0 8px rgba(26, 26, 26, 0.04); }
}

@keyframes t-ai-branch-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

html[data-theme="dark"] .t-ai-node-core {
  background: #eef2ff;
  color: #0b1017;
  border-color: #eef2ff;
}

html[data-theme="dark"] .t-ai-pillars li,
html[data-theme="dark"] .t-ai-config-panel {
  background: rgba(255, 255, 255, 0.03);
}

html[data-theme="dark"] .t-ai-code,
html[data-theme="dark"] .t-ai-rule-code {
  background: #020617;
  border-color: #243041;
}

@media (prefers-reduced-motion: reduce) {
  .t-ai-node-core,
  .t-ai-branch:first-child,
  .t-ai-branch:last-child {
    animation: none;
  }
}

/* —— AI Routing Platform homepage —— */

.t-home-ai {
  scroll-behavior: smooth;
}

.t-home-ai .t-home-section,
.t-home-ai .t-ai-cap-card {
  scroll-margin-top: 5.5rem;
}

.t-ai-nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  flex-wrap: wrap;
  justify-content: center;
}

.t-ai-nav a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--t-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.t-ai-nav a:hover {
  color: var(--t-ink);
}

@media (max-width: 900px) {
  .t-ai-nav {
    display: none;
  }
}

.t-ai-router {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(760px, 100%);
  margin: 0 auto;
  animation: t-home-rise 0.75s ease 0.22s both;
}

.t-ai-router-visitor {
  flex-shrink: 0;
}

.t-ai-router-link {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--t-border) 25%, var(--t-border) 75%, transparent);
  position: relative;
}

.t-ai-router-link::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-top: 1.5px solid var(--t-muted);
  border-right: 1.5px solid var(--t-muted);
  transform: translateY(-50%) rotate(45deg);
  opacity: 0.7;
}

.t-ai-router-out {
  display: grid;
  gap: 0.55rem;
  justify-items: start;
}

.t-ai-route {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.t-ai-router-out .t-ai-route:nth-child(1) { animation: t-ai-branch-in 0.7s ease 0.4s both; }
.t-ai-router-out .t-ai-route:nth-child(2) { animation: t-ai-branch-in 0.7s ease 0.52s both; }
.t-ai-router-out .t-ai-route:nth-child(3) { animation: t-ai-branch-in 0.7s ease 0.64s both; }
.t-ai-router-out .t-ai-route:nth-child(4) { animation: t-ai-branch-in 0.7s ease 0.76s both; }

.t-ai-node-sm {
  min-width: 0;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  white-space: nowrap;
}

.t-ai-node-dest {
  font-family: var(--t-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--t-muted);
  background: transparent;
  border-style: dashed;
}

.t-ai-node-dest.t-ai-node-md {
  color: var(--t-accent);
  border-style: solid;
}

.t-ai-route-arrow {
  color: var(--t-muted);
  font-size: 0.85rem;
  opacity: 0.75;
}

@media (max-width: 700px) {
  .t-ai-router {
    flex-direction: column;
    gap: 0.5rem;
  }

  .t-ai-router-link {
    width: 2px;
    height: 1.5rem;
    background: linear-gradient(180deg, transparent, var(--t-border) 25%, var(--t-border) 75%, transparent);
  }

  .t-ai-router-link::after {
    right: auto;
    top: auto;
    left: 50%;
    bottom: 4px;
    transform: translateX(-50%) rotate(135deg);
  }

  .t-ai-router-out {
    justify-items: center;
  }

  .t-ai-node-sm {
    white-space: normal;
    text-align: center;
  }
}

.t-ai-feature-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .t-ai-feature-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .t-ai-feature-grid-4 {
    grid-template-columns: 1fr;
  }

  .t-profile-links-toolbar {
    flex-wrap: wrap;
  }

  .t-create-link-btn {
    width: 100%;
  }
}

.t-ai-cap-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
  margin-top: 1.5rem;
  text-align: left;
}

@media (max-width: 900px) {
  .t-ai-cap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .t-ai-cap-grid {
    grid-template-columns: 1fr;
  }
}

.t-ai-cap-card {
  display: flex;
  flex-direction: column;
  padding: 1.35rem 1.35rem 1.25rem;
  border: 1px solid var(--t-border);
  border-radius: var(--t-radius);
  background: var(--t-card);
}

.t-ai-cap-tag {
  align-self: flex-start;
  margin: 0 0 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--t-green);
  background: rgba(5, 150, 105, 0.09);
}

.t-ai-cap-tag-planned {
  color: var(--t-muted);
  background: rgba(107, 114, 128, 0.12);
}

.t-ai-cap-title {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.t-ai-cap-body {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--t-muted);
}

.t-ai-cap-list {
  list-style: none;
  margin: auto 0 0;
  padding: 0.85rem 0 0;
  border-top: 1px solid var(--t-border);
  display: grid;
  gap: 0.35rem;
}

.t-ai-cap-list li {
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--t-ink);
  padding-left: 1rem;
  position: relative;
}

.t-ai-cap-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--t-accent);
  opacity: 0.65;
}

.t-ai-cap-list-mono li {
  font-family: var(--t-mono);
  font-size: 0.78rem;
}

.t-ai-rules-panel {
  border: 1px solid var(--t-border);
  border-radius: 14px;
  background: var(--t-card);
  overflow: hidden;
}

.t-ai-rules-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.8rem 1.1rem;
  border-top: 1px solid var(--t-border);
  font-family: var(--t-mono);
  font-size: 0.84rem;
}

.t-ai-rules-row:first-child {
  border-top: none;
}

.t-ai-rules-row span:first-child {
  color: var(--t-ink);
  font-weight: 500;
}

.t-ai-rules-row span:last-child {
  color: var(--t-muted);
  text-align: right;
}

.t-ai-config .t-ai-code {
  margin-top: 1.5rem;
}

.t-ai-config .t-ai-pillars {
  margin-top: 1.1rem;
}

html[data-theme="dark"] .t-ai-cap-tag {
  background: rgba(52, 211, 153, 0.12);
}

html[data-theme="dark"] .t-ai-cap-tag-planned {
  background: rgba(188, 199, 214, 0.1);
}

html[data-theme="dark"] .t-ai-rules-panel,
html[data-theme="dark"] .t-ai-cap-card {
  background: rgba(255, 255, 255, 0.03);
}

@media (prefers-reduced-motion: reduce) {
  .t-ai-router,
  .t-ai-router-out .t-ai-route {
    animation: none;
  }
}
