:root {
  --ink: #11261f;
  --ink-soft: #4a5d55;
  --paper: #f4f6f2;
  --surface: #ffffff;
  --line: #d7ded8;
  --action: #2e6a50;
  --action-ink: #ffffff;
  --error: #a3261b;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
}
.brand {
  font-weight: 800;
  font-size: 1.375rem;
  color: var(--ink);
  text-decoration: none;
}
.brand span {
  color: var(--action);
}
.narrow {
  max-width: 26rem;
  margin: 10vh auto 2rem;
  padding: 0 16px;
}
.wide {
  max-width: 56rem;
  margin: 0 auto;
  padding: 24px 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
}
h1 {
  font-size: 1.5rem;
  margin: 0 0 16px;
}
label {
  display: block;
  font-weight: 600;
  margin: 16px 0 6px;
}
input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  font: inherit;
  padding: 0.65em 0.9em;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
}
input:focus-visible,
button:focus-visible {
  outline: 3px solid var(--action);
  outline-offset: 2px;
}
.button {
  display: inline-block;
  margin-top: 20px;
  font: inherit;
  font-weight: 700;
  padding: 0.65em 1.4em;
  border: 0;
  border-radius: 999px;
  background: var(--action);
  color: var(--action-ink);
  cursor: pointer;
}
.button.secondary {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
  margin-top: 0;
}
.error {
  color: var(--error);
  background: #fbeceb;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0 0 8px;
}
.muted {
  color: var(--ink-soft);
  font-size: 0.9375rem;
}
header.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
header.top form {
  margin: 0;
}

/* App bar and menu */
.appbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.appbar-inner {
  max-width: 56rem;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}
.appbar nav {
  display: flex;
  gap: 4px;
  flex: 1;
  flex-wrap: wrap;
}
.appbar nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
}
.appbar nav a[aria-current="page"] {
  background: var(--paper);
  color: var(--action);
}
.appbar .who {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  flex-wrap: wrap;
}
h2 {
  font-size: 1.125rem;
  margin: 0 0 12px;
}
h3 {
  font-size: 1rem;
  margin: 16px 0 4px;
}
a {
  color: var(--action);
}

/* WhatsApp numbers page */
.two-col {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 800px) {
  .two-col {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  }
}
.numbers {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
}
.numbers li {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.badge {
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  background: #e3f1ea;
  color: var(--action);
}
.badge.disconnected {
  background: #f1e6e4;
  color: var(--error);
}
.notice {
  margin-top: 16px;
  background: #fdf6dc;
  border: 1px solid #ecdca0;
  border-radius: 12px;
  padding: 4px 14px;
}
.notice:focus {
  outline: 3px solid var(--action);
  outline-offset: 2px;
}
.explainer summary {
  cursor: pointer;
  list-style: none;
}
.explainer summary::-webkit-details-marker {
  display: none;
}
.explainer summary h2 {
  display: inline;
}
.explainer summary::after {
  content: " ▾";
  color: var(--ink-soft);
}
.explainer:not([open]) summary::after {
  content: " ▸";
}
.explainer ul {
  padding-left: 1.2em;
}
.explainer p,
.explainer li {
  margin: 0 0 8px;
}
.diagram {
  margin: 12px 0 8px;
}
.diagram svg {
  width: 100%;
  height: auto;
  max-width: 420px;
  display: block;
}
.diagram .box {
  fill: var(--paper);
  stroke: var(--line);
  stroke-width: 1.5;
}
.diagram .box.optional,
.diagram .link.optional {
  stroke-dasharray: 5 4;
}
.diagram .link {
  stroke: var(--action);
  stroke-width: 2;
}
.diagram .hub {
  fill: var(--action);
}
.diagram text {
  font:
    600 13px system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  fill: var(--ink);
}
.diagram text.small {
  font-weight: 400;
  font-size: 11px;
  fill: var(--ink-soft);
}
.diagram text.hub-text {
  fill: var(--action-ink);
  font-size: 15px;
  font-weight: 800;
}

/* Numbers list, actions and messages */
.number {
  display: block;
}
.number-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.number-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  align-items: flex-start;
}
.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  flex: 1 1 18rem;
  margin: 0;
}
.inline-form input {
  flex: 1 1 12rem;
}
.confirm summary {
  list-style: none;
  display: inline-block;
}
.confirm summary::-webkit-details-marker {
  display: none;
}
.confirm[open] form {
  margin-top: 8px;
  background: #fbeceb;
  border-radius: 12px;
  padding: 4px 14px 14px;
}
.button.danger {
  background: var(--error);
  color: #fff;
}
.button.secondary.danger {
  background: transparent;
  color: var(--error);
  border-color: #e2b8b3;
}
.notice.small {
  font-size: 0.9375rem;
  padding: 8px 12px;
  margin: 8px 0 0;
}
.flash {
  background: #e3f1ea;
  color: var(--action);
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 600;
}
.connect {
  margin-top: 16px;
}
.connect label {
  margin-top: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Inbox */
.small {
  font-size: 0.8125rem;
}
.convos {
  list-style: none;
  padding: 0;
  margin: 0;
}
.convos li a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.convos li a:hover {
  background: var(--paper);
}
.convo-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.convo-preview {
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.thread {
  list-style: none;
  padding: 12px;
  margin: 12px 0;
  background: var(--paper);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 60vh;
  overflow-y: auto;
}
.msg {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  align-self: flex-start;
}
.msg.out {
  align-self: flex-end;
  background: #dff3e8;
  border-color: #c4e3d1;
}
.msg.failed {
  border-color: var(--error);
}
.msg-body {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.msg-meta {
  margin: 4px 0 0;
  font-size: 0.75rem;
  color: var(--ink-soft);
}
.composer textarea {
  width: 100%;
  font: inherit;
  padding: 0.65em 0.9em;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
}
.composer h2 {
  margin-top: 12px;
}

/* Activity */
.activity {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.activity th,
.activity td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.activity th {
  color: var(--ink-soft);
  font-weight: 600;
}
.site-foot {
  max-width: 56rem;
  margin: 0 auto;
  padding: 20px 16px 32px;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--ink-soft);
}
.site-foot p {
  margin: 4px 0 0;
}
.trust {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 0;
}
.trust li:not(:last-child)::after {
  content: "·";
  margin-inline: 0.6em;
}

/* Team, organisation switcher and agreements */
.spaced {
  margin-top: 16px;
}
select,
textarea {
  width: 100%;
  font: inherit;
  padding: 0.65em 0.9em;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
}
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--action);
  outline-offset: 2px;
}
.member-list,
.choice-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}
.member-list > li,
.choice-list > li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.member-list > li > div:first-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.member-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.choice-list form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 0;
}
.choice-list .button {
  margin-top: 0;
}
label.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 400;
}
label.check input {
  margin-top: 0.3em;
  flex: none;
}
.agreement-text {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px 18px;
  margin: 12px 0 20px;
  background: var(--paper);
}
.agreement-text h2,
.agreement-text h3 {
  font-size: 1.05rem;
  margin: 18px 0 6px;
}
.facts {
  display: grid;
  grid-template-columns: minmax(8rem, max-content) 1fr;
  gap: 6px 16px;
}
.facts dt {
  font-weight: 600;
}
.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.mono {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.8125rem;
}
.flash input {
  margin-top: 8px;
  font-weight: 400;
}
@media (max-width: 480px) {
  .facts {
    grid-template-columns: 1fr;
  }
}
@media print {
  .appbar,
  .site-foot,
  .muted a {
    display: none;
  }
}

