/* Obsidian Devices brand palette — see ../../../../05 Brand/Brand Style Guide.md.
   Same variable names as before this branding pass (minimal diff), real
   brand hex values instead of placeholders — matching how fleetctl's own
   web/static/style.css already does this. */
:root {
  --bg: #14171A;        /* Obsidian Black */
  --surface: #1B2025;   /* Charcoal */
  --border: #2C333B;    /* Graphite */
  --text: #F2F4F5;      /* Off-White */
  --text-dim: #8b96a1;
  --accent: #2EE59D;    /* Terminal Green — accent only, never body text/bg */
  --error: #f2705e;
  font-family: "Inter", "Space Grotesk", -apple-system, "Segoe UI", Roboto, sans-serif;
}

.brand-logo { height: 32px; width: auto; display: block; }

* { box-sizing: border-box; }

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.site-header .brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

.site-header nav a,
.site-header nav .whoami {
  margin-left: 1rem;
  color: var(--text-dim);
}

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

.flashes { list-style: none; padding: 0; }
.flash {
  padding: 0.6rem 0.9rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}
.flash-success { background: #16332a; color: var(--accent); }
.flash-error { background: #331a1a; color: var(--error); }

.field { margin-bottom: 1rem; }
.field label { display: block; margin-bottom: 0.3rem; color: var(--text-dim); }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 1rem;
}
.field-checkbox { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.field-checkbox input { width: auto; }
.field-checkbox label { margin-bottom: 0; color: var(--text); }

fieldset { border: 1px solid var(--border); border-radius: 6px; padding: 1rem; margin-bottom: 1rem; }
fieldset legend { color: var(--text-dim); padding: 0 0.4rem; }
fieldset ul { list-style: none; padding: 0; margin: 0; }
fieldset ul li { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
fieldset ul li input { width: auto; }

.fleetctl-fields {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.fleetctl-fields dl { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 1rem; margin: 0; }
.fleetctl-fields dt { color: var(--text-dim); }
.fleetctl-fields dd { margin: 0; font-family: "JetBrains Mono", Menlo, Consolas, monospace; }
.error { color: var(--error); font-size: 0.85rem; margin: 0.2rem 0 0; }
.hint { color: var(--text-dim); font-size: 0.85rem; }

button, input[type="submit"] {
  background: var(--accent);
  color: #05221a;
  border: none;
  border-radius: 6px;
  padding: 0.55rem 1.1rem;
  font-weight: 600;
  cursor: pointer;
}

.search-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.search-bar input[type="text"] {
  flex: 1;
  padding: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
}
.search-bar select {
  padding: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.listing-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  color: var(--text);
}
.listing-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}
.listing-card .no-image {
  width: 100%;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  background: #12151b;
}
.listing-card-body { padding: 0.75rem; }
.listing-card-body h3 { margin: 0 0 0.3rem; font-size: 1rem; }
.listing-card .price { color: var(--accent); font-weight: 600; margin: 0; }
.listing-card .category { color: var(--text-dim); font-size: 0.85rem; margin: 0.2rem 0 0; }

.listing-images { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.listing-images img { max-width: 220px; border-radius: 8px; border: 1px solid var(--border); }

.owner-actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; }
.owner-actions form { display: inline; }

table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
th, td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
th { color: var(--text-dim); font-weight: 600; font-size: 0.85rem; }

.site-footer {
  max-width: 960px;
  margin: 2rem auto 0;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}
.site-footer nav { display: flex; justify-content: center; gap: 1.25rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.site-footer nav a { color: var(--text-dim); }
.site-footer nav a:hover { color: var(--text); }
.site-footer p.hint { margin: 0; }

pre.secret {
  background: var(--surface);
  border: 1px solid var(--error);
  color: var(--error);
  padding: 1rem;
  border-radius: 8px;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  white-space: pre-wrap;
  word-break: break-all;
  font-family: "JetBrains Mono", Menlo, Consolas, monospace;
}

.address-box {
  background: var(--surface);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 1rem;
  border-radius: 8px;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  white-space: pre-wrap;
  word-break: break-all;
  font-family: "JetBrains Mono", Menlo, Consolas, monospace;
}

.crypto-pay { margin: 1.5rem 0; }
.crypto-pay form { margin-top: 0.75rem; }

.qr-preview {
  display: block;
  background: #fff;
  padding: 0.75rem;
  border-radius: 8px;
  margin: 1rem 0;
}

/* Brand guide: JetBrains Mono for code/specs/price lists */
.price, .listing-card .price {
  font-family: "JetBrains Mono", Menlo, Consolas, monospace;
}

.conversation-list { list-style: none; padding: 0; }
.conversation-list li {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.5rem;
}
.conversation-list a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text);
}
.conversation-list a:hover { background: var(--surface); text-decoration: none; }
.conversation-time { display: block; margin-top: 0.2rem; }

.message-thread {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 60vh;
  overflow-y: auto;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 1rem;
}
.message-bubble {
  max-width: 70%;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
}
.message-bubble p { margin: 0 0 0.2rem; white-space: pre-wrap; word-break: break-word; }
.message-bubble .hint { font-size: 0.75rem; }
.message-bubble.mine {
  align-self: flex-end;
  background: var(--accent);
  color: #05221a;
}
.message-bubble.mine .hint { color: #0a3b2c; }
.message-bubble.theirs {
  align-self: flex-start;
  background: var(--bg);
  border: 1px solid var(--border);
}

.conversation-list li.unread { border-color: var(--accent); }
.conversation-list li.unread strong { color: var(--accent); }
.unread-badge {
  display: inline-block;
  min-width: 1.2rem;
  padding: 0 0.35rem;
  margin-left: 0.4rem;
  border-radius: 999px;
  background: var(--accent);
  color: #05221a;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
}

.timer-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0 0.3rem;
}
.timer-form label { color: var(--text-dim); }
.timer-form select {
  padding: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
}

.message-bubble button {
  margin-top: 0.3rem;
  padding: 0.3rem 0.7rem;
  font-size: 0.85rem;
}
.message-bubble.mine button { background: #05221a; color: var(--accent); }

/* Landing / process / FAQ pages */
.hero { padding: 2rem 0 1rem; }
.hero h1 { font-size: 2rem; line-height: 1.25; margin: 0 0 1rem; max-width: 40rem; }
.hero-sub { color: var(--text-dim); max-width: 38rem; margin: 0 0 1.5rem; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.button {
  display: inline-block;
  background: var(--accent);
  color: #05221a;
  border-radius: 6px;
  padding: 0.6rem 1.2rem;
  font-weight: 600;
}
.button:hover { text-decoration: none; opacity: 0.9; }
.button-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.value-props {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 2.5rem 0;
}
.value-prop h3 { margin: 0 0 0.4rem; }
.value-prop p { color: var(--text-dim); margin: 0; }

.category-teaser, .tier-teaser, .faq-teaser, .why-linux-teaser { margin: 2.5rem 0; }
.category-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.category-pill {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: var(--surface);
}
.category-pill:hover { border-color: var(--accent); text-decoration: none; }

.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.tier-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
}
.tier-card h3 { margin: 0 0 0.3rem; }
.tier-price { color: var(--accent); font-family: "JetBrains Mono", Menlo, Consolas, monospace; margin: 0 0 0.6rem; }
.tier-card ul { margin: 0.75rem 0 0; padding-left: 1.1rem; color: var(--text-dim); }
.tier-card li { margin-bottom: 0.3rem; }

.process-steps { list-style: none; padding: 0; margin: 1.5rem 0; counter-reset: step; }
.process-steps li {
  position: relative;
  padding: 0 0 1.25rem 2.5rem;
  border-left: 1px solid var(--border);
  margin-left: 0.6rem;
}
.process-steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.process-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: -0.7rem;
  top: 0;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: var(--accent);
  color: #05221a;
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.process-steps h3 { margin: 0 0 0.25rem; }
.process-steps p { margin: 0; color: var(--text-dim); }

.faq-list { margin: 1.5rem 0; }
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}
.faq-item dt { font-weight: 600; margin-bottom: 0.4rem; }
.faq-item dd { margin: 0; color: var(--text-dim); }

.why-linux { display: flex; gap: 1.5rem; margin: 2rem 0; align-items: flex-start; }
.why-linux-tabs {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 0 0 260px;
}
.why-linux-tab {
  text-align: left;
  background: var(--surface);
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.7rem 0.9rem;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
}
.why-linux-tab:hover { border-color: var(--accent); color: var(--text); }
.why-linux-tab.active {
  border-color: var(--accent);
  color: var(--text);
  background: #16332a;
}
.why-linux-panels {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  min-height: 12rem;
}
.why-linux-panel h2 { margin-top: 0; font-size: 1.2rem; }
.why-linux-panel p { color: var(--text-dim); margin-bottom: 0; }

@media (max-width: 700px) {
  .why-linux { flex-direction: column; }
  .why-linux-tabs { flex-direction: row; flex-wrap: wrap; flex: none; width: 100%; }
}

/* Listing specs: entry form (admin) and buyer-facing table. */
.specs-fieldset { border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem 1rem; margin: 1rem 0; }
.specs-fieldset legend { padding: 0 0.4rem; }
.spec-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
table.specs { border-collapse: collapse; margin: 1rem 0; }
table.specs th { text-align: left; color: var(--text-dim); font-weight: 500; padding: 0.25rem 1.5rem 0.25rem 0; }
table.specs td { font-family: "JetBrains Mono", Menlo, Consolas, monospace; padding: 0.25rem 0; }
