/* Conduit prototype styling — protective register, calm, plain.
   No marketing puffery, no urgency-mongering, no emoji. */

:root {
  --bg: #f5f3ef;
  --surface: #ffffff;
  --border: #d8d4cc;
  --text: #1d2733;
  --text-soft: #5a6675;
  --primary: #1f4a5f;
  --primary-deep: #163947;
  --primary-soft: #e6eef2;
  --accent: #6a4a2b;
  --warn-bg: #fff6d6;
  --warn-text: #5c4b00;
  --warn-border: #d6b94a;
  --ok: #2d6a4f;
  --error: #7a1b1b;
  --error-bg: #f9e7e7;
  --token: #2a3140;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

.prototype-banner {
  background: var(--warn-bg);
  color: var(--warn-text);
  border-bottom: 2px solid var(--warn-border);
  padding: 0.6em 1em;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

header.site {
  background: var(--primary-deep);
  color: white;
  padding: 1em 2em;
}

header.site a { color: white; text-decoration: none; }
header.site h1 { margin: 0; font-weight: 600; letter-spacing: 0.04em; font-size: 1.4rem; }
header.site h1 a:hover { text-decoration: underline; }
header.site .tagline { color: #b8c8d0; font-size: 0.85rem; margin-top: 0.2em; }

nav.site {
  background: var(--primary);
  padding: 0.5em 2em;
}
nav.site a {
  color: white;
  text-decoration: none;
  margin-right: 1.5em;
  font-size: 0.95rem;
  padding: 0.3em 0;
  display: inline-block;
}
nav.site a:hover { border-bottom: 2px solid white; }
nav.site .nav-right { float: right; }

main {
  max-width: 960px;
  margin: 2em auto;
  padding: 0 1.5em;
}

h2 { color: var(--primary-deep); margin-top: 1.5em; }
h3 { color: var(--primary); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.5em;
  margin: 1em 0;
}

.card h3 { margin-top: 0; }
.card .meta { color: var(--text-soft); font-size: 0.9rem; }

.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5em;
  margin: 2em 0;
}

.role-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.5em;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: border-color 0.15s;
}
.role-card:hover { border-color: var(--primary); }
.role-card h3 { color: var(--primary-deep); margin-top: 0; }
.role-card p { color: var(--text-soft); margin-bottom: 0; }

button, .button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.6em 1.2em;
  font-size: 1rem;
  border-radius: 3px;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  display: inline-block;
  margin-right: 0.5em;
}
button:hover, .button:hover { background: var(--primary-deep); }

button.secondary, .button.secondary {
  background: var(--surface);
  color: var(--primary);
  border: 1px solid var(--primary);
}
button.secondary:hover, .button.secondary:hover {
  background: var(--primary-soft);
}

button.danger, .button.danger {
  background: var(--error);
}

form .field { margin-bottom: 1em; }
form label { display: block; font-weight: 600; margin-bottom: 0.3em; color: var(--text); }
form input[type="text"], form select, form textarea {
  width: 100%;
  padding: 0.5em;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 1rem;
  font-family: inherit;
}
form textarea { min-height: 120px; resize: vertical; }
form .help { color: var(--text-soft); font-size: 0.85rem; margin-top: 0.3em; }

.flash {
  padding: 0.8em 1.2em;
  border-radius: 3px;
  margin: 1em 0;
}
.flash.success { background: #e7f3ec; color: var(--ok); border: 1px solid #b3d9c0; }
.flash.error { background: var(--error-bg); color: var(--error); border: 1px solid #d4a3a3; }

.token {
  font-family: "SF Mono", Consolas, Menlo, monospace;
  font-size: 0.9em;
  background: var(--primary-soft);
  padding: 0.15em 0.5em;
  border-radius: 3px;
  color: var(--token);
}

.case-handle {
  font-family: "SF Mono", Consolas, Menlo, monospace;
  font-size: 1.1rem;
  background: var(--primary-soft);
  padding: 0.5em 0.8em;
  border-radius: 4px;
  display: inline-block;
  border: 1px solid var(--border);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
}
table.data th, table.data td {
  text-align: left;
  padding: 0.5em 0.8em;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.data th {
  background: var(--primary-soft);
  color: var(--primary-deep);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.message {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.8em 1em;
  margin: 0.6em 0;
}
.message .from { font-weight: 600; color: var(--primary); font-size: 0.9rem; }
.message .ts { color: var(--text-soft); font-size: 0.8rem; margin-left: 0.6em; }
.message .content { margin-top: 0.4em; white-space: pre-wrap; }
.message.sealed { background: #f0eee9; }
.message.sealed .content { color: var(--text-soft); font-style: italic; }
.message.purged { background: #f0eee9; border-style: dashed; }
.message.purged .content { color: var(--text-soft); font-style: italic; }
.message .expires-at { font-size: 0.75rem; color: var(--text-soft); margin-top: 0.4em; }
.destruct-field select { width: auto; min-width: 180px; }

.badge {
  display: inline-block;
  padding: 0.15em 0.6em;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--primary-soft);
  color: var(--primary-deep);
}
.badge.urgent { background: #f9e7c4; color: var(--accent); }
.badge.emergency { background: var(--error-bg); color: var(--error); }
.badge.closed { background: #e0e0e0; color: var(--text-soft); }

footer.site {
  margin-top: 4em;
  padding: 2em;
  background: var(--primary-deep);
  color: #b8c8d0;
  text-align: center;
  font-size: 0.85rem;
}
footer.site a { color: white; }

.compartment-note {
  background: var(--primary-soft);
  border-left: 4px solid var(--primary);
  padding: 0.8em 1.2em;
  margin: 1em 0;
  font-size: 0.9rem;
  color: var(--text-soft);
}

ul.plain { list-style: none; padding: 0; }
ul.plain li { padding: 0.4em 0; border-bottom: 1px solid var(--border); }
ul.plain li:last-child { border-bottom: none; }
