/* Hoja de estilos del portal. Diseño «Edición diaria»: docs/design/README.md.
   No lleva hash de contenido a proposito: sin paso de build no hay manifiesto que consultar desde
   el Worker, asi que se sirve con una cache corta (ver _headers). */

@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #141414;
  --paper: #ffffff;
  --paper-alt: #f6f5f2;
  --accent: #c22e1a;
  --accent-soft: #ffb4a6;
  --muted: #555555;
  --rule: #dddddd;
  --danger: #8a2a1b;
  --ok: #0f6b44;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1200px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px / 1.6 var(--sans);
  -webkit-text-size-adjust: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  margin: 0;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --- tipografia de apoyo --- */

.kicker {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.kicker.accent,
.accent {
  color: var(--accent);
}

.lede {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.55;
  color: #222;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 14px;
}

.display {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.section-title {
  font-size: 36px;
  font-weight: 700;
}

.double {
  border-top: 3px double var(--ink);
}

.stack > * + * {
  margin-top: 16px;
}

/* --- botones y formularios --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 22px;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font: 600 16px / 1.25 var(--sans);
  text-align: center;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
  background: var(--paper-alt);
  color: var(--ink);
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}

.btn.primary:hover {
  background: #a82614;
}

.btn.dark {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.btn.danger {
  border-color: var(--danger);
  color: var(--danger);
}

.btn.link {
  border: 0;
  background: none;
  padding: 0 8px;
  text-decoration: underline;
}

.btn.small {
  min-height: 44px;
  padding: 0 14px;
  font-size: 14px;
}

label {
  font-size: 14px;
  font-weight: 600;
}

input[type="text"],
input[type="search"],
input[type="email"],
input[type="url"],
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  padding: 0 12px;
  font: 400 16px / 1.4 var(--sans);
  color: var(--ink);
}

textarea {
  padding: 12px;
  resize: vertical;
}

input[type="radio"],
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  margin: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hint {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.error {
  color: var(--danger);
  font-size: 14px;
  line-height: 1.5;
}

.notice {
  background: var(--paper-alt);
  padding: 20px 24px;
}

.choice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid #bbb;
  cursor: pointer;
  font-weight: 400;
}

.choice:has(input:checked) {
  border: 2px solid var(--accent);
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.row > .grow {
  flex: 1 1 240px;
  min-width: 0;
}

.hp {
  display: none;
}

/* --- cabecera --- */

.strip {
  border-bottom: 1px solid var(--ink);
  font-size: 13px;
  color: var(--muted);
}

.strip .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 24px;
  padding-block: 8px;
}

.strip a {
  color: var(--accent);
  font-weight: 600;
}

.masthead {
  text-align: center;
  padding-top: 40px;
}

.logo {
  font-family: var(--serif);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: var(--ink);
}

.logo:hover {
  color: var(--ink);
  text-decoration: none;
}

.logo span {
  color: var(--accent);
}

.masthead .logo {
  font-size: clamp(56px, 10vw, 128px);
}

.masthead .tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  margin-top: 16px;
  color: #333;
}

.navbar {
  margin-top: 16px;
}

.home .navbar {
  margin-top: 32px;
}

.navbar .bar {
  border-top: 3px double var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 12px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.navbar .left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
}

.navbar .logo {
  font-size: 32px;
}

.navbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.navbar nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
}

.navbar nav a[aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.navbar nav a.alerts {
  color: var(--accent);
}

.search {
  display: flex;
  gap: 8px;
  flex: 0 1 340px;
}

.search input {
  min-height: 44px;
}

.search .btn {
  min-height: 44px;
}

/* main lleva tambien .wrap, que pone el padding a 0 24px: hace falta mas especificidad. */
main.wrap {
  padding-top: 40px;
  padding-bottom: 72px;
}

/* --- piezas de oferta --- */

.grid-jobs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  column-gap: 40px;
}

.piece {
  border-top: 1px solid var(--rule);
  padding: 20px 0 24px;
}

.piece .company {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.piece h3 {
  font-size: 23px;
  line-height: 1.2;
  font-weight: 600;
  margin-top: 8px;
}

.piece .meta {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}

.piece .meta .seen {
  color: var(--accent);
}

.list-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}

.list-row .main {
  flex: 999 1 380px;
  min-width: 0;
}

.list-row h3 {
  font-size: 23px;
  line-height: 1.2;
  font-weight: 600;
}

