:root {
  color-scheme: light;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #193047;
  background: #f3f6f8;
  line-height: 1.6;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 0;
  margin: 0;
  background: #f3f6f8;
}

a {
  color: #174f78;
  text-underline-offset: 0.18em;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #e89b34;
  outline-offset: 3px;
}

.shell {
  width: min(100% - 32px, 1120px);
  margin-inline: auto;
}

.site-header {
  padding: 28px 0 36px;
  color: #f5f8fb;
  background: #18344b;
}

.header-content {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.brand {
  color: inherit;
  font-weight: 750;
  text-decoration: none;
}

.brand span {
  margin-left: 8px;
  color: #b9d4e5;
  font-weight: 500;
}

.owner-language-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}

.eyebrow {
  margin: 14px 0 0;
  color: #5d7b92;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.site-header .eyebrow {
  margin-top: 12px;
  color: #b9d4e5;
}

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

h1,
h2,
h3 {
  line-height: 1.2;
}

h1 {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.5rem);
}

.intro {
  max-width: 66ch;
  margin: 0;
  color: #d8e5ed;
}

.dashboard-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 8px;
  padding: 8px 14px;
  border: 1px solid #afc8d8;
  border-radius: 7px;
  color: #f5f8fb;
  font-weight: 650;
  text-decoration: none;
}

.page-content {
  display: grid;
  gap: 20px;
  padding-block: 24px 48px;
}

.panel {
  min-width: 0;
  padding: clamp(18px, 4vw, 28px);
  border: 1px solid #d2dce3;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 26px rgb(25 48 71 / 5%);
}

.panel h2 {
  margin: 7px 0 10px;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
}

.panel p {
  max-width: 78ch;
}

.access-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 10px;
  margin-top: 18px;
}

.access-form label {
  grid-column: 1 / -1;
  font-weight: 650;
}

input,
select,
textarea,
button {
  min-width: 0;
  max-width: 100%;
  border: 1px solid #8298a8;
  border-radius: 7px;
  font: inherit;
}

input,
select,
textarea {
  padding: 10px 12px;
  color: #193047;
  background: #fff;
}

button {
  min-height: 44px;
  padding: 8px 14px;
  color: #fff;
  background: #174f78;
  cursor: pointer;
  font-weight: 650;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.secondary-button {
  color: #193047;
  background: #eef3f6;
}

.status {
  min-height: 1.6em;
  margin: 16px 0 0;
  color: #415b70;
}

.timeline-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.summary-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: end;
}

.count-chip,
.badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid #c3d2dc;
  border-radius: 999px;
  color: #24485f;
  background: #edf4f7;
  font-size: 0.82rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0;
  padding: 14px;
  border-radius: 8px;
  background: #f3f6f8;
}

.filters label {
  display: grid;
  flex: 1 1 220px;
  gap: 5px;
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 650;
}

.timeline-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline-row {
  min-width: 0;
  padding: clamp(14px, 3vw, 22px);
  border: 1px solid #d2dce3;
  border-radius: 9px;
  background: #fff;
}

.row-badges,
.row-actions,
.row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.row-badges {
  margin-bottom: 10px;
}

.badge-source {
  color: #143e5e;
  background: #e2eff6;
}

.badge-evidence {
  color: #4a3d18;
  border-color: #e2d5a6;
  background: #fbf6e5;
}

.badge-review {
  border-color: #c8c4d8;
  color: #453d62;
  background: #f1eff7;
}

.review-required,
.review-pending {
  border-color: #e1c27e;
  color: #614411;
  background: #fff5db;
}

.review-cleared,
.review-not_required {
  border-color: #a8d0b5;
  color: #245337;
  background: #eaf6ed;
}

.review-rejected {
  border-color: #e0b0ad;
  color: #7d2d2a;
  background: #fff0ef;
}

.timeline-row h3 {
  margin: 0 0 10px;
  font-size: 1.12rem;
}

.row-meta {
  color: #425d72;
  font-size: 0.92rem;
}

