:root {
  color-scheme: light dark;
  --bg: #0b1220;
  --surface: rgba(255, 255, 255, 0.06);
  --surface2: rgba(255, 255, 255, 0.09);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.66);
  --border: rgba(255, 255, 255, 0.12);
  --brand: #2f7f7a;
  --brand2: #1f3a5f;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  --radius: 16px;
  --radius-sm: 12px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f8fb;
    --surface: rgba(15, 23, 42, 0.04);
    --surface2: rgba(15, 23, 42, 0.06);
    --text: #0f172a;
    --muted: rgba(15, 23, 42, 0.65);
    --border: rgba(15, 23, 42, 0.12);
    --shadow: 0 16px 40px rgba(2, 6, 23, 0.10);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(47, 127, 122, 0.35), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(31, 58, 95, 0.32), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 45%),
    var(--bg);
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 60px;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow: 0 0 0 6px rgba(47, 127, 122, 0.14);
}

.brand-title {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.brand-title strong {
  font-size: 14px;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-title span {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.pill:hover {
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.hero {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.controls {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 12px;
  margin-top: 16px;
}

@media (max-width: 640px) {
  .controls { grid-template-columns: 1fr; }
}

input[type="search"], select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  outline: none;
}
input[type="search"]::placeholder { color: rgba(255,255,255,0.50); }

@media (prefers-color-scheme: light) {
  input[type="search"]::placeholder { color: rgba(15,23,42,0.45); }
}

input[type="search"]:focus, select:focus {
  border-color: rgba(47, 127, 122, 0.7);
  box-shadow: 0 0 0 4px rgba(47, 127, 122, 0.18);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

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

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.03);
  padding: 16px;
  box-shadow: 0 10px 26px rgba(0,0,0,0.18);
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.card:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.18);
  text-decoration: none;
}

.meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.badge {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(255,255,255,0.02);
}

.badge[data-status="draft"] { border-color: rgba(148, 163, 184, 0.35); }
.badge[data-status="sent"] { border-color: rgba(59, 130, 246, 0.42); color: rgba(147, 197, 253, 0.95); }
.badge[data-status="accepted"] { border-color: rgba(34, 197, 94, 0.42); color: rgba(134, 239, 172, 0.95); }
.badge[data-status="expired"] { border-color: rgba(244, 63, 94, 0.42); color: rgba(251, 113, 133, 0.95); }

.title {
  margin: 0 0 6px;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.sub {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  color: var(--muted);
  font-size: 12px;
}

.empty {
  margin-top: 16px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.footer {
  margin-top: 26px;
  color: var(--muted);
  font-size: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: space-between;
}

.kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
}

/* Proposal page layout */
.doc {
  width: min(920px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 80px;
}
.doc-card {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255,255,255,0.03);
  box-shadow: var(--shadow);
  padding: 26px;
}
.doc h1 {
  margin: 0 0 6px;
  font-size: 28px;
  letter-spacing: -0.03em;
}
.doc .lede { margin: 0 0 18px; color: var(--muted); line-height: 1.65; }
.doc h2 { margin: 24px 0 8px; font-size: 18px; }
.doc ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); line-height: 1.65; }
.doc p { color: var(--muted); line-height: 1.75; }
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  color: var(--text);
  font-weight: 650;
  letter-spacing: 0.1px;
}
.btn.primary {
  border-color: rgba(47, 127, 122, 0.55);
  background: linear-gradient(135deg, rgba(47,127,122,0.92), rgba(31,58,95,0.88));
  box-shadow: 0 12px 28px rgba(47,127,122,0.22);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:focus { outline: 3px solid rgba(47, 127, 122, 0.55); outline-offset: 2px; }

