:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #14181f;
  --muted: #667085;
  --line: #d8dde6;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --danger: #b42318;
  --warning: #b54708;
  --success: #047857;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  padding: 0.75rem 1rem;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  background: #98a2b3;
  cursor: not-allowed;
}

button.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.shell {
  min-height: 100vh;
  padding: 2rem;
}

.shell.compact {
  display: grid;
  place-items: center;
}

.auth-view {
  display: grid;
  gap: 1.5rem;
  margin: 8vh auto 0;
  max-width: 430px;
}

.brand {
  align-items: center;
  display: flex;
  gap: 1rem;
}

.mark {
  align-items: center;
  background: var(--text);
  border-radius: 8px;
  color: white;
  display: inline-flex;
  font-weight: 700;
  height: 44px;
  justify-content: center;
  width: 44px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 1.7rem;
}

h2 {
  font-size: 0.95rem;
}

.brand p,
.topbar p,
.message,
.conversation footer {
  color: var(--muted);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
}

label {
  display: grid;
  gap: 0.45rem;
  font-size: 0.9rem;
  font-weight: 600;
}

input {
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 42px;
  padding: 0.6rem 0.7rem;
}

input:focus {
  border-color: var(--accent);
  outline: 3px solid #ccfbf1;
}

.message {
  min-height: 1.25rem;
}

.compact-message {
  font-size: 0.84rem;
  min-height: 1rem;
}

.password-control {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: minmax(0, 1fr) auto;
}

.password-control input {
  min-width: 0;
}

.icon-button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  min-width: 76px;
}

.icon-button:hover {
  background: #f2f4f7;
}

.strength {
  background: #eef2f6;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.strength-bar {
  background: var(--danger);
  display: block;
  height: 100%;
  transition: width 160ms ease, background 160ms ease;
  width: 0;
}

.strength-bar[data-level="medium"] {
  background: var(--warning);
}

.strength-bar[data-level="strong"] {
  background: var(--success);
}

.policy-list {
  color: var(--muted);
  display: grid;
  font-size: 0.84rem;
  gap: 0.4rem;
  line-height: 1.35;
  list-style: none;
  margin: -0.2rem 0 0;
  padding: 0;
}

.policy-list li {
  align-items: start;
  display: grid;
  gap: 0.45rem;
  grid-template-columns: 1rem minmax(0, 1fr);
}

.policy-list li::before {
  color: #98a2b3;
  content: "○";
  font-weight: 700;
}

.policy-list li.passed {
  color: var(--success);
}

.policy-list li.passed::before {
  content: "✓";
}

.policy-list li.failed {
  color: var(--danger);
}

.policy-list li.failed::before {
  content: "×";
}

.hidden {
  display: none;
}

.topbar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  margin: -2rem -2rem 1.5rem;
  padding: 1rem 2rem;
}

.actions {
  display: flex;
  gap: 0.75rem;
}

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

.lane {
  min-width: 0;
}

.lane h2 {
  margin-bottom: 0.75rem;
}

.lane-list {
  display: grid;
  gap: 0.75rem;
}

.conversation {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 0.6rem;
  padding: 0.85rem;
}

.conversation-head {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.conversation-head span {
  background: #eef6f5;
  border-radius: 999px;
  color: var(--accent-dark);
  font-size: 0.74rem;
  padding: 0.2rem 0.5rem;
}

.conversation p {
  color: #303846;
  line-height: 1.35;
}

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

@media (max-width: 620px) {
  .shell {
    padding: 1rem;
  }

  .topbar {
    align-items: stretch;
    display: grid;
    gap: 1rem;
    margin: -1rem -1rem 1rem;
    padding: 1rem;
  }

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