@font-face {
  font-family:Golos;
  src:url('/assets/GolosText.woff2') format('woff2');
  font-weight:100 900;
  font-display:swap;
}

@font-face {
  font-family:Unbounded;
  src:url('/assets/Unbounded.woff2') format('woff2');
  font-weight:100 900;
  font-display:swap;
}

:root {
  --navy:#21364C;
  --blue:#4999FD;
  --action-blue:#4999FD;
  --action-text:#163149;
  --paper:#F5FAFE;
  --white:#fff;
  --muted:#526477;
  --field-border:#526477;
  --line:rgba(33,54,76,.18);
  --soft:rgba(73,153,253,.1);
  --pale-blue:#e0edf8;
  --panel-radius:20px;
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
  background:var(--paper);
  color:var(--navy);
  font:17px/1.5 Golos,sans-serif;
}

button,input,select,textarea {
  font:inherit;
}

a {
  color:var(--navy);
  text-underline-offset:3px;
}

button,a,input,select,textarea,summary {
  outline:none;
}

button:focus-visible:not([data-pointer-focus]),a:focus-visible:not([data-pointer-focus]),input:focus-visible:not([data-pointer-focus]),select:focus-visible:not([data-pointer-focus]),textarea:focus-visible:not([data-pointer-focus]),summary:focus-visible:not([data-pointer-focus]) {
  outline:2px solid var(--navy);
  outline-offset:3px;
}

button {
  cursor:pointer;
}

button:disabled {
  cursor:wait;
  opacity:.65;
}

button,.button {
  min-height:52px;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--white);
  color:var(--navy);
  padding:14px 22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  text-decoration:none;
  line-height:1.25;
  text-align:center;
  font-weight:400;
  font-size:16px;
}

button:hover,.button:hover {
  background:var(--soft);
}

.primary {
  background:var(--action-blue);
  border-color:transparent;
  color:var(--action-text);
  font-weight:400;
}

.primary:hover {
  background:var(--navy);
  border-color:transparent;
  color:var(--white);
}

h1,h2,h3,p {
  margin:0;
}

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

h1,h2 {
  font-family:Unbounded,sans-serif;
  font-weight:500;
  line-height:1.35;
  letter-spacing:-.025em;
}

h1 {
  font-size:clamp(22px,2.3vw,30px);
}

h2 {
  font-size:20px;
}

h3 {
  font-size:17px;
}

small,.muted {
  color:var(--muted);
}

small {
  font-size:13px;
}

.logo {
  width:190px;
  height:auto;
  display:block;
}

.topbar {
  background:var(--white);
  border-bottom:1px solid var(--line);
  padding:18px max(24px,calc((100vw - 1392px)/2));
  display:flex;
  align-items:center;
  gap:24px;
  flex-wrap:wrap;
}

.topbar nav {
  display:flex;
  align-items:center;
  gap:6px;
  flex:1;
}

.topbar nav a {
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:10px 16px;
  border-radius:999px;
  text-decoration:none;
  white-space:nowrap;
  line-height:1.25;
}

.topbar nav a[aria-current=page] {
  background:var(--navy);
  color:var(--white);
}

.user-name {
  overflow-wrap:anywhere;
  max-width:220px;
}

.account {
  display:flex;
  align-items:center;
  gap:12px;
  font-size:14px;
}

.demo-banner {
  padding:8px 24px;
  background:var(--soft);
  border-bottom:1px solid var(--line);
  font-size:13px;
  text-align:center;
}

.workspace {
  max-width:1392px;
  margin:0 auto;
  padding:32px 24px 64px;
}

.page-title {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
  margin-bottom:26px;
}

.page-title>div,.channel-header>h2 {
  min-width:0;
}

.workspace>.actions {
  margin-bottom:20px;
}

.page-title .muted {
  margin-top:7px;
}

.stats {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  margin-bottom:24px;
}

.stat {
  min-width:0;
  min-height:126px;
  padding:20px;
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--panel-radius);
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:16px;
  text-align:left;
}

.stat strong {
  font-family:Unbounded,sans-serif;
  font-size:34px;
  font-weight:450;
  line-height:1.05;
  font-variant-numeric:tabular-nums;
  min-width:0;
  overflow-wrap:anywhere;
}

