/* PDFine — estilo tipo RingoQuiz (oscuro + claro). */

:root{
  --bg0:#0b0f22;
  --bg1:#141a34;
  --glow1: rgba(143, 87, 255, 0.55);
  --glow2: rgba(0, 210, 255, 0.35);

  --glass: rgba(18, 22, 42, 0.78);
  --glass2: rgba(18, 22, 42, 0.62);
  --stroke: rgba(255,255,255,0.10);

  --text: rgba(245,246,255,0.92);
  --muted: rgba(245,246,255,0.62);

  --primary: #6f63ff;
  --primary2: #8c74ff;

  --shadow: 0 18px 60px rgba(0,0,0,0.45);
  --radius: 28px;

  --safeTop: env(safe-area-inset-top, 0px);
  --safeBottom: env(safe-area-inset-bottom, 0px);
  --safeLeft: env(safe-area-inset-left, 0px);
  --safeRight: env(safe-area-inset-right, 0px);
  --viewportH: 100vh;
  --editTextToolsBarHeight: 0px;
  --editTextInkBarHeight: 0px;
  --helpModalTopOffset: 0px;
  --uiScale: 1;
}

/* Modo claro: mismos colores, más claros */
html.light{
  --bg0:#f1f3ff;
  --bg1:#e8ebff;
  --glow1: rgba(143, 87, 255, 0.30);
  --glow2: rgba(0, 210, 255, 0.22);

  --glass: rgba(255,255,255,0.72);
  --glass2: rgba(255,255,255,0.58);
  --stroke: rgba(10, 14, 28, 0.10);

  --text: rgba(10, 14, 28, 0.92);
  --muted: rgba(10, 14, 28, 0.62);

  --shadow: 0 18px 50px rgba(0,0,0,0.18);
}

*{ box-sizing:border-box; }
[hidden]{ display:none !important; }
html,body{ height:100%; }
html{
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: clamp(15px, calc(17px * var(--uiScale)), 19px);
  line-height: 1.4;
  color:var(--text);
  background:
    radial-gradient(1200px 900px at 25% 20%, var(--glow1), transparent 60%),
    radial-gradient(1100px 800px at 80% 30%, var(--glow2), transparent 55%),
    radial-gradient(900px 900px at 55% 85%, rgba(255,255,255,0.06), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  overflow-x: hidden;
  padding: calc(18px + var(--safeTop)) calc(18px + var(--safeRight)) calc(18px + var(--safeBottom)) calc(18px + var(--safeLeft));
}
body.appScrollLocked{
  overscroll-behavior: none;
  touch-action: none;
}
body.appScrollLocked .previewViewerModal,
body.appScrollLocked #helpModal{
  touch-action: auto;
}

