@font-face {
  font-family: Peyda;
  src: local("Peyda"), local("Peyda Regular"), local("PeydaWeb"),
    url("https://cdn.jsdelivr.net/gh/AmirAbbasVafaee/persian-fonts-cdn@main/fonts/peyda/PeydaWeb-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Peyda;
  src: local("Peyda Medium"), local("PeydaWeb-Medium"),
    url("https://cdn.jsdelivr.net/gh/AmirAbbasVafaee/persian-fonts-cdn@main/fonts/peyda/PeydaWeb-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Peyda;
  src: local("Peyda SemiBold"), local("PeydaWeb-SemiBold"),
    url("https://cdn.jsdelivr.net/gh/AmirAbbasVafaee/persian-fonts-cdn@main/fonts/peyda/PeydaWeb-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Peyda;
  src: local("Peyda Bold"), local("PeydaWeb-Bold"),
    url("https://cdn.jsdelivr.net/gh/AmirAbbasVafaee/persian-fonts-cdn@main/fonts/peyda/PeydaWeb-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

html {
  background: #fff;
}

body {
  min-height: 100vh;
  background: #fff;
  color: #000;
  font-family: Peyda, Tahoma, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

::selection {
  background: #000;
  color: #fff;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid #000;
  outline-offset: 3px;
}

button,
input,
textarea {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  opacity: 0.45;
  cursor: default;
}

a {
  color: inherit;
}

.skip {
  position: absolute;
  top: -48px;
  right: 12px;
  background: #000;
  color: #fff;
  padding: 8px 12px;
  z-index: 9;
}

.skip:focus {
  top: 8px;
}

.top {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #fff;
}

.top-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 16px 22px 14px;
}

.mark {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.step-label {
  color: #5c5c5c;
  font-size: 13px;
}

.bar {
  height: 2px;
  background: #e6e6e6;
}

.bar > span {
  display: block;
  height: 100%;
  width: 0;
  background: #000;
  transition: width 0.35s ease;
}

.wrap {
  width: min(680px, calc(100% - 40px));
  margin: 0 auto;
  padding-top: clamp(36px, 8vh, 96px);
  padding-bottom: 48px;
}

.wrap[data-step="profile"],
.wrap[data-step="tweets"],
.wrap[data-step="domain"] {
  padding-top: 32px;
}

.step {
  animation: rise 0.4s ease;
}

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

h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.03em;
}

h2 {
  margin: 28px 0 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.6;
}

.eyebrow {
  margin: 0 0 10px;
  color: #5c5c5c;
  font-size: 13px;
}

.lead p {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.75;
  text-wrap: pretty;
}

.points {
  margin: 0 0 28px;
  padding: 0;
  padding-inline-start: 1.15em;
  font-size: 18px;
  line-height: 1.75;
}

.points li {
  margin: 0 0 8px;
  text-wrap: pretty;
}

.points li:last-child {
  margin-bottom: 0;
}

.points-note {
  margin: 0 0 18px;
  font-size: 18px;
  line-height: 1.75;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 8px 0 28px;
}

.out {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 18px;
  line-height: 1.6;
}

.socials .glyph {
  width: 22px;
  height: 22px;
}

.field {
  display: block;
  margin: 0 0 22px;
}

.field > span,
.editor > span,
.line-label {
  display: block;
  margin-bottom: 4px;
  color: #5c5c5c;
  font-size: 13px;
}

.field input,
.field textarea,
.editor input,
.editor textarea,
.editor select {
  width: 100%;
  border: none;
  border-radius: 16px;
  background: #f3f3f3;
  padding: 14px 16px;
  font-size: 18px;
  line-height: 1.6;
}

.field input::placeholder,
.field textarea::placeholder,
.writing::placeholder,
.tweet textarea::placeholder {
  color: #9a9a9a;
}

.field-box {
  position: relative;
  display: block;
}

.field-box > .glyph {
  position: absolute;
  z-index: 1;
  inset-inline-start: 16px;
  top: 16px;
  width: 22px;
  height: 22px;
  color: #8a8a8a;
  pointer-events: none;
}

.field-box:has(input) > .glyph {
  top: 50%;
  transform: translateY(-50%);
}

.field-box input,
.field-box textarea {
  padding-inline-start: 48px;
}

.field-box .ltr {
  padding-inline-start: 16px;
  padding-inline-end: 48px;
}

.field-box:focus-within > .glyph {
  color: #000;
}

.field textarea,
.editor textarea {
  min-height: 120px;
  padding: 14px 16px;
  resize: vertical;
  font-size: 18px;
  line-height: 1.75;
}

.editor input,
.editor textarea,
.editor select,
.search {
  background: #f4f4f4;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 16px;
}

.field input:focus,
.field textarea:focus,
.editor input:focus,
.editor textarea:focus,
.editor select:focus,
.writing:focus,
.tweet textarea:focus {
  outline: none;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px #000;
}

.ltr {
  direction: ltr;
  text-align: left;
}

fieldset {
  margin: 8px 0 0;
  padding: 0;
  border: none;
  min-inline-size: 0;
}

legend {
  padding: 0;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.choice,
.card {
  width: 100%;
  border: none;
  background: transparent;
  color: #000;
  text-align: right;
  font: inherit;
  font-size: 18px;
  line-height: 1.6;
  transition: background 0.2s ease, color 0.2s ease;
}

.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 2px;
  border-radius: 999px;
}

.choice .glyph {
  width: 24px;
  height: 24px;
}

.choice[aria-checked="true"],
.card[aria-checked="true"] {
  background: #000;
  color: #fff;
}

.choice[aria-checked="true"] {
  padding: 10px 16px;
}

.choice:hover,
.card:hover {
  background: transparent;
  opacity: 0.45;
}

.choice[aria-checked="true"]:hover,
.card[aria-checked="true"]:hover {
  background: #000;
  opacity: 1;
}

.cards {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
}

.card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 4px;
  border-radius: 18px;
}

.card[aria-checked="true"] {
  padding: 16px 18px;
}

.card-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card .title {
  font-size: 28px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.03em;
}

.glyph {
  width: 36px;
  height: 36px;
  flex: none;
}

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

.other-field {
  margin-top: 12px;
}

.brief {
  margin: 8px 0 28px;
  padding: 0;
  font-size: 17px;
  line-height: 1.75;
  color: #222;
}

.brief p {
  margin: 0 0 10px;
  text-wrap: pretty;
}

.brief p:last-child {
  margin-bottom: 0;
}

.brief-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.75;
}

.brief-note {
  margin: 10px 0 0;
  font-size: 18px;
  line-height: 1.75;
  text-wrap: pretty;
}

.writing {
  width: 100%;
  min-height: 160px;
  border: none;
  border-radius: 16px;
  background: #f3f3f3;
  padding: 16px;
  font: inherit;
  font-size: 18px;
  line-height: 1.75;
  resize: vertical;
  padding-inline-start: 48px;
}

.linkbox {
  margin: 8px 0 20px;
  padding: 16px;
  border: 1px solid #000;
}

.linkbox p {
  margin: 0 0 10px;
}

.url {
  display: block;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #000;
  direction: ltr;
  text-align: left;
  font-size: 13px;
  line-height: 1.6;
  word-break: break-all;
}

.tweets {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.tweet {
  border: none;
  padding: 0;
}

.tweet.over .count {
  font-weight: 700;
}

.tweet-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
  color: #9a9a9a;
  font-size: 13px;
}

.tweet textarea {
  width: 100%;
  min-height: 96px;
  border: none;
  border-radius: 16px;
  resize: vertical;
  background: #f3f3f3;
  padding: 14px 16px;
  font: inherit;
  font-size: 17px;
  line-height: 1.7;
  padding-inline-start: 48px;
}

.count.over {
  font-weight: 700;
}

.tweet .miss {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
}

.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 8px 0 18px;
}

.actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 28px 0 8px;
}

.actions .error {
  flex: 1 0 100%;
  margin: 0;
}

.btn {
  border: none;
  border-radius: 999px;
  background: #000;
  color: #fff;
  padding: 12px 20px;
  font: inherit;
  font-size: 15px;
  line-height: 1.4;
}

.btn.ghost {
  background: transparent;
  color: #000;
  padding-inline: 8px;
}

.btn.text {
  border: none;
  border-radius: 0;
  background: none;
  color: #000;
  padding: 12px 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.btn:hover {
  opacity: 0.72;
}

.btn.ghost:hover,
.btn.text:hover {
  background: transparent;
  opacity: 0.45;
}

.error {
  margin: 12px 0 0;
  font-size: 14px;
  font-weight: 700;
}

.muted {
  color: #5c5c5c;
}

.small {
  font-size: 14px;
  line-height: 1.8;
}

.resume {
  margin-bottom: 28px;
  padding: 0;
}

.resume p {
  margin: 0 0 12px;
}

.resume .actions {
  position: static;
  padding: 0;
  background: none;
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  z-index: 6;
  transform: translateX(-50%);
  background: #000;
  color: #fff;
  padding: 10px 16px;
  font-size: 14px;
}

.reads {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 22px;
}

.read {
  padding: 0 0 8px;
  white-space: pre-wrap;
  line-height: 1.9;
  font-size: 18px;
}

.read b {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 500;
}

.admin-wrap {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 80px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 10px 0 28px;
}

.tabs button {
  border: none;
  background: none;
  padding: 10px 0;
  color: #9a9a9a;
  font: inherit;
  font-size: 15px;
}

.tabs button[aria-selected="true"] {
  color: #000;
  font-weight: 700;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.search {
  width: min(320px, 100%);
  border: none;
  background: #f4f4f4;
  border-radius: 14px;
  padding: 10px 14px;
  font: inherit;
  font-size: 16px;
}

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

.filters button[aria-pressed="true"] {
  background: #000;
  color: #fff;
}

.row {
  display: grid;
  grid-template-columns: 1.3fr 1fr 0.8fr auto;
  gap: 12px;
  width: 100%;
  padding: 16px 0;
  border: none;
  background: none;
  text-align: right;
  font: inherit;
}

.row:hover {
  background: #fafafa;
}

.row strong {
  display: block;
  font-size: 17px;
}

.row span,
.meta {
  color: #5c5c5c;
  font-size: 13px;
  line-height: 1.7;
}

.badge {
  align-self: center;
  justify-self: start;
  border: none;
  padding: 0;
  font-size: 12px;
  font-style: normal;
}

.badge.draft {
  color: #9a9a9a;
}

.block {
  margin: 28px 0;
}

.block h3 {
  margin: 0 0 8px;
  color: #5c5c5c;
  font-size: 13px;
  font-weight: 500;
}

.person {
  margin: 0;
  font-size: 16px;
  line-height: 1.9;
  white-space: pre-wrap;
}

.editor {
  margin: 0 0 28px;
  padding: 8px 0 0;
}

.editor-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  font-size: 14px;
}

.check input {
  width: 16px;
  height: 16px;
  accent-color: #000;
}

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

.empty {
  padding: 28px 0;
  color: #5c5c5c;
}

@media (max-width: 720px) {
  .top-row {
    padding-inline: 16px;
  }

  .wrap,
  .admin-wrap {
    width: min(100% - 32px, 680px);
  }

  .row {
    grid-template-columns: 1fr auto;
  }

  .card .title {
    font-size: 20px;
  }

  h1 {
    font-size: 34px;
  }
}

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