/* Punch Report styles. build.py copies this file to dist/style.css.
   Edit colors in :root below; sections are labelled. */
:root {
  --green-900: #0c3d24;
  --green-800: #14532d;
  --green-700: #166534;
  --green-600: #15803d;
  --green-500: #22c55e;
  --green-100: #dcfce7;
  --green-50: #f0fdf4;
  --sand: #f7f5f0;
  --sand-dark: #efece4;
  --text: #1a2e22;
  --text-muted: #5c6b62;
  --border: #e5e2d9;
  --warning-bg: #fffbeb;
  --warning-border: #f59e0b;
  --bad: #b91c1c;
  --ok: #15803d;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(20,83,45,.04);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  margin: 0;
  background: var(--sand);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}
main { padding-top: 1.5rem; padding-bottom: 2rem; }
h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 .75rem; color: var(--green-900); letter-spacing: -.02em; }
h2 { font-size: 1.35rem; margin: 1.75rem 0 .6rem; color: var(--green-800); }
p { margin: .6rem 0; }
a { color: var(--green-700); }
a:hover { color: var(--green-600); }
.muted { color: var(--text-muted); font-size: .9rem; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--green-800) 0%, var(--green-700) 100%);
  color: white;
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
.hero h1 { color: white; font-size: 2.4rem; margin-bottom: .5rem; }
.hero p { font-size: 1.1rem; opacity: .95; max-width: 640px; }
.hero .stats { display: flex; gap: 1.5rem; margin-top: 1.25rem; font-size: .95rem; }
.hero .stats span { background: rgba(255,255,255,.12); padding: .4rem .8rem; border-radius: 999px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  text-decoration: none;
  color: inherit;
  display: block;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(20,83,45,.08); }
.card h3 { margin: 0 0 .35rem; font-size: 1.15rem; color: var(--green-800); }
.card p { margin: 0; color: var(--text-muted); font-size: .92rem; }
.card .arrow { float: right; color: var(--green-600); font-weight: 600; }

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 1rem 0;
  font-size: .92rem;
}
th, td { padding: .7rem .85rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--green-50); font-weight: 600; color: var(--green-900); font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafaf7; }
.bad { color: var(--bad); font-weight: 600; }
.ok { color: var(--ok); font-weight: 600; }

/* Status pills */
.status {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
}
.status.bad { background: #fee2e2; color: #991b1b; }
.status.ok { background: var(--green-100); color: var(--green-800); }
.status.muted { background: #f3f4f6; color: var(--text-muted); }

/* Forms */
.signup {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow);
}
.signup b { display: block; font-size: 1.05rem; margin-bottom: .6rem; color: var(--green-900); }
.signup input[type=email] {
  padding: .65rem .8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  min-width: 240px;
  font-size: 1rem;
  margin-right: .5rem;
}
.signup button {
  background: var(--green-700);
  color: white;
  border: none;
  padding: .7rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
}
.signup button:hover { background: var(--green-800); }
.signup small { display: block; margin-top: .5rem; }

/* Notices */
.notice {
  background: var(--warning-bg);
  border-left: 4px solid var(--warning-border);
  padding: .85rem 1rem;
  border-radius: 0 8px 8px 0;
  margin: 1.25rem 0;
  font-size: .95rem;
}

/* Actions / buttons as links */
.actions { margin: 1rem 0; }
.actions a {
  display: inline-block;
  margin-right: .75rem;
  margin-bottom: .5rem;
  padding: .5rem .9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  background: white;
  font-size: .9rem;
  color: var(--green-800);
}
.actions a:hover { background: var(--green-50); border-color: var(--green-600); }

/* Filter input */
input#q, select#f {
  padding: .6rem .8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: white;
  margin: .5rem 0 1rem;
}
input#q { width: 100%; max-width: 360px; }
select#f { min-width: 180px; }

/* Source line */
.source { font-size: .9rem; color: var(--text-muted); margin: .75rem 0; }
.source a { color: var(--green-700); }


/* Course header meta */
.course-meta { color: var(--text-muted); font-size: .95rem; margin-bottom: 1rem; }
/* ---------- Layout wrapper ---------- */
.wrap, body > main { max-width: 1080px; margin-left: auto; margin-right: auto; padding-left: 1.25rem; padding-right: 1.25rem; }
main { padding-top: 1.75rem; padding-bottom: 2.5rem; }

