/* ============================================================
   GLOBAL BASE STYLES (SCREEN)
   ============================================================ */

:root {
  --primary:#2a4d8f;
  --accent:#e67e22;
  --success:#27ae60;
  --bg:#f4f7f9;
}

/* Base Layout */
body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  background: var(--bg);

  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
header {
  width: 100%;
  background: var(--primary);
  color: white;
  padding: 8px 15px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;

  box-shadow: 0 2px 6px rgba(0,0,0,0.2);

  position: sticky;
  top: 0;
  z-index: 5000;
}

header img {
  height: 50px;
}

header h1 {
  font-size: 1.2rem;
  margin: 0;
}

header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

header nav a {
  color: white;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 6px 10px;
  border-radius: 5px;
  transition: background 0.3s;
}

header nav a:hover {
  background: var(--accent);
  color: #fff;
}

/* Main */
main {
  flex: 1;
  padding: 16px;
  overflow-y: visible;
}

/* Tabs */
.tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.tab-nav button {
  padding: 10px 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

/* Lesson Cards */
.lesson-card {
  background: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  margin-bottom: 20px;
  border-left: 5px solid var(--primary);
}

.lesson-card h2 {
  color: var(--primary);
  margin-top: 0;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 10px;
}

/* Rule Box */
.rule-box {
  background: #fff8e1;
  border-left: 5px solid var(--accent);
  padding: 15px;
  margin: 10px 0;
  border-radius: 6px;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

th, td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: center;
}

th {
  background: #eee;
}

/* Worksheet Layout */
.question-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding-left: 20px;
  
}

.question-item {
  margin-bottom: 20px;
}

.answer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.download-section {
  margin-top: 30px;
  text-align: center;
}

/* Visibility */
.print-only {
  display: none;
}

.screen-only {
  display: block;
}