button, input, select, textarea{
  font: inherit;
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: max(calc(12px * var(--uiScale)), 10px);
  padding: max(calc(14px * var(--uiScale)), 12px) max(calc(16px * var(--uiScale)), 14px);
  border-radius: max(calc(22px * var(--uiScale)), 18px);
  background: var(--glass2);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: var(--safeTop);
  z-index: 92;
  overflow: visible;
  min-width: 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
  letter-spacing:0.2px;
  min-width: 0;
}
.brand > span{
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brandBtn{
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  margin: 0;
  cursor: pointer;
}
.brandBtn:active{ transform: translateY(1px); }
.brandLogo{
  width: 22px;
  height: 22px;
  border-radius: 7px;
  object-fit: cover;
  box-shadow: 0 0 18px rgba(143,87,255,0.45);
}
.dot{
  width:10px;height:10px;border-radius:999px;
  background: radial-gradient(circle at 30% 30%, #ff6bff, #6f63ff 55%, #00d2ff);
  box-shadow: 0 0 18px rgba(143,87,255,0.45);
}

.actions{
  display:flex;
  align-items: center;
  gap: calc(10px * var(--uiScale));
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  min-width: 0;
}
.actions > *{
  flex: 0 0 auto;
}
.topbarCluster{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: max(calc(8px * var(--uiScale)), 6px);
  padding: max(calc(4px * var(--uiScale)), 3px);
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.topbarClusterStatus{
  padding-right: max(calc(6px * var(--uiScale)), 5px);
}
.topbarClusterActions{
  padding-right: max(calc(4px * var(--uiScale)), 3px);
}
html.light .topbarCluster{
  border-color: rgba(25, 52, 90, 0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.82), rgba(224,233,255,0.5));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.62);
}
.topbar .actions .iconbtn[data-label]::after{
  content: none;
}
.topbarPlanBadge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: max(calc(52px * var(--uiScale)), 48px);
  min-height: max(calc(30px * var(--uiScale)), 28px);
  padding: 0 max(calc(10px * var(--uiScale)), 9px);
  border-radius: 999px;
  border: 1px solid rgba(255, 206, 92, 0.56);
  background: rgba(255, 206, 92, 0.16);
  color: #ffe8a2;
  font-size: max(calc(11px * var(--uiScale)), 10px);
  font-weight: 900;
  letter-spacing: 0.4px;
  line-height: 1;
  white-space: nowrap;
}
.topbarPlanBadge[data-plan="free"]{
  border-color: rgba(120, 220, 255, 0.46);
  background: rgba(120, 220, 255, 0.14);
  color: #cdefff;
}
.topbarPlanBadge[data-plan="studio"]{
  border-color: rgba(196, 143, 255, 0.54);
  background: rgba(196, 143, 255, 0.16);
  color: #f0dbff;
}
.visualModeBtn{
  font-weight: 900;
  letter-spacing: 0.2px;
}
.visualModeBtn[data-mode="simple"]{
  border-color: rgba(120, 220, 155, 0.42);
  background: rgba(120, 220, 155, 0.14);
  color: #ddffe9;
}
.visualModeBtn[data-mode="advanced"]{
  border-color: rgba(255, 208, 128, 0.46);
  background: rgba(255, 208, 128, 0.15);
  color: #ffe7bc;
}
html.light .topbarPlanBadge{
  border-color: rgba(160, 116, 0, 0.42);
  background: rgba(255, 214, 106, 0.22);
  color: rgba(80, 54, 0, 0.95);
}
html.light .topbarPlanBadge[data-plan="free"]{
  border-color: rgba(40, 120, 180, 0.38);
  background: rgba(120, 220, 255, 0.22);
  color: rgba(10, 45, 76, 0.95);
}
html.light .topbarPlanBadge[data-plan="studio"]{
  border-color: rgba(133, 88, 190, 0.4);
  background: rgba(196, 143, 255, 0.24);
  color: rgba(65, 31, 113, 0.95);
}
html.light .visualModeBtn[data-mode="simple"]{
  border-color: rgba(22, 138, 74, 0.28);
  background: rgba(120, 220, 155, 0.2);
  color: rgba(12, 82, 44, 0.96);
}
html.light .visualModeBtn[data-mode="advanced"]{
  border-color: rgba(170, 112, 20, 0.3);
  background: rgba(255, 214, 106, 0.24);
  color: rgba(92, 57, 0, 0.96);
}

@media (min-width: 1220px) and (pointer: fine){
  .topbar .actions{
    gap: calc(8px * var(--uiScale));
  }
  .topbar .actions .iconbtn[data-label]{
    width: auto;
    min-width: max(calc(44px * var(--uiScale)), 40px);
    padding: 0 12px 0 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
  }
  .topbar .actions .iconbtn[data-label]::after{
    content: attr(data-label);
    display: inline-block;
    font-size: max(calc(12px * var(--uiScale)), 11px);
    letter-spacing: 0.2px;
    font-weight: 800;
    line-height: 1;
    opacity: 0.92;
    margin-top: 1px;
  }
}

