/* HIII.BOO — Quiet, vertical, no boxes */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400&display=swap');

:root {
  --bg: #050505;
  --text: #9198A1;
  --text-dim: #6B6F75;
  --link: #A79A82;
  --line: rgba(160, 166, 173, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'JetBrains Mono', 'IBM Plex Mono', 'Berkeley Mono', monospace;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 0.9rem;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  padding: 1.5rem;
}

/* Typography */
h1, h2, h3 {
  font-weight: 400;
  color: var(--text);
}

h1 {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 0.95rem;
  margin-bottom: 1rem;
  color: var(--text-dim);
}

p {
  margin-bottom: 0.8rem;
  color: var(--text);
  font-size: 0.9rem;
}

/* Links */
a {
  color: var(--link);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.6;
}

pre {
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-dim);
}

/* Home - single viewport, no scroll, vertical flow */
body.home {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem 2rem;
  overflow-y: auto;
}

.home-page {
  max-width: 580px;
  width: 100%;
  margin: auto 0;
}

/* Hero */
.home-hero {
  margin-bottom: 2rem;
}

.ghost {
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
  opacity: 0.5;
}

.home-hero h1 {
  margin-bottom: 0.6rem;
  font-size: 1.1rem;
}

.home-hero p {
  margin-bottom: 0.3rem;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.home-nav {
  margin-top: 1rem;
  display: flex;
  gap: 1.5rem;
}

.home-nav a {
  font-size: 0.85rem;
}

/* Sections - compact spacing, NO BORDERS */
.home-card {
  margin-bottom: 1.8rem;
}

.home-wide {
  /* no special treatment */
}

.home-card h2 {
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
}

.home-card p {
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Code block - minimal background only */
.code-block {
  background: rgba(160, 166, 173, 0.03);
  padding: 0.6rem;
  margin-top: 0.4rem;
  border-radius: 2px;
  overflow-x: auto;
  color: var(--text);
  font-size: 0.75rem;
  line-height: 1.4;
}

/* Muted text */
.muted {
  color: var(--text-dim);
  font-size: 0.75rem;
}

.premium-badge {
  font-size: 0.7rem;
  color: var(--text-dim);
  opacity: 0.6;
}

/* Pricing - simple list */
.price-list p {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.3rem;
  font-size: 0.85rem;
}

.price-list strong {
  font-weight: 400;
  color: var(--text);
}

.price-list span {
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* Footer - one line separator only */
.home-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
}

.home-footer p {
  margin-bottom: 0.3rem;
}

/* Auth pages */
.auth-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 2rem;
}

.auth-container {
  max-width: 400px;
  width: 100%;
}

.auth-header {
  margin-bottom: 3rem;
}

.auth-header .ghost {
  margin-bottom: 1.5rem;
}

.auth-header h1 {
  margin-bottom: 0.5rem;
}

.auth-header p {
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* Forms - compact */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

input, select, textarea {
  width: 100%;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.6rem;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text);
  transition: border-color 0.2s;
  margin-bottom: 1rem;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(160, 166, 173, 0.2);
}

input::placeholder {
  color: var(--text-dim);
  opacity: 0.4;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-dim);
  font-size: 0.8rem;
}

button, .btn {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.6rem 1.2rem;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
  transition: opacity 0.2s;
  width: 100%;
}

button:hover, .btn:hover {
  opacity: 0.6;
}

select {
  color-scheme: dark;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%),
                    linear-gradient(135deg, var(--text-dim) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

option {
  background: var(--bg);
  color: var(--text);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  box-shadow: 0 0 0 1000px var(--bg) inset;
  border-color: var(--line);
}

button, .btn {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.7rem 1.5rem;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
  transition: opacity 0.2s;
}

button:hover, .btn:hover {
  opacity: 0.6;
}

.btn-primary {
  color: var(--link);
}

.form-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  text-align: center;
}

.form-footer a {
  font-size: 0.85rem;
}

/* Dashboard - compact, single viewport */
.dashboard {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  max-height: 100vh;
  overflow-y: auto;
}

.dashboard-header {
  margin-bottom: 1.5rem;
}

.dashboard-header h1 {
  margin-bottom: 0.4rem;
  font-size: 1rem;
}

.dashboard-header p {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
}

nav, .dashboard-nav {
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}

nav a, .dashboard-nav a {
  margin-right: 1.5rem;
  font-size: 0.85rem;
  opacity: 0.7;
}

nav a:hover, .dashboard-nav a:hover {
  opacity: 1;
}

nav a.active, .dashboard-nav a.active {
  color: var(--text);
  opacity: 1;
}

.dashboard-section {
  margin-bottom: 1.8rem;
}

.dashboard-section h2 {
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
}

h2 {
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
  color: var(--text-dim);
}

