/* AMP10 Studio. Colours and type follow amp10.company. */
:root {
  --bg: #0b0b0c;
  --bg-elev: #111114;
  --bg-input: #0d0d0f;
  --text: #ececed;
  --text-dim: #a0a0a6;
  --text-mute: #75757c;
  --border: #1f1f23;
  --border-strong: #2a2a30;
  --accent: #007bff;
  --accent-soft: rgba(0, 123, 255, 0.12);
  --ok: #3ecf8e;
  --warn: #f5a524;
  --bad: #ff6b6b;
  --radius: 14px;
  --pad-x: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  background: var(--bg);
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
h1,
h2 {
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
h1 {
  font-size: 28px;
  font-weight: 650;
}
h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}
p {
  margin: 0 0 8px;
}
code {
  font: 12.5px/1.4 "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #1a1a1e;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
}
.dim {
  color: var(--text-dim);
}
.hint {
  color: var(--text-mute);
  font-size: 13px;
}
.lead {
  margin: 6px 0 24px;
}
.icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  flex: none;
}

/* Layout */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px var(--pad-x);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 16px;
}
.brand:hover {
  text-decoration: none;
}
.brand img {
  border-radius: 7px;
}
.brand b {
  font-weight: 600;
  color: var(--text-dim);
}
.topnav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
}
.topnav a {
  color: var(--text-dim);
}
.topnav a[aria-current] {
  color: var(--text);
}
.topnav form {
  margin: 0;
}
.who {
  color: var(--text-mute);
}
main {
  flex: 1;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px var(--pad-x) 64px;
}
main.narrow {
  max-width: 460px;
  padding-top: 64px;
}
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  padding: 20px var(--pad-x);
  border-top: 1px solid var(--border);
  color: var(--text-mute);
  font-size: 13px;
}
.footer a {
  color: var(--text-dim);
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  margin-bottom: 12px;
}
.stack > * + * {
  margin-top: 16px;
}
.notice {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
  border: 1px solid;
}
.notice-ok {
  background: var(--accent-soft);
  border-color: rgba(0, 123, 255, 0.35);
}
.notice-warn {
  background: rgba(245, 165, 36, 0.1);
  border-color: rgba(245, 165, 36, 0.35);
}

/* Controls */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  font: 500 14px/1.2 Inter, system-ui, -apple-system, sans-serif;
  cursor: pointer;
  text-decoration: none;
}
.button:hover {
  text-decoration: none;
  border-color: #3a3a42;
}
.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.button.primary:hover {
  background: #1a88ff;
}
.button.tiktok {
  background: #fff;
  border-color: #fff;
  color: #000;
}
.button.danger {
  border-color: rgba(255, 107, 107, 0.45);
  color: var(--bad);
}
.button.danger:hover {
  background: rgba(255, 107, 107, 0.08);
}
.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button.link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--text-dim);
  font: inherit;
  cursor: pointer;
}
button.link:hover {
  color: var(--text);
}
label {
  display: block;
  font-weight: 500;
}
input[type="email"],
input[type="password"],
input[type="file"],
textarea,
select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  color: var(--text);
  font: 400 15px/1.4 Inter, system-ui, -apple-system, sans-serif;
}
textarea {
  resize: vertical;
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: #1a1a1e;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
legend {
  font-weight: 500;
  padding: 0;
  margin-bottom: 8px;
}
small {
  display: block;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 400;
  margin-top: 2px;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  cursor: pointer;
}
.check input,
.option input {
  margin-top: 4px;
  accent-color: var(--accent);
}
.check.is-disabled,
.check:has(input:disabled) {
  opacity: 0.45;
  cursor: not-allowed;
}
.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
}
.option {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font-weight: 400;
  cursor: pointer;
}
.option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.modes legend {
  grid-column: 1 / -1;
}
.switch {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-weight: 400;
  cursor: pointer;
}
.switch input {
  appearance: none;
  flex: none;
  position: relative;
  width: 38px;
  height: 22px;
  margin: 2px 0 0;
  border-radius: 999px;
  background: var(--border-strong);
  cursor: pointer;
  transition: background 0.15s;
}
.switch input::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
}
.switch input:checked {
  background: var(--accent);
}
.switch input:checked::before {
  transform: translateX(16px);
}
.disclosure-options {
  margin: 14px 0 0 50px;
}
.label-prompt {
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--accent-soft);
  font-size: 13px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.counter {
  margin-top: 4px !important;
  text-align: right;
}