.iconbtn{
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border-radius: 999px;
  width: max(calc(44px * var(--uiScale)), 40px);
  height: max(calc(44px * var(--uiScale)), 40px);
  display:grid;
  place-items:center;
  font-size: max(calc(18px * var(--uiScale)), 15px);
  cursor:pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.iconbtn:active{ transform: translateY(1px); }
.iconbtn.isActive{
  border-color: rgba(89, 224, 160, 0.65);
  background: rgba(89, 224, 160, 0.18);
  color: #e9fff4;
}
html.light .iconbtn.isActive{
  color: rgba(6, 47, 27, 0.95);
}
.uiScaleWrap{
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 130;
}
.langSwitchWrap{
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 131;
}
.langToggleBtn{
  min-width: max(calc(52px * var(--uiScale)), 46px);
  padding: 0 max(calc(10px * var(--uiScale)), 9px);
  font-size: max(calc(12px * var(--uiScale)), 11px);
  font-weight: 900;
  letter-spacing: 0.5px;
}
.uiScaleBtn{
  font-size: 15px !important;
  font-weight: 900;
  letter-spacing: 0.2px;
  opacity: 0.72;
  background: rgba(255,255,255,0.1);
}
.uiScaleBtn:hover,
.uiScaleBtn:focus-visible{
  opacity: 0.95;
}
.uiScalePanel{
  position: fixed;
  top: 0;
  left: 0;
  z-index: 250;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, auto));
  gap: 6px;
  padding: 7px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(36,44,90,0.9), rgba(22,28,70,0.9));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 22px rgba(0,0,0,0.3);
}
.uiScaleActionBtn{
  min-height: 32px;
  min-width: 44px;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
#btnUiScaleReset{
  min-width: 56px;
}

.strictBanner{
  max-width: 1180px;
  margin: 10px auto 0;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(89, 224, 160, 0.5);
  background: rgba(22, 90, 58, 0.3);
  color: rgba(230, 255, 244, 0.95);
  font-size: 14px;
  line-height: 1.35;
}
html.light .strictBanner{
  background: rgba(89, 224, 160, 0.22);
  color: rgba(8, 45, 27, 0.95);
}

