/* clients.k-wired.com — portal (Step 9 login + session)
   Brand: black / white / clients purple · Montserrat
   Official clients section art: assets/img/clients-bg-grid.png (static purple grid + soft vignette).
*/

:root {
  --bg: #000000;
  --panel: #121214;
  --panel-glass: rgba(18, 18, 20, 0.95);
  --text: #ffffff;
  --muted: #a3a3a8;
  --border: rgba(255, 255, 255, 0.12);
  --accent: #b56cff; /* clients purple — match official purple grid art */
  --accent-soft: rgba(181, 108, 255, 0.16);
  --err: #ff7a7a;
  --warn: #f0c14a;
  --radius: 14px;
  --font: "Montserrat", system-ui, sans-serif;
  --clients-bg: url("../img/clients-bg-grid.png");
  /* Soft vignette — light center keeps purple glow clean */
  --clients-bg-scrim: radial-gradient(
    ellipse 78% 68% at 50% 42%,
    rgba(0, 0, 0, 0.05) 0%,
    rgba(0, 0, 0, 0.12) 48%,
    rgba(0, 0, 0, 0.35) 78%,
    rgba(0, 0, 0, 0.55) 100%
  );
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.muted {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
}

h1 {
  margin: 0 0 0.5rem;
  font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2rem);
  letter-spacing: -0.02em;
}

.lead {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 34rem;
}

/* —— Login —— */
.page-login,
.page-dashboard {
  /* Official clients section art — static; +30% native (1000×625 → 1300px wide) */
  background-color: var(--bg);
  background-image: var(--clients-bg-scrim), var(--clients-bg);
  background-size: auto, 1300px auto;
  background-position: center center, center center;
  background-repeat: no-repeat, no-repeat;
  background-attachment: fixed, fixed;
}

.page-login {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  min-height: 100vh;
}

