/* 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;
}

*,
*::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-main {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.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.5rem;
  border-bottom: 1px solid var(--t-border);
}

.t-avatar {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #e8e6e1, #f3f2ef);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 600;
  color: #44403c;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

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

.t-verified-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  font-size: 0.82rem;
  color: var(--t-green);
  font-weight: 500;
}

.t-check {
  margin-right: 0.15rem;
}

.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-destination {
  padding: 1.5rem 0;
  text-align: center;
}

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

.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-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-footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.78rem;
  color: var(--t-muted);
}

/* 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-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: center;
  justify-content: center;
  padding: 1rem 1.25rem 4rem;
  text-align: center;
}

.t-home-tagline {
  margin: 1.5rem 0 0.35rem;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.t-home-sub {
  margin: 0 0 2rem;
  font-size: 1rem;
  color: var(--t-muted);
  max-width: 420px;
}

.t-search-wrap {
  width: 100%;
  max-width: 584px;
}

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

.t-search-row {
  display: flex;
  align-items: center;
  background: var(--t-card);
  border: 1px solid var(--t-border);
  border-radius: 999px;
  padding: 0.35rem 0.35rem 0.35rem 1.25rem;
  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.65rem 0;
  outline: none;
  min-width: 0;
}

.t-search-btn {
  flex-shrink: 0;
  border: none;
  background: var(--t-accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.7rem 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-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-url {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.t-result-url input {
  flex: 1;
  border: 1px solid var(--t-border);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font: inherit;
  font-size: 0.88rem;
  background: #fafaf9;
}

.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.78rem;
  color: var(--t-muted);
}

.t-home-footer a {
  color: var(--t-muted);
}

/* 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 {
  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 {
  outline: none;
  border-color: #c4c0b8;
}

.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);
}

@media (max-width: 520px) {
  .t-search-row {
    flex-direction: column;
    border-radius: 16px;
    padding: 0.75rem;
    gap: 0.5rem;
  }

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

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