/* Layout and states inherit public/brand.css; no separate theme. */
:root {
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  scrollbar-color: var(--muted) var(--soft);
}
*::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
*::-webkit-scrollbar-track {
  background: var(--soft);
}
*::-webkit-scrollbar-thumb {
  background: var(--muted);
  border: 3px solid var(--soft);
  border-radius: 8px;
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--violet);
}
*::-webkit-scrollbar-thumb:active {
  background: var(--navy);
}
[hidden] {
  display: none !important;
}
.portal header,
.portal main {
  max-width: none;
  margin: 0;
}
.portal-layout {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  min-height: 100svh;
}
.portal-sidebar {
  min-width: 0;
  background: white;
  border-right: 1px solid var(--line);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.brand img {
  width: 166px;
  height: auto;
}
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--violet);
  margin: 0 0 12px;
}
.portal-sidebar .eyebrow {
  margin: 0;
}
.portal-sidebar nav {
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.portal-sidebar nav a {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 12px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  border-left: 3px solid transparent;
}
.portal-sidebar nav a:hover {
  background: var(--paper);
  color: var(--violet);
}
.portal-sidebar nav a[aria-current] {
  background: var(--soft);
  border-left-color: var(--violet);
  color: var(--navy);
}
.portal-sidebar nav span {
  font-size: 20px;
  width: 24px;
  text-align: center;
}
.sidebar-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
}
.text-button {
  background: transparent;
  border: 0;
  color: var(--violet);
  padding: 8px 0;
  text-align: left;
  width: max-content;
}
.text-button:hover:not(:disabled) {
  background: transparent;
  text-decoration: underline;
}
.portal-main {
  padding: 28px clamp(24px, 4vw, 64px);
  min-width: 0;
}
.workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0 22px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.workspace-header > div {
  min-width: 0;
  max-width: calc(100% - 70px);
}
.workspace-header select {
  max-width: 100%;
}
.workspace-name {
  font-weight: 700;
  font-size: 14px;
  margin: 0;
}
.tier-badge {
  background: var(--soft);
  color: var(--navy);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
#page-heading {
  margin: 36px 0 18px;
}
#page-heading h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 42px);
}
.page-status {
  min-height: 26px;
  margin: 12px 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.page-status.error {
  color: var(--error);
}
#page-content {
  max-width: 1140px;
}
section,
.portal form {
  margin: 0 0 22px;
  padding: 26px;
}
.portal section h2,
.portal form h2 {
  margin: 0 0 12px;
  font-size: 21px;
}
.portal section p:first-of-type {
  margin-top: 0;
}
.edit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 28px;
  align-items: start;
}
.edit-layout > div,
.edit-layout form {
  min-width: 0;
}
.field {
  margin: 0 0 22px;
}
.field label {
  font-size: 14px;
}
.field-error {
  font-size: 13px;
  color: var(--error);
  min-height: 20px;
  margin: 4px 0;
}
.fine {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.secondary,
.linkbutton.secondary {
  background: white;
  color: var(--violet);
  border: 1px solid var(--line);
}
.secondary:hover:not(:disabled),
.linkbutton.secondary:hover {
  background: var(--soft);
  color: var(--navy);
}
button {
  transition: background 0.12s ease;
  min-width: 112px;
}
button:disabled {
  cursor: default;
}
a,
button,
input[type="checkbox"],
select {
  cursor: pointer;
}
input[type="text"],
input[type="email"],
input[type="password"] {
  cursor: text;
}
input[aria-invalid="true"] {
  border-color: var(--error);
}
button:active:not(:disabled),
.linkbutton:active {
  transform: translateY(1px);
}
:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 4px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
}
.linkbutton {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 12px 20px;
  background: var(--violet);
  color: white;
  border: 1px solid var(--violet);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
}
.linkbutton:hover {
  background: var(--navy);
  color: white;
}
.workspace-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 48px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.workspace-footer span {
  margin-right: auto;
}
.preview {
  background: var(--navy);
  border-radius: 16px;
  padding: 20px;
  overflow-wrap: anywhere;
}
.preview > p {
  color: white;
  font-size: 12px;
  margin: 0 0 16px;
}
.preview-phone {
  border-radius: 14px;
  background: var(--paper);
  padding: 34px 18px;
  min-height: 340px;
  text-align: center;
}
.preview-phone h3 {
  font-size: 25px;
  line-height: 1.3;
  margin: 12px 0 24px;
}
.preview-phone .preview-action {
  display: block;
  padding: 12px;
  background: var(--violet);
  color: white;
  border-radius: 8px;
  margin: 10px 0;
  font-size: 13px;
  font-weight: 700;
}
.preview-phone .preview-action.extra {
  background: white;
  color: var(--violet);
  border: 1px solid var(--line);
}
.preview-phone img {
  width: 96px;
  height: auto;
  margin: 0 0 20px;
}
.search-row {
  display: flex;
  gap: 8px;
}
.search-row input {
  min-width: 0;
  flex: 1;
}
.search-row button {
  min-width: 48px;
  padding: 10px;
}
.results {
  list-style: none;
  margin: 12px 0;
  padding: 0;
}
.results button {
  display: block;
  text-align: left;
  width: 100%;
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  margin-top: 6px;
  font-weight: 400;
}
.results button:hover:not(:disabled) {
  background: var(--soft);
}
.results strong,
.results span {
  display: block;
}
.results span {
  font-size: 13px;
  color: var(--muted);
}
.chosen-place {
  font-size: 13px;
  padding: 12px;
  background: var(--soft);
  border-radius: 8px;
  overflow-wrap: anywhere;
}
.link-editor {
  border-top: 1px solid var(--line);
  padding: 18px 0;
  margin: 0;
}
.link-editor .field {
  margin-bottom: 8px;
}
.check-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  font-weight: 400;
  margin: 16px 0;
}
.check-label input {
  width: 20px;
  min-height: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin-top: 3px;
}
.password-row {
  display: flex;
  gap: 8px;
}
.password-row input {
  min-width: 0;
}
.password-row button {
  min-width: 70px;
}
.readiness {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}
.readiness li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
}
.readiness span {
  color: var(--muted);
  font-size: 13px;
}
.hero-summary {
  border-top: 4px solid var(--coral);
  padding: 30px;
}
.hero-summary h2 {
  font-size: 28px !important;
}
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.plan-grid section {
  padding: 20px;
  position: relative;
}
.plan-grid section.current {
  border: 2px solid var(--violet);
}
.plan-grid ul {
  padding-left: 18px;
  font-size: 13px;
}
.plan-grid .plan-price {
  font-size: 25px;
  font-family: Manrope, Arial, sans-serif;
  color: var(--navy);
}
.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}
.metric-strip strong {
  display: block;
  font:
    800 32px/1.3 Manrope,
    Arial,
    sans-serif;
}
.metric-strip span {
  font-size: 13px;
  color: var(--muted);
}
.table-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}
.table-scroll {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th,
td {
  text-align: left;
  padding: 15px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
td:first-child {
  overflow-wrap: anywhere;
}
.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}
.table-actions input {
  flex: 1;
  min-width: 160px;
}
.table-actions select {
  width: auto;
}
.empty {
  padding: 32px 10px;
  text-align: center;
  color: var(--muted);
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}
.pagination p {
  font-size: 13px;
  margin: 0;
}
.notice {
  padding: 16px;
  background: var(--soft);
  border-radius: 8px;
  color: var(--navy);
  font-size: 14px;
}
.signin-header {
  padding: 24px 5vw !important;
}
.signin-header img {
  width: 180px;
}
.signin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 8vw;
  max-width: 1100px !important;
  margin: 50px auto !important;
  padding: 24px !important;
  align-items: center;
}
.signin-intro h1 {
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: -2px;
  margin: 0 0 24px;
}
.signin-intro > p {
  max-width: 430px;
  color: var(--muted);
}
.signin-card {
  position: relative;
  margin-top: 36px;
  border-radius: 18px;
  padding: 30px;
  background: var(--navy);
  color: white;
  max-width: 380px;
  aspect-ratio: 1.85;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}