.login-shell {
  width: min(420px, 100%);
  padding: 1.75rem 1.5rem 1.5rem;
  background: var(--panel-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

.login-shell h1 {
  text-align: center;
}

.login-shell .lead {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.login-brand {
  margin: 0 0 1.25rem;
  text-align: center;
}

.login-brand img {
  width: min(220px, 100%);
  height: auto;
  display: inline-block;
}

.login-form {
  text-align: left;
}

.login-form .field {
  margin-bottom: 1rem;
}

.login-form label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.login-form input[type="email"],
.login-form input[type="password"] {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0a0a0c;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.login-form input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.form-alert {
  margin: 0 0 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: rgba(255, 122, 122, 0.12);
  border: 1px solid rgba(255, 122, 122, 0.35);
  color: var(--err);
  font-size: 0.9rem;
}

.form-alert--warn {
  background: rgba(240, 193, 74, 0.1);
  border-color: rgba(240, 193, 74, 0.35);
  color: var(--warn);
}

.form-alert--ok {
  background: rgba(181, 108, 255, 0.12);
  border-color: rgba(181, 108, 255, 0.4);
  color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.8rem 1.1rem;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #0a0a0c;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(196, 160, 224, 0.25);
}

.btn:hover {
  filter: brightness(1.06);
  text-decoration: none;
}

.btn-ghost {
  width: auto;
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(196, 160, 224, 0.45);
  box-shadow: none;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
}

.btn-ghost:hover {
  background: var(--accent-soft);
  text-decoration: none;
}

.btn-primary {
  width: auto;
  margin-top: 0;
  padding: 0.55rem 1.15rem;
  font-size: 0.85rem;
}

.addon-detail__actions .btn,
.addon-detail__actions .btn-primary,
.addon-detail__actions .btn-ghost {
  width: auto;
  margin-top: 0;
}

.addon-detail__status {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
}

.login-foot {
  margin: 1.35rem 0 0;
  font-size: 0.8rem;
  text-align: center;
}

/* —— Dashboard (Step 10 empty layout; Steps 12–16 fill panels) —— */
.page-dashboard {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.dash-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  padding: 0.9rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(5, 5, 5, 0.92);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.dash-top__brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.dash-top__brand img {
  width: 140px;
  height: auto;
  display: block;
}

.dash-top__tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.dash-top__nav {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.55rem;
  min-width: 8rem;
}

.dash-nav__link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border: none;
  background: none;
  padding: 0.15rem 0.1rem;
}

.dash-nav__link:hover {
  color: var(--accent);
  text-decoration: none;
}

.dash-nav__link.is-active {
  color: var(--accent);
  font-weight: 600;
}

.dash-nav__sep {
  color: var(--muted);
  opacity: 0.55;
  font-weight: 400;
  user-select: none;
}

.dash-support {
  position: relative;
}

.dash-support__trigger {
  cursor: pointer;
}

.dash-support__menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.55rem 0 0.4rem;
  list-style: none;
  min-width: 12.5rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  z-index: 30;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease, visibility 0.12s ease;
}

/* Invisible bridge so the pointer can move from label → menu without closing */
.dash-support__menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -0.55rem;
  height: 0.55rem;
}

.dash-support:hover .dash-support__menu,
.dash-support:focus-within .dash-support__menu {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.dash-support__menu a {
  display: block;
  padding: 0.55rem 1rem;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
}

.dash-support__menu a:hover {
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
}

.dash-top__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dash-top__who {
  font-size: 0.85rem;
}

.dash-top__signout {
  color: var(--accent);
  font-weight: 600;
}

/* Two columns desktop; stack mobile (left then right) */
.dash-layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 1.25rem;
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 1.5rem 1.75rem 2rem;
  align-items: stretch;
}

.dash-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.dash-col--right {
  min-height: 0;
  align-self: stretch;
}

.dash-col--right > [data-slot="blog-composer"] {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
}

@media (min-width: 901px) {
  /* Stretch with left column; Links sits under Blog in the right column */
  .dash-col--right > [data-slot="blog-composer"] {
    min-height: 0;
  }
}

.dash-col__label {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.dash-panel[id^="slot-"] {
  scroll-margin-top: 5rem;
}

.dash-panel {
  margin: 0;
  padding: 1.15rem 1.2rem;
  background: var(--panel-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
}

.dash-panel h2 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.dash-panel__hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

.dash-panel__ghost {
  margin: 0.85rem 0 0;
  font-size: 0.88rem;
  opacity: 0.85;
}

.dash-panel--empty {
  border-style: dashed;
  background: rgba(18, 18, 20, 0.9);
}

.dash-panel--tall {
  /* Desktop height comes from matching the left column (flex stretch). */
  min-height: 0;
}

/* —— Step 12: Site Header —— */
.site-header {
  padding: 1.15rem 1.2rem 1.25rem;
}

.site-header__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 1.15rem 1.35rem;
  align-items: start;
}

.site-header__shot-link {
  display: block;
  text-decoration: none;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0a0a0c;
}

.site-header__shot-link:hover {
  border-color: rgba(181, 108, 255, 0.45);
  text-decoration: none;
}

.site-header__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
}

.site-header__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 11rem;
  aspect-ratio: 16 / 10;
  padding: 1rem;
  background:
    linear-gradient(145deg, rgba(181, 108, 255, 0.14), transparent 55%),
    #0a0a0c;
  text-align: center;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.site-header__placeholder-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.site-header__placeholder-domain {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

/* Live website preview (Step 12) */
.site-preview {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #0a0a0c;
}

.site-preview__chrome {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.65rem;
  background: rgba(0, 0, 0, 0.55);
  border-bottom: 1px solid var(--border);
}

.site-preview__dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.site-preview__dot:nth-child(1) { background: #ff5f57; }
.site-preview__dot:nth-child(2) { background: #febc2e; }
.site-preview__dot:nth-child(3) { background: #28c840; }

.site-preview__url {
  flex: 1;
  min-width: 0;
  margin-left: 0.35rem;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-preview__refresh {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.15rem 0.25rem;
}

.site-preview__refresh:hover {
  text-decoration: underline;
}

.site-preview__stage {
  position: relative;
  height: 14.5rem;
  background: #050505;
  overflow: hidden;
}

.site-preview__stage--snap {
  height: 15rem;
}

.site-preview__loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  background: rgba(5, 5, 5, 0.88);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem;
}

.site-preview.is-ready .site-preview__loading {
  display: none;
}

.site-preview__spinner {
  width: 1.35rem;
  height: 1.35rem;
  border: 2px solid rgba(181, 108, 255, 0.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: site-preview-spin 0.8s linear infinite;
}

@keyframes site-preview-spin {
  to { transform: rotate(360deg); }
}

.site-preview__scaler {
  display: none;
}

.site-preview__frame {
  display: none;
}

.site-preview__snap,
.site-preview__snap--primary {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  z-index: 1;
  background: #111;
}

.site-preview__shot-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.site-preview__shot-link:hover .site-preview__snap {
  filter: brightness(1.04);
}

.site-preview__blocked {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 2;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.82);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  line-height: 1.4;
}

.site-preview__blocked p {
  margin: 0 0 0.35rem;
  color: var(--muted);
}

.site-preview__caption {
  margin: 0;
  padding: 0.45rem 0.65rem 0.55rem;
  font-size: 0.7rem;
  border-top: 1px solid var(--border);
}

.site-preview__caption a {
  margin-left: 0.35rem;
}

/* —— Step 13: Add-Ons —— */
.dash-panel__lead {
  margin: 0 0 1rem;
  font-size: 0.88rem;
}

.addon-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.addon-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

/* Temporary highlight (Add pressed, or Remove pressed — before Confirm) */
.addon-card.is-pending {
  background: var(--accent-soft);
  border-color: rgba(181, 108, 255, 0.55);
  box-shadow: inset 0 0 0 1px rgba(181, 108, 255, 0.25);
}

.addon-card.is-pending-add .addon-card__badge {
  display: inline-block;
}

/* Permanent confirmed — solid purple */
.addon-card.is-confirmed {
  background: #7a3bb8;
  border-color: #9b5fd4;
  box-shadow: 0 0 0 1px rgba(181, 108, 255, 0.35);
  color: #f6edff;
}

.addon-card.is-confirmed .addon-card__title,
.addon-card.is-confirmed .addon-card__price {
  color: #fff;
}

.addon-card.is-confirmed .addon-card__blurb {
  color: rgba(255, 255, 255, 0.88);
}

.addon-card.is-confirmed .addon-card__badge {
  display: none;
}

.addon-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}

.addon-card__title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.25;
  padding-right: 0;
}

.addon-card__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  flex: 0 0 auto;
  text-align: right;
}

.addon-card__badge {
  display: none;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: var(--accent);
  color: #0a0a0c;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
}

.addon-card__price {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
  white-space: nowrap;
}

.addon-card__price--stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  white-space: normal;
  line-height: 1.1;
}

.addon-card__price--stack span {
  display: block;
}

.addon-card__body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem;
  min-width: 0;
}

.addon-card__blurb {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.35;
}

.addon-card__btn {
  flex: 0 0 auto;
  align-self: center;
  margin: 0;
  display: inline-block;
  padding: 0.32rem 0.7rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #000;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
  cursor: pointer;
}

.addon-card__btn:hover:not(:disabled) {
  filter: brightness(1.08);
  text-decoration: none;
}

.addon-card__btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.addon-card.is-pending .addon-card__btn,
.addon-card.is-confirmed .addon-card__btn {
  background: rgba(10, 10, 12, 0.35);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.addon-card.is-pending .addon-card__btn {
  background: var(--accent);
  color: #0a0a0c;
  border: 0;
}

.addon-card.is-confirmed .addon-card__btn {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
}

@media (max-width: 720px) {
  .addon-grid {
    grid-template-columns: 1fr;
  }
}

/* —— Step 14: Talk to Your Web Designer —— */
.designer-form .field {
  margin-bottom: 1rem;
}

.designer-form label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.designer-form select,
.designer-form textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0a0a0c;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.designer-form select:focus,
.designer-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.designer-form textarea {
  resize: vertical;
  min-height: 5.5rem;
  line-height: 1.45;
}

.designer-message-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: stretch;
}

.designer-message-row textarea {
  min-height: 5.5rem;
  height: 100%;
}

.designer-form__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.15rem;
}

