/* ============================================================================
   Full Circle (learn) - shared styles
   Header/start-screen styling ported from chunks/learn's own assets/style.css
   (structure + class names), same trio family. The content-block classes
   (.ex/.arr-up/.arr-dn/.gw/.frame-lbl/.temp/.badge/table) are ported
   verbatim from sentence.html's own <style> block, since this app's
   content.json carries that guide's own inline markup through unchanged -
   same signal, same colors, no re-derivation.
   ============================================================================ */

:root {
  --bg-color: #232323;
  --card-color: #1d1d1d;
  --accent-gold: #e6c27a;
  --light-gray: #D8D8D8;
  --darker-gray: #888888;

  --green: #7ed6a0;
  --blue: #6fb7ff;
  --orange: #ffa94d;
  --gray: #a0a4ad;
}

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

body {
  background-color: var(--bg-color);
  color: var(--light-gray);
  font-family: Verdana, Geneva, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  padding-bottom: 60px;
}

a { color: inherit; }

/* -------------------------------------------------------------------------
   Header (shared: start screen, rules screen)
   ------------------------------------------------------------------------- */
header.app-header {
  position: sticky;
  top: 0;
  background-color: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(5px);
  border-bottom: 2px solid var(--card-color);
  padding: 15px 20px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.header-title { display: flex; align-items: center; gap: 12px; }
.logo-link { display: inline-flex; border-radius: 50%; line-height: 0; flex-shrink: 0; }
.logo-img { width: 56px; height: 56px; border-radius: 50%; display: block; object-fit: cover; }

.back-link {
  color: var(--darker-gray);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 0.2s;
}
.back-link:hover { color: var(--accent-gold); }

header.app-header h1 {
  color: var(--accent-gold);
  font-size: 1.3rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* -------------------------------------------------------------------------
   Start screen - group grid: 4 cards (Four Frames, Politeness Ladder,
   Social Toolkit, Read-Back), matching stress/learn's/chunks/learn's own
   convention.
   ------------------------------------------------------------------------- */
.hero { max-width: 800px; margin: 30px auto 0; padding: 0 20px; }
.hero p { color: #c8c8c8; font-size: 1.05rem; }

main { max-width: 800px; margin: 0 auto; padding: 20px; }

.level-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.level-card {
  background-color: var(--card-color);
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.level-title { font-size: 1.1rem; font-weight: 800; margin-bottom: 4px; }
.level-desc { color: #999; font-size: 0.85rem; margin-bottom: 14px; }

.group-actions { display: flex; gap: 10px; margin-top: auto; }

.go-btn {
  font-family: inherit;
  font-weight: 800;
  font-size: 0.9rem;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  padding: 8px 20px;
  text-decoration: none;
  text-align: center;
  transition: transform 0.15s ease, opacity 0.15s ease;
  flex: 1 1 auto;
  background-color: var(--accent-gold);
  color: #121212;
}
.go-btn:hover { transform: translateY(-1px); opacity: 0.92; }

.no-results {
  display: none;
  text-align: center;
  padding: 40px;
  color: var(--darker-gray);
}

.site-footer {
  text-align: center;
  color: var(--darker-gray);
  font-size: 0.8rem;
  margin-top: 40px;
}

/* -------------------------------------------------------------------------
   Content screen - a group's blocks: intro text, rule cards, a table, a
   step list, occasional notes. No accordion here (unlike chunks/learn) -
   each group is short enough to read straight through.
   ------------------------------------------------------------------------- */
.guide-main { max-width: 800px; margin: 30px auto; padding: 0 20px; }

.block-intro { color: #c8c8c8; font-size: 1rem; margin: 0 0 20px; }
.block-intro:first-child { color: var(--darker-gray); font-size: 0.95rem; }

.block-note,
p.block-note {
  color: var(--gray);
  font-size: 0.92rem;
  border-left: 3px solid var(--gray);
  padding-left: 12px;
  margin: 16px 0;
}

.rule-card {
  background-color: var(--card-color);
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

.rule-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.rule-body { font-size: 0.98rem; color: #c8c8c8; }

.steps-card .step-line { margin: 10px 0; font-size: 0.98rem; color: #c8c8c8; }
.steps-card .step-line:first-child { margin-top: 0; }
.steps-card .step-line:last-child { margin-bottom: 0; }

/* Semantics ported from sentence.html's own <style>: example sentences,
   melody arrows, glue words, region/temperature badges. */
.ex { color: var(--blue); font-style: italic; font-weight: 700; }
.gw { color: var(--gray); }
.arr-up { color: var(--green); font-weight: 800; }
.arr-dn { color: var(--orange); font-weight: 800; }
.frame-lbl {
  color: var(--gray);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  width: 84px;
  display: inline-block;
}

.badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  border-radius: 12px;
  padding: 2px 10px;
  margin-left: 8px;
  vertical-align: middle;
  color: #1a1a1a;
}
.badge.green { background: var(--green); }
.badge.blue { background: var(--blue); }
.badge.orange { background: var(--orange); }
.badge.gray { background: var(--gray); }

.temp { color: var(--gray); font-size: 0.8rem; font-weight: 700; margin-left: 6px; }

table { border-collapse: collapse; width: 100%; margin: 8px 0 16px; }
th, td { border: 1px solid #2a2a2a; padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: #262626; color: var(--accent-gold); font-weight: 800; }
tr:nth-child(even) td { background: var(--card-color); }