/* Avatars */
.avatar {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  overflow: hidden;
  border-radius: 50%;
  background: #1f1f23;
  color: var(--text-dim);
  font-weight: 600;
}
.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-sm {
  width: 28px;
  height: 28px;
  font-size: 12px;
}
.avatar-md {
  width: 52px;
  height: 52px;
  font-size: 20px;
}
.avatar-lg {
  width: 96px;
  height: 96px;
  font-size: 36px;
}

/* Login */
.login {
  text-align: center;
  padding: 32px;
}
.login img {
  border-radius: 12px;
  margin-bottom: 12px;
}
.login h1 {
  font-size: 22px;
  margin-bottom: 6px;
}
.login form {
  text-align: left;
  margin-top: 20px;
}
.login .button {
  width: 100%;
}

/* Channels */
.channel-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.channel-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
  background: #000;
  border: 1px solid var(--border-strong);
  color: #fff;
  font-size: 22px;
}
.accounts {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}
.accounts li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.accounts li:last-child {
  border-bottom: 1px solid var(--border);
}
.account {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.account-links {
  display: flex;
  gap: 16px;
  font-size: 14px;
}

/* Connection screens */
.conn-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 2px;
  color: var(--text-mute);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  box-shadow: inset 0 -1px 0 var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs a {
  padding: 10px 14px;
  color: var(--text-dim);
  border-bottom: 2px solid transparent;
  font-weight: 500;
  white-space: nowrap;
}
.tabs a:hover {
  color: var(--text);
  text-decoration: none;
}
.tabs a[aria-current] {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.profile {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.profile-body {
  min-width: 0;
}
.profile h2 {
  font-size: 22px;
  margin-bottom: 2px;
}
.bio {
  margin-top: 12px;
  white-space: pre-line;
}
.profile-link {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 12px;
  font-size: 14px;
  word-break: break-all;
}
.badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #5aa9ff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}
.meta {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 10px 16px;
  margin: 8px 0 0;
}
.meta dt {
  color: var(--text-dim);
}
.meta dd {
  margin: 0;
}
.scopes {
  list-style: none;
  margin: 0;
  padding: 0;
}
.scopes li + li {
  margin-top: 6px;
}
.scopes code {
  margin-right: 6px;
}
.danger-zone {
  border-color: rgba(255, 107, 107, 0.25);
}
.narrow-card {
  max-width: 620px;
}
.danger-zone ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

/* Insights */
.tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.tile {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.tile-label {
  margin: 0;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
}
.tile-value {
  margin: 4px 0 0;
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.table-wrap {
  overflow-x: auto;
  margin: 0 -8px;
}
table.videos {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.videos th {
  padding: 8px;
  text-align: left;
  color: var(--text-mute);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.videos td {
  padding: 12px 8px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}
.videos .num {
  text-align: right;
  white-space: nowrap;
}
.video-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  min-width: 240px;
}
.video-cell img,
.video-cell .cover {
  width: 48px;
  height: 64px;
  flex: none;
  border-radius: 6px;
  object-fit: cover;
  background: #1f1f23;
}
.video-cell .dim {
  display: block;
  font-size: 13px;
}
.video-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pager {
  display: flex;
  justify-content: space-between;
  margin: 16px 0 0;
}

/* Publish */
.publish-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}
.posting-as {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
}
.posting-as p {
  margin: 0;
}
.preview video {
  display: block;
  width: 100%;
  max-height: 440px;
  border-radius: 10px;
  background: #000;
}
.preview .hint {
  margin-top: 6px;
}
.declaration {
  color: var(--text-dim);
  font-size: 13px;
}
.progress {
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
}
.progress p {
  margin: 8px 0 0;
}
.progress .button {
  margin-top: 12px;
}
.progress[data-tone="ok"] {
  border-color: rgba(62, 207, 142, 0.4);
}
.progress[data-tone="bad"] {
  border-color: rgba(255, 107, 107, 0.45);
}
.bar {
  height: 6px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}
.bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.2s;
}
.progress[data-tone="ok"] .bar span {
  background: var(--ok);
}
.posts {
  list-style: none;
  margin: 0;
  padding: 0;
}
.posts li {
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.posts p {
  margin: 0;
}
.post-caption {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.status-ok {
  color: var(--ok);
}
.status-bad {
  color: var(--bad);
}
.status-busy {
  color: var(--warn);
}

@media (max-width: 760px) {
  .tiles {
    grid-template-columns: repeat(2, 1fr);
  }
  .publish-grid,
  .modes,
  .meta {
    grid-template-columns: 1fr;
  }
  .profile {
    flex-direction: column;
  }
  .who {
    display: none;
  }
  .disclosure-options {
    margin-left: 0;
  }
}