.designer-form__submit {
  width: auto;
  min-width: 10rem;
}

.designer-form__submit--inline {
  align-self: stretch;
  min-width: 5.5rem;
  width: 5.5rem;
  margin-top: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  font-size: 0.85rem;
  box-shadow: none;
}

.designer-attach {
  margin-bottom: 0.35rem;
}

.designer-attach__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.designer-attach__copy {
  flex: 1 1 12rem;
  min-width: 0;
}

.designer-attach__label {
  display: block;
  margin: 0 0 0.15rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.designer-attach__hint {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.35;
}

.designer-attach__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  cursor: pointer;
  margin: 0;
  width: auto;
  min-width: 18rem;
  padding: 0.55rem 1.75rem;
  font-size: 0.85rem;
  text-align: center;
}

.designer-attach__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.designer-attach__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  margin: 0.45rem 0 0;
  padding: 0;
  font-size: 0.78rem;
  line-height: 1.3;
  color: var(--muted, #9a9aa3);
}

.designer-attach__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  padding: 0.15rem 0.2rem 0.15rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #0a0a0c;
  color: var(--text);
}

.designer-attach__chip-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 11rem;
}

.designer-attach__chip-x {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted, #9a9aa3);
  font: inherit;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
}

.designer-attach__chip-x:hover,
.designer-attach__chip-x:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.designer-thread__note {
  margin: -0.15rem 0 0.65rem;
  font-size: 0.75rem;
}

