/* =============================
   Helios UI Base v1.0 — Vocab Builder
   Semantic class alignment: grid-2, card, list-panel, tight, check
   ============================= */

:root{
  --helios-ink: #1d4ed8;                 /* Helios blue */

  --text: #111827;
  --muted: #6b7280;
  --line: 1.35;

  --bg: #f6f7f9;
  --shell: #eef2ff;

  --card: rgba(255,255,255,0.96);

  --stroke: rgba(17,24,39,0.12);
  --stroke-soft: rgba(17,24,39,0.10);

  --shadow-soft: 0 6px 18px rgba(17,24,39,0.06);
  --shadow: 0 12px 30px rgba(17,24,39,0.10);

  --r-lg: 18px;
  --r-md: 12px;
}

/* Global baseline */
html, body{
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: var(--line);
}

*{ box-sizing: border-box; }
button{ font: inherit; color: inherit; }

/* App frame */
.app-shell{
  min-height: 100vh;
  padding: 16px;
  background: linear-gradient(180deg, var(--shell) 0%, #f7f9ff 55%, var(--bg) 100%);
}

.app-container{
  max-width: 720px;
  margin: 0 auto;
}

.app-header{ margin-bottom: 12px; }

/* App identity */
.app-title{
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0 0 6px 0;
  color: var(--helios-ink);
}

/* Main surface */
.app-main{
  background: var(--card);
  border: 1px solid var(--stroke-soft);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: 0 18px 55px rgba(17,24,39,0.12);
}

/* Page title (context) */
.page-title{
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 4px 0 16px;
  color: var(--helios-ink); /* keep consistent unless you choose otherwise */
}

/* Controls */
.nav-back{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.92);
  margin-bottom: 12px;
}

/* Layout: 2-up grid */
.grid-2{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

/* Panels for lists (tiers/days) */
.list-panel{
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
  padding: 14px;

  border: 1px solid var(--stroke-soft);
  border-radius: var(--r-lg);
  background: rgba(255,255,255,0.92);
  box-shadow: 0 12px 30px rgba(17,24,39,0.08);
}

/* Tight list for execution mode (Days) */
.list-panel.tight{
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
}

/* Cards */
.card{
  text-align: left;
  display: block;
  width: 100%;

  border: 1px solid var(--stroke);
  border-radius: var(--r-lg);
  padding: 16px;
  background: rgba(255,255,255,0.92);
  box-shadow: var(--shadow-soft);
  cursor: pointer;

  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.card:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  border-color: rgba(17,24,39,0.18);
}

.card:active{ transform: translateY(0px); }

/* Uniform sizing (only where applied) */
.uniform-card{ min-height: 108px; }

/* Clamp helper (optional use) */
.clamp-2{
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Vocab Builder uses <p> for descriptions inside cards */
.card p{ color: var(--muted); }

/* Tight cards inside tight lists */
.list-panel.tight .card{
  padding: 10px 12px;
  border-radius: var(--r-md);
}

/* Completion marker */
.check{
  color: #16a34a;
  margin-right: 8px;
  font-size: 18px;
  font-weight: 700;
  text-shadow: 0 0 0.6px currentColor;
  display: inline-block;

  line-height: 1;
  transform: scale(1.35);
  vertical-align: middle;
}

/* Focus ring */
.card:focus-visible,
.nav-back:focus-visible,
button:focus-visible{
  outline: 2px solid rgba(29,78,216,0.25);
  outline-offset: 2px;
}

/* Mobile */
@media (max-width: 900px){
  .grid-2{ grid-template-columns: 1fr; }

  .card{ padding: 12px; border-radius: var(--r-md); }
  .list-panel{ padding: 10px; }
  .check{ font-size: 20px; }
}

/* Pack grid: enforce uniform card height (only here) */
.grid-2 > .card {
  min-height: 108px;
}

/* Pack grid: clamp descriptions so cards don’t grow */
.grid-2 > .card p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


/* -----------------------------
   Back-compat aliases (safe)
   (If an old class survives somewhere, it still styles correctly.)
------------------------------ */
.packs-grid{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.pack-card{ text-align:left; display:block; width:100%; border:1px solid var(--stroke); border-radius: var(--r-lg); padding:16px; background: rgba(255,255,255,0.92); box-shadow: var(--shadow-soft); cursor:pointer; transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease; }
.pack-card:hover{ transform: translateY(-1px); box-shadow: var(--shadow); border-color: rgba(17,24,39,0.18); }
.days-list{ display:flex; flex-direction:column; gap:8px; margin-top:10px; padding:10px; border:1px solid var(--stroke-soft); border-radius: var(--r-lg); background: rgba(255,255,255,0.92); box-shadow: 0 12px 30px rgba(17,24,39,0.08); }
.days-list .pack-card{ padding:10px 12px; border-radius: var(--r-md); }
.day-check{ color:#16a34a; margin-right:8px; font-size:18px; font-weight:700; text-shadow:0 0 0.6px currentColor; display:inline-block; line-height:1; transform:scale(1.35); vertical-align:middle; }
@media (max-width: 900px){ .packs-grid{ grid-template-columns: 1fr; } }