p {
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

thead {
  border-bottom: 1px solid var(--line);
}

th {
  text-align: left;
  font-weight: 400;
  color: var(--text-dim);
  padding: 1rem 0;
}

td {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(160, 166, 173, 0.04);
}

tr:last-child td {
  border-bottom: none;
}

.pricing-info {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.35rem;
  vertical-align: middle;
  outline: none;
}

.pricing-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.95rem;
  height: 0.95rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text-dim);
  font-size: 0.62rem;
  line-height: 1;
  cursor: help;
}

.pricing-info-tooltip {
  position: absolute;
  right: 0;
  top: calc(100% + 0.45rem);
  z-index: 5;
  width: min(240px, 70vw);
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  background: #000;
  color: var(--text);
  font-size: 0.68rem;
  line-height: 1.45;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity 0.15s, transform 0.15s;
}

.pricing-info:hover .pricing-info-tooltip,
.pricing-info:focus .pricing-info-tooltip,
.pricing-info:focus-within .pricing-info-tooltip {
  opacity: 1;
  transform: translateY(0);
}

/* Stats */
.stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
}

.stat {
  flex: 1;
}

.stat-value {
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Messages */
.message {
  padding: 0.8rem;
  margin-bottom: 1.5rem;
  border-left: 2px solid var(--line);
  background: rgba(160, 166, 173, 0.02);
  font-size: 0.85rem;
}

.message.error {
  border-left-color: #9A8282;
}

.message.success {
  border-left-color: #8B9A82;
}

/* Code inline */
code {
  background: rgba(160, 166, 173, 0.03);
  padding: 2px 6px;
  font-size: 0.85rem;
  border-radius: 2px;
}

/* Box class for forms/content - minimal */
.box {
  border: 1px solid var(--line);
  background: rgba(160, 166, 173, 0.02);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

/* Quiet button variant */
.quiet-button {
  background: transparent;
  color: var(--link);
  border: 1px solid rgba(167, 154, 130, 0.28);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.quiet-button:hover {
  border-color: rgba(167, 154, 130, 0.55);
}

/* Inline forms - compact */
.inline-form {
  max-width: 520px;
  margin-top: 0.8rem;
  margin-bottom: 1.2rem;
}

.inline-row {
  display: flex;
  gap: 0.6rem;
}

.inline-row input {
  flex: 1;
  margin-bottom: 0;
}

.inline-row button {
  margin-bottom: 0;
}

/* Usage displays - compact */
.usage-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.usage-summary span {
  display: block;
  color: var(--text-dim);
  font-size: 0.7rem;
  margin-bottom: 0.2rem;
}

.usage-summary strong {
  color: var(--text);
  font-weight: 400;
  font-size: 0.85rem;
}

.usage-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem 1.5rem;
  margin-bottom: 1rem;
}

.usage-grid p {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(160, 166, 173, 0.04);
  font-size: 0.8rem;
}

.usage-grid span {
  color: var(--text-dim);
}

.usage-grid strong {
  color: var(--text);
  font-weight: 400;
}

/* Usage modal - minimal overlay */
.usage-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(5, 5, 5, 0.95);
  padding: 2rem;
  overflow-y: auto;
}

.usage-modal.open {
  display: block;
}

.usage-modal-panel {
  max-width: 420px;
  margin: 4rem auto;
  padding: 0;
}

.usage-modal-head {
  margin-bottom: 2rem;
}

.usage-modal-head h2 {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.usage-modal-head .muted {
  margin-bottom: 1rem;
}

.usage-modal-head button {
  width: auto;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.85rem;
  opacity: 0.6;
  margin-top: 1.5rem;
}

.usage-modal-head button:hover {
  opacity: 1;
}

.usage-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  margin-bottom: 1rem;
}

.usage-table {
  min-width: 1780px;
  margin: 0;
  font-size: 0.75rem;
}

.usage-table th,
.usage-table td {
  padding: 0.8rem 1rem;
  white-space: nowrap;
  vertical-align: top;
}

.usage-table th {
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 1;
}

.usage-table code {
  display: inline-block;
  max-width: 720px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.7rem;
}

/* Scrollbar - minimal */
.usage-table-wrap::-webkit-scrollbar,
.usage-modal-panel::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.usage-table-wrap::-webkit-scrollbar-thumb,
.usage-modal-panel::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 3px;
}

.usage-table-wrap::-webkit-scrollbar-track,
.usage-modal-panel::-webkit-scrollbar-track {
  background: transparent;
}

::selection {
  background: rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 640px) {
  body.home {
    padding: 4rem 1.5rem;
  }

  .home-hero {
    margin-bottom: 5rem;
  }

  .home-card {
    margin-bottom: 4rem;
  }

  .stats {
    flex-direction: column;
    gap: 2rem;
  }

  .usage-summary {
    grid-template-columns: repeat(2, 1fr);
  }

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

  nav a, .dashboard-nav a {
    display: block;
    margin-bottom: 1rem;
  }

  .home-nav a {
    display: inline-block;
  }

  .usage-modal {
    padding: 12px;
  }

  .usage-modal-panel {
    width: auto;
    height: calc(100vh - 24px);
    padding: 1rem;
  }

  .usage-modal-head {
    display: block;
  }
}