/* Two-step login */
code.key {
  display: inline-block;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  padding: 0.4rem 0.6rem;
  background: var(--surface-2, #f3f4f6);
  border-radius: 6px;
}
.backup-codes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}
.backup-codes code {
  font-size: 1rem;
  letter-spacing: 0.06em;
}

/* Team permissions */
fieldset.permissions {
  border: 1px solid var(--border, #d6d9de);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
}
label.check {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-weight: normal;
  margin: 0.35rem 0;
}
label.check input {
  width: auto;
  margin-top: 0.2rem;
}
.badge.subtle {
  opacity: 0.75;
  font-weight: normal;
}
p.small {
  font-size: 0.875rem;
}

/* CV improver */
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
}
.row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.stack {
  display: grid;
  gap: 12px;
}
.stack label,
.row label {
  display: grid;
  gap: 4px;
}
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th,
.table td {
  text-align: left;
  padding: 8px;
  border-bottom: 1px solid #e5e7eb;
}
.bubbles {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.bubble {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #d9822b;
  background: #fdf1e6;
  font-size: 0.9rem;
}
form.inline {
  display: inline;
}
button.link {
  background: none;
  border: 0;
  padding: 0 2px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}
.flag {
  border-left: 3px solid #d9822b;
  padding: 4px 12px;
  margin: 12px 0;
}
fieldset.job {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  margin: 8px 0;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
label.check {
  display: flex;
  gap: 6px;
  align-items: center;
}
pre.original {
  white-space: pre-wrap;
  max-height: 400px;
  overflow: auto;
  background: #f7f7f8;
  padding: 12px;
  border-radius: 8px;
}
.wide-input {
  width: 100%;
}

/* ---- Walkthrough: module home screens ---- */
.area-switch {
  margin-bottom: 0.75rem;
}
.area-switch a {
  margin-left: 0.5rem;
}
.area-switch a[aria-current="page"] {
  font-weight: 700;
  text-decoration: none;
}
.modules {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
.module {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem;
  border: 1px solid #d8dde6;
  border-radius: 10px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}
.module:hover {
  border-color: #1f2a44;
}
.module.walkthrough {
  background: #fafbfc;
}
.module-title {
  font-weight: 700;
  font-size: 1.05rem;
}
.badge.soon {
  background: #eef1f6;
  color: #4a5468;
}
.view-switch {
  display: inline-flex;
  border: 1px solid #d8dde6;
  border-radius: 999px;
  overflow: hidden;
  margin: 0.5rem 0 1rem;
}
.view-switch a {
  padding: 0.35rem 0.9rem;
  text-decoration: none;
  color: #1f2a44;
}
.view-switch a[aria-current="page"] {
  background: #1f2a44;
  color: #fff;
}
.actions .button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---- Cancellations ---- */
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.tile {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #d8dde6;
  color: inherit;
  text-decoration: none;
}
.tile-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1f2a44;
}
.tile-label {
  font-weight: 600;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.table th,
.table td {
  text-align: left;
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid #eceff4;
  vertical-align: top;
}
.table th {
  font-size: 0.85rem;
  color: #4a5468;
  font-weight: 600;
}
.card {
  overflow-x: auto;
}
.badge.late {
  background: #fde8e6;
  color: #9b2c1f;
}
.badge.muted-badge {
  background: #eef1f6;
  color: #4a5468;
}
.badge.concern-watch {
  background: #fff4e0;
  color: #8a5300;
}
.badge.concern-talk {
  background: #fde8e6;
  color: #9b2c1f;
}
.badge.concern-fine {
  background: #e8f5ec;
  color: #23613a;
}
.plain {
  list-style: none;
  padding: 0;
}
.plain li {
  padding: 0.25rem 0;
}
.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.35rem 1rem;
}
.facts dt {
  color: #4a5468;
}
.choices {
  display: grid;
  gap: 0.3rem;
  border: 0;
  padding: 0;
}
.table .badge,
.table .button {
  white-space: nowrap;
}