@media (max-width: 560px) {
  .designer-message-row {
    grid-template-columns: 1fr;
  }

  .designer-form__submit--inline {
    width: 100%;
    min-width: 0;
  }

  .designer-attach__row {
    align-items: flex-start;
  }

  .designer-attach__btn {
    width: 100%;
  }
}

/* —— Step 16: Blog Composer —— */
.dash-blog {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

.blog-form {
  margin-top: 0.35rem;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.blog-form .field {
  margin-bottom: 1rem;
  flex: 0 0 auto;
}

/* Body grows so the composer fills the column down to Submit */
.blog-form .field--grow {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 14rem;
  margin-bottom: 1rem;
}

.blog-form label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  flex: 0 0 auto;
}

.blog-form input[type="text"],
.blog-form textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0a0a0c;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.blog-form input[type="text"]:focus,
.blog-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.blog-form textarea {
  resize: vertical;
  min-height: 14rem;
  line-height: 1.5;
}

.blog-form .field--grow textarea {
  flex: 1 1 auto;
  width: 100%;
  min-height: 14rem;
  height: 100%;
  resize: none; /* height comes from flex fill */
}

.blog-photos {
  margin: 0.15rem 0 1rem;
  padding: 0.9rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  flex: 0 0 auto;
}

.blog-photos__head {
  margin-bottom: 0.65rem;
}

.blog-photos__title {
  margin: 0 0 0.2rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.blog-photos__hint {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
}

.blog-photos__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 0.65rem;
  margin-bottom: 0.65rem;
}

/* Match label + button (UA styles differ) — identical box + type */
.blog-photos__actions .blog-photos__action-btn {
  margin-top: 0 !important;
  width: 100% !important;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  font-family: var(--font) !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
  padding: 0.65rem 1rem !important;
  min-height: 2.75rem;
  -webkit-appearance: none;
  appearance: none;
}

.blog-photos__find-status {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  line-height: 1.4;
}

.blog-photos__find-status.is-active {
  color: var(--accent);
}

.blog-photos__grid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.blog-photos__card {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0a0a0c;
  overflow: hidden;
}

.blog-photos__card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-photos__card--stock {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.5rem;
  text-align: center;
  border-style: dashed;
  border-color: rgba(181, 108, 255, 0.45);
  background: var(--accent-soft);
}

.blog-photos__card-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
}

.blog-photos__card-sub {
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.3;
}

.blog-photos__remove {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.blog-photos__remove:hover {
  background: rgba(255, 122, 122, 0.85);
}

.blog-form__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0;
  padding-top: 0.25rem;
  flex: 0 0 auto;
}

.blog-form__submit {
  width: auto;
  min-width: 10rem;
  margin-top: 0;
}

