/* Generated by scripts/split_css.py — prefer editing this file, then keep surfaces in sync. */
/* Shared: tokens, brand, buttons, toast, forms, username/charcount, rise */

:root {
  /* Lilac · grape purple · blue scale */
  --ink: #1a1228;
  --paper: #f5f0fa;
  --muted: #6b6280;
  --accent: #7b3fa0;
  --accent-soft: #9b6bc9;
  --accent-deep: #4a2170;
  --blue: #3b6fe8;
  --blue-soft: #6b8ff0;
  --lilac: #dcc9f0;
  --danger: #c4456a;
  --surface: rgba(255, 255, 255, 0.9);
  --line: rgba(74, 33, 112, 0.12);
  --shadow: 0 18px 50px rgba(40, 20, 70, 0.14);
  --radius: 18px;
  --font: "Vazirmatn", sans-serif;
  --sidebar-w: 15.5rem;
  --dash-bottom-nav-h: 0px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a:hover {
  color: var(--blue);
}

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 0 0 0.5rem;
  font-weight: 750;
}

.lede {
  color: var(--muted);
  margin: 0.35rem 0 0;
  max-width: 40rem;
  font-size: 0.95rem;
  font-weight: 450;
  line-height: 1.7;
}

.eyebrow {
  margin: 0 0 0.25rem;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.06em;
}

.brand-mark {
  font-size: clamp(2.4rem, 8vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
  color: var(--accent-deep);
  background: linear-gradient(120deg, var(--accent-deep), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-logo {
  display: block;
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-logo-sm {
  width: 1.15rem;
  height: 1.15rem;
}

.brand-logo-hero {
  width: clamp(3.2rem, 8vw, 4.5rem);
  height: clamp(3.2rem, 8vw, 4.5rem);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.45rem;
  margin: 0;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: var(--accent-deep);
  -webkit-text-fill-color: currentColor;
}

.brand-link .brand-logo {
  width: 2.1rem;
  height: 2.1rem;
}

.brand-link span {
  background: linear-gradient(120deg, var(--accent-deep), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.btn,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.35rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-view {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.75rem 1.2rem;
  font: inherit;
  font-weight: 650;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--blue) 100%);
  box-shadow: 0 10px 22px rgba(123, 63, 160, 0.28);
  border: 0;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.btn-view svg {
  width: 1.05rem;
  height: 1.05rem;
}

.btn-view:hover {
  color: #fff;
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.toast-host {
  position: fixed;
  top: calc(0.85rem + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  display: grid;
  gap: 0.55rem;
  width: min(92vw, 22.5rem);
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 0.85rem 0.85rem 1rem;
  border-radius: 16px;
  color: #fff;
  background: rgba(26, 18, 40, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 40px rgba(20, 10, 40, 0.28);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.is-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast.is-out {
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
}

.toast-text {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.55;
  color: #fff;
}

.toast-close {
  flex-shrink: 0;
  width: 1.7rem;
  height: 1.7rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.toast-close svg {
  width: 0.85rem;
  height: 0.85rem;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.toast-success {
  background: linear-gradient(135deg, rgba(74, 33, 112, 0.94), rgba(45, 70, 150, 0.92));
  border-color: rgba(220, 201, 240, 0.28);
}

.toast-error {
  background: linear-gradient(135deg, rgba(140, 40, 70, 0.95), rgba(90, 30, 55, 0.92));
  border-color: rgba(255, 180, 200, 0.25);
}

.toast-warning {
  background: linear-gradient(135deg, rgba(120, 80, 20, 0.94), rgba(90, 55, 15, 0.92));
  border-color: rgba(255, 220, 160, 0.25);
}

.toast-info {
  background: linear-gradient(135deg, rgba(40, 55, 110, 0.94), rgba(30, 40, 90, 0.92));
  border-color: rgba(180, 200, 255, 0.25);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--blue) 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(123, 63, 160, 0.3);
}

.btn-primary:hover {
  filter: brightness(1.05);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-shrink: 0;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent-deep);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-copy svg {
  width: 0.95rem;
  height: 0.95rem;
}

.btn-copy:hover,
.btn-copy.is-copied {
  border-color: color-mix(in srgb, var(--accent) 45%, white);
  background: linear-gradient(135deg, rgba(220, 201, 240, 0.55), rgba(180, 200, 255, 0.35));
  color: var(--accent-deep);
}

.btn-danger {
  background: #fff5f7;
  color: var(--danger);
  border: 1px solid rgba(196, 69, 106, 0.28);
  box-shadow: none;
}

.btn-danger:hover {
  background: #ffe8ee;
  color: #a83255;
  border-color: rgba(196, 69, 106, 0.45);
}

.btn-danger svg {
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.9rem;
}

.btn-block {
  width: 100%;
}

.btn-text {
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.icon {
  display: inline-flex;
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

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

.icon-md {
  width: 1.5rem;
  height: 1.5rem;
}

.icon-lg {
  width: 1.75rem;
  height: 1.75rem;
}

.stack-form {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.field input,
.field textarea,
.field select,
.stack-form input,
.stack-form textarea,
.stack-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.72rem 0.9rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 450;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.stack-form input:focus,
.stack-form textarea:focus,
.stack-form select:focus {
  border-color: rgba(123, 63, 160, 0.45);
  box-shadow: 0 0 0 3px rgba(123, 63, 160, 0.12);
  outline: none;
}

.field small,
.help-clear {
  color: var(--muted);
  font-weight: 450;
  font-size: 0.82rem;
  line-height: 1.55;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.85rem;
  align-items: end;
}

.field-check {
  min-width: 12rem;
}

.check-line {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.7rem;
  padding: 0 0.2rem;
  font-weight: 550;
  font-size: 0.88rem;
}

.check-line input {
  width: auto;
}

.field input[type="color"] {
  padding: 0.25rem;
  height: 2.75rem;
  cursor: pointer;
}

.field input[type="checkbox"] {
  width: auto;
  justify-self: start;
}

.error {
  color: var(--danger);
  font-style: normal;
  font-size: 0.85rem;
}

.form-errors {
  display: grid;
  gap: 0.25rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.field-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.char-count {
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: isolate;
  flex: 0 0 auto;
}

.field.is-near-limit .char-count {
  color: #b45309;
}

.field.is-at-limit .char-count {
  color: #b42318;
}

.username-field {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0 0.65rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.username-field:focus-within {
  border-color: color-mix(in srgb, var(--accent) 50%, white);
  box-shadow: 0 0 0 3px rgba(123, 63, 160, 0.12);
}

.username-field.is-invalid,
.username-field.is-invalid:focus-within {
  border-color: rgba(196, 69, 106, 0.75);
  box-shadow: 0 0 0 3px rgba(196, 69, 106, 0.16);
}

.username-field.is-valid,
.username-field.is-valid:focus-within {
  border-color: rgba(46, 140, 110, 0.65);
  box-shadow: 0 0 0 3px rgba(46, 140, 110, 0.14);
}

.username-field.is-checking {
  border-color: color-mix(in srgb, var(--blue) 45%, white);
}

.username-live-error {
  display: block;
  margin-top: 0.25rem;
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 600;
}

.username-live-error[hidden] {
  display: none !important;
}

.username-prefix,
.username-suffix {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  flex-shrink: 0;
}

.username-field input,
.field .username-input {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding-inline: 0.2rem !important;
  min-width: 0;
  flex: 1;
}

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