.list-row .side {
  flex: 1 1 120px;
  font-size: 14px;
  color: var(--accent);
  text-align: right;
}

.day {
  margin-top: 40px;
}

.day:first-child {
  margin-top: 0;
}

.day h2 {
  font-size: 28px;
  font-weight: 700;
  padding-bottom: 8px;
  border-bottom: 3px double var(--ink);
}

.day h2 small {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}

.more {
  margin-top: 24px;
  text-align: center;
}

.empty {
  font-family: var(--serif);
  font-size: 20px;
  color: #333;
  padding: 24px 0;
}

/* --- portada --- */

.lead {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--ink);
}

.lead .story {
  flex: 999 1 560px;
  min-width: 0;
}

.lead .story h1 {
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-top: 12px;
}

.lead .figure {
  flex: 1 1 300px;
  min-width: 0;
  border-left: 1px solid var(--rule);
  padding-left: 32px;
}

.big-number {
  font-family: var(--serif);
  font-size: 112px;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  margin-top: 12px;
}

.stats {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  font-size: 14px;
  color: var(--muted);
}

.stats strong {
  display: block;
  font-family: var(--serif);
  font-size: 24px;
  color: var(--ink);
}

.section {
  padding: 40px 0;
  border-bottom: 1px solid var(--ink);
}

.section:last-child {
  border-bottom: 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 24px;
}

.subscribe {
  background: var(--ink);
  color: #fff;
  padding: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 32px 48px;
  align-items: flex-start;
}

.subscribe > div {
  flex: 1 1 340px;
  min-width: 0;
}