@media (max-width: 720px) {
  .blog-photos__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.designer-thread {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.designer-thread__title {
  margin: 0 0 0.55rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.designer-thread__empty {
  margin: 0;
  font-size: 0.82rem;
}

.designer-thread__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.designer-thread__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 0.15rem 0.75rem;
  width: 100%;
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.designer-thread__row:hover,
.designer-thread__row:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.designer-thread__row-title {
  grid-column: 1;
  grid-row: 1;
  font-size: 0.88rem;
  font-weight: 600;
}

.designer-thread__row-preview {
  grid-column: 1;
  grid-row: 2;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.designer-thread__row-date {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 0.72rem;
  white-space: nowrap;
}

.designer-thread__item {
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
}

.designer-thread__meta {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
}

.designer-thread__body {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.msg-dialog {
  width: min(32rem, calc(100vw - 2rem));
  max-height: min(80vh, 36rem);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0e0e12;
  color: var(--text);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}

.msg-dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
}

.msg-dialog__inner {
  margin: 0;
  padding: 1.1rem 1.15rem 1rem;
}

.msg-dialog__title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
}

.msg-dialog__body {
  margin: 0;
  padding: 0.75rem 0.85rem;
  max-height: min(50vh, 22rem);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0a0a0c;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.msg-dialog__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.9rem;
}

/* —— Step 15: Links & Billing —— */
.links-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.35rem;
}

.dash-col--right .dash-links {
  flex: 0 0 auto;
}

.links-btn {
  width: auto;
  min-width: 0;
  margin-top: 0;
  padding: 0.55rem 0.95rem;
  text-decoration: none;
  font-size: 0.85rem;
  white-space: nowrap;
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(196, 160, 224, 0.45);
  box-shadow: none;
}

.links-btn:hover {
  background: var(--accent-soft);
  filter: none;
  text-decoration: none;
}

/* —— Back to top (same triangle as k-wired.com / forms) —— */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.65rem 1rem;
  background: #000;
  color: #fff;
  text-decoration: none;
}

.skip-link:focus {
  left: 0.75rem;
  top: 0.75rem;
}

.back-to-top-wrap {
  position: fixed;
  right: clamp(60px, 5vw + 48px, 100px);
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  pointer-events: none;
}

.back-to-top-wrap.is-visible {
  opacity: 0.75;
  visibility: visible;
  pointer-events: auto;
}

.back-to-top-wrap.is-visible:hover {
  opacity: 1;
}

.back-to-top-button {
  display: block;
  line-height: 0;
  text-decoration: none;
}

.back-to-top-button img {
  display: block;
  width: 80px;
  height: 80px;
}

.site-header__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.site-header__company {
  margin: 0 0 0.35rem;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.site-header__domain {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.site-header__contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
  margin: 0 0 1.1rem;
}

.site-header__contact dt {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-header__contact dd {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
}

.site-header__health {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.site-header__health-item {
  padding: 0.55rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  text-align: center;
}

.site-header__health-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.site-header__health-value {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.site-header__health-note {
  margin: 0.65rem 0 0;
  font-size: 0.72rem;
}

@media (max-width: 720px) {
  .site-header__grid {
    grid-template-columns: 1fr;
  }

  .site-header__contact {
    grid-template-columns: 1fr;
  }

  .site-header__health {
    grid-template-columns: 1fr;
  }
}

.dash-foot {
  margin-top: auto;
  padding: 1rem 1.5rem 1.35rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  background: rgba(5, 5, 5, 0.9);
  backdrop-filter: blur(10px);
  flex: 0 0 auto;
  order: 99; /* always last in page-dashboard flex column */
}

.dash-foot__signed {
  margin: 0;
}

.dash-foot__powered {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.dash-foot__brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}

.dash-foot__brand img {
  display: block;
  width: auto;
  height: 22px;
}

.dash-foot__brand:hover {
  opacity: 0.9;
}

/* —— Support / About stubs (shared) —— */
.shell {
  max-width: 40rem;
  margin: 12vh auto;
  padding: 1.5rem;
}

.shell h1 {
  font-weight: 600;
}

@media (max-width: 900px) {
  .page-login,
  .page-dashboard {
    /* iOS / mobile: fixed attachment is unreliable — still static (no motion) */
    background-attachment: scroll, scroll;
  }

  .dash-layout {
    grid-template-columns: 1fr;
    align-content: start;
    align-items: start;
    flex: 0 1 auto; /* don't leave a tall empty main under content */
  }

  .dash-col--right,
  .dash-col--left {
    align-self: stretch;
    width: 100%;
  }

  /* Kill desktop equal-height fill — no empty gap under Submit before Links */
  .dash-col--right > [data-slot="blog-composer"],
  .dash-blog {
    flex: 0 0 auto;
    height: auto;
    min-height: 0;
  }

  .blog-form {
    flex: 0 0 auto;
  }

  .blog-form .field--grow {
    flex: 0 0 auto;
    min-height: 14rem;
  }

  .blog-form .field--grow textarea {
    height: auto;
    min-height: 14rem;
    resize: vertical;
  }

  .dash-panel--tall {
    min-height: 0;
  }

  .dash-col--right .dash-links {
    margin-top: 0;
  }

  /* Site Header + Phone + Email centered on narrow screens */
  .site-header__meta {
    text-align: center;
  }

  .site-header__contact {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .site-header__contact dt,
  .site-header__contact dd {
    text-align: center;
  }

  .site-header__health {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .site-header__health-item {
    width: min(100%, 16rem);
    text-align: center;
  }

  .site-header__health-note {
    text-align: center;
  }

  .dash-top__nav {
    order: 3;
    flex: 1 1 100%;
    justify-content: flex-start;
  }

  .dash-support__menu {
    left: 0;
    transform: none;
  }
}

@media (max-width: 560px) {
  .dash-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .dash-top__actions {
    width: 100%;
    justify-content: space-between;
  }

  .dash-foot {
    margin-top: 0.5rem;
  }

  .links-btn-row {
    justify-content: center;
  }
}

/* —— Portal chrome pages (Add-Ons, Support, How To, Contact) —— */
.portal-page {
  flex: 1;
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
}

.portal-page__inner {
  padding: 1.25rem 1.35rem 1.5rem;
  background: var(--panel-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
}

.portal-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.portal-lead {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--muted);
}

.portal-prose h2 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.05rem;
}

.portal-prose p,
.portal-prose li {
  line-height: 1.55;
}

/* legacy single-line price under title (unused on dashboard; keep for safety) */
.dash-addons .addon-card > .addon-card__price {
  margin: 0;
}

.addon-detail-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.addon-detail {
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
}

.addon-detail__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.addon-detail__head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.addon-detail__price {
  margin: 0;
  font-weight: 700;
  color: var(--accent);
}

.addon-detail__body {
  margin: 0 0 1rem;
  line-height: 1.55;
}

.addon-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
}

.support-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.support-card {
  display: block;
  padding: 1rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  text-decoration: none;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.support-card:hover {
  border-color: rgba(181, 108, 255, 0.45);
  text-decoration: none;
}

.support-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  color: var(--accent);
}

.support-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
}

.dash-support__refresh {
  display: block;
  width: 100%;
  padding: 0.55rem 1rem;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.dash-support__refresh:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.help-designer-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.75rem;
  margin: 0.75rem 0 1.25rem;
}

.help-designer {
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
}

.help-designer h3 {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
}

.help-actions,
.help-list {
  line-height: 1.6;
}

.help-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.howto-index {
  margin: 0 0 1.25rem;
  padding-left: 1.1rem;
  line-height: 1.55;
}

.howto-example {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: #0a0a0c;
  border: 1px solid var(--border);
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.45;
}

.howto-crumbs {
  margin: 0 0 1.15rem;
  padding: 0 0 0.85rem;
  border-bottom: 1px solid var(--border);
}

.portal-prose > .howto-crumbs:last-of-type,
.howto-crumbs + .howto-crumbs,
.howto-crumbs:last-child {
  margin: 1.5rem 0 0;
  padding: 0.85rem 0 0;
  border-bottom: 0;
  border-top: 1px solid var(--border);
}

.howto-crumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--muted);
}

.howto-crumbs__list li:not(:last-child)::after {
  content: "›";
  margin-left: 0.35rem;
  color: var(--muted);
  opacity: 0.7;
}

.howto-crumbs__list a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.howto-crumbs__list a:hover {
  text-decoration: underline;
}

.howto-crumbs__list [aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

.howto-crumbs__adjacent {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin: 0.65rem 0 0;
  font-size: 0.82rem;
  line-height: 1.4;
}

.howto-crumbs__prev,
.howto-crumbs__next {
  max-width: min(100%, 18rem);
}

.howto-crumbs__next {
  margin-left: auto;
  text-align: right;
}

.howto-nav {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.activity-log {
  margin: 0;
  padding-left: 1.1rem;
  line-height: 1.5;
  font-size: 0.85rem;
}

.activity-log li {
  margin-bottom: 0.45rem;
}

.contact-form input[type="text"],
.contact-form input[type="email"] {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0a0a0c;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.dash-top__brand-link {
  display: inline-flex;
  text-decoration: none;
}