.stat.active {
  border-color:var(--navy);
  background:var(--pale-blue);

}

.filters {
  display:grid;
  grid-template-columns:minmax(200px,1.7fr) repeat(3,minmax(120px,1fr));
  gap:18px 14px;
  background:var(--pale-blue);
  border:1px solid var(--line);
  border-radius:var(--panel-radius);
  padding:22px;
  margin-bottom:22px;
  align-items:end;
}

.field {
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:0;
}

.field label,.field-label {
  font-size:14px;
  font-weight:400;
}

input,select,textarea {
  width:100%;
  min-width:0;
  min-height:52px;
  background:var(--white);
  border:1px solid var(--field-border);
  border-radius:12px;
  padding:12px 14px;
  color:var(--navy);
  font-size:16px;
  line-height:1.25;
}

textarea {
  min-height:110px;
  resize:vertical;
}

input:hover,select:hover,textarea:hover {
  border-color:var(--navy);
}

.filters .secondary-filters {
  grid-column:1/-1;
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:flex-end;
}

.secondary-filters .field {
  flex:1;
  min-width:140px;
}

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

.table-shell {
  background:var(--white);
  border:1px solid var(--line);
  border-radius:14px;
  overflow:clip;
}

.list-meta {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:12px;
  font-size:14px;
}

table {
  border-collapse:collapse;
  width:100%;
  table-layout:fixed;
  font-size:14px;
}

th,td {
  text-align:left;
  padding:16px;
  border-bottom:1px solid var(--line);
  vertical-align:middle;
  overflow-wrap:anywhere;
}

th {
  color:var(--muted);
  font-weight:500;
  background:var(--paper);
}

tr:last-child td {
  border-bottom:0;
}

.client-name {
  font-weight:500;
  font-size:16px;
  display:inline-block;
  margin-bottom:3px;
}

.cell-sub {
  display:block;
  font-size:13px;
  color:var(--muted);
  margin-top:3px;
}

.badge {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  max-width:100%;
  border:1px solid var(--line);
  border-radius:999px;
  padding:5px 10px;
  font-size:12px;
  line-height:1.25;
  background:var(--paper);
  overflow-wrap:anywhere;
  text-align:center;
}

.badge.new {
  border-color:var(--blue);
  background:var(--soft);
}

.badge.blocked {
  background:var(--paper);
  border-style:dashed;
}

.panel {
  padding:26px;
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--panel-radius);
  min-width:0;
}

.panel h2 {
  margin-bottom:18px;
}

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

.stack {
  display:flex;
  flex-direction:column;
  gap:20px;
  min-width:0;
}

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

.wide {
  grid-column:1/-1;
}

.form-grid .actions {
  margin-top:10px;
}

.detail-text {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}

.history {
  list-style:none;
  padding:0;
  margin:0;
}

.history li {
  padding:14px 0;
  border-top:1px solid var(--line);
  overflow-wrap:anywhere;
}

.history li:first-child {
  border-top:0;
  padding-top:0;
}

.history small {
  display:block;
  margin-top:5px;
}

.message {
  padding:14px;
  border:1px solid var(--line);
  border-radius:10px;
  margin:12px 0;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}

.message.outgoing {
  background:var(--soft);
}

.status-note {
  font-size:13px;
  color:var(--muted);
  margin:6px 0 16px;
}

.empty {
  padding:42px 24px;
  text-align:center;
}

.empty p {
  margin:10px auto 18px;
  max-width:540px;
  color:var(--muted);
}

.notice {
  padding:14px 18px;
  background:var(--soft);
  border:1px solid var(--blue);
  border-radius:10px;
  margin-bottom:18px;
  overflow-wrap:anywhere;
}

.notice.error {
  border-color:var(--navy);
  background:var(--paper);
}

.login {
  max-width:440px;
  margin:10vh auto;
  padding:32px 24px;
}

.login .logo {
  margin-bottom:40px;
  width:220px;
}

.login h1 {
  margin-bottom:10px;
}

.login form {
  display:flex;
  flex-direction:column;
  gap:18px;
  margin-top:26px;
}

