/* The Spanish tutoring-poster editor, /es/plantillas-cartel/. Moved out of
   the page's <style> block (task #7014). */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1C1917;
  background: #F5F5F4;
}
.top {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 20px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.logo { font-weight: 800; font-size: 22px; color: #EA580C; text-decoration: none; }
.back { color: #57534E; font-size: 14px; }
.layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
}
h1 { font-size: 22px; line-height: 1.25; margin: 0 0 8px; }
.lead { font-size: 14px; color: #57534E; line-height: 1.5; margin: 0 0 16px; }
.panel {
  background: #fff;
  border: 1px solid #E7E5E4;
  border-radius: 12px;
  padding: 16px;
  position: sticky;
  top: 16px;
}
.panel label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; }
.panel input {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 9px 10px;
  border: 1px solid #D6D3D1;
  border-radius: 8px;
}
.models { display: grid; gap: 6px; }
.models button {
  font: inherit;
  font-size: 14px;
  text-align: left;
  padding: 8px 10px;
  border: 1px solid #E7E5E4;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.models button[aria-pressed="true"] { border-color: #1C1917; font-weight: 600; }
.hint { font-size: 12px; color: #78716C; line-height: 1.45; margin: 8px 0 0; }
.print {
  width: 100%;
  margin-top: 18px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 11px;
  border: 0;
  border-radius: 8px;
  background: #C2410C;
  color: #fff;
  cursor: pointer;
}
.reset {
  width: 100%;
  margin-top: 8px;
  font: inherit;
  font-size: 13px;
  padding: 6px;
  border: 0;
  background: none;
  color: #78716C;
  text-decoration: underline;
  cursor: pointer;
}
.sheet-wrap { min-width: 0; }
/* The sheet is laid out at true A4 size and scaled with `zoom` to the
   column, so the screen and the printout wrap text at the same places. */
.sheet-zoom { width: 210mm; }

/* ── The poster itself ── */
.poster {
  width: 210mm;
  height: 297mm;
  background: #fff;
  color: #000;
  font-family: Arial, Helvetica, "Liberation Sans", sans-serif;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
  overflow: hidden;
  position: relative;
}
.poster-body {
  flex: 1;
  min-height: 0;
  padding: 18mm 16mm 8mm;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  font-size: calc(10mm * var(--fit, 1));
}
.poster [contenteditable] { outline: none; border-radius: 2mm; }
.poster [contenteditable]:hover,
.poster [contenteditable]:focus { box-shadow: 0 0 0 1.5px #FDBA74; }
.p-title { font-size: 2.1em; font-weight: 700; line-height: 1.05; text-transform: uppercase; letter-spacing: -0.01em; }
.p-sub { font-size: 1.05em; font-weight: 700; margin-top: 0.5em; line-height: 1.25; }
.p-info { font-size: 0.82em; line-height: 1.45; }
.p-info b { font-weight: 700; }
.p-cta { font-size: 0.72em; }
.p-phone { font-size: 1.55em; font-weight: 700; letter-spacing: 0.02em; margin-top: 0.15em; white-space: nowrap; }
.tabs {
  height: 62mm;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  border-top: 0.6mm dashed #000;
  position: relative;
}
.tabs::before {
  content: "\2702";
  position: absolute;
  top: -3.4mm;
  left: 4mm;
  font-size: 5mm;
  line-height: 1;
  background: #fff;
  padding: 0 1mm;
}
.tab {
  border-left: 0.4mm dashed #000;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5mm;
  text-align: center;
  overflow: hidden;
}
.tab:last-child { border-left: 0; }
.tab-label { font-size: 3.6mm; }
.tab-phone { font-size: 5.2mm; font-weight: 700; white-space: nowrap; }
.credit { display: none; }
/* Previews rendered for the article (?preview) carry the source URL so a
   picture found in Google Images leads back here; the printout does not. */
.is-preview .credit {
  display: block;
  position: absolute;
  top: 5mm;
  right: 6mm;
  font-size: 3.2mm;
  color: #A8A29E;
}

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .panel { position: static; }
}

@page { size: A4; margin: 0; }
@media print {
  body { background: #fff; }
  .top, .panel, .footer, .no-print { display: none !important; }
  .layout { display: block; padding: 0; max-width: none; }
  .sheet-zoom { zoom: 1 !important; }
  .poster { box-shadow: none; }
  .poster [contenteditable] { box-shadow: none !important; }
}

.is-preview body, body.is-preview { background: #fff; }
body.is-preview .top, body.is-preview .panel, body.is-preview .footer { display: none; }
body.is-preview .layout { display: block; padding: 0; max-width: none; }
body.is-preview .poster { box-shadow: none; }
