/* Hunt Opener: estilos base.
   Direccion D: bosque verde pino + curvas de nivel + naranja de seguridad. Un solo webfont (titulos). */

:root {
  --field: #efede4;      /* fondo caqui claro */
  --paper: #ffffff;      /* tablas y bloques */
  --ink: #1d2a22;
  --muted: #56635a;
  --line: #d8d5c6;
  --timber: #1f3d2c;     /* verde pino: header y footer */
  --timber-ink: #eef3ea;
  --contour: rgba(233, 236, 223, .09);
  --blaze: #f26a1b;      /* naranja de seguridad: solo marca y "abierta" */
  --link: #1f5c3d;
  --open-bg: #fde7d9;
  --open-ink: #8a3207;
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 720px;
  --th-bg: #e6e3d6;
}

@media (prefers-color-scheme: dark) {
  :root {
    --field: #131a16;
    --paper: #1b241e;
    --ink: #e3ebe4;
    --muted: #9fb0a4;
    --line: #2d3a31;
    --timber: #10261a;
    --link: #8fd1a8;
    --th-bg: #223027;
    --open-bg: #4a2410;
    --open-ink: #ffc29e;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--field);
  color: var(--ink);
  font: 17px/1.6 var(--body);
}

.wrap {
  max-width: var(--wrap);
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blaze); outline-offset: 2px; }

/* Header con curvas de nivel */
.site-header {
  background-color: var(--timber);
  background-image: url("/assets/contours.svg");
  background-size: 520px auto;
  background-position: right -80px top -60px;
  color: var(--timber-ink);
}
.site-header .bar {
  display: flex;
  align-items: center;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--timber-ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: .01em;
  text-decoration: none;
}
.brand-tag { width: 20px; height: 26px; flex: none; }

/* Hero (solo home) */
.hero { padding-top: 28px; padding-bottom: 44px; }
.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 8vw, 3.6rem);
  line-height: 1;
  margin: 0 0 14px;
  color: #fff;
}
.hero p {
  margin: 0;
  max-width: 34em;
  font-size: 1.08rem;
  color: var(--timber-ink);
  opacity: .88;
}

/* Contenido */
main { padding-top: 32px; padding-bottom: 56px; }

h1, h2, h3 { font-family: var(--display); line-height: 1.1; }
main h1 { font-size: 2.4rem; font-weight: 700; margin: 0 0 .5em; }
h2 { font-size: 1.6rem; font-weight: 600; margin: 1.6em 0 .4em; }
h3 { font-size: 1.25rem; font-weight: 600; margin: 1.4em 0 .3em; }
main > :first-child { margin-top: 0; }

p, ul { max-width: 38em; }
ul { padding-left: 1.2em; }
li { margin: .3em 0; }
li::marker { color: var(--muted); }

.lead { font-size: 1.12rem; color: var(--muted); }

/* Tablas de temporadas */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
}
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
tr:last-child td { border-bottom: 0; }
th {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--th-bg);
}
td.date { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Estado de temporada: texto simple; la abierta en naranja */
.status {
  font-size: .92rem;
  white-space: nowrap;
  color: var(--muted);
}
.status-open { color: var(--blaze); font-weight: 700; }

/* Fuente y verificacion */
.source {
  font-size: .92rem;
  color: var(--muted);
  border-left: 3px solid var(--line);
  padding: 2px 0 2px 12px;
  margin: 14px 0;
}

/* Footer */
.site-footer {
  background: var(--timber);
  color: var(--timber-ink);
  font-size: .92rem;
  padding: 28px 0 40px;
}
.site-footer a { color: var(--timber-ink); }
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 14px;
}
.site-footer p { margin: .4em 0; opacity: .78; max-width: 40em; }

@media (max-width: 480px) {
  body { font-size: 16px; }
  main h1 { font-size: 2rem; }
  .site-header { background-size: 460px auto; }
}
main > section:first-child > h2:first-child { margin-top: 0; }


/* Temporadas cerradas: se atenuan */
tr.is-closed td { color: var(--muted); }
.status-closed { color: var(--muted); }

/* Lista desplegable de condados */
.county-list {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 14px;
  max-width: 38em;
}
.county-list summary { cursor: pointer; font-weight: 600; color: var(--link); }
.county-list p { margin: .6em 0 .2em; font-size: .93rem; }

.warning { font-weight: 600; margin-top: 18px; }