.screen{
  max-width: 1180px;
  margin: 14px auto 0;
}
.screen[hidden]{ display:none !important; }
.siteFooter{
  max-width: 1180px;
  margin: 14px auto 0;
  padding: 12px 14px calc(12px + var(--safeBottom));
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: var(--glass2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.siteFooterNav{
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}
.siteFooterNav a{
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: calc(14px * var(--uiScale));
  opacity: 0.9;
}
.siteFooterNav a:visited{
  color: var(--text);
}
.legalFooterLink{
  display: inline-flex;
  align-items: center;
  min-height: calc(38px * var(--uiScale));
  padding: calc(10px * var(--uiScale)) calc(14px * var(--uiScale));
  text-decoration: none;
  white-space: nowrap;
}
.siteFooterNav a:hover,
.siteFooterNav a:focus-visible{
  opacity: 1;
  text-decoration: underline;
}
.siteFooterCopy{
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

/* Card base */
.card{
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow:hidden;
}

/* “Modal RingoQuiz” layout reutilizable */
.ringoModal{
  display:grid;
  grid-template-columns: 360px 1fr;
  min-height: 360px;
}
.ringoLeft{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)),
    radial-gradient(700px 500px at 40% 30%, rgba(143,87,255,0.35), transparent 60%),
    radial-gradient(700px 500px at 70% 70%, rgba(0,210,255,0.22), transparent 60%);
  border-right: 1px solid var(--stroke);
  display:grid;
  place-items:center;
  padding: 22px;
}
.appIcon{
  width: 96px;
  height: 96px;
  border-radius: 26px;
  position: relative;
  display:grid;
  place-items:center;
  font-weight:900;
  letter-spacing:0.6px;
  background: rgba(255,255,255,0.10);
  border: 1px solid var(--stroke);
  box-shadow: 0 16px 50px rgba(0,0,0,0.25);
  overflow: hidden;
}
.appIconLogo{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.appIconLogo[hidden]{
  display: none !important;
}
.appIconFallback{
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 900;
  letter-spacing: 0.4px;
}
.appIconFallback[hidden]{
  display: none !important;
}
.ringoRight{
  padding: 26px 26px 22px;
}

/* Welcome specifics */
.hero h1{
  font-size: calc(54px * var(--uiScale));
  line-height: 1;
  margin: 6px 0 12px;
}
.lead{
  margin: 0 0 18px;
  color: var(--muted);
  font-size: calc(18px * var(--uiScale));
}
.homeHeroSignals{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -2px 0 12px;
}
.homeHeroSignal{
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(120, 220, 255, 0.42);
  background: rgba(120, 220, 255, 0.11);
  color: rgba(230, 249, 255, 0.96);
  font-size: 12px;
  font-weight: 800;
}
.ctaRow{
  display:flex;
  flex-wrap:wrap;
  gap: 12px;
  margin: 16px 0 6px;
}
.homeCtaHint{
  margin: 0 0 8px;
}
.note{
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--stroke);
  color: var(--muted);
}
.homeValueSection{
  margin-top: 14px;
  display: grid;
  gap: 12px;
}
.homeValueIntro{
  display: grid;
  gap: 6px;
}
.homeValueGrid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.homeValueCard{
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.homeValueCard strong{
  line-height: 1.25;
}
.homeQuickStartSection{
  display: grid;
  gap: 8px;
}
.homeQuickStartGrid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.homeQuickStartBtn{
  justify-content: center;
  text-align: center;
  min-height: 44px;
}
.homeQuickStartBtnPrimary{
  grid-column: 1 / -1;
}
.homeTrustSection{
  margin-top: 14px;
  display: grid;
  gap: 12px;
  content-visibility: auto;
  contain-intrinsic-size: 360px;
}
.homeTrustIntro{
  display: grid;
  gap: 6px;
}
.homeTrustGrid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.homeTrustCard{
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.homeTrustCard strong{
  line-height: 1.25;
}
.homeUseCasesSection{
  margin-top: 14px;
  display: grid;
  gap: 12px;
  content-visibility: auto;
  contain-intrinsic-size: 360px;
}
.homeUseCasesIntro{
  display: grid;
  gap: 6px;
}
.homeUseCasesGrid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.homeUseCasesCard{
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.homeUseCasesCard strong{
  line-height: 1.25;
}
html[data-visual-mode="simple"] .homeTrustSection,
html[data-visual-mode="simple"] .homeUseCasesSection,
html[data-visual-mode="simple"] #toolsAccessSummary,
html[data-visual-mode="simple"] #toolsFiltersDetails,
html[data-visual-mode="simple"] .openPdfHubRecommendationSafe,
html[data-visual-mode="simple"] .openPdfHubRecommendationAlt{
  display: none !important;
}
html.light .homeHeroSignal{
  border-color: rgba(49, 104, 168, 0.24);
  background: rgba(89, 144, 255, 0.1);
  color: rgba(15, 35, 62, 0.9);
}
html.light .homeValueCard{
  border-color: rgba(10,14,28,0.14);
  background: rgba(255,255,255,0.72);
}
html.light .homeTrustCard{
  border-color: rgba(10,14,28,0.14);
  background: rgba(255,255,255,0.72);
}
html.light .homeUseCasesCard{
  border-color: rgba(10,14,28,0.14);
  background: rgba(255,255,255,0.72);
}

/* Panel */
.panel{
  padding: 20px 20px 16px;
}
.row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.row > h2,
.row > .subTitle{
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.row > .ghost,
.row > .primary{
  flex: 0 0 auto;
  max-width: 100%;
  white-space: nowrap;
}
h2{
  margin: 0;
  font-size: calc(30px * var(--uiScale));
  letter-spacing: 0.2px;
}
.subTitle{
  margin: 0;
  font-size: calc(20px * var(--uiScale));
  letter-spacing: 0.15px;
}

.primary, .ghost{
  border-radius: 999px;
  padding: calc(12px * var(--uiScale)) calc(18px * var(--uiScale));
  min-height: calc(46px * var(--uiScale));
  line-height: 1.1;
  font-weight: 800;
  border: 1px solid var(--stroke);
  cursor:pointer;
  user-select:none;
}
.primary{
  background: linear-gradient(90deg, var(--primary), var(--primary2));
  color: white;
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 14px 40px rgba(111,99,255,0.25);
}
.primary:disabled{ opacity:0.55; filter:saturate(0.5); cursor:not-allowed; }

.ghost{
  background: rgba(255,255,255,0.06);
  color: var(--text);
}
.ghost:disabled{ opacity:0.55; cursor:not-allowed; }
.uiScalePanel .uiScaleActionBtn{
  min-height: 32px;
  min-width: 44px;
  border-radius: 10px;
  padding: 6px 10px;
  line-height: 1;
}


@media (max-width: 920px){
  .topbar{
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(18, 22, 42, 0.9);
  }
  html.light .topbar{
    background: rgba(255,255,255,0.92);
  }
  #welcome .card.hero{
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(18, 22, 42, 0.9);
    box-shadow: 0 14px 38px rgba(0,0,0,0.34);
  }
  html.light #welcome .card.hero{
    background: rgba(255,255,255,0.94);
    box-shadow: 0 12px 28px rgba(15, 24, 45, 0.12);
  }
  #welcome .ringoLeft{
    background:
      linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)),
      radial-gradient(520px 360px at 40% 30%, rgba(143,87,255,0.24), transparent 62%),
      radial-gradient(520px 360px at 70% 70%, rgba(0,210,255,0.16), transparent 62%);
  }
  .homeUseCasesGrid{ grid-template-columns: 1fr; }
  .homeTrustGrid{ grid-template-columns: 1fr; }
  .ringoModal{ grid-template-columns: 1fr; }
  .ringoLeft{ border-right:none; border-bottom: 1px solid var(--stroke); min-height: 180px; }
  .hero h1{ font-size: 46px; }
  .topbar{
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 18px;
  }
  .brand{
    flex: 1 1 auto;
    gap: 8px;
    max-width: none;
  }
  .brand > span{
    font-size: max(calc(17px * var(--uiScale)), 15px);
  }
  .actions{
    width: 100%;
    flex: 1 1 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
  }
  .topbarCluster{
    max-width: 100%;
    min-width: 0;
    gap: 5px;
    padding: 3px;
  }
  .topbarClusterStatus{
    flex: 0 0 auto;
    padding-right: 4px;
  }
  .topbarClusterActions{
    flex: 1 1 auto;
    justify-content: flex-end;
    min-width: 0;
    padding-right: 3px;
  }
  .actions .iconbtn{
    width: max(calc(42px * var(--uiScale)), 38px);
    height: max(calc(42px * var(--uiScale)), 38px);
    font-size: max(calc(17px * var(--uiScale)), 15px);
  }
  .langToggleBtn{
    min-width: max(calc(48px * var(--uiScale)), 44px);
    padding: 0 10px;
    font-size: max(calc(11px * var(--uiScale)), 10px);
  }
  .topbarPlanBadge{
    min-height: max(calc(28px * var(--uiScale)), 26px);
    padding: 0 max(calc(8px * var(--uiScale)), 7px);
    font-size: max(calc(10px * var(--uiScale)), 9px);
  }
}