.login .actions {
  margin-top:22px;
}

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

.channel {
  display:flex;
  flex-direction:column;
  gap:12px;
}

.channel-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.install-tip {
  margin-top:24px;
  border-top:1px solid var(--line);
  padding-top:18px;
  font-size:14px;
  color:var(--muted);
}

.back {
  display:inline-block;
  margin-bottom:20px;
}

.attribution {
  font-size:14px;
  display:grid;
  grid-template-columns:1fr 2fr;
  gap:8px;
  overflow-wrap:anywhere;
}

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

.analytics-grid .panel p {
  margin-top:12px;
}

.refresh-line {
  margin-top:20px;
  font-size:13px;
  color:var(--muted);
}

/* Form actions stay separate from editable fields in every panel. */
.panel form:not(.form-grid) {
  display:flex;
  flex-direction:column;
  gap:18px;
}
.panel form>.actions {
  margin-top:2px;
}
/* Controls: all technical icons are local Rune outline SVGs. */
.ui-icon {
  display:block;
  width:20px;
  height:20px;
  flex:none;
  object-fit:contain;
}

.control-label {
  min-width:0;
  overflow-wrap:anywhere;
}


.search-control {
  position:relative;
  min-width:0;
}

.search-control>.ui-icon {
  position:absolute;
  left:14px;
  top:50%;
  transform:translateY(-50%);
  pointer-events:none;
}

.search-control>input {
  padding-left:44px;
}

/* Operational counters: generated 3D assets, stable text and numeric geometry. */
.stat-symbol {
  display:flex;
  align-items:center;
  justify-content:center;
  flex:none;
  width:72px;
  height:72px;
}

.stat-icon {
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
}

.stat-copy {
  display:flex;
  flex-direction:column;
  gap:9px;
  min-width:0;
}

.stat-label {
  line-height:1.25;
  overflow-wrap:normal;
  word-break:normal;
}

.stat-active {
  background:var(--white);
  color:var(--navy);
  border-color:var(--line);
}

/* Analytics: a summary followed by actual measured breakdowns. */
.analytics-filters {
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;
}

.analytics-summary {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  background:var(--navy);
  color:var(--white);
  border-radius:var(--panel-radius);
  padding:32px;
}

.summary-copy {
  display:flex;
  flex-direction:column;
  gap:10px;
  min-width:0;
}

.summary-label {
  font-size:16px;
  line-height:1.3;
}

.summary-value {
  font-family:Unbounded,sans-serif;
  font-size:clamp(32px,4vw,48px);
  font-weight:450;
  line-height:1.1;
  overflow-wrap:anywhere;
}

.summary-copy>p {
  color:var(--paper);
  font-size:14px;
}

.summary-symbol,.analytics-symbol {
  display:flex;
  align-items:center;
  justify-content:center;
  width:96px;
  height:96px;
  flex:none;
  background:var(--pale-blue);
  border-radius:28px;
}

.feature-icon {
  display:block;
  width:56px;
  height:56px;
  object-fit:contain;
}

.section-heading {
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:20px;
}

.section-heading .ui-icon {
  width:24px;
  height:24px;
}

.section-heading h2 {
  margin:0;
  font-size:18px;
  min-width:0;
}

.analytics-searchPhrases {
  grid-column:1/-1;
}

.analytics-list {
  list-style:none;
  margin:0;
  padding:0;
}

.analytics-list li {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:16px 0;
  border-top:1px solid var(--line);
}

.analytics-list li:first-child {
  padding-top:0;
  border-top:0;
}

.analytics-item-label {
  min-width:0;
  overflow-wrap:anywhere;
}

.analytics-item-value {
  font-variant-numeric:tabular-nums;
  font-size:18px;
  font-weight:450;
  flex-shrink:0;
  line-height:1.25;
}

.analytics-empty {
  padding:12px 0;
  line-height:1.5;
}

.analytics-state {
  display:flex;
  align-items:center;
  gap:28px;
  padding:32px;
}

.analytics-state-copy {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:14px;
  min-width:0;
}

.analytics-state-copy h2 {
  margin:0;
}

.analytics-state-copy p {
  max-width:65ch;
}