/* En el telefono, cada temporada se apila como una ficha */
@media (max-width: 600px) {
  .table-scroll { overflow: visible; background: transparent; border: 0; }
  .season-table thead { display: none; }
  .season-table, .season-table tbody, .season-table tr, .season-table td { display: block; width: 100%; }
  .season-table tr {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 4px;
    margin-bottom: 10px;
    padding: 8px 0;
  }
  .season-table td {
    display: grid;
    grid-template-columns: 5.5em 1fr;
    gap: 10px;
    border: 0;
    padding: 4px 14px;
  }
  .season-table td::before {
    content: attr(data-label);
    font-family: var(--display);
    font-weight: 600;
    color: var(--muted);
  }
  .season-table td:first-child { font-weight: 600; }
  .season-table .status { justify-self: start; }
  td.date { white-space: normal; }
}

/* Tablero de hoy: mismo fondo que las tablas */
.board {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px 18px 16px;
  margin: 4px 0 8px;
}
.board p { margin: 0; max-width: none; }
.board-asof { font-size: .88rem; color: var(--muted); margin-bottom: 10px; }
.board-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 28px; }
.board-label {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 2px;
}
.board-open .board-label { color: var(--blaze); font-weight: 700; }
.board-name, .board-date {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.8rem;
  line-height: 1.05;
  color: var(--ink);
}
.board-name + .board-meta + .board-name { margin-top: 12px; }
.board-none { font-size: 1.3rem; color: var(--muted); }
.board-meta { font-size: .92rem; color: var(--muted); margin-top: 4px; }
.board-open { border-right: 1px solid var(--line); padding-right: 24px; }
@media (max-width: 600px) {
  .board-grid { grid-template-columns: 1fr; }
  .board-open { border-right: 0; padding-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
}

.note { font-size: .92rem; color: var(--muted); }
.plain-table {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  max-width: 30em;
  overflow-x: auto;
}
.alloc-table td.num, .alloc-table th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.alloc-table th, .alloc-table td { padding: 8px 12px; }

/* Varias temporadas abiertas: nombres mas chicos */
.board-many .board-name { font-size: 1.3rem; }
.board-many .board-name + .board-meta + .board-name { margin-top: 10px; }

/* Navegacion del header */
.site-header .bar { justify-content: space-between; gap: 16px; }
.site-nav { display: flex; gap: 18px; }
.site-nav a {
  color: var(--timber-ink);
  text-decoration: none;
  font-size: .95rem;
  opacity: .88;
}
.site-nav a:hover { opacity: 1; text-decoration: underline; }
@media (max-width: 420px) {
  .brand { font-size: 1.25rem; gap: 8px; }
  .site-nav { gap: 12px; }
  .site-nav a { font-size: .85rem; }
}
.nowrap { white-space: nowrap; }

/* Home */
.home-today { max-width: none; }
.home-today table { font-size: .95rem; }
.home-today td:first-child a { font-weight: 600; }
.home-today .status { white-space: normal; }
@media (max-width: 600px) {
  .home-today thead { display: none; }
  .home-today tr { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .home-today tr:last-child { border-bottom: 0; }
  .home-today td { display: block; padding: 2px 0; border: 0; }
  .home-today td:nth-child(2)::before { content: "Open now: "; color: var(--muted); }
  .home-today td:nth-child(3)::before { content: "Next: "; color: var(--muted); }
}

.state-list { list-style: none; padding: 0; margin: 0; max-width: none; }
.state-list li {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 8px;
}
.state-link {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.3rem;
  text-decoration: none;
}
.state-link:hover { text-decoration: underline; }
.state-dates { color: var(--muted); font-size: .95rem; }

/* Resumen por estado */
.by-state .status { white-space: normal; }
.cell-note { display: block; font-size: .85rem; color: var(--muted); white-space: normal; }

/* Reglas por estado (straight-wall) */
.rule-tag {
  display: inline-block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--muted);
  white-space: normal;
}
.rule-straight_wall, .rule-no_rifles { color: var(--blaze); }
.rules-table td:first-child { font-weight: 600; white-space: nowrap; }
.rule-details { margin-top: 6px; font-size: .92rem; }
.rule-details summary { cursor: pointer; color: var(--link); }
.rule-details p { margin: .4em 0; }
.online-yes, .online-some { color: var(--link); }
.online-no { color: var(--blaze); }

/* Selector de estado en guias nacionales */
.state-jump { margin: 18px 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.state-jump label { font-weight: 600; }
.state-jump select { font: inherit; padding: 6px 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); color: inherit; max-width: 100%; }

/* Header en telefonos: el menu pasa a una segunda linea */
@media (max-width: 480px) {
  .site-header .bar { flex-wrap: wrap; row-gap: 6px; padding-bottom: 10px; }
  .site-nav { width: 100%; gap: 18px; }
  .site-nav a { font-size: .9rem; }
}

/* Migas */
.crumbs { font-size: .88rem; color: var(--muted); margin: 0 0 14px; }
.crumbs a { color: var(--muted); }
.crumbs span[aria-hidden] { margin: 0 4px; }
