/* Hallmark · shape: index · genre: atmospheric · theme: Lumen (deal 1/3, seed sakura-garden-private-proxy-8e85·74b7e9cb·2026-10-23·r0) · job: try · draw: 74b7e9cb
 * hero: settled · nav: edge-aligned · footer: minimal · imagery: none · signature: model catalog and latency readout
 * axes: dark/roman-serif/warm · posture: restrained · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P9 H9 E9 S9 R9 V9 · weakest: none, aligned all elements to tokens */
@import url("./tokens.css");
@import url("./base.css");

/* Layout Chrome */
.site-header {
  border-bottom: var(--rule-hair) solid var(--color-rule);
  background: var(--color-paper);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky-nav);
  padding-block: var(--space-md);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.site-brand {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  color: var(--color-ink);
  letter-spacing: var(--tracking-display);
  text-decoration: none;
  line-height: 1;
}

.site-brand:hover {
  color: var(--color-accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item a:not(.btn) {
  color: var(--color-muted);
  font-size: var(--text-sm);
  text-decoration: none;
  text-transform: lowercase;
  transition: color var(--dur-short) var(--ease-out);
}

.nav-item a:not(.btn):hover,
.nav-item a:not(.btn).active {
  color: var(--color-ink);
}

/* Hero Section */
.hero-settled {
  padding-block: var(--space-2xl) var(--space-xl);
  border-bottom: var(--rule-hair) solid var(--color-rule);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: var(--gap-columns);
  align-items: center;
}

@media (max-width: 60rem) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.hero-headline {
  font-size: var(--text-display);
  line-height: 0.96;
  margin-bottom: var(--space-md);
}

.hero-sentence {
  color: var(--color-muted);
  font-size: var(--text-lead);
  max-width: 48ch;
  margin-bottom: var(--space-lg);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.verb {
  display: inline-block;
  color: var(--color-accent-2);
  text-decoration: underline;
  text-decoration-thickness: var(--rule-hair);
  text-underline-offset: 0.16em;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  text-transform: lowercase;
  border: none;
  transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary,
a.btn-primary,
button.btn-primary,
.nav-item a.btn-primary {
  background: var(--color-accent);
  color: var(--color-accent-ink) !important;
  font-weight: 500;
}

.btn-primary:hover,
a.btn-primary:hover,
button.btn-primary:hover,
.nav-item a.btn-primary:hover {
  background: var(--color-ink);
  color: var(--color-paper) !important;
}

.btn-secondary {
  background: transparent;
  color: var(--color-ink);
  box-shadow: inset 0 0 0 var(--rule-hair) var(--color-rule-2);
}

.btn-secondary:hover {
  background: var(--color-paper-2);
  color: var(--color-ink);
}

.btn-danger {
  background: transparent;
  color: var(--color-error);
  box-shadow: inset 0 0 0 var(--rule-hair) var(--color-error);
}

.btn-danger:hover {
  background: var(--color-paper-2);
}

.btn-sm {
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--text-xs);
}

/* Wells & Cards */
.well {
  background: var(--color-paper-2);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-card);
  padding: var(--space-lg);
}

.well-highlight {
  border-color: var(--color-rule-2);
  box-shadow: var(--shadow-card);
}

/* Blueprint Grid Texture */
.blueprint-well {
  background-color: var(--color-paper-2);
  background-image: 
    linear-gradient(to right, var(--rule-blueprint) 1px, transparent 1px),
    linear-gradient(to bottom, var(--rule-blueprint) 1px, transparent 1px);
  background-size: 48px 48px;
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-card);
  padding: var(--space-lg);
}

/* Tags and Meta Readouts */
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: var(--space-3xs) var(--space-xs);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-family: var(--font-body);
  line-height: 1.2;
  text-transform: lowercase;
}

.tag-live {
  background: transparent;
  color: var(--color-live);
  box-shadow: inset 0 0 0 var(--rule-hair) var(--color-live);
}

.tag-closed {
  background: transparent;
  color: var(--color-error);
  box-shadow: inset 0 0 0 var(--rule-hair) var(--color-error);
}

.tag-accent {
  background: transparent;
  color: var(--color-accent);
  box-shadow: inset 0 0 0 var(--rule-hair) var(--color-accent);
}

.tag-muted {
  background: transparent;
  color: var(--color-muted);
  box-shadow: inset 0 0 0 var(--rule-hair) var(--color-rule-2);
}

.tag-subtle {
  background: var(--color-paper-3);
  color: var(--color-ink-2);
}

/* Section Containers */
.section {
  padding-block: var(--space-xl);
}

.section-head {
  margin-bottom: var(--space-lg);
}

.section-title {
  font-size: var(--text-section);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.section-lead {
  color: var(--color-muted);
  font-size: var(--text-md);
  max-width: 55ch;
}

/* Forms and Inputs */
.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-muted);
  text-transform: lowercase;
  margin-bottom: var(--space-2xs);
}