/* ---------- Top bar (full width) ---------- */
.topbar { background: var(--green-900); color: white; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: .55rem; color: white; text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.brand:hover { color: white; }
.logo { width: 30px; height: 30px; flex: none; }
.topnav { display: flex; gap: 1.5rem; }
.topnav a { color: rgba(255,255,255,.85); text-decoration: none; font-weight: 500; font-size: .95rem; }
.topnav a:hover { color: white; }
.menu-btn { display: none; background: none; border: 1px solid rgba(255,255,255,.3); color: white; border-radius: 8px; width: 42px; height: 38px; font-size: 1.3rem; cursor: pointer; }

/* ---------- Footer (full width, links only) ---------- */
.site-footer { background: var(--green-900); color: rgba(255,255,255,.7); font-size: .85rem; margin-top: 2rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; padding-top: 1.1rem; padding-bottom: 1.1rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-footer a { color: rgba(255,255,255,.85); text-decoration: none; }
.site-footer a:hover { color: white; text-decoration: underline; }

/* ---------- Home hero photo + course search ---------- */
.hero.photo { position: relative; background: linear-gradient(180deg, rgba(8,40,22,.55), rgba(8,40,22,.82)), url("assets/hero.jpg") center/cover; padding: 3.5rem 2.25rem 2.5rem; overflow: visible; }
.finder { position: relative; max-width: 560px; margin-top: 1.5rem; }
.finder input { width: 100%; padding: .95rem 1.1rem; border-radius: 12px; border: none; font-size: 1.05rem; font-family: inherit; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.finder ul { list-style: none; margin: .4rem 0 0; padding: .3rem; position: absolute; left: 0; right: 0; background: white; border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.18); z-index: 20; max-height: 340px; overflow-y: auto; }
.finder ul:empty { display: none; }
.finder li a { display: block; padding: .6rem .8rem; border-radius: 8px; color: var(--text); text-decoration: none; }
.finder li a:hover, .finder li a.on { background: var(--green-50); }
.finder li small { color: var(--text-muted); margin-left: .4rem; }

/* ---------- Course status card ---------- */
.statuscard { border-radius: var(--radius); padding: 1.4rem 1.6rem; margin: 1rem 0 1.25rem; color: white; box-shadow: var(--shadow); }
.statuscard .label { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; opacity: .9; }
.statuscard .big { font-size: 1.9rem; font-weight: 800; line-height: 1.2; margin: .2rem 0; letter-spacing: -.02em; }
.statuscard .sub { opacity: .92; margin: 0; }
.statuscard.red { background: linear-gradient(135deg, #b91c1c, #991b1b); }
.statuscard.amber { background: linear-gradient(135deg, #d97706, #b45309); }
.statuscard.green { background: linear-gradient(135deg, var(--green-700), var(--green-800)); }
.statuscard.grey { background: linear-gradient(135deg, #6b7280, #4b5563); }

/* ---------- 12-month timeline ---------- */
.timeline { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem .8rem; margin: 1rem 0; box-shadow: var(--shadow); }
.tl-track { position: relative; height: 26px; background: var(--green-50); border-radius: 6px; margin: .5rem 0 .3rem; }
.tl-bar { position: absolute; top: 0; bottom: 0; border-radius: 6px; min-width: 4px; }
.tl-bar.aer { background: #f59e0b; }
.tl-bar.closed { background: #dc2626; }
.tl-today { position: absolute; top: -5px; bottom: -5px; width: 2px; background: var(--green-900); }
.tl-months { display: grid; grid-template-columns: repeat(12, 1fr); font-size: .72rem; color: var(--text-muted); }
.tl-legend { font-size: .8rem; color: var(--text-muted); margin-top: .4rem; }
.tl-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 .3rem 0 .8rem; vertical-align: middle; }

/* ---------- Phone layout ---------- */
@media (max-width: 720px) {
  .menu-btn { display: block; }
  .topnav { display: none; position: absolute; top: 60px; left: 0; right: 0; background: var(--green-900); flex-direction: column; gap: 0; padding: .5rem 1.25rem 1rem; }
  .topnav.open { display: flex; }
  .topnav a { padding: .7rem 0; border-top: 1px solid rgba(255,255,255,.1); }
  .hero.photo { padding: 2.25rem 1.25rem 2rem; }
  .hero h1 { font-size: 1.9rem; }
  .hero .stats { flex-wrap: wrap; gap: .5rem; }
  .statuscard .big { font-size: 1.45rem; }
  .tl-months span:nth-child(even) { visibility: hidden; }
  .signup input[type=email] { min-width: 0; width: 100%; margin-bottom: .5rem; }
  .signup button { width: 100%; }
  th, td { padding: .55rem .5rem; font-size: .85rem; }
  .site-footer .wrap { flex-direction: column; }
}

/* ---------- Course lists: status pills, filters, past dates ---------- */
.pill { display: inline-block; padding: .25rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.pill.red { background: #fee2e2; color: #991b1b; }
.pill.amber { background: #fef3c7; color: #92400e; }
.pill.green { background: var(--green-100); color: var(--green-800); }
.pill.grey { background: #f3f4f6; color: var(--text-muted); }
.dates { font-size: .85rem; }
.dates small { color: var(--text-muted); }
.past, .past td { color: #9ca3af; }
.dates .past { text-decoration: none; opacity: .8; }
.filters { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center; margin: 1.25rem 0 .5rem; }
.filters[hidden] { display: none; }
.seg { display: inline-flex; align-items: center; gap: .25rem; background: white; border: 1px solid var(--border); border-radius: 10px; padding: .2rem; }
.seg b { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); padding: 0 .4rem; }
.seg button { border: none; background: none; font: inherit; font-size: .88rem; padding: .4rem .7rem; border-radius: 7px; cursor: pointer; color: var(--green-800); }
.seg button.on { background: var(--green-700); color: white; }
.filters label { font-size: .88rem; color: var(--text-muted); }
.filters select, .filters input#q { margin: 0; padding: .5rem .7rem; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: .9rem; background: white; }
.filters input#q { max-width: 260px; }
table.courses td:first-child small { display: block; margin-top: .1rem; }
@media (max-width: 720px) {
  .filters { gap: .5rem; }
  .seg { width: 100%; overflow-x: auto; }
  .seg button { padding: .4rem .55rem; font-size: .82rem; }
  .filters input#q { max-width: none; width: 100%; }
  table.courses thead { display: none; }
  table.courses tr { display: block; padding: .75rem .85rem; border-bottom: 1px solid var(--border); }
  table.courses td { display: block; border: none; padding: .15rem 0; }
  table.courses .dates { font-size: .82rem; }
}
