* {
  box-sizing: border-box;
}

/* Final account/order polish overrides. Keep this at the end so older rules do not win. */
.account-hero {
  align-items: end;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.account-hero-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.account-tabs,
.order-tabs {
  align-items: stretch;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  margin: 24px 0;
  padding: 10px;
}

.order-tabs {
  border-bottom: 6px solid var(--brand);
  border-radius: 8px 8px 0 0;
}

.account-tabs button,
.order-tab,
.button,
button.button,
.order-actions a,
.order-actions button {
  align-items: center;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 900;
  justify-content: center;
  line-height: 1.15;
  min-height: 44px;
  text-decoration: none;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.account-tabs button,
.order-tab {
  background: #f6f0ff;
  border: 1px solid #e0cdf7;
  color: var(--brand);
  flex: 1 1 0;
  padding: 13px 18px;
}

.account-tabs button.active,
.account-tabs button[aria-selected="true"],
.account-tab.active,
.account-tab[aria-selected="true"],
.order-tab.active,
.order-tab[aria-selected="true"],
.order-filter.active {
  background: var(--aimari-brand, var(--brand, #6200ad));
  border-color: var(--aimari-brand, var(--brand, #6200ad));
  color: #fff;
  box-shadow: 0 14px 30px rgba(98, 0, 173, 0.22);
}

.button.primary,
.button:not(.secondary):not(.danger):not(.ghost) {
  background: var(--brand);
  border: 1px solid var(--brand);
  color: #fff;
}

.button.secondary,
.order-actions a,
.order-actions button {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
}

.button.danger,
.order-actions form button {
  background: #fff6f7;
  border-color: #f0c4cc;
  color: #a11335;
}

.button.compact,
.order-actions a,
.order-actions button {
  min-height: 38px;
  padding: 8px 13px;
}

.button:hover,
.account-tabs button:hover,
.order-tab:hover,
.order-actions a:hover,
.order-actions button:hover {
  transform: translateY(-1px);
}

.order-row,
.device-item,
.template-row {
  align-items: center;
  background: #fff;
  border: 1px solid #d9c4ff;
  border-radius: 8px;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding: 18px;
}

.order-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.order-actions form {
  margin: 0;
}

.device-counter,
.order-limit-banner {
  background: #f7f1ff;
  border: 1px solid #d9c4ff;
  border-radius: 8px;
  color: var(--brand);
  display: inline-flex;
  font-weight: 900;
  gap: 8px;
  margin-bottom: 18px;
  padding: 12px 16px;
}

.device-list {
  display: grid;
  gap: 12px;
}

.device-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

.license-data {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
}

.license-copy-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.license-copy-row code {
  overflow-wrap: anywhere;
  white-space: normal;
}

.workshop-profile-form {
  align-items: end;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(180px, auto) minmax(120px, auto);
}

.logo-upload-box {
  align-items: center;
  border: 1px dashed #b98cff;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  justify-items: center;
  min-height: 112px;
  padding: 14px;
  text-align: center;
}

.logo-upload-box img {
  height: 72px;
  object-fit: contain;
  width: 72px;
}

@media (max-width: 860px) {
  .account-hero,
  .license-data,
  .workshop-profile-form,
  .order-row,
  .device-item,
  .template-row {
    grid-template-columns: 1fr;
  }

  .account-hero-actions,
  .order-actions {
    justify-content: flex-start;
  }

  .account-tabs,
  .order-tabs {
    overflow-x: auto;
  }

  .account-tabs button,
  .order-tab {
    flex: 0 0 max-content;
    min-width: 170px;
  }
}

.plugin-detail {
  margin: 0 auto;
  max-width: 1180px;
  padding: 72px 6vw 90px;
}

.plugin-hero {
  align-items: start;
  display: grid;
  gap: 38px;
  grid-template-columns: minmax(0, 1.1fr) 360px;
}

.plugin-hero h1 {
  color: var(--ink);
  font-size: clamp(3rem, 7vw, 5.6rem);
  line-height: .95;
  margin: 12px 0 18px;
}

.plugin-hero .lead {
  color: var(--muted);
  font-size: 1.18rem;
  line-height: 1.6;
  max-width: 760px;
}

.plugin-hero .lead p {
  margin: 0 0 12px;
}

.plugin-hero .lead :last-child {
  margin-bottom: 0;
}

.plugin-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 24px;
}

.plugin-tags span {
  background: #eef7f2;
  border-radius: 999px;
  color: #0a7f43;
  font-weight: 850;
  padding: 6px 11px;
}

.plugin-tags .access {
  background: #f3e8ff;
  color: var(--brand);
}

.plugin-card-preview {
  background: #fff;
  border: 1px solid #dfd4ef;
  border-radius: 8px;
  box-shadow: 0 22px 60px rgba(98, 0, 173, .12);
  display: grid;
  padding: 34px;
}

.plugin-card-preview img {
  height: 110px;
  margin-bottom: 24px;
  object-fit: contain;
  width: 110px;
}

.plugin-card-preview h2 {
  font-size: 2rem;
  margin: 0 0 10px;
}

.plugin-card-action {
  justify-self: end;
  margin-top: 22px;
  min-width: 160px;
}

.plugin-info-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 34px;
}

.plugin-info-card {
  background: #fff;
  border: 1px solid #dfd4ef;
  border-radius: 8px;
  padding: 22px;
}

.plugin-info-card span {
  color: #5b6b85;
  display: block;
  font-weight: 850;
  margin-bottom: 8px;
}

.plugin-info-card strong {
  color: var(--ink);
  font-size: 1.15rem;
}

.plugin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 42px 0 18px;
}

.plugin-tabs a {
  border: 1px solid #d9c4ff;
  border-radius: 8px;
  color: var(--brand);
  font-weight: 900;
  padding: 12px 18px;
  text-decoration: none;
}

.plugin-tab-panel {
  background: #fff;
  border: 1px solid #dfd4ef;
  border-radius: 8px;
  margin-top: 14px;
  padding: 26px;
}

.plugin-tab-panel > div > :first-child {
  margin-top: 0;
}

@media (max-width: 860px) {
  .plugin-hero,
  .plugin-info-grid {
    grid-template-columns: 1fr;
  }

  .plugin-card-action {
    justify-self: stretch;
  }

  .content-columns {
    grid-template-columns: 1fr;
  }
}

/* Account and order UI consistency pass */
:root {
  --aimari-brand: #6200ad;
  --aimari-mint: #00e1a7;
  --aimari-ink: #07142f;
  --aimari-line: #dbe4f3;
  --aimari-soft: #f7f2ff;
}

.button,
button.button,
.account-tab,
.order-tab,
.order-actions a,
.order-actions button {
  align-items: center;
  border-radius: 8px;
  border: 1px solid var(--aimari-line);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 900;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  text-decoration: none;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.button:hover,
.account-tab:hover,
.order-tab:hover,
.order-actions a:hover,
.order-actions button:hover {
  transform: translateY(-1px);
}

.button.primary,
.account-tab.active,
.account-tab[aria-selected="true"],
.order-tab.active,
.order-tab[aria-selected="true"] {
  background: var(--aimari-brand);
  border-color: var(--aimari-brand);
  color: #fff;
  box-shadow: 0 14px 30px rgba(98, 0, 173, 0.16);
}

.button.secondary,
.order-actions a,
.order-actions button {
  background: #fff;
  color: var(--aimari-ink);
}

.button.danger,
.order-actions form button {
  background: #fff6f7;
  border-color: #f0c4cc;
  color: #a11335;
}

.button.compact,
.order-actions a,
.order-actions button {
  min-height: 38px;
  padding: 8px 13px;
}

.button.wide {
  width: 100%;
}

.account-hero {
  align-items: end;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.account-hero-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.account-tabs,
.order-tabs {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--aimari-line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  margin: 24px 0;
  padding: 8px;
}

.account-tabs {
  position: sticky;
  top: 76px;
  z-index: 2;
}

.account-tab,
.order-tab {
  background: #f7f1ff;
  color: #4b1479;
  flex: 1;
}

.order-tabs {
  border-bottom: 6px solid var(--aimari-brand);
  border-radius: 8px 8px 0 0;
  padding-bottom: 10px;
}

.order-row {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  padding: 18px;
}

.order-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.order-actions form {
  margin: 0;
}

.device-counter {
  background: #f3e8ff;
  border: 1px solid #dfc7ff;
  border-radius: 8px;
  color: var(--aimari-brand);
  display: inline-flex;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 14px;
}

.device-list {
  display: grid;
  gap: 12px;
}

.device-item {
  align-items: center;
  background: #fff;
  border: 1px solid var(--aimari-line);
  border-radius: 8px;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 16px;
}

.device-item strong,
.device-item span,
.device-item small {
  display: block;
  overflow-wrap: anywhere;
}

.license-data {
  align-items: start;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 12px 28px;
}

.license-copy-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.license-copy-row code {
  overflow-wrap: anywhere;
  white-space: normal;
}

.workshop-profile-form {
  align-items: end;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(260px, 1fr) 190px;
}

.workshop-profile-form > .button {
  grid-column: 1 / -1;
}

.logo-upload-box {
  align-items: center;
  aspect-ratio: 1 / 0.72;
  background: #fff;
  border: 1.5px dashed var(--aimari-brand);
  border-radius: 8px;
  color: var(--aimari-brand);
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  min-height: 150px;
  padding: 16px;
  text-align: center;
}

.logo-upload-box .logo-preview {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 82px;
  width: 100%;
}

.logo-upload-box .logo-preview img {
  max-height: 82px;
  max-width: 120px;
  object-fit: contain;
}

.logo-upload-box small {
  color: #536682;
  font-weight: 800;
}

.order-limit-banner {
  align-items: center;
  background: #fbf7ff;
  border: 1px solid #dbc2ff;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 18px 0;
  padding: 16px;
}

.order-limit-banner strong {
  color: var(--aimari-brand);
  font-size: 1.45rem;
}

.order-limit-banner small {
  color: #536682;
  font-weight: 800;
}

.template-row {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.template-row.official {
  grid-template-columns: minmax(0, 1fr) auto;
}

.template-row code {
  overflow-wrap: anywhere;
  white-space: normal;
}

.template-modal {
  border: 0;
  border-radius: 12px;
  max-width: 720px;
  width: min(720px, calc(100vw - 32px));
}

.template-modal::backdrop {
  background: rgba(7, 20, 47, 0.48);
}

.template-modal-card {
  background: #fff;
  border-radius: 12px;
  display: grid;
  gap: 16px;
  padding: 24px;
}

.modal-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.modal-close {
  border-radius: 999px;
  min-height: 38px;
  min-width: 38px;
  padding: 0;
}

@media (max-width: 760px) {
  .account-hero {
    grid-template-columns: 1fr;
  }

  .account-hero-actions {
    justify-content: flex-start;
  }

  .account-tabs,
  .order-tabs {
    overflow-x: auto;
    position: static;
  }

  .account-tab,
  .order-tab {
    flex: 0 0 max-content;
    min-width: 170px;
  }

  .subscription-card,
  .split-card,
  .order-form-grid,
  .workshop-profile-form,
  .order-row,
  .template-row,
  .template-row.official,
  .device-item {
    grid-template-columns: 1fr;
  }

  .license-data {
    grid-template-columns: 1fr;
  }

  .order-actions {
    justify-content: flex-start;
  }
}

.orders-workshop-card {
  display: grid;
  gap: 22px;
}

.workshop-profile-form {
  align-items: end;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) 170px minmax(120px, auto);
}

.logo-upload-box {
  align-items: center;
  border: 1px dashed #7a00d4;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  min-height: 112px;
  padding: 14px;
  text-align: center;
}

.logo-upload-box span {
  color: var(--brand);
  font-size: 1.4rem;
  font-weight: 900;
}

.logo-upload-box input {
  display: none;
}

.logo-preview img {
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  max-height: 92px;
  max-width: 140px;
  object-fit: contain;
}

.order-tabs {
  align-items: center;
  border-bottom: 6px solid var(--brand);
  display: flex;
  gap: 18px;
  margin: 22px 0 18px;
  padding-bottom: 10px;
}

.order-tab,
.order-filter {
  background: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  min-height: 48px;
  padding: 10px 22px;
  text-transform: uppercase;
}

.order-tab.active,
.order-filter.active {
  background: var(--aimari-brand, var(--brand, #6200ad));
  border-color: var(--aimari-brand, var(--brand, #6200ad));
  color: #fff;
}

.order-panel[hidden] {
  display: none !important;
}

.order-form-grid {
  align-items: stretch;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(220px, 0.8fr) minmax(280px, 1.2fr);
}

.template-summary {
  border: 1px solid #b86aff;
  border-radius: 8px;
  color: #6200ad;
  min-height: 76px;
  padding: 16px;
}

.template-columns-field {
  display: grid;
  gap: 10px;
}

.template-columns-field textarea {
  min-height: 118px;
  resize: vertical;
}

.template-columns-field small {
  color: #52627d;
}

textarea.is-fixed {
  background: #f6f0ff;
  color: #465875;
}

.orders-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
}

.orders-list,
.template-list {
  display: grid;
  gap: 12px;
}

.order-row,
.template-row {
  align-items: center;
  border: 1px solid #d8c3ff;
  border-radius: 8px;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding: 16px;
}

.order-row strong,
.template-row strong {
  display: block;
}

.order-row span,
.template-row span {
  color: #536682;
}

.order-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.order-actions a,
.order-actions button {
  background: transparent;
  border: 0;
  color: var(--brand);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 4px;
  text-decoration: underline;
}

.order-actions form {
  margin: 0;
}

@media (max-width: 760px) {
  .workshop-profile-form,
  .order-form-grid,
  .order-row,
  .template-row {
    grid-template-columns: 1fr;
  }

  .order-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .orders-filter {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .order-actions {
    justify-content: flex-start;
  }
}

body {
  margin: 0;
  background: var(--page, #f7f5fb);
  color: var(--ink, #08152f);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.site-header {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid #dfe5ef;
  display: flex;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 6vw;
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo {
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 800;
  text-decoration: none;
}

.site-nav {
  align-items: center;
  display: flex;
  gap: 24px;
}

.nav-item {
  position: relative;
}

.nav-item.has-dropdown > a::after {
  content: "▾";
  font-size: 0.72em;
  margin-left: 6px;
}

.nav-dropdown-menu {
  background: #fff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(8, 21, 47, 0.12);
  display: none;
  min-width: 220px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 14px);
  z-index: 20;
}

.nav-item.has-dropdown:hover .nav-dropdown-menu,
.nav-item.has-dropdown:focus-within .nav-dropdown-menu {
  display: grid;
  gap: 4px;
}

.nav-dropdown-menu a {
  border-radius: 6px;
  padding: 10px 12px;
}

.nav-dropdown-menu a:hover {
  background: #f4effb;
}

.nav-item.has-dropdown > a::after {
  content: "v";
}

.site-nav a,
.site-footer a {
  color: #52617a;
  font-weight: 650;
  text-decoration: none;
}

.site-nav a:hover,
.site-footer a:hover {
  color: var(--brand);
}

.menu-toggle {
  background: transparent;
  border: 0;
  display: none;
  height: 40px;
  width: 40px;
}

.menu-toggle span {
  background: var(--ink);
  display: block;
  height: 2px;
  margin: 6px 5px;
}

.hero {
  display: grid;
  gap: 48px;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  min-height: calc(100vh - 72px);
  padding: 11vh 8vw 8vh;
}

.hero-copy {
  align-self: center;
  max-width: 820px;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 12px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  font-size: clamp(2.7rem, 7vw, 6.5rem);
  line-height: 0.95;
  margin: 0 0 24px;
}

.hero-copy p:not(.eyebrow),
.hero-subtitle,
.page-hero p,
.lead {
  color: #53627a;
  font-size: 1.18rem;
  max-width: 680px;
}

.hero-subtitle p,
.footer-description p {
  margin: 0 0 10px;
}

.hero-subtitle :last-child,
.footer-description :last-child {
  margin-bottom: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  align-items: center;
  border: 1px solid #cfd8e8;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  text-decoration: none;
}

.button.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.button.compact {
  min-height: 38px;
  padding: 0 14px;
}

form label {
  color: #52617a;
  display: grid;
  font-weight: 750;
  gap: 8px;
  margin-bottom: 14px;
}

form input,
form textarea,
form select {
  border: 1px solid #cfd8e8;
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 46px;
  padding: 10px 12px;
  width: 100%;
}

.check-row {
  align-items: center;
  display: flex;
  gap: 10px;
}

.check-row input[type="checkbox"] {
  min-height: auto;
  width: auto;
}

.hero-panel {
  align-self: end;
  background: #fff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  display: grid;
  gap: 1px;
  overflow: hidden;
}

.metric {
  padding: 28px;
}

.metric + .metric {
  border-top: 1px solid #dfe5ef;
}

.metric span,
.feature a,
.list-item span,
.article-card span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  font-size: 1.35rem;
  margin: 8px 0;
}

.metric small {
  color: #60708a;
}

.band,
.content-split,
.article-grid,
.plans,
.article,
.account-shell,
.page-hero {
  margin: 0 auto;
  max-width: 1240px;
  padding: 72px 6vw;
}

.tool-hero {
  text-align: center;
}

.tool-hero p {
  margin-left: auto;
  margin-right: auto;
}

.section-head {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-head.compact {
  margin-bottom: 14px;
}

.section-head h2,
.page-hero h1,
.article h1 {
  font-size: clamp(2rem, 4vw, 4.6rem);
  line-height: 1;
  margin: 0;
}

.section-head p {
  color: #5b6b85;
  max-width: 600px;
}

.feature-grid,
.article-grid,
.plans {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature,
.article-card,
.plan,
.account-panel {
  background: #fff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  padding: 24px;
}

.feature h3,
.article-card h2,
.plan h2 {
  margin: 10px 0;
}

.feature p,
.article-card p,
.plan p,
.plan-copy,
.account-panel li,
.prose {
  color: #53627a;
}

.content-split {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.list-stack {
  display: grid;
  gap: 12px;
}

.list-item {
  background: #fff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  display: block;
  padding: 20px;
  text-decoration: none;
}

.list-item strong {
  display: block;
  font-size: 1.15rem;
  margin: 5px 0;
}

.page-hero {
  padding-bottom: 32px;
}

.article-card {
  color: inherit;
  min-height: 220px;
  text-decoration: none;
}

.article-card img {
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  margin-bottom: 16px;
  object-fit: cover;
  width: 100%;
}

.plan.featured {
  border-color: var(--brand);
  box-shadow: inset 0 4px 0 var(--brand);
}

.plan.current {
  border-color: var(--accent);
  box-shadow: inset 0 4px 0 var(--accent), 0 18px 46px rgba(0, 239, 159, 0.12);
}

.plan-label-row {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.current-plan-badge {
  background: #e8fff5;
  border-radius: 999px;
  color: #087d62;
  font-size: 0.72rem;
  padding: 5px 10px;
}

.current-plan-button[disabled] {
  background: #e8fff5;
  border-color: #b8f2dc;
  color: #087d62;
  cursor: not-allowed;
  opacity: 1;
  width: 100%;
}

.price {
  color: var(--brand);
  font-size: 1.35rem;
  font-weight: 850;
}

.plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.plan ul,
.account-panel ul {
  padding-left: 20px;
}

.plan-copy p,
.product-card-copy p {
  margin: 0 0 10px;
}

.plan-copy :last-child,
.product-card-copy :last-child {
  margin-bottom: 0;
}

.license-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: 110px 1fr;
}

.license-summary dt {
  color: #65748e;
  font-weight: 800;
}

.license-summary dd {
  margin: 0;
}

.license-key {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  overflow-wrap: anywhere;
}

.license-key-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.copy-license {
  background: #f5f1fb;
  border: 1px solid #d9c9ed;
  border-radius: 999px;
  color: var(--brand);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 850;
  min-height: 32px;
  padding: 0 12px;
}

.copy-license:hover,
.copy-license.copied {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.notice {
  border-radius: 8px;
  font-weight: 750;
  margin-bottom: 16px;
  padding: 12px 14px;
}

.notice.success {
  background: #f0fdf4;
  color: #166534;
}

.notice.danger {
  background: #fef2f2;
  color: #991b1b;
}

.device-manager {
  border-top: 1px solid #dfe5ef;
  margin-top: 22px;
  padding-top: 20px;
}

.device-manager h3 {
  margin: 0 0 14px;
}

.device-list {
  display: grid;
  gap: 10px;
}

.device-row {
  align-items: center;
  background: linear-gradient(135deg, #fff, #fbf8ff);
  border: 1px solid #dfcef5;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(98, 0, 173, 0.06);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 16px;
}

.device-row > div {
  min-width: 0;
}

.device-row strong,
.device-row span,
.device-row small {
  display: block;
  overflow-wrap: anywhere;
}

.device-row strong {
  font-size: 1.02rem;
}

.device-row .device-plugin {
  color: var(--brand);
  font-weight: 850;
}

.device-row span,
.device-row small,
.muted {
  color: #63708a;
}

.button.compact {
  min-height: 38px;
  padding: 0 14px;
}

.button.danger {
  background: #fff;
  border-color: #e4d6f4;
  color: #6200ad;
}

.button.danger:hover {
  background: #6200ad;
  border-color: #6200ad;
  color: #fff;
}

.article {
  max-width: 900px;
}

.article-cover {
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  margin: 24px 0;
  object-fit: cover;
  width: 100%;
}

.back-link {
  color: var(--brand);
  font-weight: 800;
  text-decoration: none;
}

.prose {
  background: #fff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  margin-top: 24px;
  padding: 28px;
}

.prose img {
  border-radius: 8px;
  max-width: 100%;
}

.prose iframe,
.plugin-tab-panel iframe,
.plugin-hero iframe,
.plan-copy iframe,
.product-card-copy iframe {
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 8px;
  display: block;
  margin: 18px 0;
  max-width: 100%;
  width: 100%;
}

.prose figure,
.plugin-tab-panel figure,
.plugin-hero figure,
.plan-copy figure,
.product-card-copy figure {
  margin: 20px 0;
}

.prose figure img,
.plugin-tab-panel figure img,
.plugin-hero figure img,
.plan-copy figure img,
.product-card-copy figure img {
  border-radius: 8px;
  display: block;
  height: auto;
  max-width: 100%;
}

.prose figcaption,
.plugin-tab-panel figcaption,
.plugin-hero figcaption,
.plan-copy figcaption,
.product-card-copy figcaption {
  color: #65748e;
  font-size: 0.9rem;
  margin-top: 8px;
}

.content-columns {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

blockquote {
  border-left: 4px solid var(--brand);
  color: #33415c;
  margin: 20px 0;
  padding: 4px 0 4px 18px;
}

.article-support {
  align-items: center;
  background: #fff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-top: 18px;
  padding: 20px;
}

.article-support strong,
.article-support span {
  display: block;
}

.article-support span {
  color: #5b6b85;
  margin-top: 4px;
}

.embed {
  aspect-ratio: 16 / 9;
  background: #eef2f8;
  border-radius: 8px;
  margin: 24px 0;
  overflow: hidden;
}

.embed iframe {
  border: 0;
  height: 100%;
  width: 100%;
}

.auth-shell {
  display: grid;
  min-height: 70vh;
  place-items: center;
  padding: 48px 20px;
}

.auth-panel {
  background: #fff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  max-width: 520px;
  padding: 32px;
  width: 100%;
}

.auth-panel h1 {
  font-size: clamp(2.3rem, 5vw, 4rem);
}

.auth-panel .button {
  width: 100%;
}

.account-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.account-actions form {
  margin: 0;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  margin-top: 18px;
}

.auth-links a {
  color: var(--brand);
  font-weight: 800;
  text-decoration: none;
}

.account-shell {
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  min-height: 65vh;
}

.empty {
  color: #6b7890;
}

.site-footer {
  align-items: center;
  background: #fff;
  border-top: 1px solid #dfe5ef;
  display: flex;
  justify-content: space-between;
  padding: 32px 6vw;
}

.site-footer p {
  color: #60708a;
  margin: 6px 0 0;
}

.site-footer small {
  color: var(--brand);
  display: block;
  font-weight: 850;
  margin-top: 6px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

@media (max-width: 860px) {
  .site-header {
    min-height: 64px;
    padding: 0 20px;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    background: #fff;
    border-bottom: 1px solid #dfe5ef;
    display: none;
    flex-direction: column;
    left: 0;
    padding: 18px 20px;
    position: absolute;
    right: 0;
    top: 64px;
  }

  .site-nav.open {
    display: flex;
  }

  .hero,
  .content-split,
  .account-shell {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 28px;
    min-height: auto;
    padding: 64px 20px 36px;
  }

  .band,
  .content-split,
  .article-grid,
  .plans,
  .article,
  .account-shell,
  .page-hero {
    padding-left: 20px;
    padding-right: 20px;
  }

  .feature-grid,
  .article-grid,
  .plans {
    grid-template-columns: 1fr;
  }

  .section-head,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .device-row {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Aimari Suite visual refresh */
.site-header {
  border-top: 4px solid var(--brand);
  min-height: 78px;
}

.logo {
  align-items: center;
  display: inline-flex;
  gap: 10px;
}

.logo img {
  height: 34px;
  width: 34px;
}

.logo span {
  display: inline-block;
}

.nav-pill {
  background: var(--brand);
  border-radius: 8px;
  color: #fff !important;
  padding: 8px 14px;
}

.nav-support-link {
  border: 1px solid #d8e0ee;
  border-radius: 8px;
  padding: 8px 12px;
}

.hero {
  background:
    radial-gradient(circle at 78% 18%, rgba(98, 0, 173, 0.14), transparent 28%),
    linear-gradient(180deg, #fbfaff 0%, var(--page) 100%);
  display: block;
  min-height: auto;
  padding: 96px 8vw 76px;
}

.hero-copy h1 {
  color: #08152f;
  max-width: 760px;
}

.hero-centered {
  margin: 0 auto;
  max-width: 980px;
  text-align: center;
}

.hero-centered h1 {
  font-size: clamp(3rem, 8vw, 7rem);
  margin-left: auto;
  margin-right: auto;
}

.hero-centered p:not(.eyebrow) {
  margin-left: auto;
  margin-right: auto;
}

.hero-centered .hero-actions {
  justify-content: center;
}

.hero-showcase {
  align-self: center;
  display: grid;
  gap: 14px;
}

.showcase-card {
  background: #fff;
  border: 1px solid #e3daef;
  border-radius: 8px;
  box-shadow: 0 22px 60px rgba(35, 15, 60, 0.12);
  padding: 34px;
}

.showcase-card.main {
  min-height: 360px;
}

.showcase-card img {
  height: 92px;
  width: 92px;
}

.showcase-card span,
.showcase-strip span {
  color: var(--brand);
  display: block;
  font-size: 0.78rem;
  font-weight: 850;
  margin-top: 24px;
  text-transform: uppercase;
}

.showcase-card strong {
  display: block;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1;
  margin: 10px 0;
}

.showcase-card small {
  color: #5b6b85;
  font-size: 1rem;
}

.showcase-strip {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.showcase-strip span {
  background: #fff;
  border: 1px solid #e3daef;
  border-radius: 8px;
  margin: 0;
  padding: 14px 12px;
  text-align: center;
  text-transform: none;
}

.product-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-card {
  background: #fff;
  border: 1px solid #dfd4ef;
  border-radius: 8px;
  box-shadow: 0 16px 42px rgba(35, 15, 60, 0.08);
  overflow: hidden;
}

.product-top {
  align-items: center;
  background: var(--brand);
  color: #fff;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 50px;
  padding: 0 16px;
}

.product-top span,
.product-actions a {
  background: #00ef9f;
  border-radius: 999px;
  color: #08152f;
  font-size: 0.74rem;
  font-weight: 900;
  padding: 5px 12px;
  text-decoration: none;
  text-transform: uppercase;
}

.tag-stack,
.tag-list {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.tag-stack span {
  display: inline-flex;
}

.product-media {
  align-items: center;
  background: linear-gradient(135deg, rgba(98, 0, 173, 0.22), rgba(98, 0, 173, 0.42));
  display: flex;
  height: 150px;
  justify-content: center;
}

.product-media img {
  height: 72px;
  width: 72px;
}

.product-card h3,
.product-card p,
.product-card-copy,
.product-actions {
  margin-left: 18px;
  margin-right: 18px;
}

.product-card h3 {
  margin-bottom: 8px;
  margin-top: 18px;
}

.product-card p {
  color: #5b6b85;
  min-height: 72px;
}

.product-card-copy {
  color: #5b6b85;
  min-height: 72px;
}

.product-actions {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

.product-actions small {
  background: #eef7f2;
  border-radius: 999px;
  color: #0a7f43;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 850;
  padding: 5px 9px;
}

.product-card.light .product-top {
  background: #7d54bd;
}

.product-card.soon .product-top {
  background: #2d1b4f;
}

.section-head.centered {
  align-items: center;
  display: grid;
  justify-content: center;
  text-align: center;
}

.section-head.centered p {
  margin-left: auto;
  margin-right: auto;
}

.pricing-preview {
  padding-top: 34px;
}

.mini-plan-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mini-plan {
  background: #fff;
  border: 1px solid #d9c9ed;
  border-radius: 8px;
  min-height: 210px;
  padding: 26px;
}

.mini-plan.featured {
  border-color: var(--brand);
  box-shadow: inset 0 4px 0 var(--brand), 0 18px 46px rgba(98, 0, 173, 0.12);
}

.mini-plan span {
  color: var(--brand);
  font-weight: 900;
}

.mini-plan strong {
  display: block;
  font-size: 2rem;
  margin: 18px 0 8px;
}

.workflow-band .feature span {
  color: var(--brand);
  font-size: 0.9rem;
}

.plans {
  align-items: stretch;
  padding-top: 24px;
}

.plan {
  display: flex;
  flex-direction: column;
  min-height: 420px;
}

.plan .plan-actions {
  margin-top: auto;
}

.plan .button.primary {
  width: 100%;
}

.pricing-hero {
  text-align: center;
}

.pricing-hero h2 {
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 1;
  margin: 0 0 18px;
}

.pricing-hero p {
  margin-left: auto;
  margin-right: auto;
}

.billing-switch {
  background: #fff;
  border: 1px solid #dfd4ef;
  border-radius: 8px;
  display: inline-flex;
  gap: 4px;
  margin-top: 24px;
  padding: 5px;
}

.billing-switch button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #52617a;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  min-height: 40px;
  padding: 0 18px;
}

.billing-switch button.active {
  background: var(--brand);
  color: #fff;
}

.pricing-copy {
  margin-left: auto;
  margin-right: auto;
  max-width: 960px;
}

.account-page {
  margin: 0 auto;
  max-width: 1220px;
  padding: 64px 6vw 84px;
}

.account-title {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 28px;
}

.account-title h1 {
  color: var(--brand);
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 1;
  margin: 0;
}

.account-card {
  background: #fff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  margin-bottom: 24px;
  padding: 28px;
}

.subscription-card {
  display: grid;
  gap: 28px;
  grid-template-columns: 280px minmax(0, 1fr);
}

.subscription-card span,
.download-card span {
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.subscription-card h2 {
  font-size: 3rem;
  line-height: 1;
  margin: 12px 0;
}

.subscription-details {
  display: grid;
  gap: 12px 18px;
  grid-template-columns: 140px minmax(0, 1fr);
  margin: 0;
}

.subscription-details dt {
  color: #65748e;
  font-weight: 850;
}

.subscription-details dd {
  margin: 0;
}

.download-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.account-tabs {
  align-items: stretch;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #ded1ef;
  border-radius: 20px;
  box-shadow: 0 20px 55px rgba(98, 0, 173, 0.09);
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 24px;
  padding: 10px;
}

.account-tabs button {
  -webkit-appearance: none;
  appearance: none;
  align-items: center;
  background: #f7f3ff;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #52617a;
  cursor: pointer;
  display: flex;
  font: inherit;
  font-weight: 850;
  justify-content: center;
  min-height: 56px;
  padding: 12px 16px;
  text-align: center;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
}

.account-tabs button.active,
.account-tabs button[aria-selected="true"] {
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 12px 28px rgba(98, 0, 173, 0.24);
  color: #fff;
  transform: translateY(-1px);
}

.account-tabs button:not(.active):hover {
  border-color: #cdb5ec;
  color: var(--brand);
}

.account-tabs button:focus-visible {
  outline: 3px solid rgba(0, 232, 162, 0.38);
  outline-offset: 2px;
}

.account-tab-panel {
  animation: accountPanelIn 180ms ease-out;
  display: block;
}

.account-tab-panel[hidden] {
  display: none;
}

@keyframes accountPanelIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.download-card {
  background: #faf8ff;
  border: 1px solid #e6dcf4;
  border-radius: 8px;
  padding: 18px;
}

.download-card img {
  height: 52px;
  margin-bottom: 16px;
  width: 52px;
}

.download-card h3 {
  margin: 8px 0;
}

.download-card p {
  color: #5b6b85;
}

.wide {
  width: 100%;
}

.login-modal {
  display: none;
  inset: 0;
  position: fixed;
  z-index: 50;
}

.login-modal.open {
  display: block;
}

.login-modal-backdrop {
  background: rgba(8, 21, 47, 0.52);
  inset: 0;
  position: absolute;
}

.login-modal-panel {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(8, 21, 47, 0.28);
  left: 50%;
  max-width: 460px;
  padding: 34px;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 32px);
}

.login-modal-panel h2 {
  font-size: 2.2rem;
  line-height: 1;
  margin: 0 0 12px;
}

.login-modal-panel p,
.login-modal-panel small {
  color: #5b6b85;
}

.modal-close {
  align-items: center;
  background: #f5f1fb;
  border: 1px solid #e3daef;
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  font-size: 1.5rem;
  height: 40px;
  justify-content: center;
  position: absolute;
  right: 18px;
  top: 18px;
  width: 40px;
}

.modal-logo {
  height: 58px;
  margin-bottom: 18px;
  width: 58px;
}

.testimonial-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.testimonial-card {
  background: #fff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  padding: 24px;
}

.testimonial-card img,
.testimonial-avatar {
  border-radius: 999px;
  height: 58px;
  margin-bottom: 18px;
  object-fit: cover;
  width: 58px;
}

.testimonial-avatar {
  align-items: center;
  background: var(--brand);
  color: #fff;
  display: flex;
  font-size: 1.4rem;
  font-weight: 900;
  justify-content: center;
}

.testimonial-card blockquote {
  color: #53627a;
  font-size: 1.05rem;
  margin: 0 0 18px;
}

.testimonial-card strong,
.testimonial-card span {
  display: block;
}

.testimonial-card span {
  color: #65748e;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  border: 1px solid #e4e9f2;
  border-radius: 8px;
  padding: 0;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 900;
  list-style: none;
  padding: 18px 20px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  font-weight: 900;
}

.faq-item[open] summary::after {
  content: "-";
}

.faq-item div {
  border-top: 1px solid #e4e9f2;
  padding: 0 20px 18px;
}

.tool-hero {
  text-align: center;
}

.tool-hero p {
  margin-left: auto;
  margin-right: auto;
}

.csv-tool {
  margin: 0 auto 72px;
  max-width: 1240px;
  padding: 0 6vw 72px;
}

.csv-toolbar,
.csv-actions,
.csv-import-panel,
.csv-preview-panel {
  background: #fff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
}

.csv-import-panel {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 16px;
  padding: 20px;
}

.csv-import-panel h2,
.csv-import-panel p {
  margin: 0;
}

.csv-import-panel p {
  color: #5b6b85;
  margin-top: 8px;
}

.csv-import-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.csv-import-actions input[type="file"] {
  height: 1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.csv-status {
  color: #5b6b85;
  font-weight: 850;
  grid-column: 1 / -1;
  margin: 0;
}

.csv-status[data-status="success"] {
  color: #087d62;
}

.csv-status[data-status="error"] {
  color: #9b1c2f;
}

.csv-toolbar {
  display: grid;
  gap: 16px;
  grid-template-columns: 1.1fr 1fr 1.2fr auto;
  margin-bottom: 16px;
  padding: 20px;
}

.csv-toolbar label {
  color: #52617a;
  display: grid;
  font-weight: 850;
  gap: 8px;
}

.csv-toolbar select,
.csv-toolbar input {
  border: 1px solid #cfd8e8;
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 46px;
  padding: 10px 12px;
}

.check-row {
  align-content: end;
  grid-template-columns: auto 1fr;
  min-width: 170px;
}

.check-row input {
  min-height: auto;
  width: auto;
}

.custom-field-builder {
  background: #fff;
  border: 1px dashed #cfd8e8;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.custom-field-row {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 160px 130px auto;
}

.custom-field-row label {
  color: #52617a;
  display: grid;
  font-size: 0.88rem;
  font-weight: 850;
  gap: 6px;
}

.custom-field-row input,
.custom-field-row select,
.extra-fields input,
.extra-fields textarea {
  border: 1px solid #cfd8e8;
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}

.extra-fields {
  display: grid;
  gap: 14px;
}

.submission-meta,
.csv-merger {
  background: #fff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  padding: 18px;
}

.submission-meta {
  background: #f8fafc;
  margin: 14px 0;
}

.submission-meta p {
  margin: 0;
}

.csv-merger .csv-import-actions {
  justify-content: flex-start;
}

.csv-merger [data-merger-files] {
  max-width: 100%;
}

.csv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  padding: 16px;
}

.csv-table-wrap {
  background: #fff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  margin-bottom: 18px;
  overflow: auto;
}

.csv-table {
  border-collapse: collapse;
  min-width: 820px;
  width: 100%;
}

.csv-table th,
.csv-table td {
  border-bottom: 1px solid #e4e9f2;
  border-right: 1px solid #e4e9f2;
  min-width: 140px;
  padding: 0;
  vertical-align: top;
}

.csv-table th:last-child,
.csv-table td:last-child {
  border-right: 0;
}

.csv-table th {
  background: #f7f4fc;
  color: var(--brand);
  font-size: 0.9rem;
  text-align: left;
}

.csv-table [contenteditable] {
  min-height: 46px;
  outline: 0;
  padding: 12px;
}

.csv-table select {
  background: #fff;
  border: 0;
  color: var(--ink);
  font: inherit;
  font-weight: 850;
  min-height: 46px;
  outline: 0;
  padding: 12px;
  width: 100%;
}

.csv-table select:focus {
  box-shadow: inset 0 0 0 2px var(--brand);
}

.csv-table [contenteditable]:focus {
  box-shadow: inset 0 0 0 2px var(--brand);
}

.csv-row-tools {
  min-width: 82px !important;
  text-align: center;
  width: 82px;
}

.csv-mini-button {
  background: transparent;
  border: 0;
  color: #9b1c2f;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  min-height: 46px;
  padding: 0 12px;
}

.csv-column-button {
  display: block;
  min-height: auto;
  padding: 0 12px 10px;
  text-align: left;
}

.csv-preview-panel {
  display: grid;
  gap: 18px;
  grid-template-columns: 260px minmax(0, 1fr);
  padding: 20px;
}

.csv-preview-panel h2 {
  margin: 0 0 8px;
}

.csv-preview-panel p {
  color: #5b6b85;
  margin: 0;
}

.csv-preview-panel textarea {
  border: 1px solid #cfd8e8;
  border-radius: 8px;
  color: #25344e;
  font: 0.92rem ui-monospace, SFMono-Regular, Consolas, monospace;
  min-height: 180px;
  padding: 14px;
  resize: vertical;
  width: 100%;
}

textarea[readonly],
textarea.readonly {
  background: #f7f2ff;
  color: #52617a;
  cursor: not-allowed;
}

.csv-share-form {
  display: grid;
  gap: 16px;
}

.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid label,
.csv-share-form label,
.wide-label {
  color: #52617a;
  display: grid;
  font-weight: 900;
  gap: 8px;
}

.form-grid input,
.form-grid select,
.form-grid textarea,
.csv-share-form textarea,
.wide-label input {
  border: 1px solid #cfd8e8;
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 48px;
  padding: 12px 14px;
  width: 100%;
}

.logo-preview {
  align-items: center;
  border: 1px dashed #cfd8e8;
  border-radius: 8px;
  display: flex;
  min-height: 76px;
  padding: 12px;
}

.logo-preview img {
  max-height: 64px;
  max-width: 180px;
}

.shared-list-grid,
.submission-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.shared-list-card,
.submission-card {
  align-items: center;
  border: 1px solid #d9e2f2;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.8fr) auto;
  padding: 14px;
}

.submission-card.detailed {
  align-items: stretch;
  display: grid;
  grid-template-columns: 1fr;
}

.submission-head {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.status-pill {
  background: #fff7ed;
  border-radius: 999px;
  color: #9a3412 !important;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 6px 10px;
}

.status-pill.success {
  background: #ecfdf5;
  color: #087d62 !important;
}

.csv-table-wrap.preview {
  margin: 4px 0 0;
}

.shared-list-card span,
.submission-card span {
  color: #5b6b85;
  display: block;
  margin-top: 4px;
}

.shared-list-card code {
  color: #52617a;
  overflow-wrap: anywhere;
}

.shared-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.public-list-body {
  background: radial-gradient(circle at top right, rgba(98, 0, 173, 0.14), transparent 34%), var(--page);
  color: var(--ink);
  min-height: 100vh;
}

.public-list-shell {
  margin: 0 auto;
  max-width: 980px;
  padding: 42px 20px;
}

.public-list-panel {
  background: #fff;
  border: 1px solid #d9e2f2;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(8, 21, 47, 0.08);
  display: grid;
  gap: 24px;
  padding: clamp(24px, 5vw, 48px);
}

.public-list-panel.centered {
  justify-items: center;
  text-align: center;
}

.public-list-brand {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: auto minmax(0, 1fr);
}

.public-list-brand img {
  border-radius: 8px;
  max-height: 86px;
  max-width: 132px;
}

.public-list-brand h1 {
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 0.95;
  margin: 0 0 12px;
}

.public-list-brand p {
  margin: 0;
}

.public-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.public-csv-table input,
.public-csv-table select {
  border: 0;
  font: inherit;
  min-height: 44px;
  padding: 8px;
  width: 100%;
}

.public-csv-table input:disabled,
.public-csv-table select:disabled {
  background: #f8fafc;
  color: #25344e;
  opacity: 1;
}

.text-danger {
  background: transparent;
  border: 0;
  color: #9b1c2f;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

@media (max-width: 1080px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .logo img {
    height: 30px;
    width: 30px;
  }

  .hero {
    min-height: auto;
  }

  .showcase-strip,
  .mini-plan-grid,
  .product-grid,
  .testimonial-grid {
    grid-template-columns: 1fr;
  }

  .product-card p {
    min-height: 0;
  }

  .account-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .article-support {
    align-items: stretch;
    flex-direction: column;
  }

  .subscription-card,
  .subscription-details,
  .download-grid,
  .account-tabs,
  .form-grid,
  .shared-list-card,
  .submission-card,
  .public-list-brand,
  .csv-import-panel,
  .csv-toolbar,
  .csv-preview-panel {
    grid-template-columns: 1fr;
  }

  .csv-import-actions {
    justify-content: stretch;
  }

  .csv-import-actions .button {
    width: 100%;
  }

  .csv-actions .button {
    width: 100%;
  }

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

  .custom-field-row .button,
  .csv-merger .button {
    width: 100%;
  }

  .public-list-body {
    background: #f5f7fb;
  }

  .public-list-shell {
    padding: 14px;
  }

  .public-list-panel {
    gap: 18px;
    padding: 22px 16px;
  }

  .public-list-brand {
    gap: 12px;
  }

  .public-list-brand img {
    max-height: 78px;
    max-width: 110px;
  }

  .public-list-brand h1 {
    font-size: clamp(2rem, 12vw, 3rem);
    line-height: 1.05;
  }

  .csv-table-wrap.compact,
  .csv-table-wrap.preview {
    border: 0;
    overflow: visible;
  }

  .public-csv-table,
  .csv-preview-table {
    min-width: 0;
  }

  .public-csv-table thead,
  .csv-preview-table thead {
    display: none;
  }

  .public-csv-table,
  .public-csv-table tbody,
  .public-csv-table tr,
  .public-csv-table td,
  .csv-preview-table,
  .csv-preview-table tbody,
  .csv-preview-table tr,
  .csv-preview-table td {
    display: block;
    width: 100%;
  }

  .public-csv-table tr,
  .csv-preview-table tr {
    background: #fff;
    border: 1px solid #dfe5ef;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
  }

  .public-csv-table td,
  .csv-preview-table td {
    border-right: 0;
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 10px 12px;
  }

  .public-csv-table td::before,
  .csv-preview-table td::before {
    color: var(--brand);
    content: attr(data-label);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .public-csv-table input,
  .public-csv-table select {
    border: 1px solid #dfe5ef;
    border-radius: 8px;
    min-height: 44px;
  }

  .public-list-actions .button {
    width: 100%;
  }
}

/* Final overrides: account/order buttons and tabs */
.account-tabs,
.order-tabs {
  align-items: stretch;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  margin: 24px 0;
  padding: 10px;
}

.order-tabs {
  border-bottom: 6px solid var(--brand);
  border-radius: 8px 8px 0 0;
}

.account-tabs button,
.order-tab,
.button,
button.button,
.order-actions a,
.order-actions button {
  align-items: center;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 900;
  justify-content: center;
  line-height: 1.15;
  min-height: 44px;
  text-decoration: none;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.account-tabs button,
.order-tab {
  background: #f6f0ff;
  border: 1px solid #e0cdf7;
  color: var(--brand);
  flex: 1 1 0;
  padding: 13px 18px;
}

.account-tabs button.active,
.account-tabs button[aria-selected="true"],
.order-tab.active,
.order-tab[aria-selected="true"] {
  background: var(--aimari-brand, var(--brand, #6200ad));
  border-color: var(--aimari-brand, var(--brand, #6200ad));
  color: #fff;
  box-shadow: 0 14px 30px rgba(98, 0, 173, 0.22);
}

.account-tab.active,
.account-tab[aria-selected="true"],
.order-tab.active,
.order-tab[aria-selected="true"],
.order-filter.active {
  background: var(--aimari-brand, var(--brand, #6200ad)) !important;
  border-color: var(--aimari-brand, var(--brand, #6200ad)) !important;
  color: #fff !important;
}

.button.primary,
.button:not(.secondary):not(.danger):not(.ghost) {
  background: var(--brand);
  border: 1px solid var(--brand);
  color: #fff;
}

.button.secondary,
.order-actions a,
.order-actions button {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
}

.button.danger,
.order-actions form button {
  background: #fff6f7;
  border-color: #f0c4cc;
  color: #a11335;
}

.button.compact,
.order-actions a,
.order-actions button {
  min-height: 38px;
  padding: 8px 13px;
}

.order-row,
.device-item,
.template-row {
  align-items: center;
  background: #fff;
  border: 1px solid #d9c4ff;
  border-radius: 8px;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding: 18px;
}

.order-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.order-actions form {
  margin: 0;
}

.device-counter,
.order-limit-banner {
  background: #f7f1ff;
  border: 1px solid #d9c4ff;
  border-radius: 8px;
  color: var(--brand);
  display: inline-flex;
  font-weight: 900;
  gap: 8px;
  margin-bottom: 18px;
  padding: 12px 16px;
}

.device-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

.license-data {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
}

.license-copy-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.license-copy-row code {
  overflow-wrap: anywhere;
  white-space: normal;
}

@media (max-width: 860px) {
  .account-hero,
  .license-data,
  .workshop-profile-form,
  .order-row,
  .device-item,
  .template-row {
    grid-template-columns: 1fr;
  }

  .account-hero-actions,
  .order-actions {
    justify-content: flex-start;
  }

  .account-tabs,
  .order-tabs {
    overflow-x: auto;
  }

  .account-tabs button,
  .order-tab {
    flex: 0 0 max-content;
    min-width: 170px;
  }
}