@media(max-width:1050px) {
  .topbar {
    gap:14px;
  }
  .account {
    margin-left:auto;
  }
  .topbar nav {
    order:3;
    flex-basis:100%;
  }
  .filters {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  th,td {
    padding:13px 10px;
  }
  .card-grid {
    grid-template-columns:1fr;
  }
  .analytics-grid {
    grid-template-columns:1fr;
  }
  .stats {
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
  }
  .stat {
    padding:16px;
    gap:10px;
  }
  .stat strong {
    font-size:28px;
  }
  .stat-symbol {
    width:58px;
    height:58px;
  }
}

@media(max-width:650px) {
  .analytics-filters {
    grid-template-columns:1fr;
  }
  .analytics-filters>.primary {
    justify-self:start;
  }
  .analytics-summary {
    padding:24px;
    align-items:flex-start;
  }
  .summary-symbol {
    width:58px;
    height:58px;
    border-radius:18px;
  }
  .summary-symbol .feature-icon {
    width:36px;
    height:36px;
  }
  .analytics-state {
    flex-direction:column;
    align-items:flex-start;
    padding:24px;
    gap:20px;
  }
  .analytics-state .analytics-symbol {
    width:72px;
    height:72px;
  }
  .analytics-list li {
    gap:14px;
  }
  .section-heading h2 {
    font-size:17px;
  }
  .topbar {
    padding:16px;
  }
  .topbar .logo {
    width:150px;
  }
  .account {
    gap:8px;
  }
  .account .user-name {
    display:none;
  }
  .account button {
    padding:8px 12px;
  }
  .topbar nav {
    gap:4px;
    flex-wrap:wrap;
    min-width:0;
  }
  .topbar nav a {
    flex:1 1 96px;
    min-width:0;
    min-height:44px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:9px 6px;
    text-align:center;
    font-size:14px;
    white-space:normal;
    overflow-wrap:anywhere;
  }
  .workspace {
    padding:24px 16px 44px;
  }
  .page-title {
    align-items:flex-start;
    flex-direction:column;
    margin-bottom:20px;
  }
  .stats {
    grid-template-columns:repeat(auto-fit,minmax(min(100%,9em),1fr));
  }
  .stat {
    min-height:136px;
    font-size:14px;
    flex-direction:column;
    align-items:flex-start;
    gap:8px;
    padding:16px;
  }
  .stat-symbol {
    width:58px;
    height:58px;
  }
  .stat-copy {
    flex-direction:column;
    align-items:flex-start;
    width:100%;
    gap:6px;
  }
  .filters {
    grid-template-columns:1fr;
    padding:18px;
    gap:14px;
  }
  .filters .secondary-filters {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
  }
  .secondary-filters .field {
    min-width:0;
  }
  .secondary-filters .actions {
    grid-column:1/-1;
  }
  .table-shell {
    border:0;
    background:none;
    overflow:visible;
  }
  table,tbody {
    display:block;
    width:100%;
  }
  thead {
    display:none;
  }
  tr {
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:10px;
    padding:16px;
    border:1px solid var(--line);
    border-radius:12px;
    background:var(--white);
    margin-bottom:12px;
  }
  td {
    display:block;
    padding:0;
    border:0;
  }
  td:first-child {
    grid-column:1/-1;
  }
  td:before {
    content:attr(data-label);
    display:block;
    font-size:12px;
    color:var(--muted);
    margin-bottom:4px;
  }
  td:first-child:before {
    display:none;
  }
  td:last-child {
    grid-column:1/-1;
    padding-top:10px;
    border-top:1px solid var(--line);
  }
  .panel {
    padding:18px;
  }
  .form-grid {
    grid-template-columns:1fr;
  }
  .wide {
    grid-column:auto;
  }
  .channels-grid {
    grid-template-columns:1fr;
  }
  .list-meta {
    align-items:flex-start;
  }
  .list-meta .button {
    font-size:13px;
    padding:9px 10px;
  }
  .login {
    margin:5vh auto;
  }
  .attribution {
    grid-template-columns:1fr;
    gap:4px;
  }
}

@media(prefers-reduced-motion:reduce) {
  * {
    scroll-behavior:auto!important;
  }
}
