/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

:root {
  --bg: #15151a;
  --surface: #1c1c23;
  --surface-raised: #22222b;
  --hairline: #2f2f38;
  --text: #f1ede3;
  --text-muted: #97938a;
  --safe: #5fb878;
  --soon: #d9a440;
  --gone: #c1473f;
  --unknown: #6b7280;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

code {
  font-family: "IBM Plex Mono", monospace;
  background: var(--surface-raised);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}

/* Hero */
.hero {
  margin-bottom: 40px;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 32px;
}

.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--soon);
  margin: 0 0 12px;
}

.hero h1 {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.tagline {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0;
  max-width: 46ch;
}

/* Form */
.import-form { margin-bottom: 32px; }

.field-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.decklist-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.92rem;
  padding: 16px;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s ease;
}

.decklist-input::placeholder { color: #57544c; }

.decklist-input:focus {
  border-color: var(--soon);
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}

.hint {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
}

.submit-btn {
  background: var(--soon);
  color: #1a1305;
  border: none;
  border-radius: 6px;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 22px;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.15s ease;
}

.submit-btn:hover { filter: brightness(1.08); }
.submit-btn:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

/* Notices */
.notice {
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 0.92rem;
  border: 1px solid var(--hairline);
}

.notice p { margin: 0; }

.notice-info { background: var(--surface); color: var(--text); }

.notice-warning {
  background: rgba(217, 164, 64, 0.08);
  border-color: rgba(217, 164, 64, 0.35);
  color: #ecd8a8;
}

.error-lines {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--text-muted);
}

/* Summary stats */
.summary {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.stat {
  flex: 1;
  min-width: 120px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-top: 3px solid var(--unknown);
  border-radius: 8px;
  padding: 14px 16px;
}

.stat-safe { border-top-color: var(--safe); }
.stat-soon { border-top-color: var(--soon); }
.stat-gone { border-top-color: var(--gone); }
.stat-unknown { border-top-color: var(--unknown); }

.stat-num {
  display: block;
  font-family: "Fraunces", serif;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1;
}

.stat-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.policy-note {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0 0 32px;
  line-height: 1.6;
}

/* Deck sections */
.deck-section { margin-bottom: 32px; }

.deck-section h2 {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 1.3rem;
  margin: 0 0 12px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.deck-section .count {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
}

.card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  overflow: hidden;
}

.card-row {
  display: grid;
  grid-template-columns: 44px 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  background: var(--surface);
  border-left: 4px solid var(--unknown);
  border-bottom: 1px solid var(--hairline);
}

.card-row:last-child { border-bottom: none; }

.card-row.status-safe { border-left-color: var(--safe); }
.card-row.status-rotating_soon { border-left-color: var(--soon); background: rgba(217, 164, 64, 0.06); }
.card-row.status-not_standard { border-left-color: var(--gone); background: rgba(193, 71, 63, 0.06); }
.card-row.status-unknown { border-left-color: var(--unknown); }

.card-row .qty {
  font-family: "IBM Plex Mono", monospace;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.card-row .name {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-row .name a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dotted var(--text-muted);
}

.card-row .name a:hover { border-bottom-color: var(--text); }

.card-row .stamp {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--surface-raised);
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.card-row .status-label {
  font-size: 0.82rem;
  text-align: right;
  white-space: nowrap;
  color: var(--text-muted);
}

.status-safe .status-label { color: var(--safe); }
.status-rotating_soon .status-label { color: var(--soon); }
.status-not_standard .status-label { color: var(--gone); }
.status-unknown .status-label { color: var(--unknown); }

/* Only rotating-soon rows carry a title attribute (the rotation date),
   so the help cursor signals the tooltip. */
.status-label[title] {
  cursor: help;
}

/* Footer */
.site-footer {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px 56px;
  border-top: 1px solid var(--hairline);
}

.site-footer p {
  margin: 24px 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.site-footer a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dotted var(--text-muted);
  white-space: nowrap;
}

.site-footer a:hover { border-bottom-color: var(--text); }
.site-footer a:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

@media (max-width: 600px) {
  .card-row {
    grid-template-columns: 30px 1fr;
    grid-template-rows: auto auto;
  }
  .card-row .stamp,
  .card-row .status-label {
    grid-column: 2;
    text-align: left;
  }
  .form-row { flex-direction: column; align-items: stretch; }
  .submit-btn { width: 100%; }
}