.row-meta p {
  margin: 0;
}

.message-preview {
  margin: 13px 0;
  padding: 12px 14px;
  border-left: 3px solid #73a0bc;
  background: #f4f8fa;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.row-actions {
  margin-top: 14px;
}

.row-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  overflow-wrap: anywhere;
}

.evidence-details {
  margin-top: 12px;
  border-top: 1px solid #e1e7eb;
  padding-top: 10px;
}

.evidence-details summary {
  width: fit-content;
  min-height: 36px;
  padding: 5px 0;
  color: #174f78;
  cursor: pointer;
  font-weight: 650;
}

.evidence-list {
  display: grid;
  grid-template-columns: minmax(130px, 0.35fr) minmax(0, 1fr);
  gap: 6px 12px;
  margin: 8px 0 0;
}

.evidence-list dt {
  color: #526b7e;
  font-weight: 650;
}

.evidence-list dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.message-detail {
  min-width: 0;
  margin-top: 14px;
  padding: 14px;
  border-radius: 8px;
  background: #f3f6f8;
}

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

.reply-form {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.reply-form textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
}

.empty-state,
.error-state {
  margin: 14px 0;
  padding: 14px;
  border-radius: 8px;
  background: #f3f6f8;
}

.error-state {
  color: #842f2f;
  background: #fff0ef;
}

.site-footer {
  padding: 18px 0;
  color: #536b7d;
  border-top: 1px solid #d2dce3;
  font-size: 0.86rem;
}

[hidden] {
  display: none !important;
}

@media (max-width: 680px) {
  .site-header {
    padding-block: 22px 28px;
  }

  .access-form {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .access-form label {
    grid-column: auto;
  }

  .timeline-heading {
    align-items: start;
    flex-direction: column;
    gap: 4px;
  }

  .summary-counts {
    justify-content: start;
  }

  .evidence-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .evidence-list dd {
    margin-bottom: 8px;
  }
}

.ainbox-owner-page [hidden]{display:none!important}
.ainbox-owner-page .site-header{padding-top:0;background:var(--surface,#fff);color:var(--ink-strong,#193047)}
.ainbox-owner-page .nav{display:flex;flex-wrap:wrap;align-items:center;gap:20px;padding-block:12px;min-height:72px;border-bottom:1px solid var(--line-soft,#d2dce3)}
.ainbox-owner-page .nav .brand-logo{display:block;width:146px;height:32px}
.ainbox-owner-page .nav-links{display:flex;flex-wrap:wrap;gap:20px;margin-left:auto}
.ainbox-owner-page .nav-links a{display:inline-flex;align-items:center;min-height:44px;text-decoration:none;font-size:.875rem;font-weight:650}
.ainbox-owner-page .owner-language-control{margin-left:auto}
.ainbox-owner-page select,.ainbox-owner-page input{min-height:44px}
.ainbox-owner-page .header-content{padding-top:24px}
.ainbox-owner-page .intro,.ainbox-owner-page .site-header .eyebrow{color:var(--ink-muted,#415b70)}
.ainbox-owner-page .dashboard-link{border-color:var(--line-soft,#d2dce3);color:var(--ink-strong,#193047)}
.ainbox-owner-page .access-form{grid-template-columns:minmax(0,1fr)}
.ainbox-owner-page .access-form input,.ainbox-owner-page .access-form button{width:100%}
.ainbox-owner-page .timeline-heading{flex-wrap:wrap}
.ainbox-owner-page .filters select{width:100%}
.ainbox-owner-page .row-actions a,.ainbox-owner-page summary{min-height:44px}
.ainbox-owner-page summary{display:flex;align-items:center;cursor:pointer}
@media(max-width:640px){.ainbox-owner-page .nav{gap:12px}.ainbox-owner-page .nav-links{order:3;width:100%;margin-left:0;gap:16px}.ainbox-owner-page .owner-language-control span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.ainbox-owner-page .summary-counts{justify-content:start}}