.form-control {
  width: 100%;
  height: 44px;
  padding: 0 var(--space-md);
  background: var(--color-paper);
  border: var(--rule-hair) solid var(--color-rule-2);
  border-radius: var(--radius-card);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  transition: border-color var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out);
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-focus);
}

.form-control-mono {
  font-family: var(--font-outlier);
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
}

/* Form Label Row with Aligned Helper Actions */
.form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2xs);
}

.form-label-row .form-label {
  margin-bottom: 0;
}

.form-helper-btn {
  background: none;
  border: none;
  color: var(--color-accent);
  font-size: var(--text-xs);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity var(--dur-short) var(--ease-out);
  font-family: var(--font-body);
}

.form-helper-btn:hover {
  opacity: 0.8;
}

/* Input Action Group - Symmetrical & Even */
.input-group {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.input-group .form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  flex: 1;
  min-width: 0;
  height: 44px;
}

.input-group .btn {
  border-radius: 0;
  margin-left: -1px;
  border: var(--rule-hair) solid var(--color-rule-2);
  padding: 0 var(--space-sm);
  height: 44px;
  width: 80px;
  min-width: 80px;
  max-width: 80px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  background: var(--color-paper-3);
  color: var(--color-ink);
  white-space: nowrap;
  box-sizing: border-box;
}

.input-group .btn:hover {
  background: var(--color-paper-2);
  color: var(--color-accent);
}

.input-group .btn:last-child {
  border-top-right-radius: var(--radius-card);
  border-bottom-right-radius: var(--radius-card);
}

/* Account Number Scramble Animation */
.animating-account {
  color: var(--color-live) !important;
  animation: accountPulse 0.15s infinite alternate;
}

@keyframes accountPulse {
  0% { opacity: 0.75; }
  100% { opacity: 1; text-shadow: 0 0 6px rgba(16, 185, 129, 0.4); }
}

.account-settled {
  color: var(--color-accent) !important;
  transition: all 0.4s ease-out;
  animation: settleFlash 0.5s ease-out;
}

@keyframes settleFlash {
  0% { background-color: rgba(244, 63, 94, 0.15); }
  100% { background-color: var(--color-paper); }
}

/* Auth Cards */
.auth-container {
  max-width: 460px;
  margin: var(--space-2xl) auto;
  padding-inline: var(--space-md);
}

.auth-card {
  background: var(--color-paper-2);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-card);
  padding: var(--space-xl);
  color: var(--color-ink);
}

.auth-header {
  text-align: center;
  margin-bottom: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-header img {
  display: block;
  margin: 0 auto var(--space-sm);
}

.auth-header .tag {
  margin-inline: auto;
  margin-bottom: var(--space-xs);
}

.auth-header h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  line-height: 1.1;
  margin: 0 auto var(--space-2xs);
  max-width: none;
  width: 100%;
  text-align: center;
}

.auth-header p {
  color: var(--color-muted);
  font-size: var(--text-sm);
  margin: 0 auto;
  max-width: 38ch;
  width: 100%;
  text-align: center;
  line-height: 1.45;
}

/* Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-card);
  background: var(--color-paper-2);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: var(--text-sm);
}

.data-table th {
  padding: var(--space-sm) var(--space-md);
  background: var(--color-paper-3);
  color: var(--color-muted);
  font-size: var(--text-xs);
  font-weight: 400;
  text-transform: lowercase;
  border-bottom: var(--rule-hair) solid var(--color-rule);
}

.data-table td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: var(--rule-hair) solid var(--color-rule);
  color: var(--color-ink);
  font-variant-numeric: tabular-nums;
}

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

.data-table tr:hover td {
  background: var(--color-paper-3);
}

/* Code Blocks */
.code-box {
  background: var(--color-paper);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-card);
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-outlier);
  font-size: var(--text-xs);
  color: var(--color-ink-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  overflow-x: auto;
}

.code-box code {
  color: var(--color-ink);
}

/* Alerts */
.alert-box {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-card);
  font-size: var(--text-sm);
  margin-bottom: var(--space-md);
  display: block;
  text-align: left;
  line-height: 1.5;
  background: var(--color-paper-2);
  border: var(--rule-hair) solid var(--color-rule);
}

.alert-box.alert-box-dismissible {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.alert-box strong {
  display: inline;
  margin-right: var(--space-3xs);
}

.alert-box-success {
  border-color: var(--color-live);
  color: var(--color-live);
}

.alert-box-danger {
  border-color: var(--color-error);
  color: var(--color-error);
}

.alert-box-info {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* Toast */
#toast-container {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.toast {
  background: var(--color-paper-3);
  border: var(--rule-hair) solid var(--color-rule-2);
  color: var(--color-ink);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

/* Footer */
.site-footer {
  border-top: var(--rule-hair) solid var(--color-rule);
  padding-block: var(--space-xl);
  background: var(--color-paper);
  color: var(--color-muted);
  margin-top: auto;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-copy {
  color: var(--color-muted);
  font-size: var(--text-xs);
}