@media (min-width: 1024px) and (pointer: fine){
  .topbar{
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(18, 22, 42, 0.9);
  }
  html.light .topbar{
    background: rgba(255,255,255,0.92);
  }
  #welcome .card.hero{
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(18, 22, 42, 0.9);
    box-shadow: 0 14px 38px rgba(0,0,0,0.34);
  }
  html.light #welcome .card.hero{
    background: rgba(255,255,255,0.94);
    box-shadow: 0 12px 28px rgba(15, 24, 45, 0.12);
  }
  #welcome .ringoLeft{
    background:
      linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)),
      radial-gradient(520px 360px at 40% 30%, rgba(143,87,255,0.24), transparent 62%),
      radial-gradient(520px 360px at 70% 70%, rgba(0,210,255,0.16), transparent 62%);
  }
}

@media (max-width: 520px){
  body{
    padding:
      calc(10px + var(--safeTop))
      max(8px, var(--safeRight))
      calc(10px + var(--safeBottom))
      max(8px, var(--safeLeft));
  }
  .topbar{
    gap: 6px;
    padding: 9px 8px;
  }
  .brand{
    gap: 8px;
    flex-basis: 100%;
    max-width: none;
  }
  .actions{
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .topbarCluster{
    gap: 4px;
    padding: 3px;
  }
  .topbarClusterStatus{
    align-self: flex-start;
    width: fit-content;
    padding-right: 4px;
  }
  .topbarClusterActions{
    width: 100%;
    justify-content: space-between;
    padding-right: 3px;
  }
  .actions .iconbtn{
    width: max(calc(40px * var(--uiScale)), 36px);
    height: max(calc(40px * var(--uiScale)), 36px);
    font-size: max(calc(16px * var(--uiScale)), 14px);
  }
  .langToggleBtn{
    min-width: max(calc(44px * var(--uiScale)), 40px);
    padding: 0 8px;
    font-size: max(calc(11px * var(--uiScale)), 10px);
  }
  .uiScaleBtn{
    font-size: 14px !important;
  }
}

/* PDFine · primera pintura con el lenguaje visual de «de Barrameda». */
:root{
  --bg0:#121617;
  --bg1:#121617;
  --glow1:transparent;
  --glow2:transparent;
  --glass:#191e1f;
  --glass2:rgba(18,22,23,.9);
  --stroke:#343b3b;
  --text:#f0ede6;
  --muted:#aeb5b1;
  --primary:#7eaaad;
  --primary2:#6f999c;
  --shadow:0 18px 45px rgba(0,0,0,.2);
  --radius:3px 24px 3px 24px;
  --pdfine-surface:#191e1f;
  --pdfine-surface-2:#222829;
  --pdfine-accent-soft:#253536;
  --pdfine-accent-strong:#a9cacc;
}
html.light{
  --bg0:#f6f3ed;
  --bg1:#f6f3ed;
  --glow1:transparent;
  --glow2:transparent;
  --glass:#fffdf9;
  --glass2:rgba(246,243,237,.9);
  --stroke:#d9d3c8;
  --text:#202626;
  --muted:#68706d;
  --primary:#315f63;
  --primary2:#244b4f;
  --shadow:0 18px 45px rgba(32,38,38,.07);
  --pdfine-surface:#fffdf9;
  --pdfine-surface-2:#eee9df;
  --pdfine-accent-soft:#dce8e6;
  --pdfine-accent-strong:#244b4f;
}
body{
  background:var(--bg0);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  line-height:1.58;
  padding:calc(10px + var(--safeTop)) calc(24px + var(--safeRight)) calc(24px + var(--safeBottom)) calc(24px + var(--safeLeft));
}
.topbar{
  max-width:1240px;
  min-height:66px;
  margin:0 auto;
  padding:10px 0;
  border:0;
  border-bottom:1px solid var(--stroke);
  border-radius:0;
  background:color-mix(in srgb,var(--bg0) 88%,transparent);
  box-shadow:none;
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}
.brand{font-weight:700;letter-spacing:-.035em}.brand>span{font-size:1.24rem}
.brandLogo{width:30px;height:30px;border-radius:50% 50% 50% 9px;box-shadow:none}
.topbarCluster,html.light .topbarCluster{padding:0;border:0;background:transparent;box-shadow:none}
.iconbtn,.langToggleBtn{width:39px;min-width:39px;height:39px;min-height:39px;border:1px solid var(--stroke);border-radius:999px;background:var(--pdfine-surface);color:var(--text);box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;font-size:.92rem}
.topbarPlanBadge,.topbarPlanBadge[data-plan="free"],.topbarPlanBadge[data-plan="studio"]{min-height:31px;border:1px solid var(--stroke);background:var(--pdfine-surface);color:var(--muted);box-shadow:none}
.screen{max-width:1240px;margin:0 auto;padding-top:50px}
.card{border:1px solid var(--stroke);border-radius:var(--radius);background:var(--pdfine-surface);box-shadow:var(--shadow);backdrop-filter:none;-webkit-backdrop-filter:none}
#welcome .card.hero{background:var(--pdfine-surface)}
.ringoModal{grid-template-columns:minmax(270px,.78fr) minmax(0,1.22fr);min-height:500px}
.ringoLeft{min-height:500px;padding:42px;border-right:1px solid var(--stroke);background:var(--pdfine-surface-2)}
.appIcon{width:132px;height:132px;border:1px solid var(--stroke);border-radius:3px 30px 3px 30px;background:var(--pdfine-surface);box-shadow:var(--shadow)}
.ringoRight{display:flex;flex-direction:column;justify-content:center;padding:54px clamp(30px,5vw,68px)}
.hero h1{margin:.05em 0 .22em;font-family:Georgia,"Times New Roman",serif;font-size:clamp(3.6rem,8vw,7rem);font-weight:520;line-height:.9;letter-spacing:-.064em}
.lead{max-width:680px;margin:0 0 20px;color:var(--muted);font-size:clamp(1.05rem,1.8vw,1.24rem);line-height:1.55}
.homeHeroSignals{gap:8px;margin:0 0 18px}.homeHeroSignal{min-height:auto;padding:5px 9px;border:0;border-radius:999px;background:var(--pdfine-accent-soft);color:var(--pdfine-accent-strong);font-size:.7rem;font-weight:800;letter-spacing:.09em;text-transform:uppercase}
.primary,.ghost{min-height:44px;padding:11px 18px;border-radius:999px;font-size:.92rem;font-weight:750;box-shadow:none}.primary{border-color:var(--primary);background:var(--primary);color:#fff}.ghost{border-color:var(--stroke);background:var(--pdfine-surface);color:var(--text)}
.homeValueSection{margin-top:22px;padding-top:22px;border-top:1px solid var(--stroke)}
html[data-visual-mode="simple"] #welcome .homeValueIntro,html[data-visual-mode="simple"] #welcome .homeValueGrid,html[data-visual-mode="simple"] #homeCtaHint,html[data-visual-mode="simple"] #homeQuickStartLead{display:none!important}
html[data-visual-mode="simple"] #welcome .homeQuickStartGrid{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:900px){body{padding:calc(8px + var(--safeTop)) calc(16px + var(--safeRight)) calc(18px + var(--safeBottom)) calc(16px + var(--safeLeft))}.ringoModal{grid-template-columns:1fr;min-height:0}.ringoLeft{min-height:210px;border-right:0;border-bottom:1px solid var(--stroke)}.ringoRight{padding:36px 28px 32px}}
@media(max-width:640px){.screen{padding-top:24px}.ringoLeft{min-height:164px;padding:24px}.appIcon{width:92px;height:92px}.ringoRight{padding:28px 22px 24px}html[data-visual-mode="simple"] #welcome .homeQuickStartGrid{grid-template-columns:1fr}}


/* Primera pintura: el atributo hidden mantiene el buscador fuera hasta cargar un PDF. */
.globalPdfSearchDock[hidden]{display:none!important}
html.light .topbarPlanBadge,
html.light .topbarPlanBadge[data-plan="free"],
html.light .topbarPlanBadge[data-plan="studio"],
.topbarPlanBadge,
.topbarPlanBadge[data-plan="free"],
.topbarPlanBadge[data-plan="studio"]{
  border-color:var(--stroke);
  background:var(--pdfine-surface);
  color:var(--muted);
  box-shadow:none;
}
.uiScalePanel,
html.light .uiScalePanel,
.languagePanel,
html.light .languagePanel{
  border-color:var(--stroke);
  background:var(--pdfine-surface);
  color:var(--text);
  box-shadow:var(--shadow);
}