.signin-card span {
  font-size: 13px;
  color: var(--soft);
}
.signin-card strong {
  font-family: Manrope, Arial, sans-serif;
  font-size: 20px;
}
.signin-card .orbit {
  position: absolute;
  right: 22px;
  top: 20px;
  font-size: 40px;
  color: var(--coral);
}
.signin-panel {
  margin: 0;
  padding: 32px;
}
.signin-panel h2 {
  font-size: 26px;
}
.provider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  margin: 14px 0;
}
.provider span {
  font-size: 21px;
}
.loading-page {
  padding: 10vh 24px !important;
  text-align: center;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  left: 20px;
  top: -80px;
  background: white;
  padding: 12px;
  z-index: 2;
}
.skip:focus {
  top: 10px;
}
dialog {
  max-width: 440px;
  width: calc(100% - 32px);
  max-height: 85svh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  color: var(--ink);
}
dialog::backdrop {
  background: rgb(32 37 43 / 0.45);
}
dialog h2 {
  margin: 0;
}
.tap-page header {
  max-width: 800px;
}
.tap-page header img {
  width: 140px;
}
.tap-main {
  max-width: 540px;
  text-align: center;
  padding: 32px 24px;
  min-height: 65svh;
}
.tap-main h1 {
  font-size: clamp(32px, 7vw, 48px);
  overflow-wrap: anywhere;
}
.tap-main > .linkbutton,
.tap-links > .linkbutton {
  display: flex;
  width: 100%;
  margin: 14px 0;
}
.tap-main form,
.tap-main section {
  text-align: left;
  margin-top: 24px;
}
.tap-footer {
  text-align: center;
  padding: 20px;
}
.tap-footer a {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
}
.tap-footer img {
  width: 68px;
  height: auto;
}
.support-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: center;
  overflow-wrap: anywhere;
}
code {
  display: block;
  padding: 12px;
  background: var(--soft);
  overflow-wrap: anywhere;
  user-select: all;
}
@media (max-width: 1100px) {
  .edit-layout {
    grid-template-columns: 1fr;
  }
  .preview {
    max-width: 340px;
  }
  .plan-grid {
    grid-template-columns: 1fr;
  }
  .portal-main {
    padding: 26px;
  }
  .plan-grid section {
    margin-bottom: 0;
  }
}
@media (max-width: 760px) {
  .portal-layout {
    grid-template-columns: 1fr;
  }
  .portal-sidebar {
    padding: 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    gap: 16px;
  }
  .portal-sidebar nav {
    flex-direction: row;
    overflow-x: auto;
  }
  .portal-sidebar nav a {
    white-space: nowrap;
    border-left: 0;
    border-bottom: 3px solid transparent;
  }
  .portal-sidebar nav a[aria-current] {
    border-bottom-color: var(--violet);
  }
  .portal-sidebar nav span,
  .portal-sidebar > .eyebrow {
    display: none;
  }
  .sidebar-foot {
    position: static;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .brand img {
    width: 136px;
  }
  .signin-layout {
    grid-template-columns: 1fr;
    margin: 0 auto !important;
    gap: 28px;
  }
  .signin-intro h1 {
    font-size: 38px;
  }
  .signin-card {
    display: none;
  }
  .metric-strip {
    gap: 12px;
    padding: 18px;
  }
  .metric-strip strong {
    font-size: 25px;
  }
  .pagination {
    flex-wrap: wrap;
  }
  .portal-main {
    padding: 22px 18px;
  }
  .portal form,
  section {
    padding: 20px;
  }
  .workspace-name {
    max-width: 210px;
    overflow-wrap: anywhere;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (forced-colors: active) {
  :root {
    scrollbar-color: auto;
  }
  .tier-badge,
  .preview,
  .preview-action {
    border: 1px solid CanvasText;
  }
  .portal-sidebar nav a[aria-current] {
    outline: 2px solid Highlight;
  }
}