.subscribe form {
  flex: 1 1 420px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.subscribe h2 {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.05;
  margin-top: 12px;
}

.subscribe .kicker {
  color: var(--accent-soft);
}

.subscribe .lede {
  color: #d9d9d9;
  margin-top: 16px;
}

.subscribe input {
  border: 0;
}

.subscribe .hint,
.subscribe .hint a {
  color: #d0d0d0;
}

.subscribe .hint a {
  text-decoration: underline;
}

.subscribe fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.subscribe legend {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.subscribe .check {
  font-size: 15px;
  min-height: 32px;
}

.index {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  column-gap: 40px;
}

.index-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  padding: 12px 0;
  border-bottom: 1px dotted #999;
}

.index-row .name {
  font-weight: 600;
  font-size: 17px;
}

.index-row .fill {
  flex: 1;
}

.index-row .count {
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.follow {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
}

.pillars > div {
  border-top: 3px solid var(--accent);
  padding-top: 16px;
}

.pillars h3 {
  font-family: var(--sans);
  font-size: 17px;
  letter-spacing: 0;
}

.pillars p {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  margin-top: 8px;
  color: #333;
}

/* --- maquetas a dos columnas --- */

.split {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: flex-start;
}

.split > .primary {
  flex: 999 1 600px;
  min-width: 0;
}

.split > .aside {
  flex: 1 1 320px;
  min-width: 0;
}

.dark-box {
  background: var(--ink);
  color: #fff;
  padding: 28px;
}

.dark-box .kicker {
  color: var(--accent-soft);
}

.dark-box h2 {
  font-size: 24px;
  line-height: 1.2;
  margin-top: 10px;
}

.dark-box input {
  border: 0;
}

.dark-box .hint,
.dark-box .hint a {
  color: #d0d0d0;
}

.dark-box .btn {
  width: 100%;
  margin-top: 12px;
}

.dark-box .btn.ghost {
  background: transparent;
  color: #fff;
  border-color: #fff;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid currentColor;
  font-size: 14px;
}

.chip.on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.chip.warn {
  border-color: var(--accent);
  background: #fff4f2;
  color: var(--danger);
}

.chip .n {
  margin-left: 8px;
  font-weight: 600;
  color: var(--muted);
}

.chip.warn .n {
  color: var(--danger);
}

/* --- filtros del listado --- */

.filters {
  margin-top: 24px;
  padding: 16px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: flex-end;
}

.filters .field {
  flex: 1 1 200px;
  min-width: 0;
}

.filters .field.wide {
  flex: 2 1 280px;
}

/* --- ficha --- */

.crumbs {
  font-size: 14px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.facts {
  margin: 32px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.facts > div {
  padding: 16px 16px 16px 0;
}

.facts dt {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.facts dd {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-size: 20px;
}

.excerpt {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.6;
  color: #222;
  max-width: 720px;
  white-space: pre-line;
}

.apply {
  margin-top: 32px;
  padding: 24px;
  background: var(--paper-alt);
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
}

.apply p {
  flex: 1 1 240px;
}

.closed-title {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.badge.ok {
  border-color: var(--ok);
  color: var(--ok);
}

.badge.off {
  border-color: var(--muted);
  color: var(--muted);
}

/* --- empresa --- */

.company-head {
  margin-top: 24px;
  padding-bottom: 32px;
  border-bottom: 3px double var(--ink);
  display: flex;
  flex-wrap: wrap;
  gap: 24px 48px;
  align-items: flex-end;
  justify-content: space-between;
}

.company-head h1 {
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.company-head .numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: flex-end;
}

.number {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
}

.letter {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  padding-top: 20px;
}

/* --- alertas --- */

.steps {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.steps section {
  border-top: 1px solid var(--ink);
  padding-top: 20px;
}

.steps h2 {
  font-size: 28px;
  font-weight: 700;
}

.choices {
  border: 0;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.checks {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 4px 24px;
}

.checks .check {
  border-bottom: 1px dotted #bbb;
}

.preview {
  background: var(--paper-alt);
  padding: 28px;
}

.preview ol {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}

.preview li {
  border-top: 1px solid #d6d3cc;
  padding: 14px 0;
}

.preview li a {
  display: block;
  margin-top: 4px;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.25;
  font-weight: 600;
}

.alert-card {
  border: 1px solid var(--ink);
  padding: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  align-items: flex-start;
}

.alert-card.paused {
  background: var(--paper-alt);
}

.alert-card .body {
  flex: 999 1 480px;
  min-width: 0;
}

.alert-card h2 {
  font-size: 26px;
  line-height: 1.2;
  margin-top: 12px;
}

.alert-card .actions {
  flex: 1 1 220px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.alert-card form {
  display: contents;
}

.centered {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.narrow {
  max-width: 640px;
}

.summary {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px 16px;
  font-size: 16px;
}

.summary dt {
  font-weight: 600;
}

.summary dd {
  margin: 0;
}

/* --- paginas de texto (legal, como funciona) --- */

.doc {
  max-width: 760px;
}

.doc h2 {
  font-size: 26px;
  font-weight: 700;
  margin-top: 36px;
}

.doc p {
  font-size: 17px;
  line-height: 1.65;
  color: #222;
  margin-top: 10px;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 15px;
}

.side-nav a {
  min-height: 36px;
  display: flex;
  align-items: center;
}

nav.side-nav a[aria-current="page"] {
  font-weight: 700;
  color: var(--accent);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--ink);
  margin-top: 28px;
}

table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 15px;
}

th,
td {
  padding: 12px 16px;
  text-align: left;
}

thead tr {
  background: var(--paper-alt);
}

tbody tr {
  border-top: 1px solid var(--rule);
}

.numbered {
  list-style: none;
  padding: 0;
  margin: 56px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
}

.numbered li {
  border-top: 3px solid var(--ink);
  padding-top: 16px;
}

.numbered .n {
  font-family: var(--serif);
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
}

.numbered h2 {
  font-family: var(--sans);
  font-size: 19px;
  margin-top: 12px;
  letter-spacing: 0;
}

.numbered p {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  margin-top: 8px;
  color: #333;
}

details {
  border-bottom: 1px solid var(--rule);
}

summary {
  cursor: pointer;
  padding: 20px 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
}

details p {
  margin: 0 0 20px;
  font-size: 17px;
  line-height: 1.6;
  color: #333;
}

.four04 {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: center;
}

.four04 .num {
  font-family: var(--serif);
  font-size: clamp(120px, 18vw, 240px);
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.05em;
  color: var(--accent);
}

/* --- pie --- */

footer.site {
  background: var(--ink);
  color: #e8e8e8;
}

footer.site .top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px 32px;
  padding-block: 32px 20px;
  font-size: 14px;
}

footer.site .top .logo {
  font-size: 28px;
  color: #fff;
}

footer.site .top span:last-child {
  max-width: 560px;
  line-height: 1.5;
}

footer.site .links {
  border-top: 1px solid #333;
}

footer.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  padding-block: 8px 24px;
  font-size: 14px;
}

footer.site nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

footer.site a:hover {
  color: #fff;
}

@media (max-width: 640px) {
  .lead .figure {
    border-left: 0;
    padding-left: 0;
  }

  .subscribe,
  .dark-box,
  .preview {
    padding: 24px;
  }

  .big-number {
    font-size: 80px;
  }

  .summary {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
